Core Contracts

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

Wrong fee hardcoded in fee collector

Summary

There are a few fee types in the protocol, all of them hardcoded, but 2 of them are set to wrong values

Vulnerability Details

The protocol has a fee collector contract the is responsible for fee collection and distribution.

A function that sets different fee types is called (_initializeFeeTypes()) from the constructore in oreder to set the fee tpyes. All fees are in BPS. The problem is with the // Buy/Sell Swap Tax (2% total) and // NFT Royalty Fees (2% total) fees.
All fee types have commends on how much in percentage the fee is. In these two fee types the fees are set to 10 times more than anticipated.

For example the buy/sell swap tax is 2% total like:

// Buy/Sell Swap Tax (2% total)
feeTypes[6] = FeeType({
veRAACShare: 500, // 0.5%
burnShare: 500, // 0.5%
repairShare: 1000, // 1.0%
treasuryShare: 0
});

However the percentages in the comments do not match the values in bps. For example burnShare is 500 BPS which is 500/10_000 = 1/20 or 5% . THis is 10 times more than 0.5 which is anticipated.

ALso there is no setter function to reset the fees

Impact

Low

Tools Used

Manual Review

Recommendations

Set the fees as follows:

// Buy/Sell Swap Tax (2% total)
feeTypes[6] = FeeType({
- veRAACShare: 500, // 0.5%
+ veRAACShare: 50, // 0.5%
- burnShare: 500, // 0.5%
+ burnShare: 50, // 0.5%
- repairShare: 1000, // 1.0%
+ repairShare: 100, // 1.0%
treasuryShare: 0
});
// NFT Royalty Fees (2% total)
feeTypes[7] = FeeType({
- veRAACShare: 500, // 0.5%
+ veRAACShare: 50, // 0.5%
burnShare: 0,
- repairShare: 1000, // 1.0%
+ repairShare: 100, // 1.0%
- treasuryShare: 500 // 0.5%
+ treasuryShare: 50 // 0.5%
});

Also adding a setter function would be best.

Updates

Lead Judging Commences

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