Core Contracts

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

Fee Type 6 and 7 are expected to be 2% but they are 20%

Vulnerability Details

At FeeController::_initializeFeeTypes() we can see that fee types with index 6 and 7 are meant to have only a total sum of 2%.

Yet they have a total sum of 20% each, see here. This is because BASIS_POINTS == 10_000 == 100%, thus 20% == 2_000. Precisely what they add up to:

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

Impact

The tax will be x10 higher than expected for the Buy/Sell Swap Tax and NFT Royalty Fees fee types.

This affects the distributeCollectedFees()::_calculateDistribution() which uses the feeTypes state, distributing more fees than it should to the swap tax (index number 6) and NFT royalty fees (index number 7).

Recommendations

Divide by 10 each of the initialization values on the FeeController::_initializeFeeTypes() function to have a total sum of 2% for each of the fee types:

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