The claimFaucetTokens() function updates critical state variables (lastClaimTime and dailyClaimCount) after making an external ETH transfer to the caller. This violates the Checks-Effects-Interactions pattern and creates a reentrancy window:
While hasClaimedEth is correctly set before the external call (preventing ETH re-claiming), lastClaimTime and dailyClaimCount are not, allowing one reentrant token claim.
Initial claimFaucetTokens() passes all checks
ETH sent → attacker's receive() executes
Reentrant call to claimFaucetTokens() still passes checks because lastClaimTime and dailyClaimCount not yet updated
Reentrant call transfers 1000 tokens
Original call completes, transfers another 1000 tokens
Result: 2000 tokens received instead of 1000 (100% overpayment)
Attacker claimed 2x tokens per transaction
Add this ReentrancyAttackcontract in test folder
Add this import in RaiseBoxFaucet.t.sol file
Add this test in RaiseBoxFaucet.t.sol file
Update state before external calls (Checks-Effects-Interactions pattern) or 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.