Core Contracts

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

Incorrect Basis Points Lead to Unallocated Funds

Summary

Fee Types 6 (Swap Tax) and 7 (NFT Royalty) use basis point values that sum to 2,000 bps (20%) instead of the required 10,000 bps (100%), leaving 80% of fees unassigned.

Vulnerability Details

In the code below, you can see that the developer intended to do 2500 + 2500 + 5000 = 10,000 which will be 100% of the 2% fee collected. The error in the code is 500 + 500 + 1000 = 2000which is 20% of the 2% leaving 80% of the 2% fee unallocated.

  • Real-World Scenario:

    • A decentralized exchange (DEX) processes $10M in daily swaps

    • Intended Allocation: 2% tax = $200,000/day

    • Actual Allocation: Only 20% of 200,000(200,000(40,000) is distributed.

    • Result: 160,000/day is lost or stuck in the contract

/**
* @dev Initializes default fee types according to protocol rules
*/
function _initializeFeeTypes() internal {
// Protocol Fees: 80% to veRAAC holders, 20% to treasury
// 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%
});
}

Impact

From the details above, we can see that the protocol losses a lot of money due to this oversight. 80% of the fees loss or stuck in the contract is huge. Also protocol revenue leaks, undermining sustainability.

Tools Used

Manual review

Recommendations

feeTypes[6] = FeeType({
veRAACShare: 2500, // 25% of 2% tax → 0.5% absolute
burnShare: 2500, // 25% → 0.5%
repairShare: 5000, // 50% → 1.0%
treasuryShare: 0
});
// NFT Royalty Fees (2% total)
feeTypes[7] = FeeType({
veRAACShare: 2500, // 25% of 2% tax → 0.5% absolute
burnShare: 0,
repairShare: 5000, // 50% → 1.0%
treasuryShare: 2500 // 25% of 2% tax → 0.5% absolute
});
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!