Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QA Report #192

Open
code423n4 opened this issue May 23, 2022 · 0 comments
Open

QA Report #192

code423n4 opened this issue May 23, 2022 · 0 comments
Labels
bug Something isn't working duplicate This issue or pull request already exists QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax

Comments

@code423n4
Copy link
Contributor

[L-01] safeApprove is deprecated

The _setupRole function is deprecated according to the Open Zeppelin comment
Deprecated. This function has issues similar to the ones found in {IERC20-approve}, and its usage is discouraged.

There are many safeApprove instances in code
https://github.com/code-423n4/2022-05-aura/blob/main/contracts/AuraLocker.sol#L240
https://github.com/code-423n4/2022-05-aura/blob/main/contracts/AuraLocker.sol#L241
https://github.com/code-423n4/2022-05-aura/blob/main/contracts/AuraMerkleDrop.sol#L131
https://github.com/code-423n4/2022-05-aura/blob/main/contracts/AuraMerkleDrop.sol#L132
https://github.com/code-423n4/2022-05-aura/blob/main/contracts/AuraStakingProxy.sol#L147
https://github.com/code-423n4/2022-05-aura/blob/main/contracts/AuraStakingProxy.sol#L148
https://github.com/code-423n4/2022-05-aura/blob/main/contracts/AuraStakingProxy.sol#L150
https://github.com/code-423n4/2022-05-aura/blob/main/contracts/AuraStakingProxy.sol#L151
https://github.com/code-423n4/2022-05-aura/blob/main/contracts/AuraStakingProxy.sol#L215
https://github.com/code-423n4/2022-05-aura/blob/main/contracts/AuraStakingProxy.sol#L216
https://github.com/code-423n4/2022-05-aura/blob/main/contracts/AuraPenaltyForwarder.sol#L41
https://github.com/code-423n4/2022-05-aura/blob/main/contracts/CrvDepositorWrapper.sol#L52
https://github.com/code-423n4/2022-05-aura/blob/main/contracts/CrvDepositorWrapper.sol#L53
https://github.com/code-423n4/2022-05-aura/blob/main/contracts/AuraClaimZap.sol#L98
https://github.com/code-423n4/2022-05-aura/blob/main/contracts/AuraClaimZap.sol#L99
https://github.com/code-423n4/2022-05-aura/blob/main/contracts/AuraClaimZap.sol#L101
https://github.com/code-423n4/2022-05-aura/blob/main/contracts/AuraClaimZap.sol#L102
https://github.com/code-423n4/2022-05-aura/blob/main/contracts/AuraClaimZap.sol#L104
https://github.com/code-423n4/2022-05-aura/blob/main/contracts/AuraClaimZap.sol#L105
https://github.com/code-423n4/2022-05-aura/blob/main/contracts/BalLiquidityProvider.sol#L59
https://github.com/code-423n4/2022-05-aura/blob/main/contracts/BalLiquidityProvider.sol#L60
https://github.com/code-423n4/2022-05-aura/blob/main/contracts/AuraVestedEscrow.sol#L186
https://github.com/code-423n4/2022-05-aura/blob/main/contracts/AuraBalRewardPool.sol#L75

This Open Zeppelin comment indicates it is deprecated
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/utils/SafeERC20.sol#L39-L43

Recommended Mitigation Steps

Replace safeApprove with {safeIncreaseAllowance} or {safeDecreaseAllowance} instead

@code423n4 code423n4 added bug Something isn't working QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax labels May 23, 2022
code423n4 added a commit that referenced this issue May 23, 2022
@0xMaharishi 0xMaharishi added the duplicate This issue or pull request already exists label May 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
Projects
None yet
Development

No branches or pull requests

2 participants