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

# Liquidation Manual

## Liquidation Overview

The Teller protocol works with both secured (ie. collateralized) and unsecured (ie. non-collateralized) loans. When a loan is borrowed, the collateral ratio is calculated as the combination of a liquidation buffer plus a liquidation reward. The current values are set as 15% and 5% respectively. Additionally, each loan has a unique expiration date. This is determined by a user’s loan request.

## Liquidation Scenarios

There are two scenarios when a loan can be liquidated:

1. Collateral value is less than `[Total Owed * (1 + Reward %)]`
2. Loan is overdue. The `current date > loan expiration` date

`Total Owed: Value of the loan borrowed and the interest owed`\
`Reward: Fee given to liquidator, initially set to 5%`

## Loan Types

Teller allows for several collateral types:

**Over-collateralized.** \
Collateral of 135% or above. Funds will be transferred from the lending pool directly to the borrower's wallet.&#x20;

If the value of the `collateral deposited` falls below the value of `[Total Owed * (1 + Reward %)]`, the loan is available for liquidation. Likewise, if the current date is greater than the loan expiration date, the loan is available for liquidation.

**Secured.** \
Collateral between 20%-134.99%. Funds are transferred from the lending pool to an escrow contract specific to the loan.&#x20;

If the value of the `collateral deposited plus the funds in escrow` falls below the value of `[Total Owed * (1 + Reward %)]`, the loan is available for liquidation. Likewise, if the current date is greater than the loan expiration date, the loan is available for liquidation.

**Unsecured.** \
No-collateral needed. Funds are transferred from the lending pool to an escrow contract specific to the loan.&#x20;

Liquidation can only occur if the loan is overdue.&#x20;

## How to Become a Teller Liquidator

Head to the open-source solidity repository of the Teller V1 Protocol [here](https://github.com/teller-protocol/teller-protocol-v1).

1. check out the `develop` branch
2. run `git pull`
3. run `yarn`
4. make sure your `.env` file has the proper mnemonic you want to use
5. make sure your address for the mnemonic has funds to liquidate the loan
6. run `truffle exec --network rinkeby ./scripts/loans/liquidate.js --tokenName {DAI} --collTokenName {ETH} --senderIndex 0`

The liquidation script will automatically attempt to liquidate any available loans.


---

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.teller.org/teller-docs/protocol/liquidation-manual.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
