DAMM v2 Rust SDK
Last updated
Last updated
Read the
Program Repo on Github:
Rust SDK on Github:
Program ID (Mainnet-beta): cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG
Program ID (Devnet): cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG
anchor 0.31.0
solana 2.1.0
rust 1.85.0
create_config: create a config key that includes all pre-defined parameters when user create pools with that config key.
create_token_badge: whitelist token mint, that has non-permissionless extensions (token2022)
create_claim_fee_operator: whitelist an address to claim protocol fee
close_claim_fee_operato: unwhitelist the address to claim protocol fee
close_config: close a config key
initialize_reward: initialize an on-chain liquidity mining for a pool
update_reward_funder: update a whitelisted address to fund rewards for on-chain liquidity mining
update_reward_duration: update reward duration for liquidity mining
set_pool_status: enable or disable pools. If pool is disabled, user can only be able to withdraw, can't add liquidity or swap
claim_protocol_fee: claim protocol fee to Meteora's treasury address
fund_reward: fund reward for on-chain liquidity mining
withdraw_ineligible_reward: withdraw ineligible reward
claim_partner_fee: claim partner fee
initialize_pool: create a new pool from a config key
initialize_customizable_pool: create a new pool with customizable parameters, should be only used by token deployer, that token can't be leaked.
create_position: create a new position nft, that holds liquidity that owner will deposit later
add_liquidity: add liquidity to a pool
remove_liquidity: remove liquidity from a pool
remove_all_liquidity: remove all liquidity from a pool
claim_position_fee: claim position fee
lock_position: lock position with a vesting schedule
refresh_vesting: refresh vesting schedule
permanent_lock_position: lock position permanently
claim_reward: claim rewards from on-chain liquidity mining
swap: swap with the pool
vault_config_key: alpha-vault address that is able to buy pool before activation_point
pool_creator_authority: if this address is non-default, then only this address can create pool with that config key (for launchpad)
pool_fees: includes base fee scheduler, dynamic-fee, protocol fee percent, partner fee percent, and referral fee percent configuration
activation_type: determines whether pools are run in slot or timestamp
collect_fee_mode: determines whether pool should collect fees in both tokens or only one token
sqrt_min_price: square root of min price for pools
sqrt_max_price: square root of max price for pools