Platform: Code4rena
Start Date: 20/01/2022
Pot Size: $80,000 USDC
Total HM: 5
Participants: 37
Period: 7 days
Judge: Jack the Pug
Total Solo HM: 1
Id: 76
League: ETH
Rank: 18/37
Findings: 1
Award: $263.93
🌟 Selected for report: 1
🚀 Solo Findings: 0
53.5879 USDC - $53.59
0x1f8b
Gas saving.
It's possible to save gas using the pointer claim
instead of access to storage again in SherlockClaimManager._setState
.
Manual review.
Change
claims_[_claimIdentifier].state = _state; claims_[_claimIdentifier].updated = block.timestamp;
to
claim.state = _state; claim.updated = block.timestamp;
#0 - jack-the-pug
2022-03-26T11:41:47Z
Dup #200
🌟 Selected for report: 0x1f8b
0x1f8b
gas saving.
The contract AaveV2Strategy
has two methods deposit
and withdrawAll
where it's done ILendingPool lp = getLp();
and this line should be moved bellow the condition if (amount == 0) revert InvalidConditions();
in the case of deposit
and bellow if (balanceOf() == 0) {
in the case of withdrawAll
.
Manual review
Move the variable lp bellow the first conditional.
11.8662 USDC - $11.87
0x1f8b
gas saving.
The contract SherClaim has a false comparation in the method claim, it's cheaper to use !active() instead of active() == false, it will require less opcodes.
Manual review
use ! instead of == false
#0 - jack-the-pug
2022-03-26T11:32:08Z
Dup #132