Core Contracts

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

Inadequate addition of Prime Rate Updates to Derived Interest Parameters

Summary

When the prime rate is updated (e.g., via setPrimeRate), the derived rate parameters (baseRate, optimalRate, and maxRate) remain fixed based on the initial prime rate. This static assignment fails to propagate subsequent changes in the prime rate.

Vulnerability Details

At initialization the contract sets:

  • baseRate = primeRate.percentMul(25_00)

  • optimalRate = primeRate.percentMul(50_00)

  • maxRate = primeRate.percentMul(400_00)

However, there is no mechanism to automatically update these derived parameters when the prime rate changes at https://github.com/Cyfrin/2025-02-raac/blob/main/contracts/core/pools/LendingPool/LendingPool.sol#L678. The relative percentages for the base, optimal, and max rates become inconsistent with the new prime rate, potentially skewing interest calculations.

Impact

Interest Mispricing: Borrowing and lending rates may not reflect current market conditions, leading to distortions in the cost of capital.

Tools Used

Manual Review

Recommendations

Implement a mechanism to recalculate baseRate, optimalRate, and maxRate whenever the prime rate is updated.

Updates

Lead Judging Commences

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

ReserveLibrary::setPrimeRate only updates primeRate without adjusting baseRate, optimalRate, and maxRate proportionally, breaking interest rate model and causing incorrect calculations

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

ReserveLibrary::setPrimeRate only updates primeRate without adjusting baseRate, optimalRate, and maxRate proportionally, breaking interest rate model and causing incorrect calculations

Support

FAQs

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