Core Contracts

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

Inconsistent fee share distribution in FeeCollector's initialization

Summary

The _initializeFeeTypes function in the FeeCollector contract initializes fee types 6 (Swap Tax) and 7 (NFT Royalties) with share totals that don't equal the required 100% (10000 basis points), contradicting the validation requirement enforced in the updateFeeType function.

Vulnerability Details

All fee type distributions must total 100% (10000 basis points) as enforced by the updateFeeType function:

// From updateFeeType function
if (newFee.veRAACShare + newFee.burnShare + newFee.repairShare + newFee.treasuryShare != BASIS_POINTS) {
revert InvalidDistributionParams();
}

However, in _initializeFeeTypes, two fee types are initialized with incorrect totals:

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

Impact

Inconsistent fee distribution calculations for Swap Tax and NFT Royalty fees. Could also result in underallocation of fees to stakeholders and system invariant violation where fee shares must total 100%.

Tools Used

  • Manual code review

Recommendations

Modify the initialization values for fee types 6 and 7 to total 10000 basis points:

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

Lead Judging Commences

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