What is a blockchain oracle?

Blockchain oracles are third-party services that provide smart contracts with external information. They serve as bridges between blockchains and the outside world. Blockchains and smart contracts cannot access off-chain data (data that is outside of the network). However, for many contractual agreements, it is vital to have relevant information from the outside world to execute the agreement.

This is where blockchain oracles come into play, as they provide a link between off-chain and on-chain data. Oracles are vital within the blockchain ecosystem because they broaden the scope in which smart contracts can operate. Without blockchain oracles, smart contracts would have very limited use as they would only have access to data from within their networks. 

It’s important to note that a blockchain oracle is not the data source itself, but rather the layer that queries, verifies, and authenticates external data sources and then relays that information. The data transmitted by oracles comes in many forms – price information, the successful completion of a payment, or the temperature measured by a sensor.  To call data from the outside world, the smart contract has to be invoked, and network resources have to be spent. Some oracles also have the ability to not only relay information to smart contracts but to send it back to external sources.

Many different types of oracles exist – how a blockchain oracle operates is entirely dependent on what it is designed for. This article will go through some of those designs.

Example of a blockchain oracle

Suppose that Alice and Bob place a bet on who the winner of the US presidential election will be. Alice believes that the Republican candidate will win, while Bob believes that the Democrat will be the winner. They agree on the terms of the bet and lock their funds in a smart contract, which will release all the funds to the winner based on the results of the election.

Since the smart contract cannot interact with external data, it has to depend on an oracle to feed it the necessary information – in this case, the results of the presidential election. After the election is over, the oracle queries a trusted API to find out which candidate has won and relays this information to the smart contract. The contract then sends the funds to Alice or Bob, depending on the outcome.

Without the oracle relaying the data, there would have been no way to settle this bet in a way that couldn’t be gamed by one of the participants. 

What are the different types of blockchain oracles?

Blockchain oracles can be classified depending on a number of different qualities: 

  • Source – does the data originate from software or hardware?
  • Direction of information – is it inbound or outbound?
  • Trust – is it centralized or decentralized?

A single oracle can fall into multiple categories. For example, an oracle that sources information from a company website is a centralized inbound software oracle.

Software oracles

Software oracles interact with online sources of information and transmit it to the blockchain. This information can come from online databases, servers, websites – essentially, any data source on the Web.

The fact that software oracles are connected to the Internet not only allows them to supply information to smart contracts but also to transmit that information in real-time. This makes them one of the most common types of blockchain oracles. 

Information typically provided by software oracles can include exchange rates, digital asset prices, or real-time flight information…”

PLEASE CLICK HERE TO READ THE FULL ARTICLE