Core Contracts

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

Whitelist Bypass Ambiguity

Summary

Whitelisted addresses are exempt from transfer taxes but still pay burn taxes, violating the intended invariant that whitelisted users bypass all taxes. The burn function does not check if the caller is whitelisted.

Vulnerability Details

function _update(address from, address to, uint256 amount) internal override {
// Skip tax if either sender or receiver is whitelisted
if (whitelistAddress[from] || whitelistAddress[to]) {
super._update(from, to, amount);
return;
}

Transfers involving whitelisted addresses skip taxes entirely.

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);
}
}

No validation for whether msg.sender is whitelisted.

Whitelisted users still pay burn taxes.

The expectation is that Whitelisted users should burn amount tokens without any tax. However the code implementation shows Whitelisted users pay burn taxes, reducing their balance by amount + taxAmount

Impact

Whitelisted users still pay burn taxes even though they are not supposed to.

Tools Used

Foundry

Recommendations

Add a whitelist check to the burn function:

function burn(uint256 amount) external {
if (whitelistAddress[msg.sender]) {
_burn(msg.sender, amount); // Burn full amount, no tax
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
Invalidated
Reason: Design choice
Assigned finding tags:

RAACToken::burn doesn't check if msg.sender is whitelisted, causing whitelisted users to pay burn taxes despite being exempt from transfer taxes

By Design according to the sponsor

Support

FAQs

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

Give us feedback!