> For the complete documentation index, see [llms.txt](https://docs.kairosswap.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kairosswap.com/using-kairos/liquidation.md).

# Liquidation

How Liquidation Works

In a swap, both parties post collateral to guarantee they can pay the obligations from their side of the trade. The buyer's collateral, as well as the pool's collateral, is sized to cover the expected payment they could owe over the term, calculated from the swap rate and the length of the swap — not from the notional amount. The collateral amount can then be adjusted based on the market's leverage multiplier.

On top of that collateral, the buyer prefunds a small **liquidation bounty** at the moment they open the swap. The bounty is a percentage of their required collateral, set per market by the `liquidationIncentive` parameter and capped at **5%**. So a buyer whose maximum payment obligation is $5,000 posts $5,000 in collateral plus a bounty of up to $250, for a total of up to $5,250 pulled from their wallet at entry (alongside the protocol fee).

**The bounty is refundable.** It's accounted for separately from the collateral that backs your payments, and if your swap is never liquidated it comes back to you in full when the swap settles at expiry. You only forfeit it if you're actually liquidated.

### When does a position become liquidatable?

A position becomes liquidatable when one side's collateral can no longer cover the payment it **already owes** on accrued interest up to right now.

This is worth being precise about: liquidation is evaluated on **accrued** payments, not projected ones. Where the rate might go between now and expiry is irrelevant to whether you can be liquidated today. A swap is only liquidatable when one side's collateral is mathematically insufficient at this moment.

### Who can liquidate?

**Anyone.** Liquidation is permissionless — there is no whitelist and no privileged liquidator role. Whoever calls `liquidateSwap` on an underwater position becomes the liquidator and collects the reward.

Where that reward comes from depends on which side went underwater:

* **Buyer-side liquidation** — the liquidator receives the buyer's prefunded liquidation bounty.
* **Pool-side liquidation** — the liquidator receives `liquidationIncentive × poolCollateralBacking`, drawn from the LP collateral reserved for that swap.

At most one side is liquidated per call. The other side receives its normal settlement.

### What happens when you're liquidated

The swap closes immediately. Your remaining collateral, after the liquidator's reward is paid out, transfers to the counterparty. In the example above, being liquidated means losing the $250 bounty on top of settling what you owed.

Importantly, this works **symmetrically**. The LP pool faces liquidation on exactly the same terms as the buyer — if the pool's backing for a swap can't cover what the pool owes, the pool gets liquidated and the buyer is made whole.

Your maximum loss on a swap is what you posted. Because each swap is independently collateralized and settlement caps each side's payment at its own collateral, you can never end up owing more than you put in.

### How to avoid liquidation

**Choose a lower-leverage market.** Leverage is notional divided by collateral, so a lower multiplier puts more collateral behind the same position size. Liquidation is that collateral running out — more of it simply moves the point where that happens further away, so rates have to travel further against you to get there.

The cost is capital efficiency: the same exposure ties up more money. Where two markets track the same rate and differ only in leverage, that's the trade you're making.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.kairosswap.com/using-kairos/liquidation.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
