Core Contracts

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

Incorrect Fee Percentage Calculation in `FeeCollector.sol`

Summary

In FeeCollector.sol, the fee allocation values for Buy/Sell Swap Tax and NFT Royalty Fees are incorrectly set. The contract defines 10,000 as 100%, meaning that 0.5% should correspond to 50, not 500, and 1% should correspond to 100, not 1000. This miscalculation leads to an overestimation of fee allocations, potentially affecting the distribution of funds.

Vulnerability Details

In FeeCollector.sol#L379, the fee allocation is defined as follows:

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

Since 10,000 represents 100%, the correct values should be:

  • 0.5% → 50 instead of 500

  • 1% → 100 instead of 1000

Due to this incorrect scaling, the fee percentages are 10 times higher than intended, potentially diverting more funds than expected.

Impact

The miscalculation inflates the actual fee deductions, leading to excessive allocations for veRAAC, burn, repair, and treasury shares. This could result in an imbalance in fund distribution, affecting the contract's financial operations and user expectations.

Tools Used

Manual code review.

Recommendations

Adjust the fee allocation values to correctly reflect the intended percentages:

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

By correcting the values, the contract will allocate fees as intended, ensuring proper fund distribution.

Updates

Lead Judging Commences

inallhonesty Lead Judge 7 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.

Give us feedback!