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: 65/74
Findings: 1
Award: $7.89
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: SM3_SS
Also found by: 0x11singh99, 0xAnah, 0xSmartContract, 0xn006e7, 0xprinc, DavidGiladi, ElCid, JCN, K42, MIQUINHO, Raihan, Rolezn, SAAJ, SY_S, Strausses, TheSavageTeddy, bigtone, erebus, hunter_w3b, josephdara, lsaudit, mahdirostami, oakcobalt, peanuts, pfapostol, seth_lawson
7.8853 USDC - $7.89
In the constructor, all checks for invalid inputs better be done in the beginning to save more gas in case of fail tx (revert)
Fix:
constructor(bytes16 _maxPercentIncrease, bytes16 _maxPercentDecrease, uint256 _blockTime, bytes16 _alpha) { if (_maxPercentDecrease > ABDKMathQuad.ONE) { revert InvalidMaxPercentDecreaseArgument(_maxPercentDecrease); } if (_alpha > ABDKMathQuad.ONE) { revert InvalidAArgument(_alpha); } ...rest of the code }
#0 - c4-pre-sort
2023-07-13T13:18:09Z
141345 marked the issue as low quality report
#1 - c4-judge
2023-08-05T10:56:37Z
alcueca marked the issue as grade-b