Each claimer can receive 0.005 Sepolia from the faucet the first time they call claimFaucetTokens, assuming there is enough Sepolia in the contract and the dailySepEthCap has not been reached. When a address has claimed Sepolia from the faucet, it is mapped to true in hasClaimedEth.
However, if a user has previously claimed Sepolia or the owner has paused the Sepolia faucet, dailyDrips, which tracks how much Sepolia has been claimed in a day, will be reset to 0. If dailyDrips is reset to 0 in this way, it will not be an accurate count of the amount of Sepolia that has been claimed that day, so the daily cap can be surpassed.
While this is possible, the DeployRaiseBoxFaucet script is currently set up to deploy RaiseBoxFaucet with an amount to drip of 0.005 Sepolia and a daily cap of 1 Sepolia. This would take 200 claims from the faucet to reach the daily limit, but the RaiseBoxFaucet contract deploys with a dailyClaimLimit of 100. If the dailyClaimLimit is increased by the owner with adjustDailyClaimLimit, then then dailySepEthCap can be exploited.
Likelihood:
This can be exploited in the event the owner raises the dailyClaimLimit to allow for more claims than the dailySepEthCap would allow. Assuming the contract was deployed with the DeployRaiseBoxFaucet script, the dailyClaimLimit would need to be over 200 for the exploit that have any effect.
Impact:
Users would be able to claim more Sepolia from the contract than the faucet intends.
The contract owner increases the daily claim limit to more than 200.
An attacker calls claimFaucetTokens to receive faucet tokens as well as claiming 0.005 Sepolia for being a first time claimer.
The attacker waits 3 days to be able to claim faucet tokens again.
200 users have claimed their first-time Sepolia reward, some of which may have been the attacker's wallets.
The attacker calls claimFaucetTokens from their original address, which has already received the Sepolia reward. The daily drip count has been reset, and more addresses can claim their first time reward.
The test shows that an attacker can reset daily claims, so more Sepolia can be claimed from the contract then expected.
Remove the else block of the Sepolia reward section in claimFaucetTokens.
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.