The closePot() function does not update the remainingRewards state variable after distributing rewards to claimants. This allows the owner to call closePot() multiple times, each time taking an additional manager cut and redistributing (or attempting to redistribute) the remaining rewards.
Since remainingRewards is never set to zero after distribution, and the check if (remainingRewards > 0) will pass on subsequent calls (if any tokens were sent back or if the initial distribution didn't zero it out), the function can be exploited for repeated manager cuts.
Additionally, if the contract receives any tokens after the first closePot() call (e.g., via direct transfer), subsequent calls will drain those as well.
Likelihood: High - The owner can call this function multiple times; no state prevents re-execution.
Impact:
Owner can repeatedly take manager cuts from the same pot
Protocol economic invariant broken: manager gets more than the intended percentage
Claimants may receive duplicate payments (if tokens are available)
This POC demonstrates that closePot() does not update remainingRewards to zero after distribution, allowing the owner to call it multiple times and extract additional manager cuts.
Setting remainingRewards = 0 after distribution ensures the owner cannot call closePot() multiple times to extract additional manager cuts.
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.