xhavic.io
GitHub (Coming Soon) Whitepaper
Docs / Oracle & AI Layer

Oracle Overview

Xhavic's native oracle layer — push-based precompiles for price feeds, randomness, and AI compute with deterministic consensus.

Xhavic’s oracle layer is built directly into the protocol as EVM precompiles. Unlike external oracle networks that require contract calls and bridge latency, Xhavic oracles execute at native speed with minimal gas overhead.

Why Native Oracles?

FeatureXhavic (Native)External Oracles
ExecutionEVM precompileContract call
Gas costMinimal~50,000 gas
LatencyNative speedCross-contract
DependenciesNoneExternal network
Data sourcesMulti-source aggregatedSingle provider
DeterminismSigned outputs onlyDepends on implementation

Push-Based Oracle Architecture

Xhavic uses a push-based oracle mechanism — oracle data is not updated on every block by default:

  1. External oracle providers monitor off-chain data sources (price feeds, system parameters)
  2. When a meaningful change occurs, the provider pushes a signed update to the network
  3. Updates are batched and included in the next available L2 batch produced by the sequencer
  4. Only signed oracle outputs are consumed by the protocol, ensuring determinism

This design avoids unnecessary state transitions and significantly reduces computational and gas overhead.

Update Frequency Controls

For critical system feeds (price data, risk parameters), Xhavic enforces:

ControlDescription
Minimum update frequencyUpdates at least every N blocks or T seconds
Maximum staleness thresholdFeeds must refresh before the threshold expires
Deviation triggersUpdates pushed when price deviates beyond a threshold

Why This Matters

  • Prevents excessive state churn — No wasted computation on unchanged data
  • Keeps gas costs predictable — Updates only when meaningful changes occur
  • Ensures deterministic oracle values — All nodes consume identical signed outputs, maintaining full consensus safety

Oracle Determinism & Consensus

Only final signed oracle outputs are included in the State Root. Nodes:

  • Do not fetch off-chain data independently
  • Only consume deterministic oracle outputs from signed provider updates
  • Maintain full state determinism across all validators

This separation ensures oracle integration does not break consensus safety. Every node produces identical state given identical inputs.

Precompile Addresses

AddressFunction
0x00...00F0Price feeds (ETH/USD, BTC/USD, etc.)
0x00...00F4Verifiable randomness
0x00...00F8AI compute cycles

Oracle Precompiles Reference →

AI Agent Support

Xhavic provides first-class protocol support for autonomous AI agents:

  • Deterministic execution ordering — Predictable multi-step strategies
  • Programmatic wallet control — Both Instant and Secured wallet types
  • Native oracle access — Direct precompile reads, no external dependencies
  • Gas-metered compute — Predictable operation budgets
  • Sub-200ms latency — Real-time decision loops

AI Agent Execution →