Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.meteora.ag/llms.txt

Use this file to discover all available pages before exploring further.

The dynamic-bonding-curve program emits 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

ItemValue
Event authority seed__event_authority
SDK helperderiveDbcEventAuthority()
Primary swap eventEvtSwap2
Deprecated compatibility eventEvtCreateConfig is deprecated; prefer EvtCreateConfigV2.

Config And Metadata Events

EventEmitted byImportant fieldsUse
EvtCreateConfigcreate_configconfig, quote_mint, fee_claimer, fee and curve fieldsDeprecated config payload kept for compatibility.
EvtCreateConfigV2create_configconfig, quote_mint, fee_claimer, leftover_receiver, config_parametersPreferred config creation payload.
EvtPartnerMetadatacreate_partner_metadatapartner_metadata, fee_claimerLink partner metadata to a fee claimer.
EvtVirtualPoolMetadatacreate_virtual_pool_metadatavirtual_pool_metadata, virtual_poolLink pool metadata to a virtual pool.
EvtInitializePoolinitialize_virtual_pool_with_spl_token, initialize_virtual_pool_with_token2022pool, config, creator, base_mint, pool_type, activation_pointIndex new DBC pools.
EvtUpdatePoolCreatortransfer_pool_creatorpool, creator, new_creatorTrack creator authority transfer.

Swap Events

EventEmitted byImportant fieldsUse
EvtSwapswap, swap2pool, config, trade_direction, has_referral, params, swap_result, amount_in, current_timestampLegacy/simple swap payload.
EvtSwap2swap, swap2pool, config, trade_direction, has_referral, swap_parameters, swap_result, quote_reserve_amount, migration_threshold, current_timestampPreferred swap payload for charting, progress, fees, and exact-out or partial-fill support.
EvtCurveCompleteswap, swap2 when the threshold is reachedpool, config, base_reserve, quote_reserveMark bonding curve completion and migration readiness.

EvtSwap2 Payload

FieldMeaning
trade_direction0 base to quote, 1 quote to base.
has_referralWhether referral fee was included in the fee split.
swap_parameters.amount_0Input for exact-in and partial-fill, or requested output for exact-out.
swap_parameters.amount_1Minimum output for exact-in and partial-fill, or maximum input for exact-out.
swap_parameters.swap_mode0 exact in, 1 partial fill, 2 exact out.
swap_result.included_fee_input_amountInput amount before excluded-fee adjustment.
swap_result.excluded_fee_input_amountAmount that moved the curve after fee handling.
swap_result.amount_leftUnused amount in partial-fill mode.
swap_result.output_amountOutput token amount.
swap_result.next_sqrt_pricePost-swap sqrt price.
swap_result.trading_fee, protocol_fee, referral_feeFee split for the swap.
quote_reserve_amountQuote reserve after the swap. Use this for progress charts.
migration_thresholdConfigured quote threshold for migration readiness.
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

EventEmitted byImportant fieldsUse
EvtClaimTradingFeeclaim_trading_feepool, token_base_amount, token_quote_amountPartner trading fee claim.
EvtClaimCreatorTradingFeeclaim_creator_trading_feepool, token_base_amount, token_quote_amountCreator trading fee claim.
EvtClaimProtocolFeeclaim_protocol_feepool, token_base_amount, token_quote_amountProtocol trading fee claim.
EvtClaimPoolCreationFeeclaim_protocol_pool_creation_feepool, receiver, creation_feeProtocol share of pool creation fee.
EvtPartnerClaimPoolCreationFeeclaim_partner_pool_creation_feepool, partner, creation_fee, fee_receiverPartner share of pool creation fee.
EvtClaimProtocolLiquidityMigrationFeeMigration claim pathpool, token_base_amount, token_quote_amountProtocol liquidity migration fee claim.

Migration And Withdrawal Events

EventEmitted byImportant fieldsUse
EvtCreateMeteoraMigrationMetadatamigration_meteora_damm_create_metadatavirtual_poolDAMM v1 migration metadata creation.
EvtPartnerWithdrawSurpluspartner_withdraw_surpluspool, surplus_amountPartner surplus withdrawal.
EvtCreatorWithdrawSurpluscreator_withdraw_surpluspool, surplus_amountCreator surplus withdrawal.
EvtWithdrawLeftoverwithdraw_leftoverpool, leftover_receiver, leftover_amountLeftover base-token withdrawal.
EvtWithdrawMigrationFeewithdraw_migration_feepool, fee, flagMigration fee withdrawal with role flag.
EvtPartnerWithdrawMigrationFeePartner migration fee withdrawal pathpool, feePartner-specific migration fee withdrawal compatibility event.

Operator Events

EventEmitted byImportant fieldsUse
EvtCreateClaimFeeOperatorOperator creation flowoperatorTrack protocol fee operator creation.
EvtCloseClaimFeeOperatorclose_claim_protocol_fee_operatorclaim_fee_operator, operatorTrack protocol fee operator closure.

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 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.