In the function Pot::closePot(), the managerCut is incorrectly calculated, leading to an erroneous value when managerCutPercent != 10.
In the function Pot::closePot(), the following formula is used to calculate the managerCut:
This formula only works correctly when managerCutPercent = 10. However, if the manager sets managerCutPercent to a different value, the managerCut will be incorrectly calculated.
Assume at the end of the Pot, remainingRewards = 100 and managerCutPercent = 20. The manager expects to withdraw 20% of the remaining rewards, resulting in managerCut = 20. However, using the current formula, the calculation is as follows:
This results in an incorrect withdrawal amount.
When managerCutPercent != 10, closing the Pot would result in an incorrect amount being withdrawn. This could lead to a loss of funds either for the manager (if managerCutPercent > 10) or for the players (if managerCutPercent < 10).
Manual review.
Use the correct formula for percentage calculations:
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.