Context
The oracle currently aggregates prices from Binance, Coinbase, and Pyth. Adding OKX as a fourth source improves median robustness — a single exchange outage or manipulation attempt now has to beat three other sources instead of two before it can skew the aggregated price.
OKX public ticker API requires no API key for spot prices.
Implementation
Add `oracle/src/sources/okx.rs` following the same interface pattern as the existing fetchers:
GET https://www.okx.com/api/v5/market/ticker?instId=<SYMBOL>-USDT
Response field: `data[0].last` (string, USD price).
- Map SO4 token symbols to OKX instrument IDs via the `PRICE_FEED_CONFIG` `sources` field (add `"okx"` as a valid source name)
- Parse the price string to `i128` at `FLOAT_PRECISION`
- Plug into the existing `aggregate_prices` pipeline alongside Binance, Coinbase, and Pyth
Acceptance criteria
Context
The oracle currently aggregates prices from Binance, Coinbase, and Pyth. Adding OKX as a fourth source improves median robustness — a single exchange outage or manipulation attempt now has to beat three other sources instead of two before it can skew the aggregated price.
OKX public ticker API requires no API key for spot prices.
Implementation
Add `oracle/src/sources/okx.rs` following the same interface pattern as the existing fetchers:
Response field: `data[0].last` (string, USD price).
Acceptance criteria