Platform: Code4rena
Start Date: 27/01/2022
Pot Size: $75,000 USDT
Total HM: 6
Participants: 29
Period: 7 days
Judge: leastwood
Total Solo HM: 6
Id: 72
League: ETH
Rank: 21/29
Findings: 1
Award: $26.86
🌟 Selected for report: 0
🚀 Solo Findings: 0
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-openleverage/blob/main/openleverage-contracts/contracts/OLETokenLock.sol#L33
Manual review
Change i++ to ++i
#0 - ColaM12
2022-02-02T18:55:34Z
Duplicate to #13
10.3004 USDT - $10.30
throttle
Gas optimization
Accessing array length in for loop is costly. among many places throughout the codebase: https://github.com/code-423n4/2022-01-openleverage/blob/main/openleverage-contracts/contracts/OLETokenLock.sol#L33
Manual review
Consider caching length before the for loop.
uint256 length = beneficiaries.length for (uint256 i; i < length; i++) { ... }
#0 - ColaM12
2022-02-02T18:57:45Z
Duplicate to #15
10.3004 USDT - $10.30
throttle
Gas savings
Some variables can be set immutable https://github.com/code-423n4/2022-01-openleverage/blob/main/openleverage-contracts/contracts/Adminable.sol#L9 https://github.com/code-423n4/2022-01-openleverage/blob/main/openleverage-contracts/contracts/Airdrop.sol#L25 https://github.com/code-423n4/2022-01-openleverage/blob/main/openleverage-contracts/contracts/OLETokenLock.sol#L15
Manual review
Change to immutable
#0 - ColaM12
2022-02-02T19:01:02Z
Duplicate to #11