Platform: Code4rena
Start Date: 07/04/2022
Pot Size: $50,000 USDC
Total HM: 5
Participants: 19
Period: 5 days
Judge: 0xean
Total Solo HM: 4
Id: 109
League: COSMOS
Rank: 16/19
Findings: 1
Award: $87.24
🌟 Selected for report: 0
🚀 Solo Findings: 0
Proof of Concept: https://github.com/code-423n4/2022-04-axelar/blob/main/src/AdminMultisigBase.sol#L51 https://github.com/code-423n4/2022-04-axelar/blob/main/src/AdminMultisigBase.sol#L158
Recommended Mitigation Steps:
change i++
to ++i
========================================================================
immutable
to declare a variable which set once at constructorProof of Concept: https://github.com/code-423n4/2022-04-axelar/blob/main/src/ERC20Permit.sol#L8
Recommended Mitigation Steps:
add immutable
========================================================================
Proof of Concept: https://github.com/code-423n4/2022-04-axelar/blob/main/src/ERC20Permit.sol#L44
Recommended Mitigation Steps:
Change to <
========================================================================
#0 - deluca-mike
2022-04-20T08:08:43Z
"Better increment" Confirmed.
"Using immutable to declare a variable which set once at constructor" Confirmed.
"Using < is cheaper than <="
Acknowledged, but a weird suggestion since <
is not the same as <=
. Sure, we could also increment the literal, but in any case, for readability, we will keep the literal and the comparator as it is. In any case, we'll change requires to if-reverts, so many of these comparators will be flipped.