# Liquidation

When the total borrowed $$TB\_t$$ exceeds the borrowable amount $$BA\_t$$, the loan can be liquidated by a third party:

$$
TB\_t>BA\_t
$$

When a third party liquidates a loan, they select a single borrow to repay and a single collateral to seize. The maximum amount $$C$$, they can liquidate is given as a percentage $$liquidation.max$$ (e.g. 50%) of the borrow balance $$BB\_t$$​:

$$
C\leqslant	BB\_t\*liquidation.max
$$

To incentivise third parties to liquidate other users’ under-collateralized loans, a liquidation bonus $$liq.bonus$$ is earned. If there is insufficient balance of the chosen collateral, then at most the full collateral balance will be seized.

A portion of the liquidation bonus is kept by the protocol as revenue, as determined by the liquidation fee $$liq.fees$$, Any remaining collateral that is not retained by the protocol, will be earned by the liquidator.


---

# Agent Instructions: 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:

```
GET https://docs.folks.finance/architecture/liquidation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
