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

# Liquidity Pool Yields

> Predicted LP yield & APY per AMM pool across 7 time horizons — derived from onchain swap fees. 10 EVM chains.

## Overview

* **Dataset ID:** `0411`
* **Table:** `blockdb_evm.b0411_liquidity_pools_yields_v1`
* **Description:** Rolling yield/ROI predictions per pool over fixed horizons (1D, 3D, 7D, 14D, 30D, 90D, 365D), based on historical swap fees (`blockdb_evm.b0303_liquidity_pools_swap_fees_v1`) and current reserves (latest `blockdb_evm.b0301_liquidity_pools_reserves_v1` snapshot).
* **Primary key:** `(pool_uid, target_period_days, block_number, tx_index, log_index)`
* **API:** [POST /evm/yields](/api-reference/evm/yields/yields)
* **CSV Sample:** [Download](https://huggingface.co/datasets/BlockDB/Liquidity-Pools-Yields-Ethereum-And-EVM-Cryptocurrency-Data/resolve/main/data/blockdb_evm.b0411_liquidity_pools_yields_v1.csv?download=true)
* **JSON Sample:** [Download](https://huggingface.co/datasets/BlockDB/Liquidity-Pools-Yields-Ethereum-And-EVM-Cryptocurrency-Data/resolve/main/data/blockdb_evm.b0411_liquidity_pools_yields_v1.json?download=true)

## Sample Viewer

<Frame>
  <iframe src="https://huggingface.co/datasets/BlockDB/Liquidity-Pools-Yields-Ethereum-And-EVM-Cryptocurrency-Data/embed/viewer/default/train" frameborder="0" width="100%" height="600px" />
</Frame>

<Info>
  This dataset emits aligned arrays (one element per pool token). Use `tokens[]` to line up `current_reserves[]`, volumes, fees, and ROI predictions.
</Info>

## Core concepts

* **Target horizon vs observed history**
  * `target_period_days`: horizon you requested (1, 3, 7, 14, 30, 90, 365)
  * `observed_period_days`: how many days of history were available/used
* **Extrapolation**
  * When `observed_period_days < target_period_days`, the dataset marks the row as extrapolated and scales observed values by:
    * (extrapolation\_factor = target\_period\_days / observed\_period\_days)
* **ROI**
  * For each token index `i`:
    * (roi\_predicted\[i] = user\_fees\_predicted\[i] / current\_reserves\[i])

## Columns

| Column                 | Type               | Description                                                                                        |                                                                             |
| ---------------------- | ------------------ | -------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
| `pool_uid`             | `BYTEA`            | Pool identifier (internal).                                                                        |                                                                             |
| `exchange_id`          | `INTEGER`          | Exchange/DEX identifier.                                                                           |                                                                             |
| `type_id`              | `INTEGER`          | Pool type identifier (FK to liquidity\_pool\_types).                                               |                                                                             |
| `block_number`         | `BIGINT`           | Block height of the as-of snapshot anchor.                                                         |                                                                             |
| `block_time`           | `TIMESTAMPTZ`      | UTC timestamp of the as-of snapshot anchor.                                                        |                                                                             |
| `tx_index`             | `INTEGER`          | Transaction index within the block.                                                                |                                                                             |
| `log_index`            | `INTEGER`          | Log index within the transaction.                                                                  |                                                                             |
| `target_period_days`   | `SMALLINT`         | Target horizon in days. Allowed: `1, 3, 7, 14, 30, 90, 365`.                                       |                                                                             |
| `observed_period_days` | `SMALLINT`         | History actually used (must be `> 0` and `<= target_period_days`).                                 |                                                                             |
| `is_full_period`       | `BOOLEAN`          | `true` when `observed_period_days == target_period_days`.                                          |                                                                             |
| `is_extrapolated`      | `BOOLEAN`          | `true` when the row is scaled from shorter history.                                                |                                                                             |
| `extrapolation_factor` | `NUMERIC(9,6)`     | Scaling factor applied when extrapolating (must be `> 1` when extrapolated; `1` when full period). | e.g. 365.0 for 365D predicted from 1D; max = target\_period\_days / 1 = 365 |
| `window_start_time`    | `TIMESTAMPTZ`      | Start time of the observed window.                                                                 |                                                                             |
| `window_end_time`      | `TIMESTAMPTZ`      | End time of the observed window.                                                                   |                                                                             |
| `tokens`               | `BYTEA[]`          | Pool token addresses (aligned arrays index by this order).                                         |                                                                             |
| `current_reserves`     | `NUMERIC(78,18)[]` | Current reserves per token (decimals-adjusted).                                                    |                                                                             |
| `volume_observed`      | `NUMERIC(78,18)[]` | Observed traded volume per token in the window.                                                    |                                                                             |
| `volume_predicted`     | `NUMERIC(78,18)[]` | Predicted traded volume per token for the target horizon.                                          |                                                                             |
| `user_fees_observed`   | `NUMERIC(78,18)[]` | Observed user/LP fees per token in the window.                                                     |                                                                             |
| `user_fees_predicted`  | `NUMERIC(78,18)[]` | Predicted user/LP fees per token for the target horizon.                                           |                                                                             |
| `roi_predicted`        | `NUMERIC(12,9)[]`  | Predicted ROI fraction per token for the target horizon.                                           |                                                                             |
| `_tracing_id`          | `BYTEA`            | Deterministic BlockDB lineage identifier for the yield record.                                     |                                                                             |
| `_parent_tracing_ids`  | `BYTEA[]`          | Tracing IDs for upstream derived records referenced during computation.                            |                                                                             |
| `_created_at`          | `TIMESTAMPTZ`      | Record creation timestamp.                                                                         |                                                                             |
| `_updated_at`          | `TIMESTAMPTZ`      | Record update timestamp.                                                                           |                                                                             |

## Use Cases

* Pool-level yield and ROI forecasting across standardized horizons
* Ranking pools by predicted fee yield (token-wise and pool-wise)
* Inputs for portfolio allocation and liquidity mining analytics
* Validating fee models by comparing predicted vs realized forward windows

## Related Datasets

<CardGroup cols={2}>
  <Card title="Swap fees" icon="coins" href="/data-catalog/evm/swaps/liquidity-pools-swap-fees">
    Per-swap fees that feed yield models.
  </Card>

  <Card title="Liquidity Pools Reserves" icon="database" href="/data-catalog/evm/reserves/liquidity-pools-reserves">
    Reserve snapshots used to calculate TVL exposure.
  </Card>
</CardGroup>
