The Oracle VM runs the O-chain (Oracle chain), a dedicated chain for decentralized oracle data aggregation. Registered data providers submit price feeds and external data as O-chain transactions. The VM aggregates reports using a median-of-medians algorithm, producing canonical price points that are disseminated to all Lux chains via Warp messages. The O-chain replaces external oracle dependencies (Chainlink, Pyth) with a native, validator-secured data layer.
Each feed is identified by a (baseAsset, quoteAsset) pair:
Feed {
feedID [32]byte // hash(baseAsset || quoteAsset)
baseAsset string // e.g., "LUX"
quoteAsset string // e.g., "USD"
heartbeat uint64 // max seconds between updates
deviation uint256 // min price change to trigger update (bps)
decimals uint8 // price precision (e.g., 8 = 1e8)
}
Data providers stake LUX and register the feeds they serve:
Providers submit reports as O-chain transactions:
Report {
feedID [32]byte
price uint256 // price * 10^decimals
timestamp uint64 // observation timestamp
sources []string // e.g., ["binance", "coinbase", "kraken"]
signature []byte // provider's signature
}
The VM aggregates reports per feed per round:
1. Collect all reports for feedID within the current block
2. Filter outliers: discard reports >3 standard deviations from the median
3. Compute weighted median, weighted by provider stake
4. Emit canonical PriceUpdate event with the aggregated price
Aggregated prices are pushed to all subscribing chains via Warp:
PriceUpdate {
feedID [32]byte
price uint256
timestamp uint64
roundID uint64
signatures []byte // O-chain validator aggregate BLS signature
}
Consuming chains verify the Warp signature and update their local price cache.
Providers are slashed for:
1. Collusion resistance: median aggregation requires >50% of staked providers to collude for price manipulation.
2. Flash loan immunity: O-chain prices are off-chain observations, not on-chain spot prices. Flash loans cannot manipulate them.
3. Latency: O-chain block time is 1 second. Warp propagation adds <500ms. Total oracle latency: <1.5 seconds.
github.com/luxfi/chains/oraclevm/ |github.com/luxfi/chains/oraclevm/aggregator/ |Copyright (C) 2024-2026, Lux Partners Limited. All rights reserved.
Licensed under the MIT License.