Pot::closePot checks that 90 days have passed, but Pot::claimCut never checks the deadline. A player who missed the 90 days can still claim their reward and then also receive a share of the final distribution. This takes money away from the players who claimed in time and from the manager.
The README says players have 90 days to claim. After that, the manager takes a cut and the rest goes to the players who claimed in time:
allowing authorized claimants 90 days to claim before the manager takes a cut of the remaining pool and the remainder is distributed equally to those who claimed in time
closePot checks the 90 days, but claimCut does not:
So after day 90, and before the owner calls closeContest, any player can still claim. The late player is also added to claimants, so closePot pays them the same closing share as the players who claimed in time.
Likelihood: High
Any player who missed the deadline can do this. No attacker and no special setup are needed.
It only needs the owner not to have closed the contest yet, which is the normal situation after day 90.
Impact: Medium
The late player takes their reward after the deadline. By the README, this reward should stay in the pool for the players who claimed in time.
The late player is also counted as a claimant, so they get the same closing payment as the on-time claimants.
As a result, the on-time claimants and the manager receive less than the protocol promises.
Only the money inside this one contest is affected. No funds are lost from outside it.
Add the following functions inside the existing TestMyCut contract in test/TestMyCut.t.sol.
Run from the repository root:
Output:
The test passes because its assertions confirm the vulnerable behavior: the late claim does not revert, and the late player receives the same closing payment as the on-time player.
Add deadline check before claiming the rewards
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.