The Pot::claimCut() function lacks a time-based validation. As a result, users can claim rewards even after the intended 90-day claim period has elapsed, violating the protocol’s business rules.
The claimCut() function allows users to claim rewards without enforcing the protocol’s 90-day time limit :
Because no timestamp or deadline check is performed, any user with a non-zero reward balance can successfully call claimCut() even after the intended claim period has expired.
This results in a violation of the protocol’s business logic and may lead to unintended reward distribution.
Pot::claimCut() allow users to claim rewards after the 90-day period, reducing the rewards for timely claimants and the owner’s share, contrary to the protocol’s intended redistribution rules, and potentially hurting user trust.
https://github.com/CodeHawks-Contests/ai-mycut/blob/main/src/Pot.sol#L37
Add a time-based check in Pot::claimCut() to ensure users can only claim rewards **within the intended 90-day window.
We warp the blockchain timestamp beyond 90 days and then call claimCut() (with player1) to demonstrate that rewards can still be claimed after the intended claim period.
Add this function to your TestMyCut.t.sol file :
Then run :
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.