_transfer uses full balance instead of amountToBurn, emptying contract completely on any burn callThe RaiseBoxFaucet::burnFaucetTokens function lets the owner burn some faucet tokens. Plan was: transfer exact amountToBurn from contract to owner, then burn that amount from owner's balance.
But line 132 says _transfer(address(this), msg.sender, balanceOf(address(this))) — it's transferring the entire contract balance to the owner, not just amountToBurn! Then it burns only the requested amount from the owner's new huge pile. Result? Contract = 0 tokens, faucet dead, users can't claim anything.
Triggers every single time the owner decides to burn tokens
Wipes out entire faucet — zero tokens left for users to claim
Breaks protocol completely, users get nothing
Malicious owner? Instant theft of all funds to their wallet
Simple test: Owner burns just 1000 tokens... watch the whole 1B disappear to their wallet.
Add this test case to the RaiseBoxFaucet.t.sol file:
Run the test using the following command:
Logs:
Skip the unnecessary transfer step and burn directly from the contract balance.
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.