Oracle architecture
1
External price sources
Real-time FX rates from Pyth Network (primary) and RedStone (fallback). OANDA provides an independent reference used only to cross-check the other sources.
2
Ratio pricing service
Collects a USD price for every supported asset, rejects stale data, and checks the quoted price against the independent sources. If the sources disagree beyond the allowed deviation, or no reliable price is available, no quote is issued.
3
Signed firm quote
The prices used for a quote are embedded in the EIP-712 signed firm quote (
from_asset_price, to_asset_price), so the exact inputs are fixed at quote time.4
On-chain price check
When the quote is executed, the FxEngine contract compares the quoted prices with Orakl Network price feeds on Kaia and rejects the transaction if they are stale or deviate beyond the corridor’s configured limit.
Every executed swap is priced twice over: validated against multiple independent sources before the quote is signed, and verified against on-chain oracle feeds at settlement.
Pyth Network (primary source)
Pyth Network is Ratio’s primary price source. Key characteristics:
Ratio uses Pyth feeds for all Phase 1 corridors: USD/IDR and USD/JPY. For JPY/IDR, the rate is derived from USD/IDR and USD/JPY — using USD purely as a pricing reference.
RedStone and OANDA (redundancy and cross-check)
- RedStone is the fallback price source, used automatically when a fresh Pyth price is not available.
- OANDA is an independent FX reference. It is never used to price a quote; it is used to detect when the quoting source has drifted from the wider market.
Price validation
Every price is validated before use:Cross-currency rate construction
For pairs without a direct oracle feed (e.g., JPY/IDR), the system constructs a reference rate:Reliability design
Multiple sources
Independent price providers prevent single-point-of-failure dependency.
On-chain verification
Every executed quote is checked against Orakl Network feeds on Kaia.
Automatic failover
Falls back from Pyth to RedStone based on price freshness.
Circuit breakers
Stops quoting rather than executing at unreliable prices.