Skip to main content

Oracle Pricing

Ratio prices every FX swap using real-time data from institutional oracle feeds — not an AMM bonding curve. This means the rate you receive is anchored to the live market, your execution quality does not degrade with transaction size, and there is no arbitrage dependency baked into your pricing.

How it works

Every quote begins with a real-time mid-market rate from professional-grade oracle feeds. Ratio then builds the spread on top of that rate based on current market conditions. The result closely tracks the real-world FX market rather than a synthetically derived curve. Pricing Pipeline The pricing pipeline follows four stages:
1

Oracle aggregation

Ratio fetches real-time FX rates from multiple independent price sources. Every incoming price is checked for freshness and cross-source consistency before being used.
2

Risk checks

The quote is checked against the corridor’s current risk state, allowed trade directions, amount limits and available pool liquidity. If any check fails, no quote is issued.
3

Spread construction

The spread is built dynamically from six components — base, volatility, liquidity, off-market hours, risk state and inventory skew. It reflects actual market conditions at the moment of quoting.
4

Quote issuance

A firm, executable quote is returned with a short expiry window (currently 60 seconds). The rate is locked for the duration of the quote window — what you see is what you get at execution.

Oracle sources

Ratio uses Pyth Network as its primary price source. Pyth provides institutional-grade, real-time FX price data sourced from professional market makers and trading firms. For redundancy, RedStone is used automatically when a fresh Pyth price is not available, and OANDA serves as an independent reference to detect when the quoting source drifts from the wider market. If no reliable price is available, Ratio stops quoting rather than quoting at an unreliable price. At execution, the FxEngine contract also checks the quoted prices against Orakl Network feeds on Kaia — see Oracle Infrastructure.
Every oracle price is validated for freshness and cross-source consistency before being used in a quote. Stale data or significant divergence between sources triggers protective measures automatically — see Risk Management for details.

Why not an AMM?

AMM-based DEXs (like Uniswap or Curve) derive price from a mathematical bonding curve based on pool ratios. This creates three problems that make AMMs unsuitable for institutional FX:

Spread construction

Ratio’s spread is not a single fixed number. It is constructed from six components that each address a distinct real-world risk: Each component is returned in fee_breakdown.spread of every quote response.
In calm markets with balanced pools, spreads sit close to the corridor’s base spread. The spread widens automatically when conditions deteriorate — this is by design, not a failure state. Tight spreads in calm conditions and wider spreads in stress conditions are both the correct outcome.

Key advantages

  • No slippage — The rate is anchored to the oracle mid-rate, not a bonding curve, so trade size within the corridor limits does not move the price against you.
  • Real market rates — Every quote is anchored to live institutional FX data, not a synthetic curve that can drift from the real world.
  • Transparent pricing — All spread components are visible in every quote response. You always know exactly what you are paying.
  • Institutional quality — Tight, oracle-anchored spreads in normal conditions, verified on-chain at execution.