MyCut

First Flight #23
Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: medium
Invalid

Incorrect Manager Cut Calculation in `Pot.sol`.

Description: The manager's cut is calculated using integer division: remainingRewards / managerCutPercent, which might not yield the intended percentage due to integer division truncation.

Impact: The manager might receive a smaller cut than intended, potentially leading to disputes or financial loss. The calculation could be misunderstood, leading to incorrect financial assumptions.

Proof of Concept: In the Pot::closePot function, the manager's cut is calculated as follows:

uint256 managerCut = remainingRewards / managerCutPercent;

If remainingRewards is 1000, the intended manager cut should be 100 (10%), but the logic might be misunderstood, and the calculation should be remainingRewards * managerCutPercent / 100 for clarity and correctness.

Recommended Mitigation: Correct the calculation to ensure clarity and correctness:

uint256 managerCut = (remainingRewards * managerCutPercent) / 100;
Updates

Lead Judging Commences

equious Lead Judge 12 months ago
Submission Judgement Published
Validated
Assigned finding tags:

Erroneous ManagerCut calculation

Appeal created

equious Lead Judge 12 months ago
Submission Judgement Published
Invalidated
Reason: Other

Support

FAQs

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