LB Pair

DEX & liquidity

The LB Pair is the top-level account for a Meteora DLMM pool. It stores the active bin id, the bin step, the fee parameters, the token mints, and the vaults. Every swap reads the LB Pair first to find out where price currently is, and writes back the new active bin afterward. It is the analog of an Orca Whirlpool account.

Detailed explanation

Meteora's DLMM program lives at LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo. Every pool deploys an LB Pair PDA derived from the two token mints and the bin step. The account stores token X mint, token Y mint, vault X, vault Y, the active bin id, the bin-step bps, base and variable fee parameters, and a reward configuration array.

On a swap, the program reads the active bin from the LB Pair, walks across bin arrays as it consumes liquidity, and updates the active bin id when price crosses a bin boundary. When the swap completes, the LB Pair's active bin and the corresponding bin array reserves are written back. Reading the LB Pair alone is enough for a price quote; reading the bin arrays is required for a depth-aware quote.

DLMM pools also support volatility-aware fees. The variable fee parameter on the LB Pair scales the fee with recent price moves, which gives LPs a buffer during fast markets. That mechanism makes DLMM fees less predictable than CLMM fees, which is a feature for LPs and a bug for swap routers.

One opinion: when you are integrating DLMM, watch the LB Pair on Geyser and re-derive your bin array reads from the new active bin. Caching bin arrays without invalidating on LB Pair updates leads to stale quotes.

When you'll see this

LB Pair accounts are present for every DLMM pool. The instructions that touch them include swap, add_liquidity, remove_liquidity, initialize_lb_pair, and set_pool_status.

How NoLimitNodes uses this

Our Meteora Enhanced Stream parses every LB Pair update with the previous and new active bin, the resulting price, and the fee state, so you can keep your view in sync without re-deserialising the account yourself.

Related terms

  • Bin Array · A Meteora DLMM account holding 70 price bins, each storing reserves and liquidity for one discrete price step.
  • DLMM · Dynamic Liquidity Market Maker. Meteora’s discrete-bin model with zero slippage inside the active bin.
  • Whirlpool · The Orca CLMM pool account that stores the active sqrt-price, current liquidity, fee tier, and tick spacing.
  • CLMM · Concentrated Liquidity Market Maker. LPs choose a price range, and capital only earns fees inside that range.
  • LP Token · A fungible SPL token that represents your share of an AMM pool, mintable on deposit and burnable on withdraw.

Canonical references

Ready to get started?

Get your free API key and start building in under 30 seconds.

Talk to Sales