The getLiquidityRate function incorrectly calculates the value of total Debt. The normalized debt index is used directly instead of the actual total debt amount, leading to severely underestimated utilization rates and incorrect interest rate calculations.
In the ReserveLibrary, getLiquidityRate function incorrectly use the normalized debt index as the total debt amount:
However, the getNormalizedDebt() function returns an index in RAY units (1e27) that tracks interest accrual.
This index should be multiplied with the total usage to get the actual total debt.
The incorrect calculation of totalDebt leads to artificially low utilization rates, showing approximately 0.1% when actual utilization could be around 50%. This causes lending and borrowing rates to be severely underpriced due to understated utilization. Furthermore, the protocol suffers significant revenue loss from interest rate miscalculation, creating systemic risk as the protocol operates with incorrect interest rates and inefficient capital allocation.
Manual Review
Recommendations:
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.