The ReserveLibrary.calculateUtilizationRate()
function returns the utilization rate of the reserve. However the implementation of the function is incorrect and returns incorrect value.
The ReserveLibrary.calculateUtilizationRate()
function calculates utilizationRate
as totalDebt / (totalLiquidity + totalDebt)
, which is incorrect.
The rateData.optimalUtilizationRate
is 80%
and utilizationRate
can be 80%
when totalDebt = 4 * totalLiquidity
. This is impossible scenario and the rateData.currentUsageRate
and rateData.currentLiquidityRate
vairable will be updated incorrectly.
The rateData.currentUsageRate
and rateData.currentLiquidityRate
vairable will be updated incorrectly.
Manual Review
Implement correct calculation for utilizationRate
.
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.