Platform: Code4rena
Start Date: 03/07/2023
Pot Size: $40,000 USDC
Total HM: 14
Participants: 74
Period: 7 days
Judge: alcueca
Total Solo HM: 9
Id: 259
League: ETH
Rank: 52/74
Findings: 1
Award: $17.52
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: 0xprinc
Also found by: 0x11singh99, 0xAnah, 0xWaitress, 0xkazim, 2997ms, 33audits, 404Notfound, 8olidity, CRIMSON-RAT-REACH, CyberPunks, DanielWang888, Deekshith99, Eeyore, Eurovickk, Inspecktor, JGcarv, John, Jorgect, Kaysoft, LosPollosHermanos, MohammedRizwan, Qeew, QiuhaoLi, Rolezn, TheSavageTeddy, Topmark, Trust, Udsen, a3yip6, alexzoid, bigtone, codegpt, erebus, fatherOfBlocks, ginlee, glcanvas, hunter_w3b, josephdara, kaveyjoe, kutugu, mahdirostami, max10afternoon, oakcobalt, peanuts, pfapostol, ptsanev, qpzm, radev_sw, ravikiranweb3, sces60107, seth_lawson, te_aut, twcctop, zhaojie, ziyou-
17.5208 USDC - $17.52
If deltaTimestamp is less than BLOCK_TIME, blocksPassed will round down to zero which lead to wrong calculation in many places
Manual Review
Always consider if your computation may round down to zero, especially when using small numbers, and if so whether your code should revert
if( blocksPassed == 0 ) { revert("Round down to zero"); }
Math
#0 - c4-pre-sort
2023-07-13T08:56:52Z
141345 marked the issue as duplicate of #287
#1 - 141345
2023-07-13T08:58:40Z
lack details on the impact and potential loss
#2 - c4-judge
2023-08-05T21:25:37Z
alcueca marked the issue as not a duplicate
#3 - c4-judge
2023-08-05T21:25:40Z
alcueca changed the severity to QA (Quality Assurance)
#4 - c4-judge
2023-08-05T21:25:45Z
alcueca marked the issue as grade-a
#5 - alcueca
2023-08-05T21:26:06Z
No proof of any impact, but worth it as QA