Core Contracts

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

Wrong getTotalDeposits returned will affect the utilizationRate calculations

Summary

The getTotalDeposits returned the wrong amount.

Vulnerability Details

The getTotalDeposits returns the total deposits in the pool

* @notice Gets the total deposits in the pool.
* @return Total deposits amount.
*/
function getTotalDeposits() external view returns (uint256) {
return rToken.balanceOf(address(this));
}

the returned value is however wrong as it returns the interest rate of the last update, this will mean that an incorrect value will be returned.

Impact

This will lead to a wrong calculations of the total deposits which will affect the utilizationRate calculations.

Tools Used

Manual review

Recommendations

Update the state during the call to getTotalDeposits by calling the updateState, this will ensure that an accurate total deposits is return and utilization rate will effectively be calculated.

Updates

Lead Judging Commences

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

RAACMinter::getUtilizationRate uses stale debt index from LendingPool by not calling updateState() first, leading to incorrect emission rate adjustments

Appeal created

anonymousjoe Auditor
about 2 months ago
inallhonesty Lead Judge
about 2 months ago
anonymousjoe Auditor
about 2 months ago
inallhonesty Lead Judge
about 2 months ago
inallhonesty Lead Judge about 2 months ago
Submission Judgement Published
Validated
Assigned finding tags:

LendingPool::getNormalizedIncome() and getNormalizedDebt() returns stale data without updating state first, causing RToken calculations to use outdated values

Support

FAQs

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