The claimFaucetTokens() function sends ETH to the first time users via a low-level call before state update lastClaimTime[faucetClaimer] = block.timestamp; dailyClaimCount
Druing the first claim, attackers can reenter claimFaucetTokens() and claim tokens again
Likelihood: high
The function directly performs an external call before state changes
Reentrancy is trivially exploitable by a crafted fallback.
Impact: high
Attackers can bypass cooldown restrictions and claim faucet tokens twice
Add the following exploit contract and test, then run this command: forge test --match-test testReentrancy -vv
PoC Results:
Use OpenZeppelin’s ReentrancyGuard and apply nonReentrant modifier to claimFaucetTokens()
Alternatively, move all state updates before the external call call
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.