Lyra Pools DLMM Documentation
Learn how Lyra Pools uses Dynamic Liquidity Market Maker (DLMM) protocol for optimized liquidity management on Solana.
What is DLMM?
Traditional AMMs (like constant-product x·y=k) spread liquidity across all prices, so most of your capital sits where trades aren't happening. DLMM concentrates liquidity into discrete price bins and adds surge-style dynamic fees that react to volatility. As a result, LP capital is used where action is, and fee rates increase when markets are frantic.
Core Concepts
Price Bins
Think of the pool as a list of bins — tiny fixed price points, each with its own reserves and fee accounting. The bin step (in bps) is the fixed percentage distance between adjacent bins. Within a bin, swaps happen at a fixed price (no slippage inside the bin). When reserves of one token are exhausted, price "jumps" to the next bin.
Active Bin
The active bin is the only bin that currently holds both X and Y tokens; it's where trades clear right now and the only bin earning fees at that moment. Bins to the left hold only Y, to the right only X. Internally, DLMM models each bin with a simple constant-sum relationship: P·x + y = L, where x and y are reserves, P is the bin's fixed price, and L is bin liquidity.
Dynamic Fees
Each swap pays a total fee: f_s = f_b + f_v. The base fee (f_b) is configured by the pool creator, proportional to bin step and a base factor. The variable fee (f_v) rises with volatility and with how many bins a swap crosses. This surge pricing compensates LPs during choppy markets and discourages snipers at launches.
How Price Moves
A swap consumes liquidity in the active bin at that bin's fixed price. If the swap is large enough to deplete the relevant side, the protocol moves to the next bin (price jumps by one bin step), continues there, and so on. The market price is the price of the current active bin; each bin hop is a discrete price move of size s.
LP Positioning Strategies
As an LP you don't just dump funds in a single curve; you choose where to place liquidity across bins:
- Spot: A uniform distribution across a range — versatile, risk-adjusted
- Curve: A tighter, concentrated shape around the current price to maximize efficiency
- Bid-Ask: "Inverted curve," often single-sided, useful for DCA-style flows or pegged pairs
Only bins that become active earn fees; you monitor and rebalance as conditions change.