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