Liquidation Mechanism

May 28
10
min of reading

What is Liquidation?

Liquidation in lending and borrowingprotocols is a process where a borrower's collateral is seized and the debt isrepaid by a third party. This usually happens when the value of the collateralfalls below a certain threshold compared to the borrowed amount, marking theposition as unhealthy to allow bots or individual users to liquidate theposition.

Why is Liquidation important?

Liquidation is a critical mechanism formaintaining the health and stability of a lending and borrowing protocol. Itensures that the protocol remains solvent. By allowing for the seizure ofcollateral and repayment of debt in a fast and fashionable manner, a protocolprevents bad debt.

When does a Liquidation occur?

A liquidation occurs when a user'sLoan-to-Value (LTV) ratio crosses a predetermined threshold. The LTV ratio is ameasure of borrowed funds to the value of the collateral. If this ratio exceedsthe limit set by the protocol (often around 80%), it indicates potential risk,triggering liquidation.

Liquidation Explained with an Example

Let's consider an example involving twocharacters, Alice and Bob:

1. Alice deposits 1,000 USDT as collateral.

2. Alice borrows 0.3 ETH, which is worth660 USD at the time (ETH price = 2,200 USD). This sets her LTV ratio at 66%.

Change in ETH Price:

The price of ETH rises to 2,700 USD.Consequently, the value of Alice's borrowed amount increases, pushing her LTVto 81% and crossing the 80% liquidation threshold.

Bob's Intervention:

Bob, another user, notices Alice's positionis now vulnerable and eligible for liquidation.

Liquidation Process:

Bob calls the liquidation function,specifying Alice's address and the desired liquidation value.

Most protocols have safeguards to preventexcessive loss for borrowers. For example, only 50% of the debt may beliquidated at a time.

Execution of Liquidation:

Bob liquidates 50% of Alice's debt, whichmeans he is repaying 0.15 ETH (405 USD) on behalf of Alice, which decreasesAlice’s LTV.

In return, Bob receives Alice's collateral,typically with a penalty added (e.g., 5%). Thus, Bob pays 405 USD but receives425.25 USDT from Alice's collateral, which then increases Alice’s LTV again.

Post-Liquidation Position:

Alice's position is adjusted to reflect theliquidation: Alice's collateral is now 574.75 USDT, and her debt is 0.15 ETH(405 USD). This results in a healthier LTV of 70.46%, marking the position ashealthy again.

Protocol-Specific Conditions and Scenarios

Different protocols might have uniqueconditions, like maximum liquidation values relative to position size, tominimize the borrower's loss.

Special Scenarios:

Certain situations might exacerbate theborrower's position, such as a large penalty leading to a more unhealthy LTVratio.

Extreme Cases: In rare cases, theliquidation plus penalty might exceed the provided collateral, which oftenresults in issues like a revert of the liquidation attempt. Protocols shouldimplement a safeguard which then only pays the provided collateral.

Key Takeaways for Borrowers

Liquidation Penalty: Choosing a protocolwith a reasonable liquidation penalty is crucial.

Speed of Liquidation: Quick liquidationhelps in maintaining protocol health and reducing borrower loss.

Token Volatility: For tokens with highervolatility, protocols often set lower LTV limits to mitigate risks.

Would love to hear the most interestingissue you have found in a liquidation process audit.

As always, if that was useful for youplease RT.

Read the original article

Related articles