Docs

Concepts

The fixing

How queued transfers cross at one Pyth price every five minutes.

On this page

The schedule

A fixing runs every 5 minutes, on the clock: 14:00, 14:05, 14:10, and so on. An order placed at 14:02 joins the 14:05 fixing. The quote names its fixing time, and Activity counts down to it.

Each currency pair's fixing takes up to 4 orders. Once a fixing has started, new quotes join the next one.

The fixing price

A fixing settles at the first signed Pyth price published at or after the fixing time, within 30 seconds of it. Nobody picks a moment: the price is whichever update Pyth published first, and Ferry checks its timestamps on chain.

Crossing

At that price, orders going one way are matched against orders going the other way. The matched value changes hands between the orders directly and pays no spread. Only the residual, the part with nothing to cross against, is exchanged through a market route, at the fixing spread from 4 bps.

USDC → EURCEURC → USDC14:05 fixing, one Pyth pricematched: crosses directly, no spreadresidualmarket route, fixing spreadExample cohort: 30,000 USDC one way against about 20,800 EURC the other, at EUR/USD 1.12040.
At the fixing, opposite orders cross each other at the one Pyth price with no spread. Only the part left over goes through a market route, at the fixing spread.

The pools aren't touched by the matched part at all. They earn from the residual, once the route has delivered what every recipient is owed.

Your minimum

Every order carries the minimum its recipient must receive. If you don't set one, the order uses the quote's estimate at the maximum spread, 200 bps. At the fixing, an order whose amount would fall below its minimum is refunded in full, and the rest of the cohort settles without it.

Settlement, cancellation and refunds

order queuedfixing, 14:05window ends, 14:10you can cancelsettled by the keeperreclaimable
A queued order. Before its fixing you can cancel it. The keeper settles it after the fixing; if it isn't settled within 5 minutes, the keeper returns the escrow to you, or you reclaim it.
  • Before the fixing, you can cancel your order from Activity. The escrow comes back to your wallet in the same transaction.
  • After the fixing, Ferry's keeper settles the whole cohort in one transaction: every order is paid, or refunded, together.
  • If a cohort isn't settled within 5 minutes of its fixing, the keeper returns each order's escrow to its sender. Reclaim in Activity does the same if you get there first. Refunds always go to the wallet that placed the order.
Esc