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 #25

Open
code423n4 opened this issue May 13, 2022 · 1 comment
Open

QA Report #25

code423n4 opened this issue May 13, 2022 · 1 comment
Labels
bug Something isn't working QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons

Comments

@code423n4
Copy link
Contributor

QA Report

File AuraLocker.sol

Unlocked pragma

Contracts should be deployed using the same compiler version/flags with which they have been tested. Locking the pragma (for e.g. by not using ^ in pragma solidity 0.5.10) ensures that contracts do not accidentally get deployed using an older compiler version with unfixed bugs.

L2

Mistake in comment

// User -> reward token -> amount
Should be
// User -> reward token -> userData
L78

Out possible lock by out of gas

If the loop in the modifier has to loop througt many rewardTokens the contract could end lockup

L173-L183

Avoid != on loop comparission

Source: https://github.com/crytic/slither/wiki/Detector-Documentation#dangerous-strict-equalities

recommendation
while (epochs[epochs.length - 1].date != currentEpoch) {
Change to:
while (epochs[epochs.length - 1].date < currentEpoch) {

L334

Critical functions dont emit events

Consider add events on this functions
addReward
approveRewardDistributor

File AuraBalRewardPool.sol

Unlocked pragma

Contracts should be deployed using the same compiler version/flags with which they have been tested. Locking the pragma (for e.g. by not using ^ in pragma solidity 0.5.10) ensures that contracts do not accidentally get deployed using an older compiler version with unfixed bugs.

L2

File AuraVestedEscrow.sol

Unlocked pragma

Contracts should be deployed using the same compiler version/flags with which they have been tested. Locking the pragma (for e.g. by not using ^ in pragma solidity 0.5.10) ensures that contracts do not accidentally get deployed using an older compiler version with unfixed bugs.

L2

Assert that array length match

current code

    function fund(address[] calldata _recipient, uint256[] calldata _amount) external nonReentrant {

Consider add

    function fund(address[] calldata _recipient, uint256[] calldata _amount) external nonReentrant {
      assert(_recipient.length == _amount.length, "Array length mismatch");

https://github.com/code-423n4/2022-05-aura/blob/a8758161373bc9c9ad2aec363b511afa3ed0613f/contracts/AuraVestedEscrow.sol#L96-L99

Critical functions dont emit events

Consider add events on this functions
setAdmin
setLocker

file Booster.sol

Assert that array length match

current code

    function voteGaugeWeight(address[] calldata _gauge, uint256[] calldata _weight ) external returns(bool){
        require(msg.sender == voteDelegate, "!auth");

Consider add

    function voteGaugeWeight(address[] calldata _gauge, uint256[] calldata _weight ) external returns(bool){
        require(msg.sender == voteDelegate, "!auth");
        require(_gauge.length == _weight.length, "array length mistmatch");

https://github.com/code-423n4/2022-05-aura/blob/main/convex-platform/contracts/contracts/Booster.sol#L535-L536

File VoterProxy.sol

Critical functions dont emit events

Consider add events on this functions
setOwner
setRewardDeposit
setSystemConfig
setOperator
setDepositor
setStashAccess
withdraw

File CrvDepositor.sol

Critical functions dont emit events

Consider add events on this functions
setFeeManager
setDaoOperator
setFees
setCooldown
[depositFor]https://github.com/code-423n4/2022-05-aura/blob/main/convex-platform/contracts/contracts/CrvDepositor.sol#L168

@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 13, 2022
code423n4 added a commit that referenced this issue May 13, 2022
@0xMaharishi 0xMaharishi added the sponsor confirmed Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity") label May 25, 2022
@0xMaharishi
Copy link

Some nice reports here, will consider resolving some.

@0xMaharishi 0xMaharishi added sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons and removed sponsor confirmed Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity") labels May 28, 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 QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons
Projects
None yet
Development

No branches or pull requests

2 participants