# Liquidation

Liquidation is determined by [*liquidation collateral factors*](https://docs.compound.finance/helper-functions/#get-asset-info-by-address), which are separate and higher than borrow collateral factors (used to determine initial borrowing capacity), which protects borrowers & the protocol by ensuring a price buffer for all new positions. These also enable governance to reduce borrow collateral factors without triggering the liquidation of existing positions.

When an account’s borrow balance exceeds the limits set by liquidation collateral factors, it is eligible for liquidation. A liquidator (a bot, contract, or user) can call the [*absorb*](https://docs.compound.finance/liquidation/#absorb) function, which relinquishes ownership of the accounts collateral, and returns the value of the collateral, minus a penalty ([*liquidationFactor*](https://docs.compound.finance/helper-functions/#get-asset-info-by-address)), to the user in the base asset. The liquidated user has no remaining debt, and typically, will have an excess (interest earning) balance of the base asset.

Each absorption is paid for by the protocol’s reserves of the base asset. In return, the protocol receives the collateral assets. If the remaining reserves are less than a governance-set [*target*](https://docs.compound.finance/liquidation/#target-reserves), liquidators are able to [*buy*](https://docs.compound.finance/liquidation/#buy-collateral) the collateral at a [*discount*](https://docs.compound.finance/liquidation/#ask-price) using the base asset, which increases the protocol’s base asset reserves.

#### Liquidatable Accounts <a href="#liquidatable-accounts" id="liquidatable-accounts"></a>

This function returns true if the account passed to it has negative liquidity based on the liquidation collateral factor. A return value of true indicates that the account is presently liquidatable.

```solidity
function isLiquidatable(address account) public view returns (bool)
```

* `account`: The account to examine liquidatability.
* `RETURNS`: Returns true if the account is presently able to be liquidated.

#### Absorb <a href="#absorb" id="absorb"></a>

This function can be called by any address to liquidate an underwater account. It transfers the account’s debt to the protocol account, decreases cash reserves to repay the account’s borrows, and adds the collateral to the protocol’s own balance. The caller has the amount of gas spent noted. In the future, they could be compensated via governance.

```solidity
function absorb(address absorber, address[] calldata accounts)
```

* `absorber`: The account that is issued liquidator points during successful execution.
* `accounts`: An array of underwater accounts that are to be liquidated.
* `RETURN`: No return, reverts on error.

#### Ask Price <a href="#ask-price" id="ask-price"></a>

In order to repay the borrows of absorbed accounts, the protocol needs to sell the seized collateral. The *Ask Price* is the price of the asset to be sold at a discount (configured by governance). This function uses the price returned by the protocol’s price feed.


---

# 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://seahorsefi.gitbook.io/seahorsefi/protocol/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.
