The dailyDrips variable is designed to track the cumulative amount of Sepolia ETH distributed through the faucet each day. It is reset to zero once per day and incremented by sepEthAmountToDrip each time a user claims drips via the claimFaucetTokens function in the RaiseBoxFaucet protocol.
However, the current implementation exhibits unintended behavior:
If the same user calls claimFaucetTokens again after the cooldown period, the dailyDrips variable is reset to zero, disrupting the accurate tracking of total daily drips.
2, A similar issue occurs when the owner pauses ETH drips using toggleEthDripPause and another user subsequently invokes claimFaucetTokens.
This results in incorrect recalculations of dailyDrips, leading to inconsistencies in the faucet’s daily distribution logic.
Likelihood:
Reason 1: Whenever a user attempts to call claimFaucetTokens multiple times after a cooldown period
Reason 2: If the claiming was paused by the owner
Impact:
The miscalculation of the dailyDrips variable prevents the first condition in the following check from functioning as intended:
As a result, the protocol may incorrectly skip or miscalculate daily Sepolia ETH distributions, leading to inaccurate enforcement of the dailySepEthCap and potential over distribution of tokens.
Paste this code snippet in RaiseBoxFaucet.t.sol and run forge test --mt test_dailyDripCalculation -vvvv
Remove the redundant else block (lines 211–213) to ensure that the dailyDrips variable maintains accurate cumulative accounting throughout the day.
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.