Liquidation
The liquidation mechanism ensures the protocol’s safety by liquidating undercollateralized debts.
A loan position is liquidated when the users' borrow balance is greater than or equal to the under-collateralization threshold, as a result, the Liquidation Margin is equal to zero.
Liquidation Margin
The Liquidation Margin is an index that has been designed to make sure the user understands how close liquidation is. The Liquidation Margin of a certain borrow is expressed at each time as follows:
Where:
represents the under-collateralization threshold. It is computed as follows:
is the ratio between the borrowed and deposited asset value.
represents the borrow balance of the user, which is composed of the borrowed amount, plus the accrued and unpaid interests.
The Liquidation margin should give you an indication of how close you are to being liquidated. The closer the value is to zero the closer the liquidation
Liquidators
The liquidators are bots used by third parties that detect the undercollateralized position and liquidate them. The liquidation can be operated on the whole amount of the loan position or just a part of it. Liquidators are incentivized to purchase the collateral at a lower price at the borrower's expense.
Folks Finance runs the community liquidators. The total profits from this operation are deposited into the community treasury.
An open-source SDK package is published on the official Folks Finance GitHub to allow anyone to build their own liquidator.
Example
Due to collateral fluctuation or unpaid interest, the Liquidation Margin reaches the value of zero. So, the liquidator:
1.1 - asks for liquidation
1.2 - repays the borrowed amount plus the accrued interest
1.3 - receives the amount of fToken used as collateral by the borrower
2.1 - sends the fToken to the protocol
2.2 - receives the amount of token originally deposited by the borrower plus the interest accrued
Last updated