Liquidation is the process in which the collateral deposited by the borrower is sold if they cannot repay the loan on time. In the case of DeFi lending platforms, If the borrower’s collateral value drops below the value of the borrowed asset and they do not deposit additional collateral to maintain the collateral value, the loan gets liquidated.

The open protocol needs to provide a liquidation price to the users to give them an idea of their collateral so that they can add more collateral on time if required. Hashstack employs the following formula to calculate the Liquidation price -

![Where, Ccv = Current Collateral Value; Lcv = Current Loan amount; Lav= Actual Loan Value; a = Liquidation discount which is 6% for CDR≥1, 5% for CDR in [0.5,1) and 4% for CDR in 0.333, 0.5)

Where, Ccv = Current Collateral Value; Lcv = Current Loan amount; Lav= Actual Loan Value; a = Liquidation discount which is 6% for CDR≥1, 5% for CDR in [0.5,1) and 4% for CDR in [0.333, 0.5)

In addition, Hashstack uses a dual liquidation mechanism to ensure that all distressed loans are timely liquidated. If the collateral offset of a distressed loan reaches below 25% with no takers, it will automatically be liquidated by Hashstack.

Screenshot 2022-09-21 at 12.13.26 PM.png

When a loan nears its liquidation price, a notification is sent to the borrower through an in-app notification facility. To prevent liquidation, borrowers can add more collateral to their loans. The liquidation call (warning) price is set to 3% lower than the liquidation price so that the borrower can get some time to take action.

If they are unable to do the same, the loan will be pushed to a distressed loan category and will be awaiting liquidation. However, even if a loan reaches the distressed loan category, borrowers can still repay it. However, loans repaid at this stage will attract an additional 1% protocol fee.

Here are some tips to prevent liquidation -