Core Contracts

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

Fees Types Values for Buy/Swap Tax and NFT Royalty are improperly set.

Summary

Fee Types Value From The FeeCollector::contructor is initialized with the protocol ruleSLOC#148-149, but the fee percentage is set improperly.

Vulnerability Details

When FeeCollector contract is deployed by the admin of the protocol that it initialize the fees function SLOC#149

// File: contracts/core/collectors/FeeCollector.sol
// Initialize fee types with protocol rules
_initializeFeeTypes();

If we check that it set the value for 7 different fees Types in that Swap Tax and NFT Royalty type fees SLOC#378-393 doesnt follow the net spec where in the Buy / Swap tax should be 2% according to the spec but here in the if we look at the function carefully it veRAACShare is 500 means 5% and burnShare is 500 means 5% and repairShare is 1000 means 10% means total would be 20% instead of the 2% SLOC#379.

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

Same For the NFT Royalty Fees Set veRAACShare is 500 means 5% and repairShare is 1000 means 10% and treasuryShare is 500 means 5% total would be 20% instead of the 2% SLOC#387. Contract Sets fees on basis points.

// File: contracts/core/collectors/FeeCollector.sol
// NFT Royalty Fees (2% total)
feeTypes[7] = FeeType({
veRAACShare: 500, // 0.5%
burnShare: 0,
repairShare: 1000, // 1.0%
treasuryShare: 500 // 0.5%
});

Impact

According to the FeeCollector Contract user will be paying more fees than the provided information from the netspec.

Tools Used

  • Manual Review

Recommended Mitigation

// 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%
});
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!