Core Contracts

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

On `FeeCollector::_initializeFeeTypes`, `feeTypes[7]` has wrong values

Summary

On FeeCollector::_initializeFeeTypes#L388C1-L393C12, feeTypes[7] is been set.

But it will get the wrong values on deployment.

Vulnerability Details

when the BASIS_POINTS is 10_000,

The values are set totally wrong.

FeeCollector::_initializeFeeTypes#L388C1-L393C12

/**
* @dev Initializes default fee types according to protocol rules
*/
function _initializeFeeTypes() internal {
// Protocol Fees: 80% to veRAAC holders, 20% to treasury
feeTypes[0] = FeeType({
veRAACShare: 8000, // 80%
burnShare: 0,
repairShare: 0,
treasuryShare: 2000 // 20%
});
// ...OTHER_CODES...
// NFT Royalty Fees (2% total)
388:: feeTypes[7] = FeeType({ // @audit wrong value
veRAACShare: 500, // 0.5%
burnShare: 0,
repairShare: 1000, // 1.0%
treasuryShare: 500 // 0.5%
393:: });
// ..OTHER_CODES...
}

Impact

The feeType will get the wrong state on deployment. As this will be used in the calculation, it will be a loss of funds.

Tools Used

Manual review

Recommendations

2% total which should be 200.
The 0.5% should be 50 when the BASIS_POINTS is 10_000.
The 1% should be 100

```Solidity
/**
* @dev Initializes default fee types according to protocol rules
*/
function _initializeFeeTypes() internal {
// Protocol Fees: 80% to veRAAC holders, 20% to treasury
feeTypes[0] = FeeType({
veRAACShare: 8000, // 80%
burnShare: 0,
repairShare: 0,
treasuryShare: 2000 // 20%
});
// ...OTHER_CODES...
// NFT Royalty Fees (2% total)
388:: feeTypes[7] = FeeType({ // @audit wrong value
- 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%
393:: });
// ..OTHER_CODES...
}
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.