Liquid Staking

Stakelink
DeFiHardhatOracle
50,000 USDC
View results
Submission Details
Severity: medium
Invalid

Do not use deprecated SafeApprove function

Summary

safeApprove function has been deprecated by OZ and it shouldn't be used.
This function has been used in PriorityPool.sol, WithdrawalPool.sol, StakingPool.sol, LSTRewardsSplitterController.sol, VaultControllerStrategy.sol contracts.

Vulnerability Details

The SafeERC20.sol contract suggests its usage is discouraged.

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

A deeper discussion on the deprecation of this function is in OZ issue below.

https://github.com/OpenZeppelin/openzeppelin-contracts/issues/2219

The OpenZeppelin ERC20 safeApprove() function has been deprecated, as seen in the comments of the OpenZeppelin code.

https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2268/files#diff-be4b7eb1bfdf20237036812b91fd14ccc3e7584ecb9d0b88a87ca6af12fd19c4R32

Impact

  • Medium

Tools Used

  • Manual Analysis

Recommendations

- Whenever possible, use safeIncreaseAllowance and safeDecreaseAllowance instead.

Updates

Lead Judging Commences

inallhonesty Lead Judge
11 months ago
inallhonesty Lead Judge 11 months ago
Submission Judgement Published
Invalidated
Reason: Known issue

Support

FAQs

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