Core Contracts

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

Incorrect fee set in _initializeFeeTypes

Summary

There is a mismatch in the fee mentioned and the fee set for swap tax and royalty fees.

Vulnerability Details

The following is the implementation for _initializeFeeTypes for Buy/Sell Swap Tax and NFT Royalty Fees :

// Buy/Sell Swap Tax (2% total)
feeTypes[6] = FeeType({
veRAACShare: 500, // 0.5%
burnShare: 500, // 0.5%
repairShare: 1000, // 1.0%
treasuryShare: 0
});
// NFT Royalty Fees (2% total)
feeTypes[7] = FeeType({
veRAACShare: 500, // 0.5%
burnShare: 0,
repairShare: 1000, // 1.0%
treasuryShare: 500 // 0.5%
});

The values set are incorrect and is increased by 10 times. For Buy/Sell Swap Tax and NFT Royalty Fees it should be 2% total but its 20% each.

The % is calculated in terms of basis points :

uint256 public constant BASIS_POINTS = 10000

The previous fees are all calculated correctly as it can be seen: 2025-02-raac/contracts/core/collectors/FeeCollector.sol at main · Cyfrin/2025-02-raac

The correct values for Buy/Sell Swap Tax and NFT Royalty Fees are :

  • For 0.5% = (0.5 / 100)10000 = 0.005 * 10000 = 50

  • for 1.0% = (1 / 100)10000 = 0.01 * 10000 = 100

Impact

Users will pay 10 times more fees.

Recommendations

Change the values to 50 for 0.5% and 100 for 1%.

Updates

Lead Judging Commences

inallhonesty Lead Judge 4 months ago
Submission Judgement Published
Validated
Assigned finding tags:

Fee shares for fee type 6 and 7 inside FeeCollector do not total up to the expected 10000 basis points, this leads to update problems, moreover they are 10x the specifications

Support

FAQs

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