Research · 1 of 3

How Orbital works

Spheres, ticks and the life of a swap, in pictures. No proofs here: they are in The math.

Contents

1Reserves on a sphere

A pool holds a few stablecoins. Write their reserves as one point, one coordinate per coin. Orbital keeps that point on a sphere of radius rr centred at (r,…,r)(r, \dots, r): every trade slides it along the surface, and the slope under it is the price.

Where all reserves are equal, every price is exactly 1. That point is the peg. A depeg is the reserves drifting away from it.

Figure 1. Two coins, so the sphere is a circle. The reserves stay on the arc nearest the origin. At the peg, the tangent has slope −1 and the price is 1; anywhere else on the arc, the slope sets another price.

2A tick is a cap

An LP who only wants to trade near the peg cuts the sphere with a plane. Their liquidity lives on the cap between the peg and that plane. While the price stays there, the tick is interior and trades like a full sphere. When a depeg pushes the reserves onto the plane, the tick is on its boundary: its reserves stay on the plane, and it stops absorbing the depeg.

Figure 2. One tick. Heavy black: the cap where its liquidity trades. Green: its plane, where it waits until the price comes back.

Our pool offers 199 planes, one per depeg price, from 0.99999 down to 0.10. They are packed tight near the peg, where stablecoins actually trade, and spread out far from it.

Figure 3. The 199 planes. In price (top), they crowd next to the peg: 120 lie within 1% of it. In depeg distance on a log scale (bottom), they are evenly spaced, forty per decade.

3One surface for all ticks

A pool holds many ticks at once. The interior ones share one point on their caps, so they add up like a single bigger sphere. The ones on their boundary add up into a fixed offset. Together they form one surface: a circle turned around the peg's axis, a torus.

When the price crosses a tick's plane, that tick moves from one group to the other. The surface changes shape, but smoothly: the price never jumps.

Figure 4. However many ticks a pool holds, the pool only ever sees two things: one sphere and one offset.

4A working model

The figure below puts these pictures together for a three-stablecoin pool, cut through its peg axis. Drag it down, or move the slider, to push token B's price down and the reserves off the peg.

1.000
1.000.12
Reserves, % of the peg
Token A100%
Token B100%
Token C100%
Figure 5. A working model of a three-stablecoin pool.
How to read it

The pool is cut through the peg axis, peg on top, seen from slightly above. The green square is the reserves xx. As token B's price falls, the state slides off the peg along the pool's surface, and its path so far is drawn heavy. Each ring is the plane x⋅v=kx \cdot v = k of a tick, labelled with its price: when the state reaches it, the ring turns green and that tick goes to its boundary.

The circle is the interior ticks, one sphere of radius rintr_{int}; the green arm carries sbound=∑sis_{bound} = \sum s_i. At each crossing the circle shrinks and the arm grows, and the surface they sweep round the axis stays tangent to the previous one. The strip is the tick bitmap, one mark per catalog price, crowded near the peg; the five ticks of the model stand taller.

The ticks span 0.80 to 0.10, wider than real pools use, so their caps show.

5How a swap is cut

A swap does not walk the curve tick by tick. The pool adds the whole input first, then asks a single question: where does the output land?

  1. Take the feeon the input
  2. Find the pieceone threshold per tick
  3. Solve oncein that piece only
  4. Prove itinside the curve
  5. Commitflip the ticks it crossed
  6. Pay the LPsfrom the two ends

Each tick's plane becomes a threshold on the sum of the reserves. Those thresholds cut the line of possible outcomes into pieces, and inside each piece the shape of the pool is fixed. The pool finds the piece that holds the endpoint, solves there once, proves the result is on its side of the curve, and only then commits.

Every possible output of one swap on one line, cut into pieces by thresholds; the endpoint is the first point certified on the pool side. piece 0 piece 1 piece 2 piece 3 pool side amount out endpoint floor no output
Figure 6. Every possible output of one swap, on one line. 1: green thresholds cut it into pieces. 2: the pool locates the piece that holds the endpoint. 3: it solves there, once. Schematic.

Asking for an exact output works the same way, read backwards: the pool fixes what you receive and finds the smallest input that pays for it.

6Adding liquidity

An LP picks a boundary and deposits the three coins in the mix the pool needs at that moment. Several LPs can share the same tick, each with their own share.

A deposit on an interior tick makes the shared sphere bigger. A deposit on a boundary tick moves the offset. Either way, no tick changes side and the price does not move. Any rounding is paid by the LP: a few wei more in, a few wei less out.

Figure 7. Dashed: before the deposit. Solid: after. The pool's state moves with its surface, so the next trade sees the same prices. Schematic.

7Where the fees go

The fee is taken from each swap's input and kept aside for LPs. There is no protocol fee. To split it, the pool compares what each tick holds before and after the swap: a tick is paid for what it took in.

Figure 8. A swap moves a run of ticks from interior to boundary. The ticks that stayed on their boundary, the ticks that crossed, and the ticks that stayed interior are each paid for what they absorbed between the swap's two ends. Schematic.

At a 1 bp fee, Orbital LPs earn exactly 1.00 bp per dollar of volume. LPs spread across three Uniswap V3 pools earn 1.11 to 1.15 bp, because two-hop routes pay the fee twice: Orbital traders keep that difference.

Figure 9. LP income per dollar of volume at a 1 bp fee, from the benchmarks.

At 1.3 bp, Orbital matches V3 LP income in 10 of 12 benchmark paths, while traders still lose less than on V3 for 100,000-token orders in three of the four configurations.

8What we built

Coins
Three ERC-20 stablecoins with 6 to 18 decimals: USDC, USDT0 and DAI in the live pool, with a 0.05 bp fee.
Onchain
Every step of the math runs in the contract. No router, no oracle, no off-chain quoter.
Swaps
Exact input and exact output, at about the gas of a Uniswap swap at the peg.
Liquidity
Per-tick LP positions, several LPs per tick, and fees.
Ticks
199 planes, each defined by an exact decimal depeg price. Every pool uses the whole catalog: there is no tick spacing, and fee tiers are independent of concentration.
SDK
@orbitaldefi/sdk reproduces every quote of the contract to the wei.

We chose Polygon for two reasons. Gas is cheap: an Orbital swap uses more gas than a Uniswap V3 swap, and on Polygon that difference costs a fraction of a cent. And USDC, USDT0 and DAI trade actively there with no peg stability module swapping them 1:1 at zero fee, so their prices move against each other and an AMM between them has flow to capture.