The burnFaucetTokens function is intended to allow the owner to burn a specified amountToBurn of tokens from the RaiseBoxFaucet protocol. This process occurs in two steps:
The contract transfers tokens to the owner.
The protocol subsequently burns the specified amount of tokens.
However, the current implementation transfers the entire token balance from the contract to the owner, rather than transferring only the specified amountToBurn. As a result, the protocol ends up burning only amountToBurn tokens while transferring the full balance to the owner, creating an inconsistency between the intended and actual behavior.
Likelihood:
Reason 1: It will occur every time the owner tries to burn tokens
Impact:
This flawed mechanism causes the contract to send the entire token balance to the owner whenever a burn operation is executed. Consequently, it may disrupt the normal functioning of the protocol, potentially leading to unintended token distribution and undermining trust in the system’s integrity.
paste this code snippet in RaiseBoxFaucet.t.sol and run forge test --mt test_burnFaucetTokensMisStep -vvvv in the terminal
This change ensures that only the designated amount is transferred to the owner, maintaining the intended burn logic and preserving the integrity of the protocol’s token management.
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.