Core Contracts

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

Certain feeType values are wrong and cannot be updated

Summary

In FeeCollector.sol certain feeType values are wrong and cannot be updated resulting in collecting more fees than stated in the natspec.

Vulnerability Details

In the function FeeCollector::_initializeFeeTypes Buy/Sell Swap Tax and NFT Royalty Fees are both supposed to sum up to 2%. Given that the protocol uses the basis points, used fee values are incorrect:

function _initializeFeeTypes() internal {
...
// 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%
});
}

Additionally, the following check does not enforce the sum correctly for these feeTypes :

function updateFeeType(uint8 feeType, FeeType calldata newFee) external override {
...
if (newFee.veRAACShare + newFee.burnShare + newFee.repairShare + newFee.treasuryShare != BASIS_POINTS) {
revert InvalidDistributionParams();
}
...
}

The check above makes it impossible to modify incorrectly initialized fee values, making them permanent.

Impact

Beyond the straightforward impact of collecting excess fees, the following checker prevents modifying the incorrectly initialized feeType structure, as all shares must sum up to 100%. Therefore, the initial fee type values remain fixed, causing a collection of 10x higher fees than intended.

Recommendations

To mitigate this issue modify the fee values to match the comments ( remove one zero ) in _initializeFeeTypes function and implement necessary logic in the updateFeeType function to support different sums than 100%.

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.