LUXDocumentation
Docs/O-Chain (Oracle)

O-Chain (Oracle)

Decentralized oracle with observe-commit-aggregate pipeline. Median, TWAP, and weighted aggregation with ZK proofs and quorum certificate attestation.

Overview

The Oracle Chain provides decentralized price feeds and external data to all Lux chains through a three-phase pipeline: observe, commit, and aggregate.

Data providers submit observations that are committed on-chain and aggregated using configurable strategies — median, TWAP, or weighted averages. ZK proofs ensure data integrity, and quorum certificates attest to the validity of each aggregation round.

Unlike off-chain oracle networks, the O-Chain runs as a native Lux blockchain, inheriting the same security guarantees and finality properties as all other chains in the network.

Technical Specifications

PipelineObserve → Commit → Aggregate
AggregationMedian, TWAP, Weighted
ProofsZK (Groth16/PLONK)
Update FreqConfigurable (1s–1hr)
Data TypesPrice, Random, Custom
Chain TypeOptional

Features

Observe-commit-aggregate pipeline
Median, TWAP, weighted aggregation
ZK proof verification
Quorum certificate attestation
Cross-chain data delivery
Configurable update frequency

Quick Start

Install the Lux SDK and start interacting with Oracle Chain.

Installation

npm install luxnet

Example

import { OracleClient } from 'luxnet/oracle'

const oracle = new OracleClient('https://oracle.lux.network')

// Get latest price feed
const price = await oracle.getPrice('LUX/USD')
console.log(`LUX price: $${price.value} (round ${price.round})`)

SDKs & Libraries

API Reference

Full API reference documentation is available at docs.lux.network.

View Full API Docs