Blast radius
The one real risk
The protocol’s safety depends on unhealthy positions being liquidated promptly. If liquidators discover targets through the API and the API is stale, positions can become liquidatable without anyone acting. The protocol stays correct here: a liquidation submitted against on-chain state either qualifies or reverts, so no bad liquidation results from stale data. The risk is inaction, not wrong action. If an indexer outage runs long during a volatile market, assume liquidation coverage is degraded and monitor on-chain health directly rather than through the dashboard.Four traps that silently corrupt a rebuild
A backfill can finish cleanly and still be wrong. These four are protocol-specific, and each one produces a gap that looks like healthy data.- Market state comes from the pool, not the controller.
PoolMarketStateBatchEventandPoolMarketParamsBatchEventare published by the pool contract. An indexer subscribed only to the controller address silently indexes no market state at all. - One liquidation can publish two position batches. A
SeizeMode::Creditliquidation writes the liquidated account’s batch first, then the receiving account’s. Key onaccount_id; never assume one operation yields one batch. - A
Credit(0)liquidation creates an account with no creation event. The new account is announced only inside the second batch’saccount_attributes. An indexer that discovers accounts from a creation event will never see it. LiqSeizeis gross,LiqCreditis net. The protocol fee sits between them. Summing both tags as the same quantity double-counts the seizure.
Triage
Always determine the ledger the indexer has reached and compare it to the chain’s current ledger. That gap is the actual severity measure, and it distinguishes “slightly behind” from “stopped”.
Recovery
1
Measure the lag
Compare the last indexed ledger to the current ledger. Record the gap before restarting anything, so you know the window that needs backfill.
2
Find the upstream cause
Check RPC health first. An indexer that cannot read the chain is a symptom, not the fault.
3
Resume ingestion
Restart from the last successfully indexed ledger, not from the chain head. Starting at the head leaves a permanent hole in the historical series.
4
Backfill the gap
Replay the missing ledger range. The chain is the source of truth and the range is fully recoverable, so a gap is repairable as long as you resume from the right point.
5
Verify against the chain
Reconcile a sample of derived values against a direct contract read. For one market, compare your totals to the pool’s
get_supplied_amount(hub_asset), get_borrowed_amount(hub_asset), get_reserves(hub_asset), and get_revenue(hub_asset), and the controller’s get_market_indexes_detailed. Matching values confirm the backfill was complete, not merely finished.Communicating during an outage
State whether protocol funds are affected, because that is the question users will actually be asking. During an indexer outage the answer is that they are not: balances and positions are on-chain and intact, and only the display of them is degraded. Tell users that positions remain safe, that on-chain actions still work if the application can reach RPC, and that displayed figures may be behind until backfill completes.Do not
- Do not resume from the chain head to make the API look current. It hides the gap instead of repairing it and leaves a permanent hole in history.
- Do not treat API totals as authoritative when reconciling protocol accounting. Read the contracts.
- Do not pause the protocol for an indexer failure. The contracts are unaffected, and pausing would convert a display outage into a real one for users.

