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?
| Feature | Xhavic (Native) | External Oracles |
|---|---|---|
| Execution | EVM precompile | Contract call |
| Gas cost | Minimal | ~50,000 gas |
| Latency | Native speed | Cross-contract |
| Dependencies | None | External network |
| Data sources | Multi-source aggregated | Single provider |
| Determinism | Signed outputs only | Depends on implementation |
Push-Based Oracle Architecture
Xhavic uses a push-based oracle mechanism — oracle data is not updated on every block by default:
- External oracle providers monitor off-chain data sources (price feeds, system parameters)
- When a meaningful change occurs, the provider pushes a signed update to the network
- Updates are batched and included in the next available L2 batch produced by the sequencer
- 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:
| Control | Description |
|---|---|
| Minimum update frequency | Updates at least every N blocks or T seconds |
| Maximum staleness threshold | Feeds must refresh before the threshold expires |
| Deviation triggers | Updates 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
| Address | Function |
|---|---|
0x00...00F0 | Price feeds (ETH/USD, BTC/USD, etc.) |
0x00...00F4 | Verifiable randomness |
0x00...00F8 | AI 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