Learn·Explainer

What is a pegbook? The order that moves with the price

A pegged order rests a fixed distance from the oracle price and moves with it — no cancelling, no re-posting, no losing your place in line. How SHOT's pegbook works.

Updated

Every order book charges a hidden tax on anyone who wants to stay close to the price. To follow the market, you cancel your order and post a new one — and every new order goes to the back of the line. The tighter you quote, the more often you re-post, and the less your place in line is worth.

SHOT's perps book has a second layer that removes that tax: the pegbook, where an order is pegged to the oracle price instead of being placed at a fixed one.

How a pegged order works

A pegged order rests at a fixed distance from Bitcoin's price index — say 5 basis points (0.05%) below it — rather than at a fixed dollar price. When the index moves, the order's price moves with it. The engine does that on every tick; you send nothing.

Move the price, watch two bidsBoth start 5 bps under Bitcoin at $100,000. One is a plain limit order; one is pegged to the index.

Limit bid

$99,950

Now 25.0 bps under the price. To follow it: cancel, re-post — and join the back of the line.

Place in line after re-posting: #7

Pegged bid · −5 bps

$100,150

Still 5 bps under the price. The engine moved it with the index — no message sent, nothing re-posted.

Place in line: #1

Bitcoin indexLimit bid placed at $99,950Bid pegged 5 bps under the index
$100,000$99,950$99,950
$100,200$99,950 — now 25 bps behind$100,150
$100,400$99,950 — now 45 bps behind$100,350
$99,800Likely filled at $99,950 on the way down$99,750

Why it keeps its place in line

On an ordinary book, an order's place in line is the moment it arrived at its price. Following the price means a new price, so a new order, so a new place — at the back.

A pegged order never moves. Only the price it rests at follows the index, so it keeps the place it had. Where several pegged and limit orders end up at the same price, they are served exactly as one level of an ordinary book: fee tier first, then who arrived first. Quoting a hair tighter buys no free priority.

Why it follows the oracle, not the book

Stock exchanges have had pegged orders for years, but they peg to the best bid and offer — the book the order is resting in. That is circular: adding a peg moves the best price, which moves the peg. It is why those venues need special limits and sometimes cancel pegs outright when the book is locked or empty.

SHOT pegs to an index aggregated from major exchanges' prices, which nothing on our own book can move. So the circle never forms, and a peg needs no extra rules to stay sane.

One book, two layers

Takers don't have to choose. Every market order matches against limit orders and pegged orders merged into one book, always at the better price, so a peg resting 2 bps from the index and a limit order resting 3 bps away are filled in the right order.

Who it's for

  • Market makers, who can quote around the price all day without spending a message — or their place in line — on every tick.
  • Anyone who wants a standing order near the price, like "buy Bitcoin 0.2% under wherever it is", without watching the screen.
  • The house itself. SHOT's bank quotes both sides on the pegbook, which is how a new market opens with depth on its first day instead of an empty book waiting for someone to make it.

What to keep in mind

  • A peg follows the index; positions are marked at the mark price. The two can drift apart, but the gap is capped — 1% at launch — and funding pulls them back together. Set your offset with that in mind.
  • It is still a limit order. It fills when a taker comes to its price; following the index does not make it fill.
  • When the index lags a very fast move, so does the peg. It moves when the index does, not before.
  • A peg can carry a limit. It sets the highest price a pegged bid may reach (or the lowest for an offer). Past it, the peg stops quoting rather than chase the index — it is not cancelled, keeps its place, and quotes again when the price comes back.

Trade perps with pegged orders — free on testnet.

Questions

Can I place pegged orders on SHOT today? Yes. On testnet, choose a peg instead of a price when you place a perp order, and set how many basis points above or below the index it should rest.

Does a pegged order cost more? It pays your fee tier like any other order. One case is special: if an index move leaves your peg crossing a limit order already resting on the book, the engine matches the two on that tick, and your peg pays your tier's taker rate — at a price at least as good as its own.

What happens to my peg if the index stops updating? It stops quoting. A peg whose index has gone stale is set aside until fresh prices arrive — not cancelled, and still holding its place — so it never trades on an old price.