Submitted by DadeKuma, also found by DadeKuma and Arabadzhiev
Borrowers have no incentives to repay the loan if the owed interest grows too much, as the liquidation check fails to take it into consideration when calculating the LTV. This will generate bad debt for the lenders.
The liquidation call must pass this check to execute:
src/processor/liquidate.rs#L27
The issue is that it fails to consider how much interest is owed by the borrower, it only checks how much the user has borrowed at the start of the loan:
src/processor/swap.rs#L16
As such, if the borrower accumulates a very high interest to pay, the lender has no way to liquidate this position if the original borrowed amounts LTV (without accrued interest) stays under 90%. These borrowers will never repaid the loan, and this will generate bad debt for lenders.
Consider adding the owed interest to the total amount when performing the liquidation check.
Invalid Validation
piske-alex (Lavarage) confirmed
alcueca (judge) decreased severity to Medium and commented:
DadeKuma (warden) commented:
alcueca (judge) commented:
DadeKuma (warden) commented:
alcueca (judge) commented:
DadeKuma (warden) commented:
Picodes (Appellate Court lead judge) commented:
Note, this finding was upgraded to High by C4 staff in reference to the Appellate Court decision.
