dailyClaimLimit to Zero, potentially barring all incoming faucet claims and causing a DoSExpected bahaviour In order for the faucet to work, the dailyClaimLimit should be set to a sensible value by the owner.
Problematic bahaviour The contract's code currently allows the owner to set the dailyClaimLimit to zero, breaking the faucet's intended functionality.
Likelihood: Low
This bug occurs when the user decreases the dailyClaimLimit by an amount equal to the current value.
Impact: High
The impact of this vulnerability is a completel lock on the faucet's functionality for as long as the dailyClaimLimit is at 0.
Add the following test in the Foundry test suite and run it with forge test --mt test_adjustDailyClaimLimit_ToZero_Succeeds.
Hypothetical Scenario
Current dailyClaimLimit is 100
Owner decreases the limit by 100, bringing it down to zero.
All calls to the claimFaucetTokens function revert.
To mitigate this vulnerability change the inequality to a strict one so that decreasing the dailyClaimLimit by a value equal to the currently stored value causes a revert:
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
View preliminary resultsAppeals are being carefully reviewed by our judges.
The contest is complete and the rewards are being distributed.