# As a Liquidator

<figure><img src="https://1501474167-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUjrjglbdIn7XDGXWmDdN%2Fuploads%2FqXrJafSsnjHtGPFpmnzl%2Fimage.png?alt=media&#x26;token=7a6932eb-60c0-4a31-9982-dd4772687015" alt=""><figcaption></figcaption></figure>

A loan can enter one of two liquidation scenarios:

#### **Total liquidation (defaults)**

If a borrower fails to repay a loan before its maturity date, the loan defaults. Once a loan has defaulted, any party — borrower, lender, or third party — may liquidate it, subject to any required onboarding. \
In a default liquidation, the loan’s collateral is used to:

1. repay the lender’s outstanding debt, and
2. pay the liquidation fee to the liquidator.

Any remaining collateral, if any, is returned to the borrower.

#### **Partial liquidation**

For loans with a partial liquidation clause, partial liquidation can occur when the loan’s current LTV reaches the liquidation LTV.

In this case, only enough collateral is liquidated or claimed to reduce the outstanding debt so that the loan’s LTV falls back below the maximum LTV.

### Who can liquidate

In both default and partial liquidation scenarios, **any party** — borrower, lender, or third party — may act as the liquidator and earn the liquidation fee. For permissioned assets users need to be Whitelisted by the Transfer Agent.

### Balance breakdown by liquidator role

The liquidation fee is calculated as a percentage of the amount liquidated. This percentage is defined by the protocol on a per-market basis.

The allocation of collateral and repayments depends on the liquidator’s role:

* **If you are the lender**\
  You claim enough collateral to cover the outstanding debt owed to you, plus additional collateral corresponding to the liquidation fee paid to you as the liquidator.\
  Any remaining collateral is returned to the borrower.
* **If you are the borrower**\
  You reclaim all collateral and repay the lender’s outstanding debt in the loan’s principal token.\
  You also receive the liquidation fee as the liquidator.
* **If you are a third party**\
  You repay the outstanding debt in the loan’s principal token to acquire the required amount of collateral, and receive additional collateral corresponding to the liquidation fee paid to you as the liquidator.\
  Any remaining collateral is returned to the borrower.

### Collateral sufficiency

The outcome of a liquidation also depends on the value of the collateral:

* **If the collateral is sufficient**\
  The lender’s outstanding debt is fully repaid, and the liquidation fee is paid to the liquidator.\
  Any excess collateral is returned to the borrower.
* **If the collateral is insufficient**\
  The liquidation fee is paid to the liquidator first.\
  Any remaining collateral is then used to repay as much of the lender’s outstanding debt as possible.
