# Liquidate Position

* Function `liquidatePosition`
* After determine that the liquidation conditions are met, calls into the same underlying `_closePosition`.
* Liquidation Condition: (1) premium is not enough to pay for the swap fees that the borrowed liquidity would have earned, OR (2) current time exceed the 3 days loan term after LP calls for seizing liquidity. Revert with `LiquidationNotMet` if none of the conditions hold.
* Note: anyone can be a liquidator when the liquidation condition is met. A `liquidationReward` is paid to 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://erc20-docs.particle.trade/developer/liquidate-position.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.
