The ReserveLibrary.getNormalizedDebt
function is intended to return the normalized debt of a reserve. However, it currently returns the usage index multiplied by a compounded interest value, which does not accurately reflect the total normalized debt. This miscalculation can lead to incorrect utilization rates and affect the overall financial calculations within the library.
The getBorrowRate()
and getLiquidityRate()
functions rely on the getNormalizedDebt()
function to retrieve the total normalized debt:
However, the implementation of getNormalizedDebt()
does not return the total normalized debt. Instead, it returns the current usage index multiplied by a compounded interest calculation:
The utilization rate, which is a critical factor in determining borrowing and liquidity rates, will be calculated based on an inaccurate total debt figure.
Manual Review
To correct the issue, the getNormalizedDebt()
function should be modified to return the actual normalized debt by multiplying the total usage by the compounded usage index:
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.