The burn function does not properly handle scenarios where burnTaxRate is greater than zero, but feeCollector is set to the zero address. This could lead to an unintended situation where part of the burned amount is expected to be transferred as a tax, but there is no valid recipient, potentially resulting in incorrect balances.
In the current implementation:
If burnTaxRate > 0 but feeCollector == address(0), the function will still execute _burn(msg.sender, amount - taxAmount), but the tax portion will not be handled properly. The tax amount should either be included in the burn or a proper validation should be added before executing the function.
A portion of the user’s burned amount may be expected to be transferred as a tax, but since feeCollector is address(0), the function will revert as the to address is address(0).
This could lead to security vulnerabilities or incorrect supply calculations if not handled properly.
if feeCollector is address(0), burn the entire amount:
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.