The burnFaucetTokens function allows the owner to burn tokens by transferring the contract’s balance to the owner and then burning from the owner’s balance. It checks the contract’s balance but not the owner’s balance before calling _burn, which could revert if the owner has insufficient tokens due to prior transfers elsewhere.
Likelihood:
Occurs when the owner has transferred some tokens elsewhere, reducing their balance below amountToBurn.
Occurs only when the owner calls burnFaucetTokens with an amountToBurn exceeding their balance after the transfer.
Impact:
Function reverts unexpectedly, preventing the owner from burning tokens.
Causes a denial-of-service for the burn operation, potentially disrupting token management.
Explanation: The PoC demonstrates how the burnFaucetTokens function fails if the owner’s balance is insufficient. The owner transfers some tokens to another address, reducing their balance. When burnFaucetTokens is called with an amount exceeding the owner’s balance after the contract’s transfer, the function reverts.
Explanation: To avoid the issue, we modify burnFaucetTokens to burn tokens directly from the contract’s balance, eliminating the need to transfer to the owner and check their balance. This simplifies the function and ensures it only depends on the contract’s balance, which is already verified.
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.