What Are Blockchain Oracles?

What Are Blockchain Oracles

What is a crypto oracle?

A crypto oracle is a service that provides blockchains with information from the real world. Or, simply put, an oracle is the link between a blockchain and everything that happens outside of it. Smart contracts cannot fetch data themselves from websites, markets, APIs or other blockchains. An oracle does that for them. Without that data, many smart contracts would not even be able to function.

You should actually see an oracle as a kind of reliable messenger.
It fetches data, checks whether it is correct and then delivers it safely to a smart contract. Think of prices of cryptocurrencies, weather data, sports results or economic data and things like that. Everything that lives outside the blockchain can be brought in through an oracle. So it is the connection between the physical world and the blockchain.


Key Takeaways

  • Oracles form the bridge between blockchains and the real world because smart contracts cannot fetch external data themselves.
  • An oracle retrieves information, verifies it and delivers it safely to a smart contract.
  • Without oracles, blockchains could not use real-time prices, events or external inputs, which would make many applications impossible.
  • Technically, oracles work in three steps: retrieving data, checking it and then publishing it on chain.

Misconceptions about Oracles

One of the most common misconceptions is that people think an oracle itself is the source of information. It is not. An oracle does not invent anything on its own, it only checks, verifies and sends. Because of this, the blockchain remains secure but still connected to the outside world. It is therefore extremely important that the oracle itself receives reliable information.

Example of an Oracle

For example, imagine you have a smart contract that automatically pays out money when there is a storm, something that would be possible on web3. The contract simply does not know when there is a storm, because a blockchain cannot just open a weather website. An oracle then fetches that data, confirms that there really is a storm, often also through other sources, and only then can the smart contract do its job.

Or think of DeFi platforms. If you have a loan with collateral, the blockchain needs to know the current value of your crypto. If the price suddenly crashes, the smart contract has to be able to intervene. That real-time price information almost always comes through an oracle that is, for example, connected to a reliable organization that provides these prices.

Without oracles, blockchains would be quite limited. They would not know current prices, would not be able to follow events from the real world and would not be able to run automations that depend on external data. Especially in a market that moves as fast as crypto, it is crucial that oracles work reliably and extremely fast.

How does a crypto oracle work?

A crypto oracle works by fetching information from outside the blockchain, checking it and then sending it on safely to the blockchain. Or, simply put, an oracle collects data, checks whether it is correct and delivers it to a smart contract that needs that information.

But how does that work technically? You can basically see it as a three step process: fetching data, verifying data and passing on data. And all of that happens in a way that ensures no one can tamper with it.

Step 1. The oracle fetches external data

The first step is that the oracle connects to one or more data sources. These can be APIs, websites, sensors, market prices, weather services, you name it.

Example.
Suppose a smart contract needs to know the current price of Ethereum. An oracle can then fetch data from different sources, such as multiple exchanges or price feeds.

Why multiple sources? Because a single source can make mistakes. By pulling data from different places, the chance of incorrect information is much smaller.

Step 2. The data is checked and validated

Once the data has been fetched, the oracle has to determine whether it is correct. This is perhaps the most important step, because blockchains are extremely strict when it comes to security.

Depending on the type of oracle, this happens in different ways.

  • Multiple oracles submit the same data and the network chooses the most reliable value.
  • Cryptographic verification, where data is digitally signed so that you can be sure no one has tampered with it.
  • Consensus mechanisms designed specifically for oracles, where the majority decides which data is correct.

Think of it like this.
The oracle is the doorman of the blockchain. It only lets information in that is known to be correct.

Step 3. The information is forwarded to the blockchain

Once the data has been checked, the oracle sends the information to the smart contract. That contract can then automatically execute something without any human involvement.

Example 1:
A smart contract for a sports bet needs a winner. The oracle sends the match results and the smart contract automatically pays out the winner.

Example 2:
A DeFi platform needs to know whether your collateral has enough value. The oracle sends price data and the smart contract decides whether liquidation has to happen.

Important.
Once the data is on the blockchain, no one can change it anymore. That makes the system reliable and transparent.

The technical picture in short

An oracle works roughly like this.

  • Fetching data sources
    • Prices, sensor data, news articles, APIs, etc.
  • Validation and security
    • Comparing across multiple sources
    • Digital signatures
    • Oracle network consensus
  • Publishing on the blockchain
    • Smart contract receives the data
    • Contract automatically executes actions

Why does this work so well?

Blockchains are very good at security and transparency, but very bad at "playing outside". They cannot just go on the internet. That is by design.

That is why we have oracles. They make sure blockchains can use real-time data, remain secure and are still connected to the real world.

Without this technical connection, smart contracts would only be half as smart. Thanks to oracles, they can react to price changes, events, time, weather conditions, sports results and anything else you can think of.

What happens if an oracle makes a mistake?

When an oracle sends incorrect data to a blockchain, the consequences can be huge. Smart contracts always execute exactly what they are told, without doubting or "checking again". Wrong data therefore also automatically means a wrong action.

What can go wrong?

  • Wrong liquidations in DeFi
    Imagine that an oracle suddenly sends the wrong price of a cryptocurrency, for example because of an error in an API or manipulation. A loan can then be liquidated automatically even though there was no real reason for it. You lose your collateral simply because the data was not correct.
  • Paying out smart contracts unfairly
    Think of insurance contracts or bets. If an oracle says there was a storm or that a team won when that is not the case, the contract automatically pays out the wrong party. This can in theory cost you money
  • Hacks and exploits
    There have been hacks in the past where attackers managed to influence price data. The smart contract then saw incorrect prices and executed actions that the attacker could use to their advantage.
  • Loss of trust
    If users cannot trust the accuracy of the data, the whole system has little value. A blockchain can be as secure as it wants, but if the input is not correct, the output is not correct either. Oracles therefore have an extreme interest in finding usable and reliable data.

That is why there is so much emphasis on decentralized oracles, redundant data points, cryptographic verification and consensus mechanisms. The less a single oracle can make the difference, the smaller the chance of errors. In practice, it almost never goes wrong because multiple data points are used, but you never have 100 percent security.

Final thoughts

Crypto oracles are the indispensable links between blockchains and the real world. Without oracles, smart contracts would hardly be usable because they cannot fetch data from outside their network. Oracles solve that problem by fetching external information, checking it and safely passing it on to the blockchain. As a result, smart contracts can react to real events such as price changes, weather conditions or sports results. This makes applications such as DeFi, insurance, supply chains and gaming possible in the first place. It is essential that oracles are reliable and cannot easily be manipulated, because the data they provide directly determines the outcome of a smart contract. In short, oracles make blockchains truly smart. They connect security with real world data and without them Web3 simply would not work.

About Finst

Finst is one of the leading cryptocurrency providers in The Netherlands and offers a best-in-class investment platform together with institutional-grade security standards and ultra-low trading fees. Finst is led by the ex-core team of DEGIRO and is authorized as a crypto-asset service provider by the Dutch Authority for the Financial Markets (AFM). Finst offers a full suite of crypto services including trading, custody, fiat on/off ramp, and staking for both retail and institutional investors.

The crypto platform you'll love

We are here to give you the tools, inspiration, and support you need to become a better investor.