The contract contains a critical accounting flaw that allows the daily ETH distribution limit (dailySepEthCap) to be bypassed. The root cause is an unconditional reset of the dailyDrips counter within an else block in the claimFaucetTokens function.
Normally, the dailyDrips counter should only reset once per day. However, the current logic resets this counter to zero every time a user who has already claimed ETH (a non-first-timer) calls the function. An attacker can exploit this by alternating between a first-time claimer address and a repeat-claimer address to reset the counter after each successful drip, allowing them to drain the contract's entire ETH balance while ignoring the daily cap.
Likelihood:
The daily ETH cap bypass occurs upon a non-first-time user calling the claimFaucetTokens function, which resets the daily drip counter for all subsequent first-time claimers within the same day.
Occurs whenever a non-first-time claimer calls `claimFaucetTokens()` or when drips are paused Impact:
Impact:
Drain of Contract's ETH Balance: The primary safeguard (dailySepEthCap) against draining the faucet's ETH supply is rendered ineffective, allowing an attacker to drain the contract of all its ETH much faster than intended.
Failure of Core Economic Logic: The intended rate-limiting for ETH distribution is completely broken, undermining a core security and economic assumption of the faucet's design.
Exceeding daily ETH cap
Draining ETH treasury beyond intended limits
Explanation
The following attack scenario demonstrates how the daily ETH cap can be bypassed. This exploit requires two addresses, one for a first-time claim and one for a subsequent claim to reset the counter.
Explanation
To remediate this vulnerability, the unconditional reset of the dailyDrips counter must be removed. The contract already contains the correct logic to reset the counter once per day. The else block containing the flawed reset is unnecessary and harmful.
By removing this else block, the dailyDrips counter will only be reset at the beginning of a new 24-hour period, correctly enforcing the dailySepEthCap as intended.
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.