Core Contracts

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

LendingPool::setPrimeRate() requires primeRate to be RAY but oracle will not return it in this format

Summary

When oracles return the primeRate amount, it will be decoded to a normalized amount, but not in RAY (27 decimals).

Vulnerability Details

The code suggests newPrimeRate will be (in RAY), but it is not

/**
* @notice Sets a new prime rate for the reserve.
* @param reserve The reserve data.
* @param rateData The reserve rate parameters.
* @param newPrimeRate The new prime rate (in RAY).
*/
function setPrimeRate( ReserveData storage reserve,ReserveRateData storage rateData,uint256 newPrimeRate) internal

This will break calculation of the borrowRate calculateBorrowRate()and the update of interest rates and liquidity updateInterestRatesAndLiquidity()

Impact

Breaking core protocol variables

Tools Used

Manual review

Recommendations

When setting the prime rate carefully convert it to RAY

Updates

Lead Judging Commences

inallhonesty Lead Judge 7 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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

Give us feedback!