Core concepts

DLMM

What is DLMM?

DLMM (Dynamic Liquidity Market Maker) pools liquidity in discrete price bins instead of a single continuous tick range. You choose a min/max price, split that interval into bins, and decide how much liquidity sits in each bin—not just one flat band from min to max.

On Pharaoh, DLMM sits alongside legacy liquidity and concentrated liquidity (CL). Avalanche’s low fees make the DLMM tradeoff attractive here: you keep bin-level accounting, analytics, liquidity shaping, and a CEX-like UX without paying the gas premium that makes CL dominant on gas-constrained chains (Ethereum, HyperEVM, and similar).

Why DLMM wins where gas is cheap

CL is more gas-efficient at the cost of weaker per-position accounting, fewer analytics, less control over how liquidity is distributed, and a more rigid LP experience. When gas is not the bottleneck—as on Avalanche—you get DLMM’s advantages without that downside. That pattern is why DLMM-native DEXs became the default on Solana.


DLMM vs concentrated liquidity

Both models concentrate capital near the trading price, but they optimize for different things:

Concentrated liquidity (V3-style)Pharaoh DLMM
One continuous range between two ticksMany bins inside a min/max range, each with its own depth
Liquidity is uniform across the range (unless you open many separate positions)Shape liquidity—Uniform, Curved, Bid-Ask, or custom curves
Strong gas efficiency; best when every rebalance is expensiveRich accounting and analytics per bin; better UX for active strategies
Tight ranges often force constant rebalancing (LVR—loss versus rebalance)Wide strategies with edge liquidity can stay in market without chasing every tick
Positions are isolated NFTs; reshaping usually means close and reopenYou own bins in the pool—trim, refill, and reshape without treating each edit as a new position

Super TLDR: CL trades gas for simplicity. DLMM trades a bit more on-chain surface area for control, transparency, and strategies that are impractical on CL—or on a CEX without hundreds of limit orders.


Bins, not isolated positions

In DLMM you do not think in terms of one rigid “position” NFT. You own liquidity across bins in a pool. That matters for day-to-day management:

  • Withdraw tokens that have already been sold through bins as price moved through your range.
  • Refill or trim specific parts of the curve without redeploying everything.
  • Reshape after the market moves—for example, roll a sell ladder on sAVAX into AVAX, withdraw AVAX, and build a new distribution.

On CL, tools often push you toward full rebalances because liquidity cannot be weighted arbitrarily across price—e.g. the same depth at $5 and $15 in a $5–$15 range rarely matches what you actually want. DLMM lets you put more liquidity where it matters and less on the tails.

Active bin

The active bin is where the pool price currently sits. Swaps interact with liquidity at and around that bin; as price crosses bin boundaries, the active bin steps forward or back.

Liquidity shapes

When adding or editing liquidity, Pharaoh exposes preset shapes (e.g. Uniform, Curved, Bid-Ask) plus controls to tune curvature and range. The bin chart and orderbook view show the same distribution in two ways: histogram by bin, and bid/ask depth by price.

USDt/USDC DLMM deposit UI with Curved shape across 7 bins, min/max price inputs, bin histogram, and CEX-style orderbook depth

For stable pairs, a curved distribution concentrates depth near the peg while keeping backup liquidity on the edges—so you are not constantly swapping in and out of a one-tick CL range as volatility spikes.

Rebalancing and LVR

Much LP drag comes from excessive rebalancing, not from being out of range briefly. CL stable strategies often chase a single tight tick; every rebalance is a taxable swap and an LVR hit. DLMM lets you stay broad and concentrate where volume is—when volatility rises and per-bin volume falls, smaller active slices can still earn comparable fees without nonstop range resets.


CEX-style orderbooks and grid trading

Depending on how you shape bins, a DLMM allocation can behave like a limit order book or an automated grid—buy on dips, sell on rips—without maintaining hundreds of separate CEX orders.

Grid trading diagram: buys at lower price levels, sells at higher levels, as spot oscillates through the range

Examples:

  • Gradual sell (sAVAX → AVAX): Stack bins above spot so sAVAX converts to AVAX as price rises; withdraw AVAX, reshape, or trim bins you no longer need.

sAVAX/AVAX DLMM liquidity shape with 17 bins—sell-side ladder above the active bin

  • Wide but center-heavy (USDC / BTC.b): Cover a large min–max range but weight bins toward the middle so most depth sits where trades actually happen.

Live DLMM position analytics: liquidity distribution, earnings per bin, hourly fees, and historical APR for a USDC/BTC.b position

  • Trading from the book: Many users route size through DLMM pools for execution that mirrors CEX depth—useful for scaling in/out (including TWAP-like behavior) when bins are placed deliberately.

Strategies that would require 400+ limit orders on a CEX—laddered buys, laddered sells, scaling in/out—can be expressed as one bin configuration on Pharaoh.


Position analytics

Pharaoh’s DLMM dashboard is built around bin-level truth, not pool-level guesses:

ViewWhat it shows
Your liquidityTotal value, token split, and the distribution curve across your min/max range
Earnings per binWhich price regions actually collected fees (e.g. peak fee in a single bin)
Total earningsCumulative fees with 1h / 24h / 7d windows
Historical APRRealized APR from what you earned, including time in and out of range
OrderbookBid/ask-style depth implied by your bins—aligned with how traders read CEX books

You can see where the pool traded against your liquidity, how much fee accrued per hour, and how APR evolved over the period you care about—critical for wide ranges that are only “active” in the center.


Real APR

Estimated APR on many protocols assumes you were in-range and earning the whole time. Pharaoh DLMM historical APR backtests what you actually earned: if you were out of range, back in range, then out again, the chart reflects that path.

You know exactly how much you made over 1h, 24h, or 7d—not a theoretical max APR if price had stayed still.


Emissions and the anti-JIT rewarder

DLMM incentives on Pharaoh use a dedicated DLMMRewarderFactory. Design goals:

  • Rewards on the active bin only — emissions target liquidity that is actually tradeable at the current price, not passive bait bins used for just-in-time (JIT) gaming.
  • Anti-JIT rewarder — Pharaoh’s implementation is built to avoid the broken reward accounting that has let JIT bots farm DLMM emissions on other deployments.
Fair incentives

DLMM rewarders industry-wide have been abused by JIT and snapshot gaming. Pharaoh’s active-bin, anti-JIT design is intentional: do not treat emissions as guaranteed yield—productive, in-range liquidity at the active price is what the rewarder is meant to pay for.

Which pools receive emissions still flows through Pharaoh’s x(3,3) voting and gauge system—the same metaDEX loop as CL and legacy pairs: voters direct PHAR, LPs compete on efficiency, fees return to xPHAR stakers.

Fee routing: DLMMFeeCollector aggregates protocol fees from DLMM activity.


Trading and routing

Integrators and the app should use DLMM-native contracts (not the V3 or legacy routers):

  • DLMMRouter — swap execution against DLMM pools
  • DLMMQuoter — quotes and simulation for routes and UIs
  • DLMMFactory — pool deployment

Verified addresses for these contracts are on Contract Addresses.

Previous
Concentrated Liquidity