Core Contracts

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

Incorrect handling of feeType 6 and 7 in 'updateFeeType'

Summary

updateFeeTypefunction is not designed to handle modifications to feeTypes 6 and 7.

Vulnerability Details

The update updateFeeTypefunction callable by the FEE_MANAGER_ROLE is used to modify the fee parameters.

BASIS_POINTS = 10000;
// updateFeeType
if (feeType > 7) revert InvalidFeeType();
// Validate fee shares total to 100%
if (newFee.veRAACShare + newFee.burnShare + newFee.repairShare +
newFee.treasuryShare != BASIS_POINTS) {
revert InvalidDistributionParams();
}

It has a check to ensure the some of different fee parameters add up to the whole BASIS_POINTS = 10000.

However the feeType 6 and feeType 7 already violate this rule as they only sum up to 2000 basis pioints.

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

Impact

Fee Types 6 & 7 cannot be updated using the current implementation of updateFeeType

Recommendations

If different fee types have different summation rules (e.g., some should sum to 2,000 instead of 10,000),
then the validation logic in updateFeeType needs to account for that.

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!