Platform: Code4rena
Start Date: 27/01/2022
Pot Size: $90,000 USDC
Total HM: 21
Participants: 33
Period: 7 days
Judge: Jack the Pug
Total Solo HM: 14
Id: 78
League: ETH
Rank: 27/33
Findings: 1
Award: $30.02
🌟 Selected for report: 0
🚀 Solo Findings: 0
throttle
Gas optimization
Accessing array length in for loop is costly. https://github.com/code-423n4/2022-01-behodler/blob/main/contracts/DAO/LimboDAO.sol#L212 https://github.com/code-423n4/2022-01-behodler/blob/main/contracts/DAO/LimboDAO.sol#L217
Manual review
Consider caching length before the for loop.
uint256 length = sushiLPs.length for (uint256 i; i < length; i++) { ... }
#0 - gititGoro
2022-02-10T00:10:47Z
duplicate of issue 12
throttle
Gas savings
Using pre-increment (++i) instead of post-increment (i++) saves few unit of gas every spin of the loop: https://github.com/code-423n4/2022-01-behodler/blob/main/contracts/DAO/LimboDAO.sol#L212 https://github.com/code-423n4/2022-01-behodler/blob/main/contracts/DAO/LimboDAO.sol#L217
Manual review
Change i++ to ++i
#0 - gititGoro
2022-02-10T00:01:56Z
duplicate of issue 10
#1 - jack-the-pug
2022-02-27T11:31:15Z
Dup #10
13.2841 USDC - $13.28
throttle
Gas savings
Assigning default values costs unnecessary gas. https://github.com/code-423n4/2022-01-behodler/blob/main/contracts/DAO/LimboDAO.sol#L212 https://github.com/code-423n4/2022-01-behodler/blob/main/contracts/DAO/LimboDAO.sol#L217
Manual review
Consider rewriting
for (uint256 i = 0; i < k; i++) { ... }
to
for (uint256 i; i < k; i++) { ... }
#0 - gititGoro
2022-02-10T05:02:30Z
duplicate of issue 20
#1 - jack-the-pug
2022-02-27T13:15:49Z
Dup #20