DBC Rust SDK
Rust SDK for interacting with the Dynamic Bonding Curve on Meteora.
Last updated
Rust SDK for interacting with the Dynamic Bonding Curve on Meteora.
Last updated
For an overview on how Dynamic Bonding Curve works, please .
This SDK provides a set of tools and methods to interact with the . It enables developers to easily create and manage dynamic bonding curves, with support for custom configurations and fee structures.
Rust SDK on Github:
anchor 0.31.0
solana 2.1.0
rust 1.79.0
Program
Mainnet-beta: dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN
Devnet: dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN
Partner can specify these parameters when they create a configuration on all their pools:
pool_fees
: include base_fee
and dynamic_fee
(optional). Partner can add fee scheduler in base_fee
or just a fixed fee. pool_fees
defines the trading fee for any pool that is created from this configuration.
collect_fee_mode
(0 | 1
): 0
means the virtual pool will only collect fee in quote token, 1
means virtual pool will collect fee in both tokens.
migration_option
: right now we only support migration to Meteora DAMM, so partner must set the value as 0
for this field.
activation_type
(0 | 1
): 0
means slot, 1
means timestamp, this field indicates the time unit that pool will work with, mostly in calculating fee scheduler and dynamic fee.
token_type
(0 | 1
): 0
means SPL Token, 1
means Token2022.
token_decimal
: the token decimals that the token will use when user creates the virtual pool with this configuration, we only support token decimals from 6 to 9.
partner_lp_percentage
: the percentage of LP that partner can claim after token is migrated.
partner_locked_lp_percentage
: the percentage of LP that partner will locked after token is migrated.
creator_lp_percentage
: the percentage of LP that creator can claim after token is migrated.
creator_locked_lp_percentage
: the percentage of LP that creator will be locked after token is migrated.
migration_quote_threshold
: the threhold for quote token, that after virtual pool reserve get such quote token amount, the token will graduate from the launch pool and will be migrated.
fee_claimer
: the address of partner that can claim trading fees from the virtual pools as well as fees from the locked LPs.
owner
: owner of the configuration.
quote_mint
: the quote mint address that virtual pool will support.
migration_fee_option
: allow partner to choose a fee option on graduated pool (currently support 0.25% | 0.3% | 1% | 2%)
token_supply
: when the fields are specified, token will have fixed supply in pre and post migration, leftover will be returned to leftover_receiver (configured in config key)
sqrt_start_price
: square root of min price in the bonding curve for the virtual pools.
curve
: an array of square price and liquidity, that defines the liquidity distribution for the virtual pools.
Using the parameter migration_fee_option
partners can choose a fee option on graduated pool.
Current fee tiers supported: 0.25% | 0.3% | 1% | 2% which corresponds to 0 | 1 | 2 | 3 below.
migration_fee_option == 0: EtwbXRxV8b46Vkho5EhMshi9qEU7xv6sMQnPHK3fX8WR
migration_fee_option == 1: VEtZapzJXreco3cbzUT8ZszawsRvRRQzGN5GBaCMwWh
migration_fee_option == 2: 8z2tYtwiAkby1tMSdf1hG2Ni8MFBk43o9tYey5zegNDh
migration_fee_option == 3: 3BuQgW3g75azhKeE3yzaqeWkmwezuDGwF6FT5py3mFrt
migration_fee_option == 0: 96gRhsiKyBJnXT2GxEnh54b9YLjzpEJ4aTetvLmQ5tWj
migration_fee_option == 1: 3GZLmQJ98xPRLNJjofzK3bfvhU11WFCiZJhEuPwgfBHb
migration_fee_option == 2: 7aqweHmWjiMJEVzTXjvpEasRiDQSK79GNWPqjbkeWtyL
migration_fee_option == 3: 6ym6zMi5RqUH3k2BNdiXUtSdpeypdWMLsxTyRhKqzhz2
locked_vesting
: locked vesting for creator after token is migrated (token will be migrated to )