Raisebox Faucet

First Flight #50
Beginner FriendlySolidity
100 EXP
View results
Submission Details
Impact: low
Likelihood: low
Invalid

Incorrect Balance Comparison in `mintFaucetTokens` Allows Over-Minting at Cap

[L-01] Incorrect Balance Comparison in mintFaucetTokens Allows Over-Minting at Cap

Description: The mintFaucetTokens function includes a check to prevent minting if the contract already holds more than 1000 * 10 ** 18 tokens:

if (balanceOf(address(to)) > 1000 * 10 ** 18) {
revert RaiseBoxFaucet_FaucetNotOutOfTokens();
}

However, this condition allows minting when the balance is exactly equal to the cap.
This means the owner could mint additional tokens even when the faucet is already full — violating the intended supply limit.

Impact:

-Over-minting risk: Owner can mint tokens beyond the intended cap.

-Tokenomics inconsistency: Faucet may hold more than the declared INITIAL_SUPPLY.

-Logic mismatch: The revert condition doesn’t fully enforce the supply ceiling.

Recommended Mitigation:

Update the condition to include equality:

-if (balanceOf(address(to)) > 1000 * 10 ** 18) {
- revert RaiseBoxFaucet_FaucetNotOutOfTokens();
-}
+if (balanceOf(address(to)) >= 1000 * 10 ** 18) {
+ revert RaiseBoxFaucet_FaucetNotOutOfTokens();
+}
Updates

Lead Judging Commences

inallhonesty Lead Judge 8 days ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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