Protocol docs specify that the reward can be claimed in the first 90 days. However, the Pot contract allows players to call the claim even after the pot has been closed (even tough there is possibly 0 rewards remaining).
The claimCut
function remains callable even after the closePot
function has been executed since there is no check to prevent this.
Proof of Concept:
While players can call the claimCut function after pot closure, the actual transfer of tokens will likely revert if the contract's balance is less than the amount the user is trying to claim, or pass if contract balance is suffitient. This can lead to gas wastage, a poor user experience and unintended behaviour of the protocol.
Manual code review / Foundry tests
Implement a closed state: Add a boolean state variable to track whether the pot has been closed:
Prevent claims after closure: Modify the claimCut
function to check the closed state:
Set the remaining rewards to 0 after closing the Pot:
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.