ORAKLE Documentation
Understand how to fetch, validate and submit real-world data to Bitcoin smart contracts using the ORAKLE network.
1. Overview
ORAKLE is a decentralized oracle network designed specifically for Bitcoin smart contracts. It allows data providers to fetch external data, achieve consensus, and submit aggregated results to on-chain contracts in a tamper-proof manner.
2. Architecture
The ORAKLE network is organized into topic-specific clusters (e.g. GOLD, FOOTBALL, CRYPTO). Each node retrieves data from trusted external APIs, communicates with peers, and submits their results to the aggregator smart contract.
- Nodes are interconnected in resilient topologies (full mesh or mesh+ring hybrid).
- Each node performs validation before submission.
- Slashing penalties apply for dishonest or inaccurate data submissions.
3. Data Submission Process
- Node fetches data from configured APIs.
- Compares with peer submissions.
- Broadcasts locally aggregated result to the smart contract.
- Smart contract applies its own validation rules.
- Validated result becomes accessible to client smart contracts and wallets.
4. Staking and Slashing
Nodes must lock ORAKLE tokens as collateral. Misbehavior (e.g., downtime, bad data, outliers) leads to progressive slashing:
- 1st violation: -5%
- 2nd violation: -15%
- 3rd violation: -45%
- 4th violation: total stake burned, node banned
5. Integration
Developers can query data feeds directly from ORAKLE's aggregator smart contract on Bitcoin Layer 2s (e.g. RSK or BitVM-compatible rollups). Libraries and SDKs are available in JS, Rust, and Python.
const price = await OrakleContract.methods.getLatestPrice("GOLD").call();
6. FAQ
Q: Can I run a node?
A: Yes, node operators must stake tokens and register through the governance portal.
Q: Is data submission anonymous?
A: No. Each node is identifiable and accountable.
Q: How do I access historical data?
A: The smart contract exposes past rounds via `getRoundData(roundId)`.