Function Pot::closePot
incorrectly calculates cut that must be paid to claimants and taht leads to part of the funds are locked in the Pot contract after the pot is closed.
Function Pot::closePot
transfers the manager's cut and then distributes remaining rewards between players who claimed their cut in time:
The issue here is that claimant's cut is calculated as (remainingRewards - managerCut) / i_players.length
, but it must be (remainingRewards - managerCut) / claimants.length
. If some players have not claimed their cut, the claimants count is less then i_players.length
(overall players count), and the calculated cut will be smaller than it must be.
Part of the funds will be locked in the Pot contract after closing if some players do not claim their rewards in time.
Manual review
Change claimant cut calculation as below:
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.