tulip-indexer is a reorg-aware PostgreSQL indexer for Tulip model-credit markets. It derives market telemetry from factory and Uniswap v4 PoolManager events.
What it indexes
MarketLaunchedevents discover canonical ModelIDs, credits, pools, curve settings, fee, supply, token ordering, and launch position.- Matching
Swapevents provide token deltas, price state, liquidity, tick, fee, sender, transaction, and block. - The indexer normalizes credit and USDG amounts and stores fixed-point prices without floating-point loss.
Guarantees
(transaction_hash, log_index)is the swap primary key, making replay idempotent.- Each cursor stores the indexed block hash.
- A hash mismatch rolls back a safety window and replays canonical logs.
- A confirmation delay avoids ingesting the unstable head.
- Cursor and event records commit in one database transaction.