# Liquidations

While we run our own bots for ensuring that liquidations occur smoothly, users are also incentivised to the same, as every liquidation might be a healthy source of profit, since each liquidation comes with a [liquidation incentive](https://compound.finance/docs/comptroller#liquidation-incentive).

The source code for the liquidation bots we run is fully open-sourced, and it leverages heavily the SDK. Users are welcomed to fork it and run their own liquidation bots.

Check it out in our [monorepo](https://github.com/ionicprotocol/monorepo).

## Gathering Liquidations

#### `getPotentialLiquidations`

**Arguments:**

* `signer: ethers.Wallet`: a wallet from which to run the liquidations
* `supportedComptrollers: Array = []`: a list of supported pool addresses. If empty, all pools will be checked
* `maxHealthFactor: BigNumber = utils.parseEther("1")`: filter positions by their health factors
* `configOverrides?:` [`ChainLiquidationConfig`](/developers/ionic-sdk/api-reference-typing-and-interfaces.md#chainliquidationconfig): configuration for the supported input and output currencies for the liquidation and other parameters

**Returns:**

* `Promise<Array<`[`LiquidatablePool`](/developers/ionic-sdk/api-reference-typing-and-interfaces.md#liquidatablepool)`>>`

### `liquidatePositions`

**Arguments:**

* `positions: Array<`[`LiquidatablePool`](/developers/ionic-sdk/api-reference-typing-and-interfaces.md#liquidatablepool)`>`

**Returns:**

* `null`


---

# 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.ionic.money/developers/ionic-sdk/liquidations.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.
