This repository has been archived by the owner on Dec 17, 2023. It is now read-only.
IceBear - Deprecated safeApprove() function #27
Labels
Non-Reward
This issue will not receive a payout
IceBear
medium
Deprecated safeApprove() function
Summary
Deprecated safeApprove() function
Vulnerability Detail
The OpenZeppelin ERC20 safeApprove() function has been deprecated, as seen in the comments of the OpenZeppelin code.
Impact
safeApprove() is Deprecated because has issues similar to the ones found in {IERC20-approve}, and its usage is discouraged.
Read More: SafeERC20.safeApprove() Has unnecessary and unsecure added behavior
OpenZeppelin/openzeppelin-contracts#2219
Code Snippet
https://github.com/sherlock-audit/2023-05-ironbank/blob/main/ib-v2/src/flashLoan/FlashLoan.sol#L108
Tool used
Manual Review
Recommendation
As suggested by the OpenZeppelin comment, replace safeApprove() with safeIncreaseAllowance() or safeDecreaseAllowance() instead.
Duplicate of #420
The text was updated successfully, but these errors were encountered: