The burnFaucetTokens() function should only transfer and burn the specified amount amountToBurn of faucet tokens from the contract’s own balance without transferring all tokens to the owner.
The burnFaucetTokens() function transfer the full contract balance to owner instead of transferring amountToBurn.
Likelihood:
The defined flawed logic always transfers the entire balance from the contract to the owner before burning, regardless of amountToBurn.
Impact:
This drains all tokens from the contract, which can disrupt core functionalities that depend on the contract’s token balance (e.g., faucet claims). Users can't claim faucet tokens until the mintFaucetTokens() called again.
To test this, include the following code in the RaiseBoxFaucetTest.t.sol file:
To mitigate the flaw, transfer and burn only the specified amountToBurn, not the full contract balance.
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.