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

# Screener

> Every chain's latest figures and its apps' figures, with averages, totals and changes over six windows, in one row.

One row per chain in `screeners.chains`, every figure as of `as_of`, the last complete day. Each measure has a column per window and aggregation, named `<measure>_<window>_<aggregation>`: `fees_30d_sum` is the fees paid to the chain over the 30 days ending on `as_of`, and `app_fees_30d_sum` is the fees paid to the apps on it.

## Columns

**Keys**

The two key columns, then one FLOAT64 column per measure, window and aggregation. Every row is a chain in `dimensions.chains`, so the join on `chain_id` always matches.

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

  <tbody>
    <tr><td>`as_of`</td><td>TIMESTAMP</td><td>The last complete day, the same on every row. Every window ends on it.</td></tr>
    <tr><td>`chain_id`</td><td>STRING</td><td>Chain the row belongs to, such as `ethereum`; joins `dimensions.chains`.</td></tr>
  </tbody>
</table>

**Aggregations**

A window is `1d`, `7d`, `30d`, `90d`, `180d` or `365d`, and spans that many days ending on `as_of`, while the `max_` columns read the whole history. Which aggregations a measure has follows its `over_time` in [Metric definitions](https://tokenterminal.com/docs/catalog/metric-definitions.md): only a measure whose `over_time` is `sum` has `sum`.

<table>
  <thead>
    <tr>
      <th width="380">Column</th>
      <th>What it holds</th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`<measure>_<window>_avg`</td><td>Mean of the daily values over the window.</td></tr>
    <tr><td>`<measure>_<window>_sum`</td><td>Total of the daily values over the window. Flows only: the measures ticked under Sum.</td></tr>
    <tr><td>`<measure>_<window>_change`</td><td>A comparison of two aggregations: the value on `as_of` against the value one window earlier, as `(now - then) / abs(then)`. Null when either value is missing or the earlier one is 0.</td></tr>
    <tr><td>`<measure>_<window>_trend`</td><td>A comparison of two aggregations: the window's average against the average of the window before it, as `(avg - prior) / abs(prior)`. Null unless the window before has a value on every one of its days, and null when its average is 0.</td></tr>
    <tr><td>`<measure>_max_latest`</td><td>The value on `as_of`. Null when there is none.</td></tr>
    <tr><td>`<measure>_max_ath`</td><td>The highest daily value over the chain's whole history.</td></tr>
    <tr><td>`<measure>_max_atl`</td><td>The lowest daily value over the chain's whole history.</td></tr>
  </tbody>
</table>

**Measures**

Every measure has the `avg`, `change`, `trend` and `max_` columns, and the flows also have `sum`. The `app_` measures are the apps on the chain added together. Price, market cap and developers sit on the [project screener](https://tokenterminal.com/docs/catalog/projects/screener.md), for the project `dimensions.chains` names in `project_id`.

<table>
  <thead>
    <tr>
      <th width="280">Measure</th>
      <th>Sum</th>
      <th>What it holds</th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`daily_active_addresses`</td><td>✗</td><td>Distinct addresses transacting on the chain per day.</td></tr>
    <tr><td>`monthly_active_addresses`</td><td>✗</td><td>Distinct addresses transacting on the chain over a rolling 30 days.</td></tr>
    <tr><td>`weekly_active_addresses`</td><td>✗</td><td>Distinct addresses transacting on the chain over a rolling 7 days.</td></tr>
    <tr><td>`app_monthly_active_addresses`</td><td>✗</td><td>Distinct addresses using the apps' contracts on the chain over a rolling 30 days, each app's count added up, so an address using two apps counts twice.</td></tr>
    <tr><td>`app_active_loans`</td><td>✗</td><td>Open loans in the apps on the chain, USD.</td></tr>
    <tr><td>`app_assets_staked`</td><td>✗</td><td>Assets staked with the apps on the chain, USD.</td></tr>
    <tr><td>`app_bridged_supply`</td><td>✗</td><td>Stablecoins bridged onto the chain, USD.</td></tr>
    <tr><td>`app_fees`</td><td>✓</td><td>Fees paid to the apps on the chain, USD.</td></tr>
    <tr><td>`app_gas_used`</td><td>✓</td><td>Gas consumed by transactions calling the apps' contracts on the chain.</td></tr>
    <tr><td>`app_outstanding_supply`</td><td>✗</td><td>Stablecoin supply issued on the chain, USD.</td></tr>
    <tr><td>`app_trading_volume`</td><td>✓</td><td>Trading volume of the exchanges on the chain, USD. Derivatives venues and aggregators are left out: an aggregator's volume is counted at the exchange it routes to.</td></tr>
    <tr><td>`app_transaction_count_contracts`</td><td>✓</td><td>Transactions calling the apps' contracts on the chain.</td></tr>
    <tr><td>`app_tvl`</td><td>✗</td><td>Value locked in the apps on the chain, USD.</td></tr>
    <tr><td>`app_monthly_active_users`</td><td>✗</td><td>Monthly active users of the apps on the chain, each app's count added up, so a user of two apps counts twice.</td></tr>
    <tr><td>`block_time_average`</td><td>✗</td><td>Average time between blocks, in milliseconds.</td></tr>
    <tr><td>`bridge_deposits`</td><td>✗</td><td>USD value of assets held in the chain's canonical bridge on the chain it settles to.</td></tr>
    <tr><td>`daily_contract_deployers`</td><td>✗</td><td>Distinct addresses deploying contracts.</td></tr>
    <tr><td>`contract_deployment_count`</td><td>✓</td><td>Contracts deployed on the chain.</td></tr>
    <tr><td>`cost_of_revenue`</td><td>✓</td><td>The chain's direct cost of revenue, such as data posted to the chain it settles to.</td></tr>
    <tr><td>`expenses`</td><td>✓</td><td>What the chain spent, in USD.</td></tr>
    <tr><td>`fees`</td><td>✓</td><td>Fees paid to the chain (gas / sequencer).</td></tr>
    <tr><td>`fees_supply_side`</td><td>✓</td><td>Fees the chain does not retain (pass-throughs to builders / operators); fees = revenue + fees\_supply\_side. 0 where there are no pass-throughs, e.g. HyperEVM gas.</td></tr>
    <tr><td>`validators`</td><td>✗</td><td>Number of validators securing the chain's consensus.</td></tr>
    <tr><td>`revenue`</td><td>✓</td><td>Revenue retained by the chain (gas / sequencer fees net of pass-throughs; equals fees where there are none, e.g. HyperEVM).</td></tr>
    <tr><td>`staking_market_cap`</td><td>✗</td><td>USD value of the chain's native token staked to secure the network.</td></tr>
    <tr><td>`token_incentives`</td><td>✓</td><td>Value of tokens the chain distributed as incentives.</td></tr>
    <tr><td>`transaction_count`</td><td>✓</td><td>Transactions processed by the chain.</td></tr>
    <tr><td>`transaction_fee_average`</td><td>✗</td><td>Average fee per transaction.</td></tr>
    <tr><td>`transaction_fee_median`</td><td>✗</td><td>Median fee per transaction.</td></tr>
    <tr><td>`transactions_per_second`</td><td>✗</td><td>Average transactions per second.</td></tr>
  </tbody>
</table>

## Sample queries

**One chain**

Every column of one row shares the same `as_of`, so the figures read together. `fees` is what users paid the chain, and `app_fees` what they paid the apps running on it.

```sql theme={null}
select
    as_of,
    fees_30d_sum,
    app_fees_30d_sum,
    transaction_count_30d_sum,
    app_tvl_max_latest,
    app_tvl_30d_change
from `screeners.chains`
where chain_id = 'ethereum'
```

**Top chains by app fees**

`app_fees_30d_sum` is the fees paid to the apps on the chain over the 30 days ending on `as_of`. The join to `dimensions.chains` on `chain_id` adds the name.

```sql theme={null}
select
    chains.name,
    screener.app_fees_30d_sum,
    screener.transaction_count_30d_sum,
    screener.app_fees_30d_trend
from `screeners.chains` as screener
join `dimensions.chains` as chains
    using (chain_id)
where screener.app_fees_30d_sum is not null
order by screener.app_fees_30d_sum desc
limit 25
```

**Chain fees against app fees**

Both sides are 30-day totals over the same window, so their ratio compares the gas users paid the chain with the fees they paid its apps. The app fee floor keeps a small base from dominating the ranking.

```sql theme={null}
select
    chains.name,
    screener.fees_30d_sum,
    screener.app_fees_30d_sum,
    safe_divide(screener.fees_30d_sum, screener.app_fees_30d_sum) as chain_to_app_fees
from `screeners.chains` as screener
join `dimensions.chains` as chains
    using (chain_id)
where screener.app_fees_30d_sum > 100000
order by chain_to_app_fees desc
limit 25
```


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