adjustDailyClaimLimit permits dailyClaimLimit to reach zero via exact subtraction, enabling permanent DoS on new claims until manual owner recoveryThe RaiseBoxFaucet::adjustDailyClaimLimit function allows the owner to fine-tune the dailyClaimLimit — the maximum number of daily token claims — by adding or subtracting a specified amount (by).
While intended for flexibility, the decrease logic only reverts if by exceeds the current limit, permitting an exact match (by == dailyClaimLimit). This sets dailyClaimLimit to zero, causing all subsequent RaiseBoxFaucet::claimFaucetTokens calls to revert immediately due to the pre-reset check if (dailyClaimCount >= dailyClaimLimit). With dailyClaimCount starting or remaining at a positive value, no new claims succeed, effectively DoS-ing the faucet for token distribution until the owner notices and intervenes.
Requires deliberate owner action (e.g., passing an exact current limit with false), making malicious intent unlikely in a benevolent setup.
However, accidental triggers are plausible via human error (e.g., a copy-paste mistake in a frontend dashboard) or automated scripts with flawed params. Or worse, a compromised owner key.
It would prevent all new token claims, which could lead to frustration among users and a loss of trust in the protocol. However, it does not lead to a loss of funds or tokens.
The owner can still increase the dailyClaimLimit again to allow new claims, but it requires manual intervention.
Add this test case to the existing RaiseBoxFaucet.t.sol file:
Run the above test using the following command:
Logs:
The adjustDailyClaimLimit function should include a check to prevent setting the dailyClaimLimit to zero. This can be done by adding a condition to ensure that the new limit is always greater than zero when decreasing the 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.