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
  • Summary
  • Key Features
  • SPL and Token 2022 support
  • Dynamic Fee
  • LP Fee Scheduler
  • Versatile LP Fee Claiming mechanism
  • LP Fee Collection Mode
  • Transferrable Position NFT
  • Concentrated Liquidity
  • Lock Liquidity Options
  • Launch single-sided liquidity
  • Built-in Farming mechanism
  • Greater cost efficiency
  • Custom start time (pool activation time)
  • Case Studies
  • DAMM v2 Integration
  1. PRODUCT OVERVIEW
  2. Meteora Liquidity Pools

DAMM v2 Overview

Summary

Dynamic AMM v2 (DAMM v2) is a brand new constant-product AMM program for liquidity pools, with a set of features to optimize transaction fees and provide greater flexibility for liquidity providers, launchpads, and token launches.

Note: DAMM v2 is a new program, and not an upgrade of the Dynamic AMM v1 program.

Key Features

DAMM v2 would come with the following features.

  • Support for a wider range of tokens: SPL and Token 2022

  • Dynamic Fee: Option of Fixed Base Fee only or with Dynamic Fee, which helps maximize returns during periods of higher volatility

  • Anti-Sniper LP Fee Scheduler: Option of an On-chain Fee scheduler where swap fee starts higher and drops over time (linearly or exponentially), as an anti-sniper mechanism

  • Versatile LP Fee claiming mechanism: LP Fee doesn't auto-compounds into the pool liquidity. Can be claimed separately from liquidity withdrawal. This allows the building of additional features into the fee distribution system

  • LP Fee collection mode: Ability to select your preferred token for LP fee collection; Base + Quote or Quote token only

  • Transferrable Position NFT: Liquidity position is not represented by an LP Token, but by a Position NFT, so ownership can be transferred to another wallet if required

  • Lock liquidity options: Option to lock liquidity with vesting (non-permanent lock) or permanently lock liquidity, while still providing the ability to claim fees

  • Concentrated liquidity: Ability to partially concentrate liquidity within a configured min-max price range for higher capital efficiency. Note: This feature is currently only available on permissioned pools created by the team.

  • Launch single-sided liquidity: To launch their token, projects can programmatically create single-sided liquidity pools with only 1 token, similar to DLMM, offering greater flexibility for launches

  • Built-in Farming mechanism: Built-in farming within the program, not a separate Farm program

  • Greater cost efficiency:

    • No Dynamic Vault integration (which DAMM v1 has) to lend tokens to external lending protocols, so DAMM v2 no longer involves hot accounts

    • CU-optimized

    • Lower SOL rent costs

    • Creating a single DAMM v2 pool + position costs ~0.022 SOL, compared to an average of ~0.25 SOL for binArrays and Positions on the DLMM pool

  • Custom start time (pool activation time): A custom start time can be set during pool creation, so that you can launch your token at the specific time you want

SPL and Token 2022 support

Users can create pools or add liquidity for tokens that support both SPL and Token 2022 (Transfer Fee, Metadata, MetadataPointer extensions).

All Token 2022 tokens with Metadata pointer, and transfer fee extensions are supported permissionlessly. Token mints with other extensions can be whitelisted by Meteora's admin.

Dynamic Fee

Pool creator has the option of choosing a Fixed Base Fee only or with an additional Dynamic Fee, which is a variable fee based on price volatility.

Dynamic Fee helps maximize returns for LPs during periods of higher volatility.

DAMM v2 Dynamic Fee Calculation

  • dynamic_fee_numerator = ((volatilityAccumulator*binStep)^2 * variableFeeControl + 99_999_999_999) / 100_000_000_000

  • dynamic_fee_percent = (dynamic_fee_numerator / 1_000_000_000) * 100

By default

  • binStep = 1

  • variableFeeControl : This value will be set in dynamic fee params when a creator creates a pool. It is a constant value stored inside poolState.

Max Dynamic Fee on DAMM v2

  • Currently, the max Dynamic Fee is ~20% of the Base Fee. It will always be <= Base Fee

  • Example:

    • Base Fee = 0.25%

    • Dynamic Fee = 0.0499%

    • Total LP Fee = 0.2999%

LP Fee Scheduler

Pool creator has the option of using an On-chain Fee Scheduler, where LP Fees can drop over time (linearly or exponentially). This acts as an anti-sniper mechanism as you can set higher fees at the very start of the token launch.

By default, LP Fees drop over time per second. But partners using the pool creation setup script have the following options:

  • Time based (unix timestamp): Fees change per second

  • Slot based: Fees change per slot (1 slot = 1 block = 0.4 secs)

Linear Fee Scheduler Example

Exponential Fee Scheduler Example

Versatile LP Fee Claiming mechanism

LP Fee no longer auto-compounds into the pool liquidity. Can be claimed separately from liquidity withdrawal. This allows the building of additional features into the fee distribution system. For example, enabling the claiming of LP Fee in a preferred token (e.g. SOL or USDC), or locking liquidity position permanently but still allow fees to be claimed.

LP Fee Collection Mode

Pool creator has the ability to select your preferred token for LP Fee Collection: Base + Quote or Quote token only.

Regarding how DAMM 2 collects fee only using the Quote token ("Token B"):

  • If a user swaps from A -> B, fee is charged on B; protocol takes some of the user's B

  • If a user swaps from B -> A, fee is charged on B before the swap is calculated; protocol takes some of the user's B before it gets swapped to A

Transferrable Position NFT

Liquidity position is not represented by an LP Token, but by a position NFT. This position NFT can be transferred to another wallet address.

Concentrated Liquidity

DAMM v2 is a constant product pool but still enables pool creators to partially concentrate liquidity using a slightly tighter price range for higher capital efficiency. Once the pool is created, LPs that enter the pool would not be able to adjust the price range. This feature combines the benefits of a constant product AMM with the concentrated liquidity feature of a CLMM.

Lock Liquidity Options

Pool creator has the option to lock liquidity with vesting (non-permanent lock) or permanently lock liquidity.

Launch single-sided liquidity

Project launches can programmatically create single-sided liquidity pools with only 1 token, similar to DLMM, offering greater flexibility for launches

Built-in Farming mechanism

There is now built-in farming within the program, not using a separate Farm program like in Dynamic AMM v1.

Greater cost efficiency

Unlike DAMM v1, DAMM v2 is not integrated with Dynamic Vaults to lend tokens to external lending protocols. Each pool now includes a set of unique accounts for swap instruction; there are no more hot accounts or shared accounts between 2 pools, which optimizes the Compute Unit (CU) and lower transaction fees and rent required.

Creating a single DAMM v2 pool + position costs ~0.022 SOL, compared to an average of ~0.25 SOL for binArrays and Positions on the DLMM pool.

Custom start time (pool activation time)

A custom start time can be set during pool creation, so that you can launch your token at the specific time you want, to coincide with your CEX listing or token airdrop claim etc.

Case Studies

DAMM v2 Integration

PreviousDynamic AMM Farm OverviewNextMemecoin Pool Overview

Last updated 3 days ago

volatilityAccumulator: This value is inside the program and stored in the poolState. For more info, read .

Please visit .

this section here
https://meteoraag.medium.com/damm-v2-case-study-elizaos-e5a30f19b9b
https://meteoraag.medium.com/damm-v2-case-study-pump-science-d18501c5ef4b
https://meteoraag.medium.com/damm-v2-single-sided-launch-pools-80dba79ac934
DAMM v2 SDK