closePot is intended to close a funded Pot once, 90 days after deployment, paying the 10% manager cut and distributing the remaining rewards to claimants. The function never resets remainingRewards, so every call re-executes the full distribution: the manager cut is paid again and every claimant receives the claimant cut again. The Pot can be drained to dust while remainingRewards still reports the original balance, and the manager cut is transferred to the ContestManager contract, which has no withdrawal path.
Likelihood: Medium. A funded Pot with unclaimed rewards reaches the 90-day mark and the owner calls closeContest; every subsequent call repeats the full payout for as long as the token balance covers it. Overfunding via repeated fundContest calls (reported separately) extends the drain.
Impact: High. Claimants receive the full remaining pool on top of their own claims, unclaimed players lose their share, the manager cut is paid repeatedly, and the Pot's token balance is exhausted. The repeated manager cuts are transferred to ContestManager, where they remain permanently locked.
Verified locally with forge 1.7.1 / solc 0.8.28 (one setup-only time-warp cheatcode):
Each of the five calls pays the claimant 13 from the same remainingRewards = 30 (30-claim scenario), i.e. 65 extra to a player entitled to 30, plus 15 in manager cuts locked in ContestManager.
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.