New users should be permitted to claim one Faucet token drip and one ETH drip on their first claim, provided that neither limit has been reached.
However, there is a reentrancy vulnerability during the ETH transfer process. When ETH is sent, the external call allows the user to re-enter the claim logic and perform an additional claim, effectively receiving double the faucet token drip.
Likelihood:
The issue can occur for every new user who receives an ETH drip and is a contract.
Impact:
First-time users can exploit the reentrancy to double claim faucet tokens, receiving more tokens than intended. This leads to unfair token distribution and potential depletion of the faucet balance.
Add the following test and helper contract to RaiseBoxFaucet.t.sol to reproduce the issue:
Move the external ETH transfer (the whole IF block below) to the end of the RaiseBoxFaucet.sol::claimFaucetTokens function, after all internal state changes are applied. This ensures that reentrancy cannot affect the token claim logic.
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.