Wrong Utilization Formula: Underestimating the Utilization of the Fund Pool
Total Liquidity is the total pool size, including the funds available for borrowing. And totalDebt is the funds that have been borrowed. Utilization should be the ratio of totalDebt to totalLiquidity, not totalDebt / (totalDebt + totalLiquidity).
Adding totalDebt will cause the formula to calculate the ratio of borrowing to the sum of borrowing and liquidity, which is not the utilization you want to calculate. In fact, the sum of totalDebt + totalLiquidity does not represent the actual pool size, but a mixed value.
Total Liquidity = 1000 units
, Total Debt = 400 units
Formula: Utilization Rate = totalDebt / (totalDebt + totalLiquidity)
Substitute the numerical calculation:
Utilization Rate = 400 / (400 + 1000)
So, the utilization rate = 28.57%.
The utilization rate obtained by the wrong formula is only 28.57%, which is far lower than the actual 40%(totalDebt / totalLiquidity
)
Assumptions:
• Total Liquidity = 1000 units
• Total Debt = 1000 units
This means that all liquidity has been borrowed and the platform's capital pool is fully utilized. In this case, let's compare the utilization calculated by the correct formula and the incorrect formula.
Utilization Rate = totalDebt / totalLiquidity
Substitute the numerical value for calculation:
Utilization Rate = 1000/1000 = 1 = 100%
Result analysis:
Utilization rate = 100%, which means that all liquidity of the platform has been borrowed and the capital pool has been fully utilized.
Formula: Utilization Rate = totalDebt / (totalDebt + totalLiquidity)
Substituting numerical values for calculation:
Utilization Rate = 1000/1000 + 1000 = 1000/2000 = 0.5 = 50%
Result analysis:
Utilization rate = 50%, this result means that the platform mistakenly believes that only 50% of the fund pool is lent out.
Utilization Rate = Total Borrowed / Total Liquidity
The utilization rate calculated using the wrong formula is too low, which causes the platform to underestimate the utilization of the fund pool.
Manual review
Modify the formula of calculateUtilizationRate function to use the correct totalLiquidity as the denominator instead of totalDebt + totalLiquidity.
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.