Platform: Code4rena
Start Date: 21/08/2023
Pot Size: $36,500 USDC
Total HM: 1
Participants: 43
Period: 7 days
Judge: Dravee
Id: 277
League: ETH
Rank: 38/43
Findings: 1
Award: $9.16
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: Udsen
Also found by: 0xSmartContract, 0xmystery, 0xprinc, Fulum, JP_Courses, MatricksDeCoder, Mirror, MohammedRizwan, MrPotatoMagic, Rolezn, Shubham, Testerbot, ast3ros, chainsnake, lanrebayode77, lsaudit, nisedo, plainshift, pontifex, prapandey031
9.1555 USDC - $9.16
Checking if the absoluteValue is less than FIXED_FEE * 2
should happen inside the block where the deduction will happen, the check is unnecessary if feeUp is true as it will be added to not subtracted from, it is only mandated when subtraction will take place.
uint256 roundedAbsoluteAmount; if (feeUp) { roundedAbsoluteAmount = absoluteValue + (absoluteValue / BASE_FEE) + FIXED_FEE; require(roundedAbsoluteAmount < INT_MAX); } else if (absoluteValue < FIXED_FEE * 2) revert AmountError(); roundedAbsoluteAmount = absoluteValue - (absoluteValue / BASE_FEE) - FIXED_FEE; roundedAmount = negative ? -int256(roundedAbsoluteAmount) : int256(roundedAbsoluteAmount); }
#0 - c4-pre-sort
2023-08-30T04:42:07Z
0xRobocop marked the issue as sufficient quality report
#1 - c4-judge
2023-09-11T19:52:03Z
JustDravee marked the issue as grade-b
#2 - c4-judge
2023-09-11T19:52:11Z
JustDravee marked the issue as grade-c
#3 - c4-judge
2023-09-11T19:53:29Z
JustDravee marked the issue as grade-b