The contract designed to allow a limited number of users (dailyClaimLimit) to claim ERC20 tokens.
The dailyClaimCout is intended to reset to zero at the beginning of each new day, allowing claims to resume.
The logic to reset dailyClaimCount is incorrectly placed after the check that enforces the daily limit.
If the limit is reached on day 1 ad no successfull claim transaction occurs on the susequent day, the reset condition is never reached. This permanently locks the faucet, as all future calls will revert at the daily limit check.
Likelihood:
Reason 1: The daily claim limit is reached on any given day, which is expected behavior for a popular faucet.
Reason 2: The claimFaucetTokens() function is not successfully called by anyone during the entire following 24-hour period, which is a highly plausible scenario.
Impact:
Impact 1: The primary function of the faucet—dispensing ERC20 tokens—becomes permanently unavailable to all users after the conditions are met.
Impact 2: The contract fails to serve its core purpose, requiring a redeployment and potentially causing a loss of trust from the community relying on it.
A test case using Foundry's cheatcodes can concretely demonstrate the vulnerability. The test simulates the exact sequence of events that leads to the permanent lockup.
The daily counter reset logic must be moved to the beginning of the function, before any checks are performed. This ensures that the first caller on a new day resets the counter, allowing claims to proceed.
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.