The claimFaucetTokens function relies on block.timestamp for the 3-day cooldown (CLAIM_COOLDOWN) and daily resets (lastFaucetDripDay, lastDripDay). Miners can manipulate block.timestamp within a small range (±15 seconds), potentially allowing users to claim slightly earlier than intended.
Likelihood:
Occurs when a miner manipulates block.timestamp to be slightly earlier than the actual time.
Occurs only within a small window (±15 seconds), limiting the frequency of exploitation.
Impact:
Users can claim tokens or ETH slightly before the 3-day cooldown or daily reset.
Minimal impact due to the long cooldown period and small manipulation range.
Explanation: The PoC demonstrates how a miner could set block.timestamp slightly early to allow a user to bypass the 3-day cooldown. By advancing time just before the cooldown period, the claim succeeds earlier than intended.
Explanation: We replace block.timestamp with block numbers for the cooldown check, as block numbers are less susceptible to manipulation. We define constants for blocks per day and the cooldown period in blocks, updating the state to track lastClaimBlock instead of lastClaimTime.
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.