Players are only allowed to claim their contest rewards within 90 days of the pot being created. After this period, the manager closes the pot and distributes any remaining rewards, preventing further claims.
The claimCut() function does not prevent players from claiming rewards after 90 days. This allows a player to claim their reward even after the pot should have been closed, breaking the intended 90-day claim period invariant.
Likelihood:
This issue occurs whenever a player attempts to call claimCut() after the 90-day claim period has elapsed and before the manager has closed the pot. It is independent of the number of players or the amount of rewards and will consistently happen whenever the time condition is exceeded.
Impact:
The contest manager may receive less than their intended 10% of unclaimed rewards if players claim after the 90-day period.
Rewards intended to be redistributed among timely claimants could instead go to late-claiming players, violating fairness.
The protocol’s core rule that players must claim within 90 days is broken, undermining trust in the system.
Malicious players could wait until after 90 days to claim rewards multiple times if unchecked, maximizing their gains at the expense of others.
In your test file, paste this code and then run `forge test --mt test_playerCannotClaimAfter90Days -vvv`. The test is going to fail thereby proving that the core invariant of the protocol is broken
The bug can be mitigated by adding a check in the claimCut() function to prevent players from claiming after 90 days:
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.