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
  • Concentrated Liquidity
  • DLMM Bin Price
  • Bin Liquidity
  • Bin Composition
  • Market Aggregation
  1. PRODUCT OVERVIEW
  2. Meteora Liquidity Pools
  3. DLMM Overview

DLMM Program

Concentrated Liquidity

With DLMM, LPs can provide liquidity within a specified price range also known as concentrated liquidity.

This is especially useful for token pairs where trades happen within a tight range such as USDC/USDT where trades usually happen around the $0.99 - $1.01. Often, liquidity outside of this range is untouched and LPs do not earn fees. By concentrating all liquidity within the price range of $0.99 - $1.01, LPs will be able to optimise their trading fees earned.

All bins except for the active one contain just one type of token (X or Y) because they have been depleted or waiting to be used. Only the active bin earns trading fees.

DLMM Bin Price

  • Liquidity is distributed across discrete bins with a fixed width and fixed price.

  • Within each bin, liquidity can be exchanged at a fixed price X + Y = k within each bin. Basically you add X tokens and take out Y tokens (or vice versa), until there is only just 1 type of token left.

  • Each bin represents a single price point, and difference between 2 consecutive bins is the bin step.

  • Bin steps are calculated based on the basis points set by the pool creator.

    • For example, taking SOL/USDC. If the current price is $20 and the bin step is 25 basis points (0.25%), then the consecutive bins would be 20 x 1.0025 = 20.05, 20.05 * 1.0025 = 20.10 and so on.

  • Liquidity pools are identified by its tuple of pooled assets token X, Token Y and bin step s: (X, Y, s)

Bin Liquidity

Liquidity in each bin is calculated by the constant sum price variant, P.x+y=LP. x + y = LP.x+y=L, where x is the quantity of token X, y is the quantity of token Y, L is the amount of liquidity in the bin and P=ΔyΔxP = \frac{Δy}{Δx} P=ΔxΔy​. P is defined as the rate of change of Y reserves per change in X reserves, and is a price constant unique to each pool.

P can be visualized as the gradient of the line in the following image:

Bin Composition

All bins except for the active one contain just one type of token (X or Y) because they have been depleted or waiting to be used. Only the active bin earns trading fees.

As P represents the slope of the line, it remains consistently uniform within every bin.

In contrast to the constant product formula that you might be familiar with from other AMMs, the price is independent of the reserve amounts of both X and Y. To put it another way, if you have a set price P and a known quantity of x (or y), you cannot determine the value of y (or x). In constant product this is calculated by simply taking y=Pxy = \frac{P}{x} y=xP​.

Given that the composition of reserves, x and y, are independent of both price and liquidity, an additional variable is used to describe the reserves available in the bin. This variable, composition factor c, is the percentage of bin liquidity composing of y:

c≡yLc≡ \frac{y}{L} c≡Ly​

From this equation, we can deduce x and y, as follows:

y=cLy=cLy=cL
x=LP(1−c)x = \frac{L}{P}(1-c)x=PL​(1−c)

Market Aggregation

The constant sum curve intercepts both the x and y axes, meaning that the reserves of X or Y token can be depleted. When this happens, the current price would move to the next bin either on the left or right.

Active price bin is defined as the bin that contains reserves of both X and Y. Note that there can only be one active bin at any point in time. All bins to the left of the active bin will only contain token Y, while all bins to the right of it will only contain token X.

A straightforward way to conceptualize this is by considering the SOL/USDC pool. Suppose we designate asset Y as USDC and asset X as SOL. Price P is determined by the amount of USDC per SOL. We can define the $100 SOL bin as the active bin, with all bins to the left containing only USDC and all bins to the right containing only SOL. When there is significant demand for SOL, the active bin shifts to the right as the SOL reserves in the $100 bin get exhausted.

PreviousWhat is DLMM?NextDynamic Fees

Last updated 1 year ago