In the RAACToken.sol
contract, when the fee collector is set to the zero address (address(0)), it’s supposed to turn off taxes, making burns "tax-free." However, the function still calculates and subtracts a tax amount, causing users to lose tokens without those tokens being burned or sent anywhere.
The contract has a rule: if the feeCollector
is set to address(0)
, no taxes should be taken, it’s supposed to be a free action. This works fine for transfers (handled by the _update
function), but the burn function doesn’t follow this rule properly.
Here’s the burn function’s code
The function calculates a tax (e.g., 0.5% of the amount you want to burn) no matter what. It doesn’t check if feeCollector is address(0) first. Then it burns only the amount minus the tax. For example, if you burn 100 tokens and the tax is 0.5, it burns 99.5 tokens.
After that, it checks if the feeCollector isn’t address(0) after the tax is subtracted and the burn happens. If it is address(0), the tax (like 0.5 tokens) isn’t sent anywhere. The problem is that the tax is taken away before checking if taxes should even apply. When feeCollector is address(0), that tax amount just disappears, it’s not burned and not sent to anyone.
The contract’s instructions say setting feeCollector to address(0) disables fees. Look at the setFeeCollector function:
The comment in setFeeCollector
("disable fee collection") and the event FeeCollectionDisabled()
imply a general intent to turn off fees. If burns are part of "fee collection," they should also be tax-free when feeCollector is address(0). But the burn function’s code contradicts this. Losing the taxAmount
when feeCollector == address(0)
(without burning or transferring it) seems like an error, no one benefits, and it breaks the "tax-free" expectation.
People burning tokens when feeCollector is address(0) lose extra tokens without them being burned or collected, which feels unfair.
Users expect the full amount to burn when fees are disabled, but they’ll see their balance drop more than the burned amount, causing distrust
Manual Review
Fix the burn function to check feeCollector first and only apply tax when it’s not address(0).
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.