Core Contracts

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

Incorrect Utilization Rate Calculation Due to `getNormalizedDebt` Implementation

Summary

The RAACMinter::getUtilizationRate function incorrectly calculates the utilization rate because it relies on lendingPool.getNormalizedDebt(), which does not return the total borrowed amount. Instead, it returns the usageIndex, leading to an inaccurate utilization rate. This inaccuracy affects the calculation of the new emission rate, potentially causing reduced incentives for users.

Vulnerability Details

Source

Code Snippet

function getUtilizationRate() internal view returns (uint256) {
uint256 totalBorrowed = lendingPool.getNormalizedDebt();
uint256 totalDeposits = stabilityPool.getTotalDeposits();
if (totalDeposits == 0) return 0;
return (totalBorrowed * 100) / totalDeposits;
}

However, the implementation of LendingPool::getNormalizedDebt returns usageIndex instead of the actual total borrowed amount:

function getNormalizedDebt() external view returns (uint256) {
return reserve.usageIndex;
}

This miscalculation impacts the emission rate adjustment in RAACMintercalculate::calculateNewEmissionRate:

function calculateNewEmissionRate() internal view returns (uint256) {
@> uint256 utilizationRate = getUtilizationRate();
__snip___
return emissionRate;
}

Impact

  • Incorrect Utilization Rate Calculation: The system operates under incorrect assumptions regarding total borrowed amounts which lead to incorrect utilization rate with inturn cause incorrect emissionRate thereby reducing Incentives

Tools Used

  • Manual code review

Recommendation

Implement a function to return the scaled total supply of the debt token and use it in the RAACMinter::getUtilizationRate function instead of getNormalizedDebt.

Updates

Lead Judging Commences

inallhonesty Lead Judge 4 months ago
Submission Judgement Published
Validated
Assigned finding tags:

RAACMinter::getUtilizationRate incorrectly mixes stability pool deposits with lending pool debt index instead of using proper lending pool metrics

inallhonesty Lead Judge 4 months ago
Submission Judgement Published
Validated
Assigned finding tags:

RAACMinter::getUtilizationRate incorrectly mixes stability pool deposits with lending pool debt index instead of using proper lending pool metrics

Support

FAQs

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