Core Contracts

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

Transfers of RAAC token to whitelisted address are tax free which is not the expected behaviour.

Summary

As per the documentation, "Whitelisted addresses can perform tax-free transfers, which is useful for protocol operations and intermediate contracts".

The expected behaviour is to allow whitelisted addresses to perform tax-free transfers. But currently, transfers to whitelisted addresses are also tax-free in RAACToken contract, and this is not intended by the protocol documentation.

Only transfers from whitelisted address should be tax-free, not transfers to whitelisted address.

Impact

The impact of this issue is medium as it leads to loss of fees for the protocol and less tokens being burned when whitelisted address receive RAAC tokens.

Tools Used

Manual review

Recommendations

Remove whitelisted[to]in the criteria to allow tax-free transfers in _update function:

function _update(address from, address to, uint256 amount) internal virtual override {
uint256 baseTax = swapTaxRate + burnTaxRate;
// Skip tax for whitelisted addresses or when fee collector disabled
if (
baseTax == 0 || from == address(0) || to == address(0) || whitelistAddress[from]
|| feeCollector == address(0)
) {
super._update(from, to, amount);
return;
}
// All other cases where tax is applied
uint256 totalTax = amount.percentMul(baseTax);
uint256 burnAmount = totalTax * burnTaxRate / baseTax;
super._update(from, feeCollector, totalTax - burnAmount);
super._update(from, address(0), burnAmount);
super._update(from, to, amount - totalTax);
}
Updates

Lead Judging Commences

inallhonesty Lead Judge 4 months ago
Submission Judgement Published
Invalidated
Reason: Design choice

Support

FAQs

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