Skip to main content
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

Creator And Pool Instructions

Swap Instructions

Swaps account for a Token 2022 transfer fee on either mint. The curve uses the amount received after the input fee. minimum_amount_out is checked against the amount the user receives after the output fee. maximum_amount_in is checked against the amount the user pays before the input fee. amount_0 on exact-in and partial-fill is the amount the user pays, including the input transfer fee. amount_0 on exact-out is the amount the user wants to receive after the output transfer fee. SwapParameters2 uses these fields:
Existing rate-limiter pools, or configs with enable_first_swap_with_min_fee enabled, require the instructions sysvar in remaining accounts on swap instructions. The SDK adds SYSVAR_INSTRUCTIONS_PUBKEY when needed.

Token Badge Remaining Accounts

Config and pool creation read token_badge from remaining account index 0 when the quote mint is not permissionless-supported. The token badge PDA is derived from ["token_badge", quote_mint]. It is read-only and not a signer. Permissionless quote mints do not need this account. A missing badge returns InvalidQuoteMint. A badge that does not match the quote mint returns InvalidTokenBadge. A badge allows a quote mint with a non-zero transfer fee or a live transfer fee config authority on create_config2 only. create_config and create_config_with_transfer_hook still reject those mints. A badge does not freeze later fee changes. Transfer-hook swaps also pass extra remaining accounts described by TransferHookAccountsInfo. Standard swap instructions reject TransferHookPool accounts, and swap2_with_transfer_hook rejects standard VirtualPool accounts with PoolTypeMismatch.

Migration Instructions

DAMM v1 migration instructions remain for existing pools. New configs and new pools cannot select MigrationOption::MeteoraDamm. DAMM v2 migration uses a DAMM v2 config with CreatePoolWithoutMintValidation so a DBC-badged quote mint can still graduate. On a version 1 config with a base transfer fee, or a quote mint with a non-zero transfer fee or a live transfer fee config authority, migration_damm_v2 deposits transfer-fee-excluded amounts and scales the smaller-fee side to hold the migration price. A legacy config (version 0) still fails migration_damm_v2 when the quote mint’s current transfer fee is non-zero.

Operator Instructions

claim_protocol_fee and zap_protocol_fee are removed. Use claim_protocol_fee2 through the protocol fee wrapper program.