Core Contracts

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

FeeCollector::_initializeFeeTypes will set some of the values to be less than 10000

Summary

In the _initializeFeeTypes function, the last two fee types (Buy/Sell Swap Tax and NFT Royalty Fees) do not sum up to 10000 (100%), which results in incorrect fee calculations. This misconfiguration skews the distribution of fees, leading to more funds going to the treasury during _calculateDistribution.

Vulnerability Details

Example Scenario

  1. The Buy/Sell Swap Tax fee type sums to 2000 instead of 10000:

    • veRAACShare = 500

    • burnShare = 500

    • repairShare = 1000

    • treasuryShare = 0

    • Total = 2000 (should be 10000)

  2. The NFT Royalty Fees type sums to 2000 instead of 10000:

    • veRAACShare = 500

    • burnShare = 0

    • repairShare = 1000

    • treasuryShare = 500

    • Total = 2000 (should be 10000)

  3. When _calculateDistribution runs:

    • The incorrectly defined fees cause lower weighted distributions for these types.

    • The leftover amounts are allocated to the treasury by default.

    • This reduces the expected shares for veRAAC holders, burn, and repair funds.

Impact

  • Incorrect Fee Distribution – Some fee types do not allocate funds as expected.

  • Excess Funds to Treasury – The miscalculation results in more fees being sent to the treasury instead of their intended destinations (veRAAC holders, burn, and repair).

  • Potential Accounting Errors – The InvalidFeeAmount() revert condition could be triggered unexpectedly if total fees collected do not match expected distributions.

Tools Used

Manual review

Recommendations

Ensure All Fee Types Sum to 10000

Modify feeTypes[6] and feeTypes[7] so that their total always equals 10000 (100%).

// Buy/Sell Swap Tax (2% total) - Corrected
feeTypes[6] = FeeType({
veRAACShare: 5000, // 50%
burnShare: 1000, // 10%
repairShare: 3000, // 30%
treasuryShare: 1000 // 10%
});
// NFT Royalty Fees (2% total) - Corrected
feeTypes[7] = FeeType({
veRAACShare: 5000, // 50%
burnShare: 1000, // 10%
repairShare: 3000, // 30%
treasuryShare: 1000 // 10%
});
``
Updates

Lead Judging Commences

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