Core Contracts

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

Unabilty to update fee types 6 and 7 in `FeeCollector`

Summary

The FeeCollector contract contains an inconsistency between the initialization of fee types 6 and 7 and the validation logic in the updateFeeType function. While the initial values for these fee types sum to 2000, the update function requires all fee shares to sum to BASIS_POINTS (10000).

Vulnerability Details

In the _initializeFeeTypes function, fee types 6 and 7 are initialized with shares that sum to 2000, which is actually 20% and not 2%:

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

However, in the updateFeeType function, there's a validation check that requires the sum of all shares to equal BASIS_POINTS (10000):

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

This means that even though fee types 6 and 7 are initialized with valid business logic , they cannot be updated using the updateFeeType function.

Impact

Due to this limitation it's impossible to update fee types 6 and 7 using the updateFeeType function, as any attempt will revert InvalidDistributionParams because of the validation check.

Recommendations

Consider modifying the updateFeeType function to apply different validation rules for different fee types (for fee types 6 and 7 to check if the shares add up to 2000)

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.