Core Contracts

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

Incorrect Fee Distribution When veRAACSupply is Zero Leads to Protocol Fee Misallocation

Summary and Impact

The FeeCollector contract incorrectly handles fee distribution when the total veRAAC supply is zero, leading to a misallocation of protocol fees. When no veRAAC tokens exist, instead of proportionally distributing the veRAACShare among burn, repair, and treasury allocations according to their ratios, the contract redirects the entire veRAACShare to the treasury. This behavior contradicts the protocol's documented tokenomics and fee distribution model.

Per the RAAC protocol documentation, the protocol is "designed to bring real estate on-chain and deeply integrate it within on-chain finance rails for seamless accessibility, composability, stability and capital efficiency." The fee distribution mechanism is a critical component of this design, particularly for the swap tax (2% total) which should maintain specific ratios: 0.5% to veRAACholders, 0.5% for burning, and 1% to the repair fund.

Vulnerability Details

In the FeeCollector contract's _processDistributions function, when totalVeRAACSupply is zero, the code simply adds the veRAACShare to the treasury's allocation:

if (shares[0] > 0) {
uint256 totalVeRAACSupply = veRAACToken.getTotalVotingPower();
if (totalVeRAACSupply > 0) {
TimeWeightedAverage.createPeriod(
distributionPeriod,
block.timestamp + 1,
7 days,
shares[0],
totalVeRAACSupply
);
totalDistributed += shares[0];
} else {
shares[3] += shares[0]; // Add to treasury if no veRAAC holders
}
}

This creates an imbalance in the fee distribution system. For example, with the swap tax fee type (type 6):

feeTypes[6] = FeeType({
veRAACShare: 500, // 0.5%
burnShare: 500, // 0.5%
repairShare: 1000, // 1.0%
treasuryShare: 0
});

When veRAACSupply is zero, instead of the intended distribution:

  • 0.5% should be burned

  • 1.0% should go to repair fund

  • 0.5% should be proportionally redistributed

The actual distribution becomes:

  • 0.5% burned

  • 1.0% to repair fund

  • 0.5% to treasury (misallocated veRAACShare)

This misallocation affects the protocol's tokenomics by:

  1. Reducing the effective burn rate, impacting the token's deflationary mechanism

  2. Overfunding the treasury beyond its intended allocation

  3. Undermining the repair fund's proportional share of redistributed fees

The issue is particularly relevant during the protocol's initial phase or periods of low veRAAC minting, where having zero veRAACSupply is more likely.

Tools Used

  • Manual Review

  • Hardhat

Recommendations

Modify the _processDistributions function to proportionally distribute the veRAACShare when veRAACSupply is zero.

Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 month ago
Submission Judgement Published
Invalidated
Reason: Design choice

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.