Normal behavior:
The burnFaucetTokens() function is intended to allow the contract owner to burn a specified amount of faucet tokens (amountToBurn) from the contract’s balance. After execution, the faucet contract should have exactly that number of tokens removed from its balance, reducing total supply by the burned amount.
Issue:
The current implementation mistakenly transfers the entire contract token balance to the owner before burning only the amountToBurn. This results in the owner holding all remaining faucet tokens, effectively draining the faucet’s token supply.
Likelihood:
The issue occurs every time the burnFaucetTokens() function is called.
The function is callable by the owner, who can unintentionally or deliberately drain all faucet tokens.
Impact:
The faucet contract balance becomes zero, preventing any future claims by users.
The owner retains all faucet tokens except the small burned portion, breaking the token distribution mechanism.
Only transfer the amount that is intended to be burned. This ensures the faucet retains the rest of its token balance and prevents unintended or malicious draining of funds.
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.