Sub-second USD valuations for 5,000+ tokens via multi-hop Uniswap v3 sqrtPriceX96 paths.
Institutional DeFi position tracking requires real-time USD valuations for thousands of tokens. The legacy GraphQL subgraph approach couldn't handle query load.
ClickHouse Materialized Views computing multi-hop token pricing, migrating from legacy GraphQL to custom OLAP architecture achieving 10× query performance.
Resolve USD valuations through direct, 1-hop, and 2-hop Uniswap v3 liquidity paths (sqrtPriceX96) for 5,000+ tokens at sub-second response and 50,000+ daily queries.
Parse pool state from raw sqrtPriceX96, tick spacing, and token ordering with defensive checks for misconfigured pools.
Build adjacency over blue-chip pairs, score paths by depth and TVL, and cap expensive traversals.
Pre-aggregate token→USD rows on ingest; nightly or streaming refreshes keep staleness bounded.
Rust Substreams modules emit normalized swap and mint events into the pricing pipeline with replay-safe cursors.
Cross-check spot prices against reference pools; page on divergence beyond thresholds.
Tenfold improvement over legacy GraphQL subgraph read paths by shifting sqrtPriceX96 math and hop resolution into ingest-time ClickHouse materializations so dashboards stopped recomputing liquidity graphs per request.
Tenfold improvement over legacy GraphQL subgraph read paths by shifting sqrtPriceX96 math and hop resolution into ingest-time ClickHouse materializations so dashboards stopped recomputing liquidity graphs per request.
Direct, one-hop, and two-hop Uniswap v3 routes with liquidity-aware intermediates — covering long-tail tokens institutional desks still held without manual oracle overrides.
Sustained institutional DeFi position tracking with predictable p95 latency because pricing snapshots were already merged in ClickHouse rather than assembled from RPC at query time.
GraphQL subgraphs recomputed pricing per request; OLAP materializations amortize math once per block batch.
50K+ daily queries made read-time graph walks economically impossible without pre-aggregation.
Two-hop cap with liquidity scoring avoided exponential blow-ups on fragmented v3 pools.
Institutional users preferred a stable USD band over chasing illusory precision through dead-end pools.
Deterministic replay and parallel map stages beat bespoke chain listeners for reorg handling.
Sharing hop logic with Uniswap jump detectors kept pricing and anomaly feeds consistent.
We take on a small number of projects at a time. If the problem is hard, we're interested.