MyCut gives each player a 90-day window to claim their reward ("allowing authorized claimants 90 days to claim before the manager takes a cut of the remaining pool"). The intended flow is: after 90 days, closePot() redistributes the unclaimed remainder to timely claimants and the manager, and the pot is then done.
However, Pot::claimCut() has no time check and no closed-state check:
(src/Pot.sol:38-46). playersToRewards is only zeroed when the player claims; closePot() does not clear it and does not set any closed flag. Therefore a player who never claimed can call claimCut() at any time - after the 90 days, and even after closePot() has already executed - and still receive their full original reward.
Impact: Medium - late claims drain the pool that was meant for redistribution to timely claimants and the manager. Players who followed the rules receive less (or nothing) while late players get fully paid; the core time-limit invariant of the protocol is broken.
Likelihood: Medium - any unclaimed player can trigger it; it is trivially executable and requires no privileges beyond holding a playersToRewards entry.
Foundry test testPocB_ClaimAfterClose (passes):
Test output: [PASS] testPocB_ClaimAfterClose - after closePot() with no claimants, player2 successfully claims 500 tokens post-closure.
Note: the same missing check also allows claims between day 90 and closePot(); the manager can never know the "final" set of claimants when computing the redistribution.
Enforce the claim window and add a closed flag:
Manual code review
Foundry (forge test) for the PoC
src/Pot.sol:38-46
https://github.com/Cyfrin/2024-08-MyCut/blob/main/src/Pot.sol#L38
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.