Blockchain
Oracles
What is Blockchain
Blockchain is a decentralised form of data storage/ledger where data is stored in form of blocks. These blocks are chained together and are replicated across multiple nodes connected in a network, making their data immutable and creating a deterministic system of data.
The Oracle Problem
The Oracle problem revolves around the inability of blockchains to access external data or communicate with the off-chain world. It is likened to a computer without an internet connection which can only access data within its hard drive.
On one hand, we have the blockchain operating in its own deterministic ecosystem which was intentional owing to the fact that blockchain networks need to reach a consensus based on some basic questions using data already stored in its ledger; and on the other hand, we have the broader off-chain (non-blockchain) digital economy overloaded with ever-expanding streams of data. This isolation of the blockchain network is exactly what makes it reliable and secure but which causes another problem; “The Oracle Problem”.

The Oracle Problem basically revolves around the inability of blockchain to communicate outside of its network and consequently the inability of the blockchain to pull in data or to send data outside of its ecosystem.
To facilitate the adoption of smart contracts based on networks like Ethereum across a wide variety of market and use cases, the oracle problem needs to be solved. For instance, a DeFi smart contract might need to access the exchange rate between DAI and USD which is inaccessible in the blockchain network, an insurance smart contract might require weather data to indicate flight delays, NFTs need a way to assign randomness to preserve its rarity. None of this information is inherently generated within the blockchain, nor are these traditional services directly accessible.
Solving the Oracle Problem
The blockchain oracle problem outlines a fundamental limitation of smart contracts — they cannot inherently interact with data and systems existing outside their native blockchain environment. Resources external to the blockchain are considered “off-chain,” while data already stored on the blockchain is considered on-chain. By being purposely isolated from external systems, blockchains obtain their most valuable properties like strong consensus on the validity of user transactions, prevention of double-spending attacks, and mitigation of network downtime. Securely interoperating with off-chain systems from a blockchain requires an additional piece of infrastructure known as an “oracle” to bridge the two environments. (source — chainlink)

What Is a Blockchain Oracle?
A blockchain oracle is a secure piece of entity that facilitates communication between a deterministic blockchain and any external or off-chain application and services and provide external data to smart contracts. Blockchains are intentionally cordoned off the real world as they are not intended to interact directly with off-chain services or data. Oracles take on several key functions:
- Listen — monitor the blockchain network to check for any incoming user or smart contract requests for off-chain data.
- Extract — fetch data from one or multiple external systems such as off-chain APIs hosted on third-party web servers.
- Format — format data retrieved from external APIs into a blockchain readable format (input) and/or making blockchain data compatible with an external API (output).
- Validate — generate a cryptographic proof attesting to the performance of an oracle service using any combination of data signing, blockchain transaction signing, TLS signatures, Trusted Execution Environment (TEE) attestations, or zero-knowledge proofs.
- Compute — perform some type of secure off-chain computation for the smart contract, such as calculating a median from multiple oracle submissions or generating a verifiable random number for a gaming application.
- Broadcast — sign and broadcast a transaction on the blockchain in order to send data and any corresponding proof on-chain for consumption by the smart contract.
- Output (optional) — send data to an external system upon the execution of a smart contract, such as relaying payment instructions to a traditional payment network or triggering actions from a cyber-physical system.
Carrying out the functions above requires that the oracle system operate both on and off the blockchain simultaneously. The on-chain component is for establishing a blockchain connection (to listen for requests), broadcasting data, sending proofs, extracting blockchain data, and potentially performing computation on the blockchain. The off-chain component is for processing requests, retrieving and formatting external data, sending blockchain data to external systems, and performing off-chain computation for greater scalability, privacy, security, and various other smart contract enhancements.
Centralized Blockchain Oracles introduce a point of failure
First of all, the whole point of the blockchain is to ensure determinism through decentralization. However, this purpose is defeated by introducing a single point of failure in the form of a centralized oracle and can be remedied by extending this decentralization to the blockchain oracle.

Whether it’s the development team running the oracle themselves or a centralized third-party service, both scenarios give excessive power to a single entity to influence the contract via control of the oracle. While the centralized oracle operator may operate with the best intentions, they are still subject to all the common centralized problems of today like downtime, DDOS attacks, hacks, and accidental incompetence, all of which put users’ funds at risk.
Even the noblest centralized entities can come under pressure once the value of the contract scales, opening them up to bribes, intimidation, and regulatory pressure, which only require one person involved in the operation to go rogue. This model is not scalable and doesn’t fit with the idea of decentralized infrastructure being a key driver of secure and reliable automation.
