Claimants are currently able to claim their rewards even after 90 days if the Contest Manager fails to close the contest on time. This behavior occurs because the system does not enforce the 90-day claim period within the claimCut
function of the Pot
contract, allowing users to continue claiming rewards beyond the intended timeframe.
In the current implementation, the Contest Manager is responsible for closing the contest by calling ContestManager.closeContest()
after the contest period has ended. However, if the Contest Manager does not call this function in a timely manner, participants can continue to claim rewards indefinitely, even after the 90-day claim window has passed.
Proof of Code
The following test function demonstrates the issue:
Issue: In the code above, player2
is still able to successfully claim their reward after the 90-day period has expired, as the ContestManager
has not yet closed the contest.
Claimants could continue to withdraw rewards after the intended 90-day period, leading to unauthorized claims. This could result in the depletion of the remaining rewards in the pot, which by the protocol's design, belong to the contestManager and the claimants who claimed early.
Foundry
To mitigate this vulnerability, it is recommended to enforce the 90-day claim period within the claimCut
function itself. This way, the function will automatically prevent any claims after the specified period, regardless of whether the ContestManager
has called closeContest()
or not.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.