RaiseBoxFaucet::burnFaucetTokens transfers more than intended before burningburnFaucetTokens() should allow the owner to burn a specific amount of faucet tokens: transfer that amount to the owner and then call _burn with the same value.
In reality, the function ignores amountToBurn when transferring and moves the entire contract balance (balanceOf(address(this))) to the owner before burning only the requested amount. The difference between the total balance and amountToBurn remains in the owner's wallet unintentionally.
Likelihood: Medium
Only the owner can call it, but it's common to want to burn a partial amount and each time the function drains the entire faucet to the owner.
There are no hidden conditions: balanceOf(address(this)) always sends the full balance, so the error appears on the first partial burn attempt.
Impact: High
The faucet is emptied even if you only wanted to destroy part of the tokens, leaving users without rewards.
Until the owner manually returns tokens, the contract is halted and onboarding of legitimate users is affected.
Prepare the faucet with a balance greater than the amount you want to burn.
As owner, call burnFaucetTokens(amountPartial).
Observe how the owner receives the entire balance minus amountToBurn, while the faucet is left at zero.
Any user trying to claim afterwards will revert due to insufficient balance.
Update the transfer to use amountToBurn and avoid moving the rest of the balance to the owner.
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.