MorpheusAI

MorpheusAI
Foundry
22,500 USDC
View results
Submission Details
Severity: low
Invalid

Use of deprecated 'safeApprove' functions in L2TokenReceiver contract, may result in locking of funds and unintended reverts.

Summary

Openzeppelin has deprecated several functions and replaced with newer versions, with safeApprove being one of them.

Vulnerability Details

safeApprove() has been deprecated and the official OpenZeppelin documentation recommends using safeIncreaseAllowance() & safeDecreaseAllowance().

A deeper discussion on the deprecation of this function is in OZ issue #2219. The OpenZeppelin ERC20 safeApprove() function has been deprecated, as seen in the comments of the OpenZeppelin code.

There are 6 instances of this issue in contracts/L2TokenReceiver.sol.

Similar findings in other contests::

Impact

Using this deprecated function can lead to unintended reverts and potentially the locking of funds.

Tools Used

Manual Review.

Recommendations

Consider replacing safeApprove() with safeIncreaseAllowance() or safeDecreaseAl- lowance() instead (as suggested by the OpenZeppelin comment).

Updates

Lead Judging Commences

inallhonesty Lead Judge
over 1 year ago
inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Known issue

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.