The Pot contract is designed to distribute rewards to contest claimants for 90 days. After this claim period, the manager is entitled to claim a one-time 10% cut of the remaining unclaimed rewards, and the rest is distributed to the claimants who claimed in time.
The closePot() function does not enforce a single execution. As a result, the manager can call closePot() multiple times and repeatedly claim 10% of the remaining rewards. This allows the manager to extract more than the intended share, violating the protocol’s reward distribution rules.
Likelihood:
This bug occurs whenever the pot has remaining unclaimed rewards after the 90-day claim period and the owner or manager calls the closePot() function. Each call results in the manager receiving an additional 10% of the remaining rewards. The vulnerability can be exploited repeatedly until the rewards are fully distributed.
Impact:
The manager can claim more than the intended 10% cut of unclaimed rewards, breaking the protocol’s reward allocation rules.
Contest participants may receive less than their fair share if the manager repeatedly claims the cut.
The protocol’s assumptions about total token distribution are compromised, potentially undermining user trust.
Any owner or manager account can exploit this bug without special privileges beyond normal permissions.
In the test file, paste this code and then run `forge test --mt test_closePotTwice -vvv`
Intorduce a state variable like `bool`
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.