code-423n4 / 2022-06-nested-findings

0 stars 1 forks source link

QA Report #78

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago
  1. __

I recommend to set

line 117

uint256 length = tokens.length; to

uint256 tokensLength = tokens.length;

this will ofcourse also set 

line 118 to

for(uint i = 0; i < tokensLength; i++)

this will provide better general clarity in line with other consistency factors of, 

for example

line 175

of the AuraLocker.sol contract where as it is

uint256 rewardTokensLength = rewardTokens.length;

instead of 

uint256 length = rewardTokens.length;

  1. __

For consistency in line with code of for loop

line 153

for (uint256 i; i < numRewards; ++i)

I recommend to also set other for loops to also implement code structure

line 118

change the uint i = 0; to uint256 i;

line 300
line 317

change the uint256 i = 0; to uint256 i;

Result

for(uint256 i; i < length; i++)

for (uint256 i; i < _claims.length; i++)

for (uint256 i; i < _claims.length; i++)
liveactionllama commented 2 years ago

On June 18 at 18:19, warden reached out via C4 help request to let us know that this is for a different contest and asked that it be withdrawn.

Yashiru commented 2 years ago

## 1 (Duplicated)

~~Duplicated of #2 at For loop optimizaion ~~

## 2 (Duplicated)

~~Duplicated of #2 at For loop optimizaion ~~