Calculations made in Pot
contract are dividing uint values for calculation of rewards, and the values are not multiples of 1e18
, thus, rounded down to the nearest integer.
LoC:
https://github.com/Cyfrin/2024-08-MyCut/blob/946231db0fe717039429a11706717be568d03b54/src/Pot.sol#L54
https://github.com/Cyfrin/2024-08-MyCut/blob/946231db0fe717039429a11706717be568d03b54/src/Pot.sol#L57
If remainingRewards
equals to 7, and managerCutPercent
is 10, then managerCut
will be rounded down to 0. Similarly, calculation of claimantCut
also leads to the value being rounded down to the nearest uint value. This leads to tokens being left unconsidered in the Pot
contract and therefore, being burnt.
Loss of tokens and miscalculation of manager and players' cuts of the rewards.
Manual Review
Multiply your rewards values by 1e18
or any other exponent value.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.