Core Contracts

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

RAACToken will not burn full amount when fee collector is not set

Summary

When RAACToken is burnt, tax amount is deducted from burn amount. This tax amount will not be transferred to fee collector if fee collector address is not set.

Vulnerability Details

The following is implementation of RAACToken.burn

function burn(uint256 amount) external {
uint256 taxAmount = amount.percentMul(burnTaxRate);
_burn(msg.sender, amount - taxAmount);
if (taxAmount > 0 && feeCollector != address(0)) { // @audit tax amount is not burnt when fee collector is address(0)
_transfer(msg.sender, feeCollector, taxAmount);
}
}

When burnTaxRate is greater than 0 and fee collector is not set, tax amount will not be burnt nor transferred.

Impact

  • This can lead to integration vulnerability with other platforms

  • When distributing collected fees, raac token will not be burnt full amount and be stuck in fee collector

if (shares[1] > 0) raacToken.burn(shares[1]);

Tools Used

Manual Review

Recommendation

Calculate taxAmount only when feeCollector address is not zero

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!