Skip to main content

Layer 5 — Oracle Aggregation & Validation

The Oracle layer is the single source of truth for all FX reference rates. It mirrors institutional FX desks that consume multiple independent price feeds and validate them against each other before trusting any single source.

Oracle Sources

SourceTypeUpdate FrequencyRole
Pyth NetworkWeb3 — Push-based~400msPrimary source; institutional-grade FX data on-chain
Orakl NetworkWeb3 — Pull-basedOn-demandPrimary source; Kaia-native oracle with corridor-specific feeds
Bloomberg / XEWeb2 — REST APIPeriodicBackup source only; used when both Web3 sources deviate beyond threshold

Aggregation Logic

Under normal conditions, the Oracle Aggregator computes a weighted mid-rate using Pyth and Orakl at equal 50% weighting. Web2 is activated only when Pyth and Orakl deviate from each other beyond a configured threshold, at which point it acts as a tiebreaker reference.

Aggregated Mid = (Pyth Price × 0.50) + (Orakl Price × 0.50)

Freshness & Deviation Validation

CorridorMax Oracle AgeMax DeviationRationale
USD/SGD, USD/JPY30 seconds0.10%Deep G10 pairs; moves are gradual and well-covered by both sources
USD/IDR, USD/MYR20 seconds0.15%EM managed-float; central bank interventions can cause sudden moves
MYR/IDR (cross)15 seconds0.20%Synthetic cross; cumulative deviation risk from both legs requires tighter freshness

Validation Outcomes

Validation ResultAction Taken
Valid — fresh and within deviationAggregated mid-rate passed to State Engine
Warning — near threshold but not breachedMid-rate passed downstream; State Engine receives PROTECT signal
Stale — oracle age exceeds max thresholdCircuit Breaker triggered; State set to HALT; no quote issued
Deviation Breach — sources diverge beyond maxCircuit Breaker triggered; State set to HALT; no quote issued