Skip to main content

Overview

  • Dataset ID: 0301
  • Tables:
    • blockdb0301_liquidity_pools_reserves_v1 — Time-series of pool reserve/state snapshots; one row per pool per lineage event.
    • blockdb0301_liquidity_pools_reserves_details_v1 — Locator-level liquidity/tick/bin detail keyed to each snapshot.

Snapshot Table Columns (blockdb0301_liquidity_pools_reserves_v1)

ColumnTypeDescription
idBIGINTSurrogate primary key for the table, used for joins and change tracking.
pool_uidBIGINTForeign key referencing blockdb0203_liquidity_pools_v1.uid for the pool in question.
exchange_idBIGINTIdentifier linking to the DigitalExchange enumeration for centralized venues.
block_numberBIGINTCanonical block height within the originating chain.
block_timeTIMESTAMPTZUTC timestamp for the block that produced this record.
tx_indexINTEGERZero-based transaction index within the block, used for deterministic ordering.
log_indexINTEGERZero-based log index within the transaction, uniquely identifying the emitted event.
reservesNUMERIC(78,0)[]Array of current reserves (per token) for even-style pools, raw units.
current_tickINTEGERCurrent tick for concentrated-liquidity pools (e.g., Uniswap v3).
current_sqrt_priceNUMERIC(49,0)Q64.96 sqrt price as integer; decode via (value / 2^96)^2 for mid-price (adjust for decimals).
current_binINTEGERCurrent bin id for bin-based AMMs (e.g., TraderJoe v2*).
_tracing_idBYTEABlockDB lineage identifier that links this record to lineage APIs.
_genesis_tracing_idsBYTEA[]Tracing identifiers for the raw artifacts (blocks, logs, proofs) that seeded this record.
_parent_tracing_idsBYTEA[]Tracing identifiers for upstream derived records referenced during computation.
_created_atTIMESTAMPTZRecord creation timestamp.
_updated_atTIMESTAMPTZRecord last update timestamp.
Constraints: Each snapshot enforces pool_uid, block_number, tx_index, log_index uniqueness so only one lineage event is stored per pool per block/log triple. A payload check ensures at least one of reserves, current_tick, or current_bin is present. Hot-path indexes cover (pool_uid, block_number DESC, tx_index DESC, log_index DESC) plus block-time ordering for time-series pulls.

Details Table Columns (blockdb0301_liquidity_pools_reserves_details_v1)

ColumnTypeDescription
snapshot_idBIGINTForeign key to blockdb0301_liquidity_pools_reserves_v1.id; cascades on delete.
pool_uidBIGINTDenormalized pool identifier to accelerate pool-scoped scans.
tickINTEGERSingle-tick locator for concentrated liquidity pools (e.g., Uniswap v3).
lower_tickINTEGERLower bound for range-style liquidity slices.
upper_tickINTEGERUpper bound for range-style liquidity slices.
bin_idINTEGERBin identifier for bin-based AMMs (e.g., TraderJoe).
liquidityNUMERIC(38,0)Engine-native packed liquidity metric (e.g., Uniswap v3 L).
amount0NUMERIC(78,0)Token0 amount associated with the locator (decimals-adjusted).
amount1NUMERIC(78,0)Token1 amount associated with the locator (decimals-adjusted).
Constraints: Each detail row must include a locator (tick, bin_id, or both lower_tick/upper_tick) and a payload (liquidity, amount0, or amount1). Uniqueness constraints enforce one tick/bin/range per snapshot, and indexes exist on snapshot_id, pool_uid, tick, bin_id, and (lower_tick, upper_tick) to support fast fan-out queries.

Use Cases

  • Backtesting and AI modeling with verifiable pool states
  • Market-structure analytics and liquidity regime detection
  • Monitoring dashboards for protocol health, volatility, and liquidity shifts
  • Price, TVL, and slippage calculations across pools and chains
  • Routing and arbitrage research (depth, fee tiers, fragmentation)