Blockchain Oracles: Bridges Between Two Worlds

Superorder.io
Superorder
Published in
5 min readApr 18, 2020

Welcome to the next part of our educational series! In these articles, Superorder describes essential cryptocurrency and blockchain concepts. Today, we will talk about blockchain oracles — services that literally make smart contracts possible. They serve as connectors between decentralized and traditional systems.

At first glance, the name may remind ancient oracles. In different cultures, people considered oracles as prophets who know the future thanks to gods or other supernatural powers. Oracles were admired and prayed. Without them, people couldn’t make enough-informed decisions at all.

You may wonder but modern blockchain oracles serve the same goal! Let’s find out how they help developers and users nowadays.

Why Do We Need Oracles At All?

At this moment, you may ask why contracts can’t connect to outside data without intermediaries. The reason is the fundamental difference between the two worlds. It comes down to two facts:

  • Blockchains are deterministic. They organize data in a sequential way in which events take place strictly one after another. Thanks to this approach, blockchains become immutable but less flexible.
  • Real world is non-deterministic. Traditional structures have multiple data points without strict sequences. We can create and access information in many different ways — flexible but incompatible with blockchains.

As a result, it’s technically impossible for blockchain systems to access off-chain data points. Smart contracts aren’t able to understand non-sequential information just like the Japanese can’t understand the Frenchman. For this, they need blockchain oracles that translate data and make it processable.

How a Blockchain Oracle Works?

Oracles pair with smart contracts so let’s talk about them. A smart contract is a digital deal with predefined execution conditions. For instance, if you want to bet on the football match result, you can use a smart contract. Predict the winner, make your wager, and seal the agreement. Eventually, you’ll either get the prize or lose the bet. What’s cool, the process is automated and unbiased as the smart contract controls it.

The trick is that the contract would be useless if it can’t access the real-world off-chain data. All agreements rely on blockchains so they have access to on-chain registered information like transactions. For many use cases like betting or voting, they also need to know what happens outside their chains. Evidently, your football prediction contract wouldn’t be able to work properly without knowing how teams played.

Here, blockchain oracles enter. Put simply, they act as bridges, connecting blockchain-based smart contracts with off-chain data sources. Oracles provide necessary info that triggers contracts. Here’s a simple underlying algorithm of work:

  1. Developers design a smart contract.
  2. Users sign the contract, adding trigger criteria.
  3. The contract utilizes a trusted API protocol.
  4. The oracle monitors target sources and sends data to the contract.
  5. The contract checks the execution criteria.
  6. If any is met, the contract triggers and closes.

Now, let’s check more specific examples of how blockchain oracles work.

Oracle work on the example of Chainlink, source: https://blokt.com/

What Are the Examples of Oracles?

Classification of oracles is different as it depends on different characteristics. Below, we list a few of the most popular types. Apart from them, you should know about so-called human oracles — experts in specific fields who can verify data and send it to smart contracts. The chance of fraudulent activity is reduced thanks to cryptography methods.

Centralized and Decentralized

According to the names, these oracles rely on one or multiple data points. Centralized agents have only one source that they use to deliver information to smart contracts. While this approach may be much more efficient and convenient, it also leaves a single point of failure and reduces the impartiality of machines.

Decentralized oracles are just like blockchains. They collect information from various sources, relying on the idea of trustless cooperation. In addition, smart contracts can get info from several oracles. This model also enables decentralization, mitigates counterparty risks, and verifies data.

Inbound and Outbound

This classification is pretty simple. Inbound oracles are services that send information from real-world sources to smart contracts — like in the example with football betting. Outbound oracles work in the opposite direction, sending data from contracts to external systems. For instance, they can automatically open a bank vault after processing ID information based on blockchain.

Software and Hardware

Both inbound and outbound agents can exchange data with different systems. Software solutions work with digital tools only. They can collect information from websites or send it to databases. Hardware oracles focus on physical devices: the already mentioned vault doors, smart home sensors, product labels, etc. Both areas are vital for better adoption of smart contracts, surely.

Why Oracles May Fail?

The main problem with oracles and smart contacts is their security. Not being parts of blockchains protected by genuine mechanisms, oracles are vulnerable to various attacks. If a malicious actor can get access to the target oracle, he/she also can control the linked smart contracts. That’s why it’s impossible to make oracles/contracts fully trustless now. Still, some experts think that this problem is more social than technical.

The Ongoing Development

At this moment, we can definitely say that blockchain oracles are vital for the entire ecosystem of smart contracts. They simply can’t work without such intermediaries. While certain security issues remain, we should accept them and get used to imperfect connections with some room for mistakes.

Further, the rise of smart contracts will lead to more investments in oracle developments. We may see more reliable solutions for more efficient communication between blockchains and external systems. For example, one unified platform for different chains that want to connect to our world.

What about the real trustless oracle? Well, it’s possible, too. But the problem is so fundamental that we can’t even estimate how and when it could be solved.

--

--

Superorder.io
Superorder

Superorder Official Page. Build trading strategies using visual interface. Earn even at night!