> For the complete documentation index, see [llms.txt](https://constant-finance.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://constant-finance.gitbook.io/docs/v0/concepts/liquidations.md).

# Liquidations

Liquidation is the protocol's recovery process for a Position that no longer satisfies its risk boundary or has reached maturity with unpaid debt. It is permissionless: an external liquidator can repay debt and receive eligible collateral, provided the Position's checks are satisfied.

## Eligibility

An open Position becomes liquidatable when either of the following is true:

* its debt value is greater than the risk-adjusted value supported by its collateral; or
* its maturity has passed and debt remains.

These triggers are independent. An unhealthy Position can be liquidated before maturity, while a healthy Position with unpaid debt becomes liquidatable after maturity.

## High-Level Flow

```mermaid
flowchart LR
    L[Liquidator] --> P[Position<br/>eligibility and limits]
    P --> C[Eligible collateral]
    C --> L
    L --> D[Debt assets returned]
    D --> P
    P --> N[Constant NFT escrow]
```

At a high level, a liquidation proceeds as follows:

1. The Position confirms that liquidation is allowed.
2. The liquidator selects registered collateral within the permitted limit.
3. The collateral is transferred for external handling.
4. The liquidator returns the required debt assets to the Position.
5. The Position checks the actual collateral removed and debt repaid.
6. The repayment reduces Position debt and funds the corresponding Constant NFT claims.

The protocol does not require a particular exchange, venue, or trading strategy. The liquidator is responsible for obtaining the debt assets needed to complete settlement.

## Partial and Full Liquidation

Before maturity, a liquidation of an unhealthy Position can address at most half of its current debt value. This cap limits the amount of collateral that can be removed in a single action.

After maturity, the Position may be liquidated in full. The current Config sets the minimum liquidation size to zero, so there is no size-based exception to the normal pre-maturity partial-liquidation limit.

## Final Position Checks

The Position verifies:

* that every requested collateral asset is registered;
* that the Position is liquidatable at execution time;
* the maximum debt value the liquidation may address;
* the permitted collateral value, including liquidation bonuses; and
* the minimum debt repayment required for the collateral actually removed.

Choosing a different external execution strategy does not bypass these checks.

## Outcomes

| Outcome                                         | Position result                                                      | Supplier result                                 |
| ----------------------------------------------- | -------------------------------------------------------------------- | ----------------------------------------------- |
| Partial liquidation                             | Debt and collateral decrease; the Position may remain open           | Repaid amounts fund Constant NFT claims         |
| Full debt settlement                            | The Position closes and returns remaining collateral to the borrower | Final supplier claims can be funded and claimed |
| Collateral exhausted before all debt is covered | The Position may retain uncovered debt                               | Suppliers may face bad debt                     |

A partial liquidation does not have to restore the Position to health. If it remains unhealthy, it can remain eligible for another liquidation. Always evaluate the debt, collateral, and health that remain after execution.

## Risks That Liquidation Does Not Remove

* An oracle price may be incorrect or stale within the accepted configuration.
* Collateral may lack enough market liquidity to obtain the required debt assets.
* External execution may fail or experience significant price impact.
* Fast price movement may reduce recoverable value before liquidation finishes.
* Exhausted collateral may leave bad debt.

Liquidation is a recovery mechanism. It is not a guarantee that every supplier claim will always be repaid in full.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://constant-finance.gitbook.io/docs/v0/concepts/liquidations.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
