> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cooket.fun/llms.txt
> Use this file to discover all available pages before exploring further.

# Indexer

> Confirmed Arc logs, canonical provenance, projections, and recovery.

`apps/indexer` supports `idle`, `active`, and bounded `once` modes. Active modes require Arc Testnet chain ID `5042002`, the verified factory and fee-manager roots, an RPC URL, PostgreSQL, and an explicit start configuration.

The indexer scans only after the configured confirmation depth (default six). It discovers dynamic token, curve, canonical pool, and CTO treasury addresses from authenticated root events and stored canonical relationships. Arc log queries are chunked to at most eight addresses, merged, deduplicated, and canonically ordered. A chunk failure returns no partial result.

New launch, graduation, and CTO sources receive bounded exact-address catch-up inside the current scan range. Uniswap V3 swap senders are recovered from the canonical transaction rather than treating the pool event recipient as the trader.

Each applied block transaction stores raw event provenance, updates projections, and advances `indexer_checkpoints`. On a checkpoint hash mismatch, the indexer invokes canonical recovery instead of continuing from a stale fork.

The configured batch size controls block range, not address count. RPC retry logic treats oversized range failures as permanent rather than retrying indefinitely.
