reserve.usageIndex which is used to find user debt while repaying borrowed amount but here reserve.usageIndex act as multipler and it can be change by huge amount of providing liquidity/withdrawing liquidity to lending pool.
Below code snippet we can se how reserve.usageIndex deteremined
In above code snippet rateData.currentUsageRate is used below we can see how it determined
In above code snippet we can see that utilizationRate is determined using totalLiquidity and total Usage it providing huge liquidity or withdrawing the liquidity leads to normal user ac will be land on liquidation or repay amount will huge than expected. Here reserve.usageIndex used as multipler in repaying , liqudation and withDrawNft here this activity can make user to repay more or force liquidation.
User can be forced to more amount than expected
Implement different mechanism to calculating the user debt while repay , withdraw NFT and Liquidation.
Code Snippet
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.