Core Contracts

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

Fees can't be updated in `FeeCollector.sol`

Vulnerability Details

When the protocol wants to update the parameters for a specific fee the FEE_MANAGER_ROLE call FeeCollector::updateFeeType function to update those parameters.

FeeCollector.sol#L220C2-L232C1

function updateFeeType(uint8 feeType, FeeType calldata newFee) external override {
...
@> feeTypes[feeType] = newFee;
emit FeeTypeUpdated(feeType, newFee);
}

The issue arises from a check in the function that Validate fee shares total to 100%.so when the FEE_MANAGER_ROLE try to update SwapTax[6] and NFTRoyalty[7] it will revert because those types of fees parameters only represent 2%

FeeCollector.sol#L225C1-L227C10

FeeCollector.sol#L380C7-L393C12

function updateFeeType(uint8 feeType, FeeType calldata newFee) external override {
..
@> if (newFee.veRAACShare + newFee.burnShare + newFee.repairShare + newFee.treasuryShare != BASIS_POINTS) {
revert InvalidDistributionParams();
}
feeTypes[feeType] = newFee;
emit FeeTypeUpdated(feeType, newFee);
}
...
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%
});
}

Tools Used

  • Manual Review

Recommendations

  • Consider add new function to update those types

    OR

  • Refactor the current implementation to update those types also

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.