<= check blocks claims at exact faucetDrip balance, denying users their tokens despite sufficient balanceThe RaiseBoxFaucet::claimFaucetTokens function checks if the contract has enough tokens before letting users claim their 1000-token drip every 3 days. Makes sense — line 175 reverts if the balance is too low.
But the check balanceOf(address(this)) <= faucetDrip is backwards. When there's exactly 1000 tokens left (enough for one claim), it still reverts! Should only block if less than 1000. Another off-by-one bug — users get screwed right when there's just enough, leaving the last claim hanging.
Hits when the balance gets low — happens naturally as users claim over time. Not rare in a busy faucet.
Denies users their legit 1000 tokens when there's exactly enough — straight-up breaks the "1000 per claim" promise
Frustrates users who see "insufficient balance" but know there's money there
Wastes the owner's time manually topping up sooner than needed
Test sets huge faucetDrip (100M) so 9 claims leave exactly 100M — should work for 10th user, but doesn't.
Add to RaiseBoxFaucet.t.sol:
Run the above test using the following command:
Logs:
Swap <= to < — only block if truly under faucetDrip, let the exact balance through.
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.