Skip to main content

Description

The Yields endpoint provides rolling yield/ROI predictions per pool across fixed time horizons (1D, 3D, 7D, 14D, 30D, 90D, 365D). Each prediction is anchored to a specific block/log position and includes aligned arrays for pool tokens, current reserves, observed/predicted volumes, user fees, and ROI fractions. Predictions are derived from historical swap fees and current reserve states.

Endpoint Matrix

EndpointSummaryDataset IDTypical Latency
POST /evm/yieldsPool yield/ROI predictions across fixed horizons0411< 300 ms

Parameter Conventions

chain_id
number
required
Chain identifier for the target EVM network. See Chain enumeration for supported values.
target_period_days
number
Target prediction horizon in days. Supported values: 1, 3, 7, 14, 30, 90, 365.
from_block
number
Starting block height (inclusive) for yield predictions.
to_block
number
Ending block height (inclusive) for yield predictions.
from_timestamp
string
Starting timestamp (ISO-8601). If it falls between blocks, the next block after this timestamp is used.
to_timestamp
string
Ending timestamp (ISO-8601). If it falls between blocks, the last block before this timestamp is used.
pool_uids
string[]
BlockDB pool identifiers for filtering yield predictions by pool.
pool_addresses
string[]
Pool contract addresses to scope yield data.
require_full_period
boolean
Only return predictions where observed_period_days == target_period_days (no extrapolation).
min_roi
number
Minimum ROI threshold for filtering predictions.

Usage Guidance

  • Pool ranking — Use yield predictions to rank pools by expected fee yield over a horizon
  • Allocation screens — Build pool allocation signals using APR/ROI predictions with full provenance
  • Model validation — Compare yield predictions against actual swap fees and reserves for backtesting
  • Horizon selection — Choose target_period_days based on your investment horizon (short-term vs long-term)
  • Full period filtering — Use require_full_period: true to exclude extrapolated predictions when historical data is insufficient

Yield Calculation

Yield predictions are computed using:
  • Historical swap fees (from /evm/swaps/fees) — Observed fee amounts over the available window
  • Current reserves (from /evm/reserves) — Current pool state for ROI denominator
  • Extrapolation — When observed_period_days < target_period_days, predictions are scaled by target_period_days / observed_period_days
ROI per token: roi_predicted[i] = user_fees_predicted[i] / current_reserves[i]

Prediction Quality Indicators

Each yield record includes quality indicators:
  • observed_period_days: Actual days of history used
  • is_full_period: true when observed_period_days == target_period_days
  • is_extrapolated: true when history is shorter than target
  • extrapolation_factor: Scaling factor applied (target / observed)

Common Patterns

Rank pools by 30-day yield:
{
  "chain_id": 1,
  "target_period_days": 30,
  "require_full_period": true,
  "from_timestamp": "2025-12-01T00:00:00Z",
  "to_timestamp": "2025-12-20T00:00:00Z"
}
Get yield predictions for specific pools:
{
  "chain_id": 1,
  "target_period_days": 7,
  "pool_uids": [
    "88e6a0c2ddd26feeb64f039a2c41296fcb3f5640000000000000000000000000"
  ],
  "from_block": 19000000
}
Filter by minimum ROI:
{
  "chain_id": 1,
  "target_period_days": 30,
  "min_roi": 0.05,
  "require_full_period": true
}

Dataset Relationships

  • Swap Fees → Yields: Historical swap fees are the primary input for yield predictions
  • Reserves → Yields: Current reserves provide the denominator for ROI calculations
  • Pools → Yields: Join pool metadata to yield predictions using pool_uid
  • Fee Terms → Yields: Fee terms determine which fees are attributed to LPs/users
  • Yields → Prices: Yield predictions can inform pricing models for pool tokens

See Also