In LendingPool contract, uncontrolled growth of liquidityIndex and **usageIndex **will be higher when after many txs happened and totalDebt = totalLiquidity = 0. This results in an inflated index over time, leading to unintended financial consequences for borrowers and lenders.
As seen above, reserve.liquidityIndex and reserve.usageIndex are always increasing, due to initial values are 1e27.
reserve.liquidityIndex = (1e27 + XXX) * reserve.liquidityIndex / 1e27
reserve.usageIndex = (1e27 + ...) * reserve.usageIndex / 1e27
After many txs such as deposit(), withdraw(), depositNFT(), borrow(), repay(), assume totalDebt=totalLiquidity=0, these index values will be much higher. But this will be the same as initial state and only index values are high.
There's no condition to prevent index growth and will let the protocol disrutpion.
If liquidityIndex and usageIndex increase without bound, future deposits and debt calculations will be skewed, potentially making lending and borrowing infeasible.
Users may exploit this by making micro-deposits and withdrawals repeatedly to manipulate the index values artificially, causing economic losses for future users.
manual
Stop index growth when reserve is empty.
Apply rebalance method for index control.
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.