What are Oracles? Smart Contracts, & “The Oracle Problem”


What is Oracles?

In the context of computing and technology, an Oracle refers to a system or mechanism that provides authoritative and reliable answers or information in response to specific queries or requests. Oracles are commonly used in various fields, including computer science, databases, blockchain technology, and smart contracts.

Oracles retrieve and verify external data for blockchains and smart contracts through methods such as web APIs or market data feeds. The type of data required by smart contracts can include information on price feeds, weather information, or even random number generation for gambling. Leveraging oracles consists of querying the data source for specific information and subsequently connecting to that source to interface between the blockchain and the data feed. As a result, smart contracts can execute based on the particular information flowing from the data feed.

•Data feeds in real-world markets and web APIs are usually not deterministic like blockchains and smart contracts. Oracles act as a bridge that can digest external and non-deterministic information into a format that a blockchain can understand and execute particular conditions with. Oracles can even be used for N-of-M multi-signature transactions to reach consensus on which transaction to sign, in relevant scenarios.

•Oracles form the basis of platforms like Augur, which is a decentralized prediction market. However, Augur is more representative of a complex oracle itself that functions as a data feed based on the “Wisdom of the Crowd” where participant behavior effectively acts as the data source. Augur also utilizes oracles for reporting the correct result to prediction markets with an incentive structure driving honest reporting.

There are several forms of oracles including:

Hardware Oracles are sensors integrated with tangible physical objects. Primary examples would be in supply chain tracking with the use of RFID tags for feeding data like environmental conditions of products to the blockchain.


Software Oracles are the most common form that pull data from third-party sources such as web APIs and can include real-world information like flight statuses and weather data.

Consensus Oracles represent a step towards decentralized oracles and rely on aggregating data from several oracles with proprietary methods for determining their authenticity and accuracy.

Inbound Oracles reflect “if this happens then do that” scenarios associated with software oracles such as “if this price is met by an asset, then trigger a sell.

Outbound Oracles allow smart contracts to send data to sources outside of the blockchain network they exist on and are also software oracles.

Oracle Types

Oracle systems can be distinguished from each other by their data sources, the direction the information moves, and the way the data earns user-trust.

Data Source

This refers to what data is being reported to the blockchain. While most data comes in a digital form, some systems collect physical data. These types of oracles are either software or hardware systems. For example, oracles can read radio frequency identification (RFID) chips, weather conditions, or healthcare data.

The Direction of Information

This highlights whether the blockchain is receiving data, or sending it. These are often referred to as inbound or outbound systems. For example, the Federal Reserve interest rate could be used in a smart contract transaction, or a wallet on-chain could reach a pre-determined amount, triggering a tax payment off-chain, in a banking application.

The Trust Mechanism

This illustrates whether the oracle is a decentralized or centralized system. Even though centralized systems can create single points of failure, many users prefer them to the more experimental alternatives.


What are Smart Contracts?

Smart contracts are a self-operating computer program that automatically executes when specific conditions are met.

With smart contracts, you can share anything of value, among strangers in a conflict-free transparent way.

You can also think of smart contracts as a Blockchain based vending machine. Just like vending machine are configured to take in dollars to dispense your choice of item, smart contracts use ether as a fuel to execute code based on pre-configured rules.

The Oracle Problem

The Oracle Problem is defined as the security, authenticity, and trust conflict between third-party oracles and the trustless execution of smart contracts. The digital world needs to know about the physical world.

Oracles retain an enormous amount of power over smart contracts in how they are executed because the data they provide determines how the smart contracts execute. Therefore, data feeds from third-party sources give that data substantial influence over the execution of a smart contract, removing its trustless nature as part of a decentralized network.


Specifically, in the context of tethering physical assets to the blockchain, oracles are not capable of providing trustless verification that ownership of an asset such as a house is actually transferred to the new owner, even if the new owner holds a token representing ownership on the blockchain. Possession in a smart contract does not always transfer to possession in the real-world, thus removing the killer application of smart contracts, trustless execution. This is a result of the smart contract needing to rely on some third-party verification of the events in the real world, in the form of an oracle.


The limitations of oracles in regards to blockchains and smart contracts are well-documented with some substantial research into how to effectively implement them. Platforms tackling the oracle problem include DelphiOraclize, and ChainLink. Essentially, these platforms are predicated on building decentralized oracle solutions by leveraging consensus-based oracles, decentralized marketplaces, and novel methods of authenticating oracle data.


Here's a high-level overview of how Oracles work:

1.Data Source: Oracles rely on data sources to obtain information from the external world. These sources can include public APIs, web scraping, IoT devices, databases, sensors, or any other reliable source of data.

2.Data Feeds: The Oracle collects relevant data from the selected sources. This can involve retrieving information from APIs, monitoring data streams, or receiving data submissions from authorized entities.

3.Data Verification: The Oracle may apply various verification mechanisms to ensure the accuracy and reliability of the data it receives. This can include cryptographic proofs, data signatures, consensus algorithms, or reputation systems.

4.Query Processing: When a smart contract or program requires specific information, it formulates a query and sends it to the Oracle. The query specifies the desired data and any additional parameters or conditions.

5. Oracle Response: The Oracle processes the query and retrieves the requested information from its data feeds. It then formulates a response containing the relevant data and sends it back to the smart contract or program that made the query.

6. Data Integration: The smart contract or program receives the Oracle's response and can utilize the provided data to execute the necessary actions or decisions within the blockchain network or its associated application.


The use of Oracles allows blockchain-based systems to access real-world data and interact with external systems, enabling them to execute complex operations, trigger events, or make decisions based on up-to-date and reliable information.

It's worth noting that the design and implementation of Oracles can vary depending on the specific use case, the desired level of trust, and the underlying technology. Different types of Oracles exist, such as centralized oracles (relying on a single trusted entity), decentralized oracles (using multiple independent sources), and consensus-based oracles (aggregating data from multiple sources to reach a consensus).


Why Oracles Are Important for Blockchain

Oracles play a crucial role in blockchain technology by enabling the integration of real-world data and events into decentralized systems. Here are some reasons why Oracles are important for blockchain:

1.Access to External Data: Blockchains are designed to be self-contained and immutable, primarily relying on data and events occurring within the network. Oracles provide a means to bridge this internal world with the external world by fetching and verifying real-time data from external sources. This capability expands the range of applications that can be built on blockchain networks, allowing them to interact with real-world events, market data, IoT devices, weather reports, financial information, and more.


2. Smart Contract Automation: Smart contracts are self-executing agreements written on blockchain platforms. By integrating Oracles, smart contracts can automatically trigger actions based on real-time data inputs. For example, an insurance smart contract could automatically initiate a claim payout when specific conditions, such as flight delays reported by an Oracle, are met. Oracles enable smart contracts to operate autonomously and respond to real-world events without requiring manual intervention.


3. Decentralized Finance (DeFi): DeFi protocols are a prominent use case for Oracles. DeFi platforms facilitate decentralized lending, borrowing, trading, and other financial activities. These platforms often require up-to-date price feeds for cryptocurrencies and other assets. Oracles provide reliable price data from various sources, ensuring accurate pricing information for decentralized exchanges, stablecoin mechanisms, lending protocols, and other DeFi applications. They enable transparency, trust, and fairness in financial operations within decentralized systems.


 4. Supply Chain and IoT Integration: Blockchain technology has applications in supply chain management and the Internet of Things (IoT). Oracles can collect and verify data from IoT devices, such as temperature sensors or GPS trackers, and securely store this information on the blockchain. This integration enables transparent tracking of goods throughout the supply chain, ensuring data integrity and traceability.

 5. Real-World Governance: Some blockchain networks incorporate decentralized governance models, where token holders participate in decision-making processes. Oracles can facilitate these processes by providing external information needed for voting or decision-making. For example, an Oracle could supply real-time data on token prices or network statistics to inform governance decisions, such as funding allocation or protocol upgrades.


For blockchains to have a sustainable impact in practical applications and various industries, they need to be able to interface accurately and reliably with real-world data. Achieving this with oracles is difficult and presents many challenges. However, significant progress has already been made on this front, and the future connectivity between blockchains and external data feeds will represent a major leap forward for the technology.


However, it's important to note that Oracles introduce a potential point of failure or vulnerability in blockchain systems. As Oracles rely on external data sources and verification mechanisms, compromised or unreliable Oracles can lead to inaccurate information being integrated into the blockchain. To mitigate these risks, various approaches, such as data aggregation, cryptographic proofs, reputation systems, and multi-source verification, are employed to ensure the reliability and integrity of Oracle data.