The `Pot::constructor` function stores the deployment time using `block.timestamp`. This is because the protocol's owner needs to wait 90 days before being able to close the pot.
However, `block.timestamp` can be manipulated by malicious miners, causing the pot to have wrong deployment time, leading to denial of service.
Likelihood:
Reason 1 // Describe WHEN this will occur (avoid using "if" statements)
Reason 2
Impact:
The deployment time could be so far in the future that it would not be closeable.
1. A malicious miner sets the time far in the future
2. User creates a contest and funds it, but the tx is validated by the malicious miner
3. Users closes the pot in a tx validated by a regular miner
4. It reverts
Add the following test to `TestMyCut.t.sol`
Don't rely on `block.timestamp`. Use `block.number` instead.
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.