> ## 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.

# Lending markets

> Lending markets and their reserves: the keys, and how to size them.

One row per lending market in `dimensions.lending_markets`, the boundary inside which deposits and debts back each other: the pool on Aave, one collateral and loan pair on Morpho Blue. `lending_market_reserve_id` keys `dimensions.lending_market_reserves`, one row per asset inside a market, and that is the grain a market's figures are summed from.

## Coverage

One row per app, and a tick marks every app that reports the measure at this grain. It is the same table as the Market tab of [Lending](/docs/catalog/lending).

<div class="tt-roster">
  <table class="tt-coverage">
    <thead>
      <tr>
        <th width="230">App</th>
        <th width="140">Project</th>
        <th>TVL</th>
        <th>Active loans</th>
        <th>Collateral</th>
      </tr>
    </thead>

    <tbody>
      <tr><td><code>aave-v3</code></td><td><code>aave</code></td><td><span class="tt-check">✓</span></td><td><span class="tt-check">✓</span></td><td><span class="tt-check">✓</span></td></tr>
      <tr><td><code>aave-v4</code></td><td><code>aave</code></td><td><span class="tt-check">✓</span></td><td><span class="tt-check">✓</span></td><td><span class="tt-check">✓</span></td></tr>
    </tbody>
  </table>
</div>

## Columns

<Tabs>
  <Tab title="Markets">
    One row per lending market on one chain.

    <table>
      <thead>
        <tr>
          <th width="280">Column</th>
          <th width="130">Type</th>
          <th>Description</th>
        </tr>
      </thead>

      <tbody>
        <tr><td><code>lending\_market\_id</code></td><td>STRING</td><td>Market key, formatted <code>\{lending\_market}-\{chain\_id}</code>.</td></tr>
        <tr><td><code>app\_id</code></td><td>STRING</td><td>App operating the market, such as <code>aave-v3</code> or <code>morpho-blue</code>. Joins <code>dimensions.apps</code>.</td></tr>
        <tr><td><code>chain\_id</code></td><td>STRING</td><td>Chain the market lives on.</td></tr>
        <tr><td><code>project\_id</code></td><td>STRING</td><td>Project behind the app. Joins <code>dimensions.projects</code>.</td></tr>
        <tr><td><code>lending\_market</code></td><td>STRING</td><td>The protocol's own key for the market: the pool contract address on pool lenders, the market hash on Morpho Blue.</td></tr>
        <tr><td><code>lending\_market\_contract\_address</code></td><td>STRING</td><td>The deployed contract the market runs on. Matches <code>lending\_market</code> on pool lenders; every Morpho Blue market on a chain shares one singleton contract.</td></tr>
        <tr><td><code>lending\_market\_name</code></td><td>STRING</td><td>Readable name of the market, such as <code>Core</code> or <code>Morpho Blue: cbBTC/USDC 86%</code>. A label, not a key.</td></tr>
      </tbody>
    </table>
  </Tab>

  <Tab title="Reserves">
    One row per reserve, one asset inside one market. An Aave pool lists one reserve per underlying token and a Morpho Blue market exactly two, the loan side and the collateral side; where a pool lists the same token twice, the key is the protocol's listing rather than the token.

    <table>
      <thead>
        <tr>
          <th width="280">Column</th>
          <th width="130">Type</th>
          <th>Description</th>
        </tr>
      </thead>

      <tbody>
        <tr><td><code>lending\_market\_reserve\_id</code></td><td>STRING</td><td>Reserve key, formatted <code>\{lending\_market}-\{lending\_market\_reserve}-\{chain\_id}</code>.</td></tr>
        <tr><td><code>lending\_market\_id</code></td><td>STRING</td><td>Market the reserve belongs to. Joins <code>dimensions.lending\_markets</code>.</td></tr>
        <tr><td><code>app\_id</code></td><td>STRING</td><td>App operating the market. Joins <code>dimensions.apps</code>.</td></tr>
        <tr><td><code>chain\_id</code></td><td>STRING</td><td>Chain the market lives on.</td></tr>
        <tr><td><code>project\_id</code></td><td>STRING</td><td>Project behind the app. Joins <code>dimensions.projects</code>.</td></tr>
        <tr><td><code>lending\_market</code></td><td>STRING</td><td>The protocol's own key for the market, copied from the market row.</td></tr>
        <tr><td><code>lending\_market\_contract\_address</code></td><td>STRING</td><td>The deployed contract the market runs on, copied from the market row.</td></tr>
        <tr><td><code>lending\_market\_name</code></td><td>STRING</td><td>Readable name of the market, copied from the market row.</td></tr>
        <tr><td><code>lending\_market\_reserve</code></td><td>STRING</td><td>The protocol's own key for the reserve inside its market: the underlying token address on Aave-style pools, the vToken contract on Venus, <code>loan</code> or <code>collateral</code> on Morpho Blue, the numeric reserve id on Aave v4.</td></tr>
        <tr><td><code>lending\_market\_reserve\_name</code></td><td>STRING</td><td>Readable name: the market name and the token symbol, such as <code>Core: WETH</code>. A label, not a key.</td></tr>
        <tr><td><code>token\_id</code></td><td>STRING</td><td>Key of the underlying token in <code>dimensions.tokens</code>, formatted <code>\{token\_address}-\{chain\_id}</code>.</td></tr>
        <tr><td><code>token\_address</code></td><td>STRING</td><td>Address of the underlying token contract.</td></tr>
        <tr><td><code>token\_symbol</code></td><td>STRING</td><td>Ticker symbol of the underlying token.</td></tr>
      </tbody>
    </table>
  </Tab>
</Tabs>

## Sample queries

<Tabs>
  <Tab title="Rank markets by size">
    TVL is a balance, so read it on a single day. The registry turns `lending_market_id` into the market's name, its app and the chain it lives on.

    ```sql theme={null}
    select
        markets.lending_market_name,
        markets.app_id,
        markets.chain_id,
        market_tvl.tvl
    from `metrics_lending_markets.tvl_daily` as market_tvl
    join `dimensions.lending_markets` as markets
        using (lending_market_id)
    where market_tvl.timestamp = timestamp('2026-08-01')
    order by market_tvl.tvl desc
    limit 20
    ```
  </Tab>

  <Tab title="What one market holds">
    The reserve rows sit one level below the market and each names its token, so the registry turns each reserve key into a symbol. Filter the reserve side on `lending_market_id` to stay inside one market.

    ```sql theme={null}
    select
        reserves.token_symbol,
        reserves.lending_market_reserve,
        reserve_tvl.tvl
    from `metrics_lending_market_reserves.tvl_daily` as reserve_tvl
    join `dimensions.lending_market_reserves` as reserves
        using (lending_market_reserve_id)
    where reserve_tvl.timestamp = timestamp('2026-08-01')
      and reserves.lending_market_id = '0xc13e21b648a5ee794902342038ff3adab66be987-ethereum'
    order by reserve_tvl.tvl desc
    ```
  </Tab>
</Tabs>
