The burnFaucetTokens function is designed to allow the owner to reduce the faucet's token supply by burning a specified amount of tokens from the contract's balance, maintaining the remaining tokens in the contract for future user claims.
The function incorrectly transfers the entire contract balance to the owner before burning only the specified amount, allowing the owner to permanently steal all remaining tokens while appearing to perform a legitimate burn operation.
Likelihood:
The owner has unlimited access to call this function at any time with any burn amount, making exploitation trivial and always available.
The function design incentivizes malicious behavior since the owner receives (totalBalance - amountToBurn) tokens for free with every call, making it economically attractive to exploit.
Impact:
Complete theft of the faucet's token supply, allowing the owner to drain billions of tokens by calling the function with minimal burn amounts (e.g., burn 1 token, steal 999,999,999 tokens).
Total destruction of the faucet mechanism as the contract becomes empty, permanently breaking all future user claims and rendering the protocol non-functional.
The vulnerability can be demonstrated by showing how a malicious owner can drain the entire faucet supply while pretending to perform a small burn operation. The attack exploits the logical flaw where all tokens are transferred but only the specified amount is burned.
The fix involves changing the transfer amount from the entire contract balance to only the amount intended to be burned. This ensures that only the tokens meant for burning are moved to the owner's address, preventing theft of the remaining supply.
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.