Concepts
The fixing
How queued transfers cross at one Pyth price every five minutes.
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.
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
- 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.