Normal behavior: Users should be able to claim faucet tokens and, if it’s their first claim, receive a small Sepolia ETH drip. Claims must respect cooldown periods, daily token claim limits, and daily ETH drip caps.
Specific issue: The function uses a global state variable faucetClaimer for racking the caller and resets dailyDrips even when the user is ineligible for ETH drip. Additionally, dailyClaimCount and lastClaimTime were previously not updated correctly, and comparisons with contract balance (<= faucetDrip) may prevent valid claims.
Likelihood:
Race conditions occur whenever multiple users interact with the faucet in the same block or close time frame.
Daily claim limits may not be enforced correctly due to improper updates of dailyClaimCount.
ETH drips can be reset incorrectly, allowing first-time claimers to bypass caps.
Impact:
Users may bypass cooldown periods or daily limits, resulting in unintended faucet token distribution.
ETH drips could exceed the intended daily cap.
Potential for privilege or logic abuse by exploiting race conditions.
This PoC demonstrates that the faucet function allows multiple issues due to the use of a global faucetClaimer variable, improper dailyDrips reset, and potential cooldown bypass. By executing claims in sequence or with multiple users in the same block, an attacker could bypass daily limits or receive unintended ETH drips.
Use currentDay = block.timestamp / 1 days consistently to handle day resets for daily claim counts and ETH drips.
Consider adding ReentrancyGuard for additional safety during ETH drip transfers.
Emit an event for each claim for auditability:
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.