The hardcoded manager cut calculation in Pot::ClaimCut
is based on division by 10, which could lead to errors if the managerCutPercent
changes.
The manager's cut is currently hardcoded to be one-tenth of the remaining rewards in the Pot::ClaimCut
function, which works because the managerCutPercent
is set to 10. However, this could lead to errors if the percentage changes in the future.
If the percentage value changes, the current hardcoded calculation may result in incorrect rewards being allocated to the manager.
Manual code review.
Instead of using a hardcoded calculation, calculate the manager's cut based on a percentage:
This way, the calculation will remain correct even if the percentage value changes.
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.