Raisebox Faucet

First Flight #50
Beginner FriendlySolidity
100 EXP
View results
Submission Details
Severity: high
Valid

After reaching daily limit it is not possible to claim faucet tokens anymore

Description

Function RaiseBoxFaucet::claimFaucetTokens checks the dailyClaimCount variable value and reverts if it exeeds dailyClaimLimit:

if (dailyClaimCount >= dailyClaimLimit) {
revert RaiseBoxFaucet_DailyClaimLimitReached();
}

The issue here is that the dailyClaimCount value resets inly in function RaiseBoxFaucet::claimFaucetTokens if all validation checks are passed. The dailyClaimCount variable value is never reset to 0 after it reaches dailyClaimLimit because the validation is never passed. The only way to fix the contract after this is to increase the dailyClaimLimit value.

Risk

Likelihood: High

The issue appears every time after the daily limit is reached.

Impact:Medium

The contract stops working, but it is possible to fix it by incrementing daily limit value.

Recommended Mitigation

Reset dailyClaimCount value before its validation if a new day is started.

Updates

Lead Judging Commences

inallhonesty Lead Judge 5 days ago
Submission Judgement Published
Validated
Assigned finding tags:

dailyClaimCount Reset Bug

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.