ERC20 transfer executed after an external ETH call reintroduces a reentrancy hook that can loop claims and desynchronize faucet accounting.
Normally the faucet drips Sepolia ETH and then transfers the ERC20 faucet token to the claimer as the last step of the interaction.
Because _transfer runs after the outbound ETH call, a malicious ERC777-style recipient can trigger tokensReceived and re-enter claimFaucetTokens while the faucet still thinks the ETH transfer succeeded only once.
Likelihood:
The vulnerability triggers whenever the claimer is a contract implementing token receiver callbacks that call back into the faucet before the ERC20 state changes.
Integration with composable wallets or DeFi protocols that proxy claims through smart contracts increases the probability of encountering a hostile hook.
Impact:
Re-entrant callbacks can drain faucet token reserves by forcing repeated _transfer executions inside a single transaction.
The faucet’s accounting diverges from reality, allowing bypass of daily token limits and making downstream monitoring unreliable.
This PoC leverages an ERC777-style hook that re-enters as soon as _transfer fires, demonstrating how the late token transfer can loop claims.
Apply the diff to move all state updates and the ERC20 transfer ahead of the ETH call while gating the drip with a flag, preventing hook-based reentry.
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.