Normal behavior: burning faucet tokens should decrease the token supply held by the faucet contract so tokens are permanently removed from circulation.
Specific issue: the owner-only burn function transfers the entire contract balance to the owner, then burns only amountToBurn from the owner. This leaves the owner holding the remaining tokens that were supposed to be burned.
Likelihood: Medium
Owner calls the function during normal maintenance or to reduce supply, this will execute the logic and trigger the issue.
Impact: High
Contract token balance is entirely moved out: the call _transfer(address(this), msg.sender, balanceOf(address(this))) transfers the full faucet balance rather than the intended amount, instantly emptying the faucet's token holdings.
Burn semantics broken: burning only amountToBurn afterwards means the remainder ends up in the owner’s wallet
The PoC demonstrates that the owner can call burnFaucetTokens to transfer the faucet’s entire token balance to themselves and then burn only the requested amount, allowing the owner to siphon the remaining tokens.
Add the test below to the RaiseBoxFaucet.t.sol:
Run the test with:
Mitigation 1 -> minimal fix: transfer only the requested amount to owner before burning.
Mitigation 2 -> (recommended): avoid sending tokens to owner at all and burn directly from the contract.
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.