RaiseBoxFaucet::dailyClaimCount Never Resets, Permanently Blocking New Token Claims After Limit ExceededThe RaiseBoxFaucet contract has a limit on how many users can claim tokens in a day, which is implemented using the combination of RaiseBoxFaucet::dailyClaimCount and RaiseBoxFaucet::dailyClaimLimit. The contract makes sure that dailyClaimCount must reset to 0 once every day, so that new users can claim tokens again.
However, the contract fails to implement the reset logic for dailyClaimCount in the right manner. After the limit is reached, no new user can claim tokens ever again, because RaiseBoxFaucet::claimFaucetTokens reverts before even reaching to the point where the reset happens. It doesn't matter whether one day has passed or more than that; the dailyClaimCount never resets until the owner manually increases the dailyClaimLimit using RaiseBoxFaucet::adjustDailyClaimLimit.
The limit can be exhausted rapidly by coordinated sybil attacks (e.g., a single entity spinning up multiple addresses) or organic growth in a new protocol's user base, making this trigger inevitable in a live deployment.
Permanently excludes legitimate new users from onboarding tokens, halting protocol adoption and leading to widespread frustration.
Forces manual owner intervention, introducing centralisation risks and operational overhead that could delay recovery for days or weeks.
In a testnet faucet like this, it undermines the entire purpose of incentivising early participation, potentially causing reputational damage and lost TVL.
Here's how the vulnerability unfolds (as shown in the PoC test case below):
The owner deploys the RaiseBoxFaucet contract and fulfils the initial token and Sepolia ETH donation requirements.
The owner adjusts the dailyClaimLimit to a low number, let's say 2, for testing purposes.
Two different users claim tokens successfully, reaching the daily limit.
A third user tries to claim tokens but fails because the daily limit has been reached.
One day passes, and the third user hopes that they can claim tokens now, but they still can't because the dailyClaimCount never resets to 0.
Add this test case to the existing RaiseBoxFaucet.t.sol file:
Run the above test using the following command:
Logs:
The contract should implement the reset logic for dailyClaimCount in a way that it resets to 0 once every day, regardless of whether the daily limit has been reached or not. This can be done by moving the reset logic to the very beginning of the claimFaucetTokens function, so that it always resets before checking the daily limit.
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.