The burnFaucetTokens() function should only transfer the amount of tokens that will be burned to prevent unintended token accumulation by the owner.
The function transfers the entire contract balance to the owner but only burns the specified amount, leaving excess tokens with the owner and potentially creating centralization risks through token hoarding.
Likelihood: High
Owner calls burnFaucetTokens() with any amount less than the total contract balance
The function executes as designed but with unintended side effects every time
No additional conditions required - happens on every burn operation where amountToBurn < contract balance
Impact: Medium
Owner accumulates tokens beyond intended limits, centralizing token distribution
Token distribution mechanism becomes compromised through unintended owner token retention
Reduces trust in the faucet system due to owner token hoarding behavior
Attack scenario:
Contract has 10,000 tokens, owner has 0
Owner calls burnFaucetTokens(1000)
Function transfers 10,000 to owner, burns 1,000
Result: Contract has 0, owner has 9,000 (should have 0)
Owner mints 5,000 new tokens to contract
Owner calls burnFaucetTokens(500)
Function transfers 5,000 to owner, burns 500
Result: Owner now has 9,000 + 4,500 = 13,500 tokens
Pattern repeats, owner accumulates massive token holdings
The mitigation fixes the logic error by ensuring only the specified burn amount is transferred to the owner before burning, preventing unintended token accumulation and maintaining proper token distribution mechanics.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
View preliminary resultsAppeals are being carefully reviewed by our judges.
The contest is complete and the rewards are being distributed.