How Pricing Works
On this page
Swap quotes from a reference print and an inventory state, not the ratio between two reserves. This page describes the testnet mechanism; it does not turn an indicative app quote into a firm trade.
The State Book
Let P be the verified reference price, I the stock held and Λ the senior stock obligation. The quote-valued shortfall is D = P × (Λ − I). A positive shortfall raises the quote; a surplus lowers it. At flat inventory, D = 0 and displacement is zero.
mechanism Bounded Algebraic Displacement
L is the liquidity scale supported by allocated capital and confidence. d bounds displacement. This is one algebraic curve, not a reserve-product invariant. A trade changes inventory along the curve, so its average execution price includes the displacement across its whole size. It is not simply the starting marginal price multiplied by quantity.
The displayed State Book is state-implied depth, not resting orders. Physical inventory, session permissions, coverage and risk budgets can bind before the curve’s quoted depth does. See Coverage Rules.
The Reference Print and Confidence
The reference engine verifies the report’s market, phase, timestamp and price basis. Token terms and sequencer conditions must also be acceptable. A verified report is an accepted reference, not proof that no newer report exists.
Confidence decays as that print ages. Lower confidence widens the quote and reduces supported depth. Supplying report bytes does not by itself remove a staleness charge: the accepted print must actually be fresher. An invalid report, an unknown multiplier basis or a sequencer fault is a safety condition, not merely a lower confidence score.
The Half-Spread
The half-spread is the side-specific cost around the displaced reference. It reflects reference bid or ask width, base venue cost, confidence and volatility. In supported sessions, the staleness term grows with the age of the print. In Discovery, a closure premium accounts for the lack of an executable external reference.
Inventory displacement is distinct from spread. A trade that restores balance moves against the displacement created by earlier flow. Any favourable restoration adjustment remains limited by funded credit; it is not an unrestricted payment for trading.
Regimes and Sessions
| Regime | Meaning |
|---|---|
| Cold | Inventory depth is not enabled. Funded crossing or exposure-reducing paths may be available; the inventory book is not evaluated without capital. |
| Anchored | A qualifying fresh reference and intact coverage permit inventory quoting within the market's limits. |
| Discovery | No executable fresh external reference. Confidence is lower; only eligible Continuous inventory can carry closed-hours exposure. |
| Safety | A reference, chain, token-basis or coverage condition prevents risk increases. Only permitted reduction and refund actions remain. |
A session is the reference market’s phase, such as regular, extended, overnight or closed. A regime describes what the engine may do. An extended or overnight session is not automatically Discovery if a supported fresh reference is available. The adapter chooses the correct report phase; a trader cannot select a cheaper phase. The MarketCalendar constrains scheduled sessions.
Closed Hours
As confidence falls through a closure, spreads widen, depth shrinks and permitted price bands tighten. Regular inventory is recalled before the scheduled close; Continuous inventory may remain in use. A weekend deposit does not acquire the exposure history of inventory already carried through the closure.
The design uses a re-anchoring auction when the discovery band binds, and an opening reconciliation when a qualifying reference resumes. These are execution transitions, not extra values of the four-regime event field. An auction or a reduction-only state is not a promise that an ordinary swap will fill.
At reopening, the engine marks carried exposure before admitting fresh risk. An adverse reference is accepted and its loss is recognised, even if coverage falls below the required floor. See An Adverse Print.
Before Confirming
Check the stock identity, reference age, session, regime, input and output amounts, quote costs, execution route and minimum received. An immediate inventory swap settles within its transaction or reverts. Crossing and auction intents are conditional paths, not retrospectively repriced immediate swaps. No inclusion time or finality deadline is assured.
Continue to Providing Liquidity or the Swap Glossary.
Keep exploring, or revisit this topic from the navigation.