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.
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.
Interest Mispricing: Borrowing and lending rates may not reflect current market conditions, leading to distortions in the cost of capital.
Manual Review
Implement a mechanism to recalculate baseRate, optimalRate, and maxRate whenever the prime rate is updated.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.