Meteora
  • Meteora: The most dynamic and sustainable liquidity layer on Solana
  • PRODUCT OVERVIEW
    • Meteora Liquidity Pools
      • DLMM Overview
        • What is DLMM?
        • DLMM Program
        • Dynamic Fees
        • Strategies & Use Cases
        • DLMM Farming Rewards
      • DLMM Launch Pool Overview
      • Dynamic AMM Overview
        • What is a Dynamic AMM Pool?
        • Dynamic AMM LP Fee and APY Calculation
        • Creating a Dynamic AMM Pool via the UI
        • Claiming Fees from Permanently Locked Liquidity
        • Dynamic AMM Stable Pools
        • Dynamic LST Pools
        • Additional yield from Dynamic Vaults
        • Dynamic AMM Farm Overview
      • DAMM v2 Overview
      • Memecoin Pool Overview
        • Memecoin Pool v2
          • What is Memecoin Pool v2?
        • Memecoin Pool v1
          • What is Memecoin Pool v1?
          • Permanently Locking Liquidity
      • Stake2Earn Pool Overview
        • What is a Stake2Earn Pool?
        • Stake2Earn for Launchpads
      • Multi-Token Stable Pool Overview
    • Alpha Vault Overview
    • Dynamic Vault Overview
      • What is a Dynamic Vault?
      • Dynamic Vault Program
      • Hermes - Meteora's Keeper
        • Algorithm to find optimal yield allocations
        • Rebalance crank
        • Operation fee calculation
      • Design Goals
      • Security
      • Dynamic Vaults Whitepaper
      • Dynamic Vaults Community Explainers
      • Affiliate Program for Dynamic Vault
        • Become an Affiliate Partner (Dynamic Vaults)
    • Dynamic Bonding Curve (DBC) Overview
      • What is the Dynamic Bonding Curve?
      • Customizable Pool Configuration
      • Bonding Curve Formula
      • DBC Migrator Keeper
  • Meteora's Anti-Sniper Suite (A.S.S.)
    • Meteora’s Anti-Sniper Suite
      • Dynamic Fees
      • Fee Scheduler
      • Alpha Vault
  • INTEGRATION
    • DLMM Integration
      • DLMM SDK
        • DLMM TypeScript SDK
        • CPI Examples
      • DLMM API
      • Fetching information on locked liquidity in a DLMM
    • Dynamic AMM Pool Integration
      • Dynamic AMM SDK
        • Dynamic AMM TypeScript SDK
        • CPI Examples
      • Dynamic AMM API
        • Pool Info
        • Pool State
      • Setting Pool and Fee Config for Dynamic AMM Pools
      • Create Dynamic Pool with Timestamp/Slot Activation
      • Dynamic AMM - Farm Integration
    • DAMM v2 Integration
      • DAMM v2 SDK
        • DAMM v2 TypeScript SDK
        • DAMM v2 Rust SDK
      • Setting Pool and Fee Config for DAMM v2
      • Technical FAQ
    • Memecoin Pool Integration
      • Memecoin Pool v2 Integration
        • Setting Pool and Fee Config for Memecoin Pool v2
      • Memecoin Pool v1 Integration
        • TypeScript Code Examples
        • CPI Examples
        • Setting Pool and Fee Config for Memecoin Pool v1
        • Track permanently-locked liquidity in Memecoin Pool v1
        • Track Protocol Fee from swaps in Memecoin Pool v1
    • Stake2Earn Pool Integration
    • Dynamic Vault Integration
      • Using TypeScript-Client
      • Using Rust-Client
      • Using CPI
      • Vault API
        • Vault Info
        • Vault State
      • Vault Developer Resources
    • Alpha Vault Integration
      • Alpha Vault TypeScript SDK
      • Alpha Vault without Whitelist Setup
      • Alpha Vault with Whitelist Setup
    • Dynamic Bonding Curve (DBC) Integration
      • DBC SDK
        • DBC TypeScript SDK
        • DBC Rust SDK
      • DBC Fee Scheduler Formula
      • DBC Scripts
      • Program Repo
      • Launchpad Template
      • Technical FAQ
  • TOKEN LAUNCH POOLS
    • Steps to Create a Pool for a Token Launch
      • Create: DLMM Launch Pool
      • Create: Dynamic AMM Pool
      • Create: Memecoin Pool v1
      • Create: Stake2Earn Pool
      • Create: Pools with Alpha Vault
        • Create: DLMM Launch Pool with Alpha Vault
        • Create: Dynamic AMM Pool with Alpha Vault
        • Create: Memecoin Pool with Alpha Vault
        • Create: Stake2Earn Pool with Alpha Vault
    • Anti-Sniper Fee Suite for a Token Launch
  • Resources
    • Audits
    • Meteora Program IDs
    • Meteora APIs
    • Devnet Testing
    • Community Data Dashboards & Tools
    • Meteora Brand Assets
    • THE MASSIVE METEORA STIMULUS PACKAGE
      • Overview
      • 1. Dynamic Liquidity Market Maker (DLMM)
      • 2. Formation Of An LP Army DAO
      • 3. The 10% Stimulus Proposal
  • USER FAQ
    • Getting Started LPing
      • Supported Wallets
      • Prepare SOL
      • SOL required for Rent
      • What is Wrapped SOL?
      • What is an AMM?
      • What does it mean to provide liquidity?
      • How to swap to the tokens required for adding liquidity to a pool
      • How to quickly check if a token has any risks
      • Viewing your transaction history
      • My wallet has been compromised. What should I do?
    • Differences between DLMM and Dynamic Pools
    • DLMM FAQ
    • Dynamic AMM FAQ
      • How is the pool price of the token calculated in a Dynamic AMM?
      • What is a Meteora LP token?
      • How do I see fees earned on a Dynamic AMM Pool?
      • How to track your earnings for a Dynamic Pool?
      • What is Virtual Price in a Dynamic Pool?
      • How do LP tokens, fees, and virtual price work for Dynamic Pools?
      • Why must I add liquidity in non-stable Dynamic Pools using a 50:50 value ratio?
      • What is AMP in a Dynamic Pool with stable coins?
      • Why is the USDT-USDC pool not 1:1 in ratio of assets?
      • Can I create an LST, FX, or Multi-token pool using the Dynamic Pool creation tool?
    • Alpha Vault FAQ
    • Why is the token sometimes not picked up and tradable on Jupiter?
    • How do I create a new farm?
    • Video Tutorials to Get Started
      • LP Army Boot Camp
      • DLMM Strategy Sessions / Jam Sessions
  • Security and Risks
    • Risk of Impermanent Loss (IL)
    • Risk of depositing into an imbalanced pool / pool with price out of sync
    • Smart contract risk
    • Risk of a stablecoin depeg
    • Operational risk for dynamic vaults and pools
    • Lending risk for dynamic vaults and pools
  • legal
    • Terms of Service
    • Stake2Earn Terms of Service
Powered by GitBook
On this page
  • Getting Started
  • Development
  • Dependencies
  • Build
  • Test
  • Program ID address:
  • Key Parameters for configuration
  • Config key for migration
  • DAMM V1:
  • DAMM V2:
  1. INTEGRATION
  2. Dynamic Bonding Curve (DBC) Integration
  3. DBC SDK

DBC Rust SDK

Rust SDK for interacting with the Dynamic Bonding Curve on Meteora.

PreviousDBC TypeScript SDKNextDBC Fee Scheduler Formula

Last updated 23 days ago

Getting Started

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:

  • DBC Migrator Keeper docs:

Development

Dependencies

  • anchor 0.31.0

  • solana 2.1.0

  • rust 1.79.0

Build

Program

anchor build -p dynamic_bonding_curve

Test

pnpm install
pnpm test

Program ID address:

  • Mainnet-beta: dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN

  • Devnet: dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN

Key Parameters for configuration

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.

Config key for migration

Using the parameter migration_fee_option partners can choose a fee option on graduated pool.

DAMM V1:

Current fee tiers supported: 0.25% | 0.3% | 1% | 2% | 4% which corresponds to 1 | 2 | 3 | 4 | 5 below.

  • migration_fee_option == 1: HBxB8Lf14Yj8pqeJ8C4qDb5ryHL7xwpuykz31BLNYr7S

  • migration_fee_option == 2: 7v5vBdUQHTNeqk1HnduiXcgbvCyVEZ612HLmYkQoAkik

  • migration_fee_option == 3: EkvP7d5yKxovj884d2DwmBQbrHUWRLGK6bympzrkXGja

  • migration_fee_option == 4: 9EZYAJrcqNWNQzP2trzZesP7XKMHA1jEomHzbRsdX8R2

  • migration_fee_option == 5: 8cdKo87jZU2R12KY1BUjjRPwyjgdNjLGqSGQyrDshhud

DAMM V2:

Current fee tiers supported: 0.25% | 0.3% | 1% | 2% | 4% | 6% which corresponds to 0 | 1 | 2 | 3 | 4 | 5 below.

  • migration_fee_option == 0: 7F6dnUcRuyM2TwR8myT1dYypFXpPSxqwKNSFNkxyNESd

  • migration_fee_option == 1: 2nHK1kju6XjphBLbNxpM5XRGFj7p9U8vvNzyZiha1z6k

  • migration_fee_option == 2: Hv8Lmzmnju6m7kcokVKvwqz7QPmdX9XfKjJsXz8RXcjp

  • migration_fee_option == 3: 2c4cYd4reUYVRAB9kUUkrq55VPyy2FNQ3FDL4o12JXmq

  • migration_fee_option == 4: AkmQWebAwFvWk55wBoCr5D62C6VVDTzi84NJuD9H7cFD

  • migration_fee_option == 5: DbCRBj8McvPYHJG1ukj8RE15h2dCNUdTAESG49XpQ44u

locked_vesting: locked vesting for creator after token is migrated (token will be migrated to )

read this
Meteora Dynamic Bonding Curve
https://github.com/MeteoraAg/dynamic-bonding-curve/tree/main/dynamic-bonding-curve-sdk
https://github.com/MeteoraAg/dbc-keeper
Jup lock