The Pot::closePot
function incorrectly calculates the share of rewards to be distributed to claimants. Instead of dividing the remaining rewards by the number of actual claimants, it incorrectly uses the total number of players. This mistake could lead to an inaccurate distribution of rewards, where claimants receive less than they are entitled to.
In the Pot::closePot
function, the calculation of each claimant's share is incorrectly performed using the total number of players Pot::i_players.length
rather than the actual number of claimants Pot::claimants.length
:
Underpayment to Claimants: The incorrect calculation can result in claimants receiving less than they are entitled to.
Residual Rewards: The miscalculation could leave residual rewards in the contract, creating an inconsistency where not all funds are correctly distributed or claimed.
Manual Review
Correct the calculation in the Pot::closePot
function to ensure that rewards are distributed based on the actual number of claimants:
This change ensures that only those who have actually claimed their rewards are considered in the distribution, leading to a fair and accurate allocation of the remaining rewards.
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.