Core Contracts

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

Swap tax and NFT Royalty fees can't be updated

Summary

feeTypes[6] and feeTypes[7] can't be updated since their sum is not expected to go above 2%.

Details

Upon initialization, 8 fee types are declared. The first 6 all consist of different fee shares which sum to a total of 100%, expressed in BPS. Fee types [6] and [7], namely Swap Tax and NFT Royalties, work differently as they sum only to a total of 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, the updateFeeType method has a strict require check that the sum of all parts should equal to BASIS_POINTS (10_000), meaning that these 2 specific fee types can't be updated as they are not designed to have a sum greater than 2%.

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

Impact

Unexpected behaviour, broken admin functionality

Mitigation

Have the current updateFeeType flow only for feeType <= 5 and design a different one for feeType > 5 that compares it to 2% instead of 100%.

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!