Peg Docs

Depth and repricing

Why a peg pool is deep with no SOL put in, and how it moves.

Deep from the start

In a DLMM pool each bin holds liquidity at one exact price, and the bins above the price can hold peg tokens alone. A peg's whole supply goes into the bins just above its price, so buys fill at the peg's price with very little movement, without anyone putting SOL in beforehand.

In testing, a 5 SOL buy into a fresh peg pool moved its price 0.1%, one bin.

Moving the price

Moving a pool's price normally takes a trade. A peg pool moves without one:

  1. The program takes all of its liquidity out.
  2. With the bins in between empty, it moves the active bin straight to the target.
  3. It puts everything back around the new price.

All three happen in one transaction, so no trade can land while the pool is empty.

What a holder sees

If a peg's asset halves, the peg's pool moves to half, and every coin priced in that peg is worth half in SOL. In testing, a holder who bought with 5 SOL and sold after a halving received 2.477 SOL: half, less about 0.5% in fees.

Limits

  • One update moves at most 400 bins (about 49%). A larger move takes several updates a few seconds apart.
  • Sellers take the SOL that buyers paid in, and no more. See Risks.