The Pot::claimCut
function allows players to claim their rewards even after the end time (90 days) of the pot has passed, which does not follow the idea to penalize players who doesn't claim their rewards in time.
The Pot::claimCut
function in the Pot
contract allows players to claim their rewards. However, there is no check to ensure that the function cannot be called after the end time of the pot contract, which is 90 days from the deployment time. As a result, players can continue to claim their rewards even after the pot is supposed to be closed.
After the pot has been deployed and 90 days have passed, players can still call the claimCut function to claim their rewards.
Place the following test into TestMyCut.t.sol
If the Pot::claimCut
function is called after the end time of the pot, it will result in players being able to claim their rewards after the end time of the contract. This can lead to disruption of the idea to penalize players who claims late.
Solidity compiler
Manual code review
Foundry
To mitigate this vulnerability, implement a check within the Pot::claimCut
function to ensure that it cannot be called after the end time of the pot. Here is an updated version of the Pot contract with the recommended changes:
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.