What is a blockchain oracle?
Oracles are a critical component enabling smart contracts to interact with the real world.
Blockchain oracles explained
Acting as a bridge between blockchains and external systems, oracles allow decentralized applications (DApps) to access off-chain data and execute based on real-world events.
In short, blockchain oracles provide external data to on-chain smart contracts. This data could include weather data, random numbers, price feeds, event outcomes, web APIs, enterprise backends, and much more.
Without oracles, blockchains and smart contracts would have no way to interact with anything happening outside their networks. One blockchain oracle example would be decentralized exchanges being unable to determine the fair price for an asset based on centralized finance price feeds.
Oracles essentially solve one of the biggest limitations of smart contracts — their inability to communicate directly with off-chain systems. By delivering data to on-chain applications or moving it cross-chain, oracles greatly expand the functionality and use cases possible with blockchain technology.
What is an oracle network?
While an individual oracle can offer data to smart contracts, oracle networks take things a step further. An oracle network brings together multiple independent oracle nodes, aggregating their data to provide smart contracts access to off-chain computation and data.
Oracle networks enable end-to-end decentralization in data delivery by combining multiple data sources, multiple oracle operators, and advanced aggregation technology. This aims to remove any single point of failure and allows smart contracts to leverage real-world data in their execution.
How do blockchain oracles work?
Oracles work through a sequence of fetching, validating, and broadcasting data from external sources to on-chain smart contracts. The key steps usually include:
- Smart contract creates an oracle request
- Oracle nodes monitor the blockchain for requests
- Oracle nodes fetch data from off-chain sources
- Nodes aggregate data to arrive at a single result
- The final result is signed and delivered on-chain
- Smart contract consumes the result and executes logic
For example, a defi lending platform’s smart contract could create a request for a specific asset’s price feed. Oracle nodes would see this request, fetch price data from exchanges, aggregate to a single price, sign the price blob, and return the result to the smart contract. The defi platform would then use this price data to calculate interest rates or liquidation penalties.
This sequence allows smart contracts to incorporate real-time data in their execution while preserving the benefits of blockchain networks.
Types of blockchain oracles
Various types of oracles provide different data and services to blockchain networks:
- Input oracles — Fetch and deliver data into smart contracts from external sources like web APIs, enterprise systems, IoT devices, etc.
- Output oracles — Allow smart contracts to execute actions on external systems, like making payments or storing data.
- Compute oracles — Perform intensive off-chain computation like generating randomness or running ML models.
- Cross-chain oracles — Fetch data across different blockchain networks, allowing interoperability between chains.
These all expand the use cases possible for smart contract developers. Input oracles like price feeds are essential for defi, while compute oracles enable verifiable randomness in blockchain gaming. Cross-chain oracles allow assets to move across networks, and output oracles could trigger real-world payment transactions.
Together, they provide the external connectivity needed for hybrid smart contracts to react to real-world events and interoperate with traditional infrastructure.
Blockchain oracle use cases
With data delivered by oracles, smart contracts can enable several decentralized applications, including:
- Decentralized finance — Access asset price data, market events, sentiment analysis, etc., to enable automated defi protocols for trading, lending, derivatives, and more.
- Insurance — Payout claims automatically when IoT devices and data feeds verify natural disasters, flight delays, supply chain issues, etc.
- Gaming — Incorporate verified external events into games and generate provably fair randomness to distribute rewards, assets, etc.
- Supply chain — Track shipment locations, conditions, state of trade processes, and more using IoT and external data.
- Enterprise — Enable legacy enterprise systems to interoperate with smart contract platforms to access new markets and use cases.
- Metaverse — Bridge metaverse environments with external data streams, off-chain computation, and blockchain networks.
- Sustainability — Access and verify data like carbon emissions, renewable energy usage, waste levels, etc., to manage environmental initiatives.
Blockchain oracle service list
The blockchain oracle landscape is ever-evolving, with myriad offerings among the best blockchain oracle services. Here is a list of some of the top blockchain oracles:
Popular oracle networks like Chainlink (LINK) integrate multiple measures meant to increase reliability and security, such as fetching data from multiple sources, using multiple oracle operators, and aggregating using technology like threshold signatures aiming to ensure high accuracy and reliability. The end result is hybrid smart contracts — combining on-chain and off-chain infrastructure for advanced functionality.
Band Protocol (BAND) is a notable decentralized oracle within the Cosmos ecosystem. It stands out for its tamper-proof data feeds and custom oracle scripts, supported by a Delegated Proof of Stake mechanism. Validators stake the native BAND token to participate in data retrieval and verification processes.
Another significant player is Decentralized Information Asset (DIA), an open-source oracle platform designed for the defi space. DIA’s strength lies in its community-driven data verification and scalability approach, making it adaptable to the rapidly changing defi environment. It supports multiple blockchains, including Ethereum (ETH), Fantom (FTM), Solana (SOL), Avalanche (AXAX), Polygon (MATIC), and Arbitrum (ARB).
Universal Market Access (UMA) is an Ethereum-based oracle that facilitates the creation of synthetic financial contracts. These contracts represent real-world assets and track their performance, democratizing access to markets that traditionally have high barriers to entry. UMA’s decentralized, open-source nature aims to ensure data integrity and bridge the gap between defi markets and real-world financial products.
Tellor (TRB) comes into the picture as a permissionless oracle catering to diverse industries. Originating from Daxia, a derivatives platform, Tellor emphasizes a system of reporters who ensure data integrity. Its two main data feeds, spot and custom prices, cater to varying client needs.
The DOS Network (DOS), a layer 2 decentralized oracle, is known for its rapid data feed delivery, which is crucial for urgent smart contract applications. However, its performance is somewhat dependent on the capabilities of layer 1 protocols.
Nest Protocol (NEST) stands out as a truly decentralized Ethereum-based oracle. It uses quotation mining for accurate data and includes price callers, miners, and verifiers. The Nest protocol also incorporates a Probabilistic Virtual Machine for additional functionalities.
iExec RLC (RLC) deviates from traditional oracles by offering a marketplace for cloud computing services, bridging the gap between web2 applications and web3. Its user-friendly APIs allow for the creation of custom oracles.
Lastly, API3 is a decentralized oracle linking web3 applications with off-chain data. Its approach involves decentralized APIs for direct data feeds and the Airnode middleware for seamless API-blockchain integration. API3 supports various blockchain networks, including Polygon and Fantom, showcasing its versatility.
The oracle problem
It’s important to understand why oracles are critical to unlocking smart contracts’ potential. Isolating data within a blockchain network gives it security — but limiting external connectivity leads to the oracle problem. This means that while oracles are a solution, they are also a compromise between convenience and security.
Oracles partially solve this problem by securely expanding connectivity while retaining many blockchain benefits. Despite this, fetching, validating, and delivering external data introduces some centralization into operations that are otherwise completely decentralized on public blockchains.
Using decentralized oracle solutions aligns with blockchain principles by not placing all the eggs in one basket. Such networks establish end-to-end decentralization, allowing radically different use cases to be built using hybrid smart contracts.
The bottom line
Oracles fill a critical gap in smart contract functionality — lack of connectivity to the “real world”. By enabling blockchain networks to access off-chain computation and external data inputs, they expand the possibilities for web3 developers.
Decentralized oracle networks can bring speed, security, and reliability to data sources and services for dApps across defi, gaming, insurance, supply chain, enterprise systems, and more. The functionality unlocked by blockchain oracles and hybrid smart contracts allows decentralized approaches across industries. They provide the key data infrastructure for enabling many web3 applications.