Platform: Code4rena
Start Date: 21/11/2022
Pot Size: $90,500 USDC
Total HM: 18
Participants: 101
Period: 7 days
Judge: Picodes
Total Solo HM: 4
Id: 183
League: ETH
Rank: 86/101
Findings: 1
Award: $39.65
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: gzeon
Also found by: 0xPanda, 0xSmartContract, B2, Deivitto, Diana, JohnSmith, PaludoX0, Rahoz, RaymondFam, ReyAdmirado, Rolezn, Schlagatron, Secureverse, Tomio, __141345__, adriro, ajtra, aphak5010, c3phas, chaduke, codeislight, cryptonue, datapunk, dharma09, halden, karanctf, keccak123, oyc_109, pavankv, sakshamguruji, saneryee, unforgiven
39.6537 USDC - $39.65
Title: Expression for constant
values such as a call to keccak256()
, should use immutable
rather than constant
Proof of Concept: PxERC20.sol#L9-L10
Recommended Mitigation Steps:
Change from constant
to immutable
reference: here
Title: >=
is cheaper than >
Impact:
Strict inequalities (>
) are more expensive than non-strict ones (>=
). This is due to some supplementary checks (ISZERO, 3 gas)
Proof of Concept: PirexGmx.sol#L252
Recommended Mitigation Steps:
Consider using >=
instead of >
to avoid some opcodes
#0 - c4-judge
2022-12-05T11:03:24Z
Picodes marked the issue as grade-c
#1 - c4-judge
2022-12-05T11:03:53Z
Picodes marked the issue as grade-b