Dynamic Bonding Curve
dynamic-bonding-curve-sdk
provides a convenient way to interact with the Dynamic Bonding Curve program and get swap quotes.
Before you begin, here are some important resources:
dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN
quote_exact_in
virtual_pool
: A reference to the VirtualPool
state.config
: A reference to the PoolConfig
for the pool.swap_base_for_quote
: A boolean indicating the direction of the trade. true
for swapping base token for quote token, false
otherwise.current_timestamp
: The current Solana cluster timestamp.current_slot
: The current Solana cluster slot.transfer_fee_excluded_amount_in
: The amount of input tokens for the swap, excluding any transfer fees.has_referral
: A boolean indicating if a referral fee should be considered.Result<SwapResult>
, where SwapResult
contains detailed information about the outcome of the swap, such as the amount out, fees, and the new state of the pool.