The claimFaucetTokens()
function is vulnerable to reentrancy attacks allowing multiple token claims due to cooldown state updates after external call.
Users can claim tokens once every 3 days (cooldown period)
First-time claimers receive both tokens and ETH
The contract updates cooldown state after external calls, enabling reentrancy during ETH transfers:
Line: 198
Attackers can bypass the 3-day cooldown mechanism
Unfair advantage over legitimate users
Token distribution occurs faster than intended
Enhances Sybil DDoS attacks: each cloned account can claim double tokens (2x `faucetDrip`) instead of one, accelerating faucet drainage
Only requires deploying a contract with malicious receive()
function
No special timing or chain conditions needed
Deterministic exploit that works every time
Only applies to first-time ETH claimers (limited scope)
Attacker deploys malicious contract with receive()
function
Attacker calls claimFaucetTokens()
(first time, eligible for ETH)
Contract sends ETH to attacker's contract via call("")
Attacker's receive()
re-enters claimFaucetTokens()
Since lastClaimTime
hasn't been updated yet, cooldown check passes
Attacker receives tokens again without waiting 3-day cooldown
Reentrancy.t.sol: https://github.com/Luu-Duc-Toan/2025-10-raisebox-faucet/blob/master/test/Reentrancy.t.sol
Move cooldown state updates before external calls:
Add OpenZeppelin's ReentrancyGuard:
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.
The contest is complete and the rewards are being distributed.