Core Contracts

Regnum Aurum Acquisition Corp
HardhatReal World AssetsNFT
77,280 USDC
View results
Submission Details
Severity: medium
Valid

Some RAAC token may not be burned or collected when burn() is called

Summary

Some RAAC token may not be burned or collected when burn() is called.

Vulnerability Details

In RAACToken, when burn() is called, burn tax is charged and some RAAC tokens are sent to feeCollector.

RAACToken::burn()

function burn(uint256 amount) external {
uint256 taxAmount = amount.percentMul(burnTaxRate);
_burn(msg.sender, amount - taxAmount);
if (taxAmount > 0 && feeCollector != address(0)) {
_transfer(msg.sender, feeCollector, taxAmount);
}
}

However, it's possible that feeCollector is set to address(0), if so, some RAAC tokens not burned as expected.

It is worth noting that burnTaxRate can not be set to 0, this is because taxRateIncrementLimit cannot be set to be larger than 1000 ( 10% in basis points), this will prevent burnTaxRate being set from 1 to 0.

Impact

Some RAAC tokens cannot be burned as expected.

Tools Used

Manual Review

Recommendations

In RAACToken, if feeCollector is address(0), it is recommended not to apply burnTaxRate.

function burn(uint256 amount) external {
+ if (feeCollector == address(0)) {
+ _burn(msg.sender, amount);
+ return;
+ }
uint256 taxAmount = amount.percentMul(burnTaxRate);
_burn(msg.sender, amount - taxAmount);
if (taxAmount > 0 && feeCollector != address(0)) {
_transfer(msg.sender, feeCollector, taxAmount);
}
}
Updates

Lead Judging Commences

inallhonesty Lead Judge 7 months ago
Submission Judgement Published
Validated
Assigned finding tags:

RAACToken::burn incorrectly deducts tax amount but doesn't burn or transfer it when feeCollector is address(0), preventing complete token burns

inallhonesty Lead Judge 7 months ago
Submission Judgement Published
Validated
Assigned finding tags:

RAACToken::burn incorrectly deducts tax amount but doesn't burn or transfer it when feeCollector is address(0), preventing complete token burns

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.

Give us feedback!