Platform: Code4rena
Start Date: 14/09/2022
Pot Size: $50,000 USDC
Total HM: 25
Participants: 110
Period: 5 days
Judge: hickuphh3
Total Solo HM: 9
Id: 162
League: ETH
Rank: 107/110
Findings: 1
Award: $16.18
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: pfapostol
Also found by: 0x040, 0x1f8b, 0x4non, 0xNazgul, 0xSmartContract, 0xc0ffEE, 0xkatana, Aymen0909, Bnke0x0, Deivitto, Diana, JAGADESH, KIntern_NA, Lambda, MiloTruck, R2, RaymondFam, Respx, ReyAdmirado, Rohan16, RoiEvenHaim, Rolezn, Ruhum, Saintcode_, Samatak, Sm4rty, SnowMan, Tomio, Tomo, WilliamAmbrozic, _Adam, __141345__, ajtra, ak1, async, c3phas, ch0bu, cryptostellar5, d3e4, delfin454000, dharma09, djxploit, durianSausage, eierina, erictee, fatherOfBlocks, gianganhnguyen, gogo, ignacio, imare, jag, jonatascm, leosathya, lukris02, malinariy, oyc_109, pashov, pauliax, peanuts, peiw, prasantgupta52, robee, rokinot, rotcivegaf, rvierdiiev, seyni, simon135, slowmoses, sryysryy, tnevler, zishansami
16.1756 USDC - $16.18
17/09/2022 14:59 Y2K Finance Note: Contracts are ordered as they appear in the repo. Suggestions are ordered by the line they occurred. Tools Used: Remix, Manual Analysis
Require statements under 32 characters save on gas
Making public
variables immutable
saves on gas
id
is only defined in the constructor; therefore can be changed to immutable
.
uint != 0
saves gas relative to uint > 0
Suggestion: Change if (reward > 0)
to if (reward != 0)
.
Require statements under 32 characters save on gas
Require statements under 32 characters save on gas
Modifiers only used once
Suggestion: in-line the modifiers per function.
i += 1
uses more gas than ++i
Suggestion: change line 195 from marketIndex += 1
to ++marketIndex
.