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:
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:
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.