RaiseBoxFaucet::dailyDrips() causes the faucet to lose accurate tracking of how much ETH has been distributed in the current dayThe amount of Sepolia ETH dripped for first-time claimers is set to certain maximum amount per day, and this reset to zero on the beginning of every new day - erasing previous day history.
Redundant elsestatement in RaiseBoxFaucet::claimFaucetTokens() resets the global daily ETH counter to zero, erasing previous drip history. This effectively disables the faucet's daily ETH cap enforcement, since every new claim by a returning user or while paused resets the counter.
Likelihood:
Triggered frequently whenever non-first-time claimers interact.
Impact:
Causes ETH over-distribution, depleting the faucet’s funds.
steps:
1) user1 claims - receives faucet token & 0.005 ETH.
2) user2 claims - receives faucet token & 0.005 ETH.
user1 claims again after 3 days - receives only faucet token & resets the dailyDripsto zero.
Repeat across users, the contract gives out unlimited ETH in oneday, because whenever a non-new user claims, dailyDripsresets to zero and whether dailySepEthCapis reached or not, ETH is send to first-time claimers despite earlier usage, bypassing the daily cap.
Add the following codes to RaiseBoxFaucet.t.sol and run forge test --mt testSkippedSepEthTransferResetsDailyDripToZero -vv :
Result:
The vulnerability can be mitigated by removing dailyDrips = 0;and emitting an event with the reason for Sepolia ETH drip skip.
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.