Core Contracts

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

Incorrect calculation in `RAACMinter::getUtilizationRate` function

Summary

The getUtilizationRate function has an issue with the incorrect initialization of the totalBorrowed variable (+), which is leading to a completely inaccurate calculation.

Vulnerability Details

In the RAACMinter::getUtilizationRate function, there is a variable named totalBorrowed that is meant to hold the total amount of RToken borrowed.

uint256 totalBorrowed = lendingPool.getNormalizedDebt();

However, the getNormalizedDebt function returns reserve.usageIndex instead of reserve.totalUsage.

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

Impact

Incorrect calculation

Tools Used

Manual review

Recommendations

Add a specific function to return reserve.totalUsage and use that function to initialize totalBorrowed.

Updates

Lead Judging Commences

inallhonesty Lead Judge 7 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 7 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.

Give us feedback!