Core Contracts

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

Double Deduction of Tokens (super._update() Call Order)

Summary

The _update function in the RAACToken contract applies tax deductions incorrectly, leading to double deductions from users’ balances. This results in users losing more tokens than they should during transactions.

Vulnerability Details

The _update function processes tax deductions in three separate steps:

super._update(from, feeCollector, totalTax - burnAmount);
super._update(from, address(0), burnAmount);
super._update(from, to, amount - totalTax);
  • First, it sends totalTax - burnAmount to the feeCollector.

  • Then, it sends burnAmount to address(0).

  • Finally, it sends amount - totalTax to the recipient.

  • This means users are losing an extra burnAmount tokens on every taxed transaction.

Example: If amount = 1000, swapTaxRate = 2%, and burnTaxRate = 1%:

totalTax = 1000 * 3% = 30
burnAmount = (30 * 1%) / 3% = 10
Total deducted = 30 + 10 + (1000 - 30) = 1010 (instead of 1000)
  • Users lose an extra 10 tokens due to incorrect calculations.

Impact

Users lose more tokens than expected due to double deduction.

Tools Used

Manual Code Review

Recommendations

Ensures that the burned amount is actually removed from supply, rather than just sent to address(0).

Updates

Lead Judging Commences

inallhonesty Lead Judge 3 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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