CometDocs
Contents

Pools

Concentrated liquidity

Comet’s pools are concentrated-liquidity AMMs. A liquidity provider chooses the price range their tokens trade in, and swaps pay them a fee while the price is inside it.

Ranges

A range is liquidity placed between a lower and an upper price. Inside the range the position holds both tokens and trades against every swap that crosses it. Move the price to see what the position holds.

SOL/USDC · example range 160–240
Price200 USDC
Held as SOL45%
Held as USDC55%

In range: the position earns its share of every swap.

A range on SOL/USDC. As the price rises through the range the position sells SOL for USDC; as it falls, it buys SOL.

A narrower range puts more liquidity at each price for the same tokens, so it earns a larger share of the fees while the price stays inside.

Ticks and prices

Prices are laid out on ticks. Each tick is 0.01% above the one before, and a range starts and ends on a tick.

price(tick) = 1.0001^tick

A pool’s fee tier sets its tick spacing: the ticks a range may use.

Fee tierTick spacingSmallest range width
0.01%10.01%
0.05%100.10%
0.30%600.60%

SOL/USDC trades at 0.05% and JitoSOL/SOL at 0.01%.

Token amounts in a range

A range is measured in liquidity, L. For a pool price P inside a range from Pa to Pb, the tokens it holds are:

base = L × (1 ÷ √P − 1 ÷ √Pb)
quote = L × (√P − √Pa)
base
the pool’s first token, such as SOL in SOL/USDC
quote
the pool’s second token

Below Pa the position is all base token; above Pb it is all quote token.

Fees

A swap pays the pool’s fee on its input. The whole fee goes to the liquidity in range at the price where the swap executes, in proportion to L.

Collected fees land in your margin account as deposits, where they earn the supply rate and count as collateral.

Swapping

Any wallet can swap against a pool; a margin account is not needed. A swap names its input amount and the least output it accepts, and executes in one transaction or not at all.

Pools also carry Comet’s own flow. Every perp opens and closes with a swap, and leveraged ranges swap when they are opened, closed or liquidated. Liquidity providers earn the fee on all of it.

Providing liquidity

  1. 1

    Choose a pool and a range

    Set the lower and upper price. They snap to the pool’s tick spacing.

  2. 2

    Supply the tokens

    The amounts of each token follow from the range and the current price.

  3. 3

    Earn fees

    Fees accrue while the price is in range.

  4. 4

    Collect or close

    Collect fees at any time. Closing returns the range’s tokens to your account.