getUtilizationRate function returns the utilizationrate by getting the NormalizedDebt from the lendingpool and getting the TotalDeposits from the stabilityPool. The issue here is that the getNormalizedDebt function returns the reserve.usageIndex. But the getUtilizationRate function treats it a the totalBorrowed which isnt the case. This lead to utilizationRate being wrongly calculated.
The usageIndex is a scaling factor that must be multiplied by totalUsage to calculate the actual totalBorrowed.
The calculateNewEmissionRate function uses the utilization rate to adjust the emission rate. If the utilization rate is incorrectly calculated, the emission rate will also be incorrectly adjusted.
manual review
Multiply totalUsage by usageIndex / 10^{27} to compute the real borrowed amount.
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.