Core Contracts

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

Improper design choice of taxing for burning

Summary

In RaacToken.sol burn() User calls with amount he wants to burn and then he burns this amount of token and pays the taxAmount if its x > 0.

Vulnerability Details

However this is an improper design chocie since if User wants to burn 50 tokens the current logic will lead to user burning less than he actually wants and then pay for tax.

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

Example: burnRate is 500 which is 5%
User calls burn with 50 tokens
(50 * 500) / 10 000
25 000 / 10 000 = 2 (2.5).

This leads to user burning less than what he wanted (48 tokens).

Impact

User not burning the amount he desires.

Tools Used

Manual Review

Recommendations

Burn the original input amount that user gave and then transfer the burnFeeAmount. User must be sure that he can cover the burnFeeAmount when he is calling the burn() function

Updates

Lead Judging Commences

inallhonesty Lead Judge 3 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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