Deprecated safeApprove() function #2
Labels
1 (Low Risk)
Assets are not at risk. State handling, function incorrect as to spec, issues with comments
bug
Something isn't working
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Handle
sirhashalot
Vulnerability details
The OpenZeppelin ERC20
safeApprove()
function has been deprecated, as seen in the comments of the OpenZeppelin code.Impact
Detailed description of the impact of this finding.
Using this deprecated function can lead to unintended reverts and potentially the locking of funds. A deeper discussion on the deprecation of this function is in OZ issue #2219.
Proof of Concept
The deprecated function is found in:
Tools Used
Manual analysis
Recommended Mitigation Steps
As suggested by the OpenZeppelin comment, replace
safeApprove()
withsafeIncreaseAllowance()
orsafeDecreaseAllowance()
instead.The text was updated successfully, but these errors were encountered: