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: 49/59
Findings: 1
Award: $435.74
🌟 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
435.7397 USDC - $435.74
Using unchecked
block for operations that can't overflow/underflow.
This line could be unchecked since if channelIndexPlusOne == 0
, thenchannelPreviouslyOpen == false
(L138) and if statement on L149 wouldn't be satisfied:
uint256 removedChannelIndex = channelIndexPlusOne - 1;
This lines could be unchecked due to check on L91 _validateOrderAndUpdateStatus
-> _verifyTime
, so if orderParameters.endTime <= block.timestamp
or orderParameters.startTime > block.timestamp
- transaction will be reverted before:
uint256 duration = orderParameters.endTime - orderParameters.startTime; uint256 elapsed = block.timestamp - orderParameters.startTime; uint256 remaining = duration - elapsed;
#0 - HardlyDifficult
2022-07-04T23:50:49Z
It appears these lines are after the conditional and unchecked should provide small savings.