Skip to main content

Overview

  • Dataset ID: 0403
  • Tables:
    • blockdb0403_token_to_token_prices_l3_v1_snapshots — Level-3 (venue-aggregated) impact grid that routes liquidity across pools for token_in → token_out. Insert reverse token order for the opposite direction.
    • blockdb0403_token_to_token_l3_v1_points — Grid-point level liquidity/price data for each L3 snapshot.
L3 snapshots support the full tick range defined by Uniswap v3/v4 (from -887272 to +887272), standardized across all AMMs.

Snapshot Table Columns (blockdb0403_token_to_token_prices_l3_v1_snapshots)

ColumnTypeDescription
snapshot_idBIGINTIdentity column for the price snapshot at this impact layer.
pool_uidBIGINTForeign key referencing blockdb0203_liquidity_pools_v1.uid for the pool in question.
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.
token_inBYTEAAddress of the token treated as the input leg for this measurement.
token_outBYTEAAddress of the token treated as the output leg for this measurement.
current_priceNUMERIC(78,18)Normalized mid price at snapshot time (token_out per 1 token_in).
grid_step_bpsSMALLINTBasis-point gap between adjacent grid points in the impact curve.
grid_radius_bpsINTEGERTotal extent of the impact grid from mid price, expressed in basis points.
grid_pointsSMALLINTSerialized list of price/size tuples representing the impact grid.
_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 & Indexes: L3 snapshots enforce the same SKU validations as L2 (address lengths, positive grid settings, consistent grid_points) plus uniqueness on (pool_uid, token_in, token_out, grid_step_bps, grid_radius_bps, block_number, tx_index, log_index). Indexes cover (pool_uid, block_number DESC, tx_index DESC, log_index DESC), (token_in, token_out), and (block_number, tx_index, log_index) to support routing queries.

Grid Points Table Columns (blockdb0403_token_to_token_l3_v1_points)

ColumnTypeDescription
snapshot_idBIGINTForeign key to blockdb0403_token_to_token_prices_l3_v1_snapshots.snapshot_id; cascades on delete.
point_indexSMALLINTZero-based position in the impact grid (0 … grid_points - 1).
offset_bps_absINTEGERAbsolute basis-point offset from mid price.
size_inNUMERIC(78,18)Aggregated routed input notionals to reach this impact level.
size_outNUMERIC(78,18)Routed output notionals at this impact level.
price_at_pointNUMERIC(78,18)Average realized price (token_out per 1 token_in) including routing impact.
Constraints & Indexes: Primary key (snapshot_id, point_index), FK back to the snapshot with cascade delete, and non-negative offsets via ck_l3_offset_nonneg. Indexed on (snapshot_id, offset_bps_abs) for ordered scans.

Use Cases

  • Accurate execution cost and slippage modeling at tick-level resolution
  • Market microstructure research and volatility surface mapping
  • Liquidity visualization tools for Uniswap V3 / V4 pools
  • Strategy backtesting using real tick granularity
  • Price impact forecasting and routing optimization