Veyronn Documentation

Indexer

Confirmation-aware log ingestion, reorg recovery, materialized reads, and candles.

The indexer is a single-writer Railway service backed by Postgres.

Ingestion loop

  1. Load the last canonical checkpoint.
  2. Determine the confirmed head from RPC head minus configured confirmations.
  3. Request logs in bounded batches from the Veyronn deployment block.
  4. Decode events with generated ABIs.
  5. Persist raw canonical events and update materialized models in one database transaction.
  6. Advance the checkpoint only after successful commit.

Materialized state

The BFF reads indexed:

  • deposits and withdrawals
  • open, partial-close, close, and liquidation events
  • positions and account activity
  • funding updates
  • sessions and session use
  • intents
  • conditional orders and triggers
  • strategies
  • worker runs and failures
  • price observations and candles

Reorg handling

Checkpoints retain block hashes. A hash mismatch causes the indexer to find the common canonical ancestor, delete affected derived rows, and replay from that point. The database therefore reflects confirmed canonical history rather than append-only assumptions.

Recovery

The start block and batch size are configuration. A clean database can replay from deployment block 92429511. Restore drills should verify schema migration, cursor recovery, replay duration, and agreement with direct contract reads.

Health

Health reporting includes service status, cursor, latest observed head, lag, and failure context. Alert when lag grows, the cursor stops, RPC errors repeat, or reorg depth exceeds policy.