Skip to main content

FX Engine Quote & Execution Flow

Complete technical specification of the Ratio FX Engine — the core processing pipeline that handles every FX swap and RFQ request on the Ratio platform. Covers the full lifecycle from initial request intake through oracle aggregation, risk state evaluation, pricing construction, quote issuance, and final atomic settlement on the Kaia blockchain.

Document Versionv1.1 — Updated per design review
StatusInternal Review
ChainKaia Blockchain
Initial CorridorsUSD-IDR · USD-SGD · MYR-IDR
ClassificationConfidential
Design Philosophy

Ratio's FX Engine is designed to mirror the behaviour of an institutional FX dealer desk — using oracle-based pricing, rules-based spread construction, and inventory-aware mid-rate adjustment — rather than an AMM curve. The goal is predictable, institutionally acceptable execution for PSPs and remittance operators, with zero AMM slippage and full auditability on-chain.

Nine-Layer Processing Pipeline

#LayerPurpose
1Request Entry & Quote TypeClassifies request as Indicative or Firm and routes accordingly
2Direction Pre-FilterValidates trade direction is permitted under current state
3Size Check & External RFQValidates size; splits tranches; routes oversized to External RFQ
4Corridor RoutingRoutes to corridor book; MYR-IDR two-step evaluation
5Oracle AggregationAggregates Pyth + Orakl + Web2; validates freshness and deviation
6State EngineEvaluates volatility; assigns NORMAL/PROTECT/RESTRICT/HALT
7Pricing EngineInventory-skewed mid-rate + four-component spread
8Arbitrage ValidationThree-layer arb checks before quote issuance
9Execution & SettlementAtomic on-chain settlement, WAOP recording, audit trail

Flow Diagram

100% · Ctrl+Scroll to zoom · Drag to pan

Corridor Reference — Phase 1

CorridorTypeBase SpreadOracle Max AgeRouteStablecoins
USD-IDRG10 → Asia EM3–4 bps20 secondsDirect BookUSDT / IDRX
USD-SGDG10 → G10 Deep1–2 bps30 secondsDirect BookUSDT / tnSGD
MYR-IDRAsia EM → Asia EM5–6 bps15 secondsDirect or Synthetic via USDMYRC / IDRX