ReserveLibrary::getNormalizedDebt
is intended to return the NormalizedDebt value. However, when timeDelta < 1
, it returns reserve.totalUsage
instead of reserve.usageIndex
. By contrast, getNormalizedIncome
correctly returns reserve.liquidityIndex
in the same scenario. This mismatch can cause confusion or errors in calculations that rely on getNormalizedDebt.
If timeDelta < 1
, the function returns reserve.totalUsage
instead of reserve.usageIndex
, which may lead to incorrect debt values.
Meanwhile, getNormalizedIncome
properly returns reserve.liquidityIndex
under similar conditions.
While getBorrowRate
(which uses getNormalizedDebt
) is not currently in use, this incorrect behavior in the library could cause issues in other protocols or future upgrades. It might produce unexpected debt calculations, potentially leading to interest rate or utilization mismatches.
Manual Code Review and Foundry
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.