What are Blockchain Oracles?

A blockchain oracle is designed to provide smart contracts on blockchains with data from an outside, or third-party source. Because smart contracts are simply self-executing code they take the data from the oracle and evaluate it before adding it to their execution flow where appropriate. This is intended to give smart contracts an increased flexibility and utility as they will be able to use third-party data seamlessly.

A smart contract can be programmed to make a payment based on any type of condition that can be expressed programmatically. In some cases all the data needed is right within the network, but in many cases the smart contract may need information from outside the network and this where blockchain oracles can be extremely handy.

A blockchain oracle might secure data from financial markets, or from a health care application, or use statistics from some manufacturing process that occurs across multiple factories. In each case the smart contract is able to use this outside data provided by the oracle to execute based on the conditions that have been specified.

Some Types of Blockchain Oracles

As mentioned above, the blockchain oracle extends the functionality of smart contracts significantly by giving them access to data from outside their own network or blockchain. You’ll find that blockchain oracles come in a variety of forms.

One of these forms is based on where the oracle resides – in the hardware or software of a system. So, we can consider the way these oracles interact with smart contracts as follows:

Oracles built on Hardware:
In some cases a smart contract needs to know when some event occurs in the real world, such as when a truck parks at a loading dock where motion sensors can detect the truck and send the information to the smart contract. Another use case is in the supply chain industry where RFID sensors are commonly used. The real challenge that hardware oracles face is to report accurately on readings without compromising data security. Oracalize proposes a two-step solution to the risks, by providing cryptographic evidence of the sensor’s readings and anti-tampering mechanisms rendering the device inoperable in the case of a breach.

Blockchain Oracles based on Software:
These are online sources of information and are easily accessible by blockchain smart contracts. They will typically provide physical data such as temperatures, asset prices, transport information, and other publically accessible information. They are probably the most powerful of all the oracle types simply due to the breadth of information and their connection to the internet. Because software oracles are connected to the internet they are capable of providing real-time data for smart contracts in some cases.

Different Forms of Blockchain Oracles

A blockchain oracle doesn’t have to be classified based on where it resides. It can also be classified by where it gets its data from or where it sends its data to.

Oracles Pulling Data:
Pulling oracles are those that provide smart contracts with data from the outside world. Financial smart contracts might be programmed to buy or sell and asset when it reaches a certain price. This type of smart contract would use an pulling oracle to obtain accurate up-to-date price information.

Oracles Pushing Data:
A pushing oracle gives a smart contract the ability to send data it has to the outside world. One example of an pushing oracle might be a smart lock in the physical world which has its own blockchain address. When it receives a payment on its blockchain address the smart contract needs to send a command to unlock it automatically.

Oracles for Prediction Markets

One other type of oracle is those used in prediction markets. In this case it isn’t the function of the pracle being considered, but rather the way in which they are used to create secure and accurate results.

Confirming Oracles:
There are prediction markets on the blockchain such as Gnosis and Augur which rely on oracles to confirm future results. If they used just one source of information it could be unreliable and risky. Instead, prediction markets use a rating system for oracles, and to make things even more secure they can use a combination of different oracles. For example they might use a selection of 4 out of 7 oracles to accurately determine the outcome of some event.

As you can see there are definite advantages to using oracles, but there remains one huge disadvantage and that is Oracles Require Trust.

Oracles Require Trust

In every case the data being used by oracles must be seen as credible and trustworthy. For example, if Tom had somehow gained access to the Accuweather database it would be a trivial thing for him to input a data point showing a maximum temperature of 96 F and thus win the wager between himself and Sam. As you can see, where there exists the possibility of smart contracts receiving faulty or manipulated data from their oracles there also exists a serious security flaw. One possible remedy to this, which prediction engines already use, is to request the information from several oracles instead of just one. In that case if one oracle reported a temperature of 96, but four others reported the temperature as 86 we would know that other conditions might be used to resolve the conflict. For example, the smart contract might only accept the majority value, which is 86 in this case, and then Sam would have been the winner of the bet. Alternatively, the smart contract could be programmed not to function at all if it gets conflicting information, and instead require human intervention.

In Conclusion

Blockchain oracles can both send and receive data from third-party sources, making them an extremely valuable resource for smart contracts on a blockchain, where the smart contract needs data that cannot be supplied by the blockchain. Oracles can greatly enhance the functionality of smart contracts by giving them a way to communicate outside their own blockchain. There are many different types of blockchain oracles, including software oracles and hardware oracles.

Despite the decentralized and trustless nature of blockchains, an oracle requires a certain level of trust to be useful. With this being the case we could see smart contracts becoming increasingly complex to deal with the trust issues of oracles. For example, a smart contract may be programmed to query several oracles in order to mitigate the trust required when using a single oracle.

One thing is almost certain, and that’s oracles making smart contracts even smarter. We’ve only begun to scratch the surface of what oracles can do. Prediction engines are one use, but smart contracts on the Internet of Things can make heavy usage of oracles for just about anything you can think of, greatly reducing the need for human intervention, and the possibility of human error.

Featured image

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.