Platform: Code4rena
Start Date: 20/05/2022
Pot Size: $1,000,000 USDC
Total HM: 4
Participants: 59
Period: 14 days
Judge: leastwood
Id: 128
League: ETH
Rank: 45/59
Findings: 1
Award: $440.69
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: Dravee
Also found by: 0x1f8b, 0x29A, 0xalpharush, Chom, Czar102, Hawkeye, IllIllI, MaratCerby, MiloTruck, NoamYakov, OriDabush, RoiEvenHaim, Spearbit, Tadashi, TerrierLover, TomJ, asutorufos, cccz, cmichel, csanuragjain, defsec, delfin454000, djxploit, ellahi, foobar, gzeon, hake, hickuphh3, ignacio, ilan, joestakey, kaden, mayo, ming, oyc_109, peritoflores, rfa, sach1r0, sashik_eth, shung, sirhashalot, twojoy, zer0dot, zkhorse
440.6858 USDC - $440.69
Utilise uncheck block for gas savings
End should be greater than start time so use unchecked block to save gas
If statement ensures no underflow :
Cache advancedOrder.parameters.endTime in a local variable
Variables are their default types
No need to assign them :
#0 - HardlyDifficult
2022-06-26T15:51:54Z
Utilise uncheck block for gas savings
Since _verifyTime
requires startTime <= endTime it may be worth using unchecked here for a small savings. Same for the others so long as it is confirmed that the appropriate checks have already been peformed.
Cache advancedOrder.parameters.endTime in a local variable
Since the endTime does not appear to be read a second time here, it's not clear this change would offer any benefit.
Variables are their default types
The compiler seems to mostly handle this automatically. In my testing, not setting defaults offered very little savings.