There are cases in which RAACToken::burn
function does not actually deduct the passed amount
parameter, but leaves some additional tokens in the user's balance, causing discrepancies.
If feeCollector is not set or is set to address(0)
, the taxAmount
is not burned or transferred, leaving it in the user's balance. This means RAACToken::burn
amount
actually only removes amount - taxAmount
from the user's balance, which is incorrect, as it should deduct the whole amount
(either via _burn
or _transfer
or some other mechanism).
Likelihood: Low. The issue happens only when feeCollector
is the zero address and burnTaxRate
is more than 0
Severity: Medium. User can end up with unexpected amount of tokens after burn, disturbing internal and external accounting.
Manual Review
Add the test below after this line:
Update the RAACToken::burn
function with an additional if statement
like the one below, to make sure that the provided amount is always
deducted from the user's 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.