Crypto Alphabet

What are blockchain oracles?

Any distributed decentralized network is always deterministic, meaning transactions in it go in strictly chronological order, and the network itself cannot independently obtain information from third sources and the outside world. To do this, there are Oracles in the blockchain, or infrastructure algorithms that translate information that is outside the network into a format that is understandable for the blockchain.

Thus, the Oracle can be considered as a way of linking the blockchain with the real world. This feature plays a key role, especially in the use of smart contracts—the protocols that ensure the automatic fulfillment of commercial transactions—transactions, and asset swaps between parties without the participation of third parties. When working with smart contracts, however, entrepreneurs and companies often face significant shortcomings, such as:

  • Smart contracts exist only in the crypto space, and a reliable blockchain system is needed for their work, the implementation of which is a technically and financially complex process.
  • Since a smart contract is an algorithm that must take into account many factors, then for the correct drawing up of such a contract, it is necessary to prescribe a large number of possible variants of the development of situations, which significantly increases the chances of a critical error.
  • Once entered into a smart contract, you cannot make changes or stop working until all the conditions prescribed in it have been fulfilled.

Unlike the blockchain, the world outside the distributed network is not at all deterministic, and it is likely that one of the parties or both may face unforeseen circumstances that will affect the terms of the smart contract. In this case, the Oracle blockchain will allow smart contracts to update the terms of their execution by obtaining information from the outside world. So, the Oracle will work as a kind of adviser, to whom a smart contract can apply for the interpretation of certain events.

How do blockchain oracles work?

One of the key questions that the developers of Oracles face is how to explain to the smart contract the occurrence of an event in a reliable, verifiable, consistent, and transparent way. This requires three components:

  • Data source

A data source is a resource that provides information to the Oracle. The types of data the Oracles work with vary greatly, so sources can vary from meteorological resources that provide weather data to Bloomberg information about fluctuations in stock prices or future events from Augur’s prediction market.

  • Query

A query is a special code that works with a particular data source. Thanks to the request, the Oracle gets the data needed by the smart contract.

  • Oracle/Consensus of Oracles

Oracle/Consensus of Oracles is an algorithm/group of algorithms that work in the blockchain, which are responsible for connecting to the data source and interpreting the information received in a format understandable for the blockchain.

There are different types of oracles based on the type of use:

  • Software oracles

The Oracle, existing in the software format, works with information that is online. Such an Oracle can provide data on weather, temperature, prices for services or goods, transport schedules, and so on. The Oracle receives the data from company websites, processes it, and sends it to a smart contract.

  • Hardware oracles

Some smart contracts require information from the real world about the physical fulfillment of certain conditions. For example, a smart contract may need data about a car that is in the range of a certain sensor. Also, the hardware Oracle can interact with RFID tags (radio frequency identification tags) for the work of smart contracts in logistics. The main problem for this type of Oracle is to ensure the proper level of protection of the information being read.

  • Inbound Oracles

This type of Oracle works directly within the smart contract itself and provides information from the outside world under certain conditions. For example, to start an automatic order for the purchase of cryptocurrencies, a smart contract must know when its rate reaches one or another mark. This information will be provided by the inbound Oracle.

  • Outbound Oracles

The outbound Oracle, on the contrary, can send information to the outside world. So, the smart locking system that exists in the real world can automatically grant the user access as soon as it receives information about the successful payment from the Oracle.

  • Consensus of Oracles

Prediction markets, such as Augur or Gnosis, require Oracles for reliable prediction of the development of events and final results. By using only one source of information, however, it is impossible to accurately determine its reliability. In this regard, prediction markets use not one, but several Oracles, to predict the consequences of events.

As the blockchain economy develops, the Oracle ecosystem will develop rapidly as a reliable way to connect the digital world with the real world. It is the Oracle blockchains that will be able to solve the problems of communication between the blockchains, as well as ensure the wider application of smart contracts in various industries interested in the use of decentralized networks.