Context
The Stabilizer team had deep on-chain engineering and a battle-tested smart contract layer. What they didn't want to spin up was a separate data-infrastructure team to scale everything around the contracts — indexer, schema, product API, observability — through a 10× volume increase.
That's where we came in.
Outcomes
- 10× protocol volume absorbed through the cutover, zero incidents
- p95 query latency: 2.4s → 290ms (8× improvement)
- MTTD for upstream RPC issues: hours → < 2 minutes
- Monthly infrastructure spend: ~$4,000 → ~$500 (≈ 8× reduction, while absorbing 10× the volume)
What we shipped
A clean-architecture data plane with explicit separation between indexing, projection, and product-facing reads — engineered so that correctness, concurrency, and cost stay predictable as on-chain volume scales.
The indexer runs on Ponder. The Postgres schema is shaped around the read patterns that actually matter to the product, not generic ORM defaults. The product surface reads from a dedicated Express API that never contends with the write path. The whole system was phased in with a zero-downtime cutover.
How it works
Projector / indexer / API split. Indexing runs as its own process, projecting events into a tuned read model. The product API reads from that model and never touches the write path — so analytics queries can't lock up indexing, and indexing can't degrade product reads.
Reorg-correct ingestion. Sequence-aware processing detects gaps and reorgs at the boundary, rolls back affected projections, and re-applies cleanly. The data plane never serves inconsistent reads through a reorg.
Postgres tuned for the queries that matter. Indexes, partial indexes, and physical layout designed around actual product read patterns — not ORM defaults. The 8× p95 win came from the schema, not from caching tricks layered on top.
Phased zero-downtime cutover. The new system stood up alongside the old, traffic shifted by tier, and the legacy path stayed available as a fallback until parity was verified end-to-end.
Infrastructure cost: ~$4k/mo → ~$500/mo
The ~8× monthly spend reduction came from architecture, not vendor swaps. The same chain, the same data — an order of magnitude cheaper to run.
- Right-sized compute. Ponder replaced a pool of overprovisioned ORM workers running 24/7 to keep up with bursts. One small instance handles the new steady-state.
- Independent sizing of indexer and product API. Splitting the two meant each could be sized for its own load instead of the worst case of both combined. The product API no longer needed headroom for indexer spikes, and vice versa.
- No more analytics read replica. Schema-led query optimization removed the need for the expensive replica that existed only to absorb analytics queries away from the write path.
- Reorg-correct ingestion. Eliminated the duplicate processing that the previous design was paying for on every chain reorganization.
- Optimized frontend cache. TanStack Query with shaped cache keys and stale-while-revalidate semantics collapsed redundant API reads from the dapp — every saved round-trip is one the backend doesn't have to serve.
Stack
Ponder · Postgres · Express · Clean architecture (projector / indexer / API) · Vite · React · TanStack Query · TypeScript