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 IDL exposes many instructions. Integrators can choose to either use the TypeScript SDK for transaction construction or build through CPI.

Partner Instructions

InstructionArgsSDK pathPurpose
create_configConfigParametersclient.partner.createConfigCreate a partner config for fees, curve, token behavior, migration, pool creation fee, and graduated-pool settings.
create_partner_metadataCreatePartnerMetadataParametersclient.partner.createPartnerMetadataCreate optional metadata for the partner fee claimer.
claim_trading_feemax_amount_a, max_amount_bclient.partner.claimPartnerTradingFee, claimPartnerTradingFee2Claim partner trading fees from a virtual pool.
claim_partner_pool_creation_feeNoneclient.partner.claimPartnerPoolCreationFeeClaim the partner share of pool creation fees.
partner_withdraw_surplusNoneclient.partner.partnerWithdrawSurplusWithdraw partner quote surplus after migration when allowed.

Creator And Pool Instructions

InstructionArgsSDK pathPurpose
initialize_virtual_pool_with_spl_tokenInitializePoolParametersclient.pool.createPoolCreate a DBC pool with an SPL Token base mint and Metaplex metadata.
initialize_virtual_pool_with_token2022InitializePoolParametersclient.pool.createPoolCreate a DBC pool with a Token-2022 base mint.
create_virtual_pool_metadataCreateVirtualPoolMetadataParametersclient.creator.createPoolMetadataCreate optional metadata for a virtual pool.
claim_creator_trading_feemax_base_amount, max_quote_amountclient.creator.claimCreatorTradingFee, claimCreatorTradingFee2Claim creator trading fees from a virtual pool.
creator_withdraw_surplusNoneclient.creator.creatorWithdrawSurplusWithdraw creator surplus after migration when allowed.
transfer_pool_creatorNoneclient.creator.transferPoolCreatorTransfer creator rights and creator fee claim authority to a new address.

Swap Instructions

InstructionArgsModesNotes
swapSwapParametersExact inLegacy exact-in swap path. It emits both EvtSwap and EvtSwap2.
swap2SwapParameters2Exact in, partial fill, exact outPreferred for trading integrations because the args map directly to SwapMode.
SwapParameters2 uses these fields:
FieldMeaning
amount_0Input amount for exact-in and partial-fill, or requested output amount for exact-out.
amount_1Minimum output for exact-in and partial-fill, or maximum input for exact-out.
swap_mode0 exact in, 1 partial fill, 2 exact out.
If the config uses rate limiter fees, or enable_first_swap_with_min_fee is enabled, swap instructions require the instructions sysvar in remaining accounts. The SDK adds SYSVAR_INSTRUCTIONS_PUBKEY when needed.

Migration Instructions

InstructionDestinationSDK pathPurpose
create_lockerDAMM v1 or DAMM v2 support flowclient.migration.createLockerCreate the locker escrow when locked vesting is configured.
withdraw_leftoverDAMM v1 or DAMM v2client.migration.withdrawLeftoverWithdraw leftover base tokens after migration.
migration_meteora_damm_create_metadataDAMM v1client.migration.createDammV1MigrationMetadataCreate metadata before DAMM v1 migration.
migrate_meteora_dammDAMM v1client.migration.migrateToDammV1Migrate a completed DBC pool to DAMM v1.
migrate_meteora_damm_lock_lp_tokenDAMM v1client.migration.lockDammV1LpTokenLock permanent LP allocation for partner or creator.
migrate_meteora_damm_claim_lp_tokenDAMM v1client.migration.claimDammV1LpTokenClaim partner or creator LP allocation.
migration_damm_v2_create_metadataDAMM v2DeprecatedDeprecated since program 0.1.7; DAMM v2 migration no longer needs a separate metadata account.
migration_damm_v2DAMM v2client.migration.migrateToDammV2Migrate a completed DBC pool to DAMM v2.
withdraw_migration_feeDAMM v1 or DAMM v2client.partner.partnerWithdrawMigrationFee, client.creator.creatorWithdrawMigrationFeeWithdraw partner or creator migration fee. Uses flag to select the fee side.