Under normal circumstances, the burnFaucetTokens function should allow the contract owner to burn a specified portion of the faucet’s token supply. The contract should transfer only the amount intended for burning from the faucet contract to the owner, then burn that same amount.
However, the current implementation mistakenly transfers the entire contract token balance to the owner before burning only the specified portion. This causes the faucet to lose all remaining tokens, leaving only the burned portion removed from supply.
Likelihood:
This occurs whenever the owner calls burnFaucetTokens during normal operations, intending to burn a portion of tokens.
The function is part of the faucet’s administrative maintenance, making its usage expected and recurring.
Impact:
The faucet contract will be fully drained of tokens, disrupting its ability to distribute tokens to users.
The excess tokens remain in the owner’s wallet, effectively centralizing supply and breaking the faucet’s intended decentralized distribution mechanism.
Explanation:
In this test, the faucet starts with 1,000,000 tokens. The owner calls burnFaucetTokens(10,000 ether) expecting only 10,000 tokens to be burned. Instead, the entire 1,000,000 tokens are transferred to the owner, and only 10,000 are burned. The faucet balance becomes zero, making future user claims impossible.
Transfer only amountToBurnor directly burn tokens from the contract, withou transferring them
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.