Skip to content
Developers14 min read

CPMM vs CLMM vs DLMM: How Solana's Three AMM Designs Work

Constant product, concentrated liquidity and liquidity bins are the three AMM designs behind most Solana pools. How each one prices a trade, where its liquidity sits, and what changes when you stream or trade against it.

Julius Schmitt · OrbitFlare
CPMM vs CLMM vs DLMM: How Solana's Three AMM Designs Work

CPMM vs CLMM vs DLMM comes down to one question: where does each design keep its liquidity? Each one is an automated market maker (AMM): an on-chain program holding a shared pot of deposits that traders swap against directly, with no need to find someone on the other side of each trade. With a CPMM, liquidity covers every price through x · y = k. With a CLMM, each liquidity provider chooses a price range for their own deposit. With a DLMM, prices are grouped into bins, and inside one bin every trade fills at one fixed price.

On Solana, Raydium offers CPMM and CLMM, Orca's Whirlpools are a CLMM, and Meteora runs the DLMM. All protocol information below is taken from the documentation of each team, checked on 9 November 2026.

Key terms

  • Liquidity pool: two token balances held together, which traders swap against.
  • Liquidity provider (LP): someone who deposits into a pool and in return collects part of the fees traders pay.
  • Price impact and slippage: price impact measures how far a trade moves the price by itself; slippage is any gap between the price you expected and the price you got.
  • Basis point (bp): 0.01%, which makes 25 basis points equal to 0.25%.
  • Tick and bin: narrow steps on the price line. A CLMM uses ticks; a DLMM uses bins.
  • Account: Solana's storage unit for data, for example the balances of a pool or a position belonging to one LP.
  • Program ID: the on-chain address of the program running a pool, which owns the accounts for each pool it creates.

CPMM vs CLMM vs DLMM at a glance

This table puts the three designs next to each other: how they spread liquidity, what an LP has to look after, and where each one fits.

How the three AMM designs differ

CPMM: the constant product market maker

Two token balances, x and y, sit in a constant product market maker, and a swap is allowed as long as their product k is unchanged after fees. Say you add some amount of one token: the pool returns exactly as much of the other as keeps x times y steady. Since price equals the ratio of the balances, a small trade shifts it slightly and a large one shifts it a lot. Liquidity is laid out along the entire price curve. The upside is a pool that is simple and never closes; the downside is that most deposited capital is parked at prices where little trading happens.

Raydium's CPMM, called Standard AMM in its interface, is what Raydium recommends to anyone opening a new constant-product pool. Token-2022 mints with supported extensions work with it. Token-2022 is the newer Solana token standard, and its optional add-on features are known as extensions. Depositors get a fungible LP token that represents what they own of the pool, and they hand it back to take their funds out. Tokens launched on Raydium's LaunchLab bonding curve also graduate to CPMM once the curve fills; a bonding curve sells a fresh token at a price that keeps rising as buyers take more. Existing pools continue to run on Raydium's older AMM v4, but CPMM is the default for new ones.

LPs who prefer to set and forget get that from a CPMM: deposit both tokens, then earn a slice of fees while trading continues. Traders get predictability, since slippage is set purely by the pool's depth, that is, the amount of each token sitting in it.

CLMM: concentrated liquidity

A concentrated liquidity pool, or CLMM, has every LP choose a price range for the funds they deposit. While the price is inside it, that money works as though it were part of a much deeper constant-product pool. Once the price leaves, fees stop and the whole position converts into just one of the pair's tokens. Ticks chop prices into steps of 0.01% each (1.0001^i, with i as the tick number), and tick spacing controls which steps the edges of a range are allowed to sit on.

The Raydium CLMM is built on concentrated liquidity as Uniswap v3 first designed it on Ethereum. Your position lives in your wallet as an NFT, a unique token that stores the range you picked and how much you put in. Fee accounting happens position by position, and nothing is earned whenever the price is out of range. Orca Whirlpools share the approach. Their fee tiers depend on tick spacing and run from 0.01% for pegged stable pairs, meaning two tokens built to stay equal in value like a pair of dollar stablecoins, to 2% at the top end. For passive liquidity Orca adds the full-range Splash Pool.

All of this asks more of the LP. Set a range tightly around the current price and it earns nothing once the market drifts outside, which is why LPs rebalance: they move the range so it keeps up with the price. A new position can also mean paying extra rent, Solana's SOL deposit for keeping a new account on chain, if no tick array yet exists for that price area; a tick array is the account that stores data for a run of ticks.

DLMM: liquidity in bins

Bins are how Meteora's Dynamic Liquidity Market Maker divides the price line. A bin keeps its liquidity at one price, and inside it the pool works like a constant-sum market: L = P · x + y. Put another way, the price multiplied by one balance, added to the other balance, does not change, so a trade that stays within the bin leaves the price where it is. At any moment only a single bin is active. Trades fill at its price without price impact; when the bin has none left of the token being bought, the pool shifts over to the next one.

The gap between neighbouring bins is the bin step. It is set in basis points and can be as large as 400. With a 25 basis point bin step, adjacent bins sit about 0.25% apart. Bins are kept in groups of 70 called bin arrays, and one position can span as many as 1,400 bins.

DLMM introduces two features not available to the CPMM and regular CLMM pools. First, fees consist of a base fee plus, on pools configured to charge it, a variable fee that rises when swaps cross many bins quickly and eases off once trading calms down. Second, LPs choose the shape of liquidity: Spot distributes it evenly, Curve clusters liquidity around the center, while Bid-Ask accumulates it on the edges.

Which AMM type should you use?

  • Passive LP, any pair: CPMM. Nothing needs managing, and fee income continues for as long as there is trading.
  • Active LP, liquid pair: CLMM. Concentrating near the market price brings the best return on each dollar, provided the range gets rebalanced.
  • Volatile pairs and token launches: DLMM. When volatility spikes the fees can climb automatically, and bin shapes give a team control over how launch liquidity is placed.
  • Trading bots: all three. Aggregators are routers that split one order over several pools for the best price, and they pull from every design, so watching a single design leaves a bot blind to part of the market.

What each pool type means for a developer

Building bots, dashboards or indexers (services storing on-chain data in a searchable database)? Then the pool design determines both the accounts each swap touches and the amount of state you must track.

Here is what a single swap updates on-chain for each design; this is the state your code must load and keep current.

What each swap changes on-chain

Each design is its own program, so each has its own program ID. The easiest way to separate one design's pools and swaps from the rest is to filter on that ID. Here they are:

Program IDs for each AMM

Raydium’s own program address list warns against signing anything whose program ID doesn’t match its table, so check IDs against each team's docs before you ship.

Streaming pool state with gRPC

Polling, meaning calling getAccountInfo again and again for each pool you track, burns through your rate limits and still gets the data to you late. Yellowstone gRPC holds a single streaming connection open and sends you account updates the moment they happen. A subscription can filter accounts by owner, the program in charge of an account, and return everything that program owns. Narrow it further with dataSize (how many bytes the account takes up) and memcmp (a match on particular bytes at a fixed spot in the account data), as shown in the account monitoring guide.

In this request, the subscription covers all accounts owned by the Meteora DLMM program. PROCESSED is the fastest of the three Solana commitment levels, meaning updates reach you before the block is confirmed:

const request = {
  accounts: {
    dlmm_pairs: {
      owner: ["LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo"],
      account: [],
      filters: [],
    },
  },
  commitment: CommitmentLevel.PROCESSED,
};

Put a memcmp filter on the account discriminator and the stream shrinks to just pool or pair accounts, skipping the positions and bin arrays that are of no use to you. Programs built with Anchor, a popular framework for Solana, store the discriminator in an account's first 8 bytes, and those bytes identify what kind of account it is.

There is a catch when tracking swaps. Lots of them are routed by an aggregator, which makes the AMM call an inner instruction instead of a top-level instruction. Inner instructions happen when a program calls another program partway through running, as when the aggregator calls the AMM here. You get inner instructions and transaction metadata from Yellowstone. Jetstream, built from decoded shreds, the small chunks a leader breaks a block into while broadcasting it, is lighter and omits them. Top-level events like pool creation are fine on Jetstream; routed swaps call for Yellowstone.

Seeing new pools early

Bots compete hardest for new pools, especially on DLMM and CPMM programs that see many launches. Shredstream streams raw shreds over UDP, a fast protocol that sends data without first setting up a connection, straight from validators at the top of Turbine, Solana's mechanism for fanning shreds out from the leader to the rest of the network. So a pool-creating transaction becomes visible before its block has been assembled. Requirements are a public IP address with an open UDP port, plus a deshredding process of your own, software that rebuilds transactions out of shreds. Place the receiver on a server near the feed; our sister brand OrbitServers offers trading bot hosting suited to it.

Landing swaps

No matter which pool it hits, a swap must get to the current leader, meaning the validator whose turn it is to produce blocks. Apex takes one signed transaction and passes it to current and upcoming leaders by way of partner validators, direct TPU (a validator's entry port for transactions) or Jito. There is no subscription and no per-send fee. Apart from ordinary network and priority fees, the only cost is a tip of at least 0.001 SOL on the standard tier, charged only if the transaction lands. Landing a transaction is not the same as it executing, so each swap still needs two safeguards: a slippage cap, which is the worst price you'll take before the swap fails instead of filling, and a priority fee, which is extra paid to move up the leader's queue. Afterwards, confirm the outcome on your RPC.

Frequently asked questions

What is the difference between CLMM and DLMM?
Both concentrate liquidity, in different ways. The CLMM model uses ticks and a constant-product curve inside each LP's range, which means each trade moves the price somewhat. The DLMM holds its liquidity in fixed-price bins, so trades inside the active bin all clear at one price, and the price only shifts once that bin is used up. Meteora's DLMM pools can also add volatility-based fees.
Is DLMM better than CLMM?
Neither fits every case. For volatile pairs and launches DLMM tends to win, since its dynamic fees and bin shapes help LPs price risk; for liquid pairs CLMM tends to win, with tight ranges earning steady fees on mature tooling. Plenty of Solana tokens have pools of both kinds, and aggregators will route through whichever fills better.
What is a CPMM in crypto?
The Constant Product Market Maker (CPMM) is the original AMM design: a pool holds a token pair, allowing any trade that keeps `x · y = k` constant after fees. Liquidity can be provided in all price ranges without an LP’s need to monitor them. On Solana, Raydium's CPMM is the main example.
Which AMM type is best for liquidity providers?
That comes down to how much attention you can give it. With CPMM you take the easier route and earn fees for as long as the pool trades. CLMM and DLMM earn more per dollar while the price stays in your range, yet need their range shifted whenever the market drifts, and concentrated positions feel price swings more sharply.
How do I track new Solana liquidity pools as they launch?
Open a Yellowstone gRPC subscription on the AMM program IDs, catch pool-creation transactions or freshly created pool accounts, and decode them with each protocol's SDK or IDL. To see them earliest, take raw shreds from Shredstream, deshred them on your side, and double-check each pool on a regular RPC before you trade.

About the author

Julius Schmitt

OrbitFlare

Thanks for reading.Back to all articles

Code. Build. Stream. Without Limits.

Build something that moves.

Choose your infrastructure. We’ll help you find the right setup.

A useful starting point

Edit the brief, then copy it and open your assistant. Paste it into a new chat to get started.

Official sources included. You choose when to send.