> ## Documentation Index
> Fetch the complete documentation index at: https://tokenterminal.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> To query the Token Terminal data catalog, read https://tokenterminal.com/docs/catalog/agents-manual.md first. It is the whole catalog as one page: table naming grammar, key columns, partition and cluster rules, units, additivity, and the tables that are documented but not served yet.
> Never query a catalog table on a time bound alone. Also filter its cluster key, which you read from INFORMATION_SCHEMA.COLUMNS; an empty result means the object is a view, whose pruning contract is on its page. Compute is billed to the caller's own Google Cloud project.

# Liquidations

> Every liquidation of an undercollateralized borrower.

One row per liquidation, with the collateral seized and the debt repaid on the same row. `collateral_amount` is the tokens seized and `borrow_amount` the debt cleared.

## Columns

<table>
  <thead>
    <tr>
      <th width="270">Column</th>
      <th width="120">Type</th>
      <th>Description</th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`block_timestamp`</td><td>TIMESTAMP</td><td>Time of the block containing the liquidation. Partition column.</td></tr>
    <tr><td>`block_number`</td><td>INTEGER</td><td>Number of the block containing the liquidation.</td></tr>
    <tr><td>`transaction_hash`</td><td>STRING</td><td>Hash of the transaction that emitted the liquidation event.</td></tr>
    <tr><td>`log_index`</td><td>INTEGER</td><td>Position of the liquidation event in the block.</td></tr>
    <tr><td>`unique_id`</td><td>INTEGER</td><td>Row key: fingerprint of `chain_id`, `block_number`, `transaction_hash`, `log_index`.</td></tr>
    <tr><td>`event_type`</td><td>STRING</td><td>Constant `liquidations`; stacking key across the lending facts.</td></tr>
    <tr><td>`project_id`</td><td>STRING</td><td>Protocol operating the market, such as `aave`.</td></tr>
    <tr><td>`app_id`</td><td>STRING</td><td>Deployment of the protocol the market belongs to.</td></tr>
    <tr><td>`chain_id`</td><td>STRING</td><td>Chain the liquidation happened on.</td></tr>
    <tr><td>`lending_market_id`</td><td>STRING</td><td>Market holding the debt that was repaid; joins `dimensions.lending_markets`.</td></tr>
    <tr><td>`lending_market_contract_address`</td><td>STRING</td><td>Contract the market lives on; not a key.</td></tr>
    <tr><td>`lending_position_id`</td><td>STRING</td><td>The liquidated position: one borrower inside one market.</td></tr>
    <tr><td>`collateral_lending_market_reserve_id`</td><td>STRING</td><td>Reserve the seized collateral sat in; joins `dimensions.lending_market_reserves`.</td></tr>
    <tr><td>`collateral_lending_market_reserve_position_id`</td><td>STRING</td><td>The borrower's holding in that collateral reserve.</td></tr>
    <tr><td>`collateral_receipt_token_address`</td><td>STRING</td><td>Receipt token whose balance moved on the collateral side; null where positions are not tokenised.</td></tr>
    <tr><td>`borrow_lending_market_reserve_id`</td><td>STRING</td><td>Reserve the repaid debt sat in; joins `dimensions.lending_market_reserves`.</td></tr>
    <tr><td>`borrow_lending_market_reserve_position_id`</td><td>STRING</td><td>The borrower's debt in that reserve.</td></tr>
    <tr><td>`borrow_receipt_token_address`</td><td>STRING</td><td>Debt token whose balance moved on the borrow side; null where debt is not tokenised.</td></tr>
    <tr><td>`liquidator_address`</td><td>STRING</td><td>Account that repaid the debt and took the collateral.</td></tr>
    <tr><td>`borrower_address`</td><td>STRING</td><td>Account that was liquidated; the position key across the lending facts.</td></tr>
    <tr><td>`collateral_token_id`</td><td>STRING</td><td>Collateral token seized: `{token_address}-{chain_id}`.</td></tr>
    <tr><td>`collateral_token_address`</td><td>STRING</td><td>Contract address of the collateral token.</td></tr>
    <tr><td>`collateral_token_symbol`</td><td>STRING</td><td>Symbol of the collateral token.</td></tr>
    <tr><td>`collateral_token_decimals`</td><td>INTEGER</td><td>Decimals of the collateral token.</td></tr>
    <tr><td>`borrow_token_id`</td><td>STRING</td><td>Debt token repaid: `{token_address}-{chain_id}`.</td></tr>
    <tr><td>`borrow_token_address`</td><td>STRING</td><td>Contract address of the debt token.</td></tr>
    <tr><td>`borrow_token_symbol`</td><td>STRING</td><td>Symbol of the debt token.</td></tr>
    <tr><td>`borrow_token_decimals`</td><td>INTEGER</td><td>Decimals of the debt token.</td></tr>
    <tr><td>`collateral_to_liquidator_amount_raw`</td><td>BIGNUMERIC</td><td>Share of the seized collateral paid to the liquidator, in the token's stored unit, exact integer.</td></tr>
    <tr><td>`collateral_to_liquidator_amount`</td><td>BIGNUMERIC</td><td>`collateral_to_liquidator_amount_raw` decimal-corrected into whole tokens.</td></tr>
    <tr><td>`collateral_to_treasury_amount_raw`</td><td>BIGNUMERIC</td><td>Share of the seized collateral kept by the protocol, in the token's stored unit, exact integer.</td></tr>
    <tr><td>`collateral_to_treasury_amount`</td><td>BIGNUMERIC</td><td>`collateral_to_treasury_amount_raw` decimal-corrected into whole tokens.</td></tr>
    <tr><td>`collateral_amount_raw`</td><td>BIGNUMERIC</td><td>Collateral seized in total, exact integer; the liquidator share and the treasury share add up to it.</td></tr>
    <tr><td>`collateral_amount`</td><td>BIGNUMERIC</td><td>`collateral_amount_raw` decimal-corrected into whole tokens.</td></tr>
    <tr><td>`borrow_amount_raw`</td><td>BIGNUMERIC</td><td>Debt repaid in the token's stored unit, exact integer.</td></tr>
    <tr><td>`borrow_amount`</td><td>BIGNUMERIC</td><td>`borrow_amount_raw` decimal-corrected into whole tokens.</td></tr>
  </tbody>
</table>

## Sample queries

> [!WARNING]
>
> This table is large and split by day. Bound `block_timestamp` and filter `chain_id` on every query, or you read the whole table and the whole table is billed to you.

**One day, one app**

Each row has two token legs: the collateral seized and the debt repaid. `borrower_address` is the position that was closed and `liquidator_address` the account that closed it.

```sql theme={null}
select
    events.block_timestamp,
    events.collateral_token_symbol,
    events.collateral_amount,
    events.borrow_token_symbol,
    events.borrow_amount,
    events.borrower_address,
    events.liquidator_address
from `facts_lending_markets.liquidations` as events
where events.block_timestamp >= timestamp('2026-09-01')
  and events.block_timestamp < timestamp('2026-09-02')
  and events.chain_id = 'ethereum'
  and events.app_id = 'aave-v3'
limit 100
```

**Most liquidated collateral**

Counting rows counts liquidation events; summing `collateral_amount` totals the tokens taken. Both are per collateral token, since the amounts are in each token's own units.

```sql theme={null}
select
    events.collateral_token_symbol,
    count(*) as liquidations,
    sum(events.collateral_amount) as collateral_seized
from `facts_lending_markets.liquidations` as events
where events.block_timestamp >= timestamp('2026-08-01')
  and events.block_timestamp < timestamp('2026-09-01')
  and events.chain_id = 'ethereum'
group by events.collateral_token_symbol
order by liquidations desc
limit 25
```

**Collateral kept by the protocol**

A liquidation splits the seized collateral between the liquidator's bonus and the protocol's cut. The two columns are those shares, and they add up to `collateral_amount`.

```sql theme={null}
select
    date(events.block_timestamp) as day,
    events.app_id,
    sum(events.collateral_to_liquidator_amount) as to_liquidator,
    sum(events.collateral_to_treasury_amount) as to_treasury
from `facts_lending_markets.liquidations` as events
where events.block_timestamp >= timestamp('2026-08-01')
  and events.block_timestamp < timestamp('2026-09-01')
  and events.chain_id = 'ethereum'
group by day, events.app_id
order by day
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.