burnFaucetTokens
transfers entire contract balance instead of the requested burn amountburnFaucetTokens
currently does:
This transfers the entire faucet contract token balance to owner (not only amountToBurn
). Then it burns amountToBurn
from owner. The result: owner gets all current faucet tokens even when they intended to burn only amountToBurn
, and leftover tokens remain with owner instead of being burned.
Impact: Owner can accidentally (or maliciously) receive the entire faucet balance when burning a smaller amount, changing the token distribution and draining the faucet.
Likelihood: Medium
Impact: Medium (owner receiving more tokens than intended)
Transfer exactly amountToBurn before burning (or directly call _burn(address(this), amount) if allowed by design and if _burn accepts burning from contract without transferring).
Option A - transfer amountToBurn
then burn:
Option B - if you want to burn directly from contract (preferred to avoid transfers):
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.
The contest is complete and the rewards are being distributed.