MyCut

First Flight #23
Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: low
Valid

Wrong calculation of `managerCut` in `Pot::closePot`

Description:

In closePot function, the managerCut is calculated by dividing remainingRewards by managerCutPercent
instead of remainingRewards multiplying by managerCutPercent and then dividing by 100.

Impact:

Although it fortunately does not affect the result (the managerCut value), But it is computationally incorrect.

Tools Used:

Manual review.

Recommendations:

Change the calculation of managerCut in closePot.

- uint256 managerCut = remainingRewards / managerCutPercent;
+ uint256 managerCut = remainingRewards * managerCutPercent / 100;
Updates

Lead Judging Commences

equious Lead Judge about 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

Dusty Pot

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.