Skip to main content
The dynamic-bonding-curve program emits most Anchor events through event CPI. Use this page when building indexers, analytics pipelines, charting systems, or low-level clients that need to map transactions back to DBC pool activity.

Event CPI

Config And Metadata Events

Swap Events

EvtSwap2 Payload

Do not reconstruct DBC price from token transfer logs. Use EvtSwap2, quote helpers, and account state so fee-adjusted amounts, partial fills, and next_sqrt_price are handled correctly.

Fee And Claim Events

Migration And Withdrawal Events

Operator Events

Indexing Notes

  1. Treat EvtSwap2.quote_reserve_amount / EvtSwap2.migration_threshold as the event-side progress signal.
  2. Reconcile event-derived progress with VirtualPool.quote_reserve from account state.
  3. Index both EvtInitializePool and EvtInitializePoolWithTransferHook, plus pool accounts, so pools created before your indexer starts are still discoverable.
  4. Store raw swap_result values for analytics; rounded UI values can lose fee and partial-fill detail.
  5. For migrated pools, use DBC events to identify completion and destination AMM state to track post-migration trading.