The Role of Oracles in the Blockchain Industry

With a current total industry wide market cap of Over $2 trillion at the time of posting and the all time high industry wide market cap having reached as high as $2.8 Trillion in November 2021, it is safe to say that the cryptocurrency industry and the underlying blockchain technology which it is built upon isn’t going anywhere adespite the extreme volatility and constant FUD fueled headlines that make waves in the news cycle.

The incredible innovation surrounding modern cryptocurrency use cases and smart contracts has and will continue to fuel this industry’s staying power. A very important but often overlooked piece of this puzzle is the role that oracles play in this ecosystem.

smart contract is a self-executing contract with the terms of the agreement between both parties involved being directly written into lines of code. These agreements get executed autonomously but only when the specific agreed upon conditions of the contract are met.

Then after a transaction occurs on the blockchain, it needs to be validated by every other node in that blockchain so that they can all agree, update their ledgers, and reach consensus. This is pretty straight forward when thinking about monetary transactions.

For example, if we send $5 from Bob to Alice, we can simply subtract $5 from Bob’s wallet and add $5 to Alice’s wallet. This is easily reproducible by every other node in the network. However, once we start to attempt more complex transactions that rely on variable data (such as the current price of Ethereum) we can potentially run into problems.

Let’s say we wanted to send the price of Ethereum at a given moment in time. The node would call an API to get the price of ETH and send it over to Alice. However, when every other node goes to validate this transaction, they too will have to call this same API. If we make that API call even a moment later, the API could be changed, updated or even hacked by then and would result in all the other nodes getting a different result and not being able to reach consensus.

Consensus is one of the most important ingredients that make blockchain technology possible in the first place. For this reason, blockchains like Ethereum and others are designed to be entirely deterministic. This means that if we replayed every transaction in a blockchain’s history all the way back from the genesis block until where we are today, we should end up in the exact same current state.

When we add in API calls to these transactions it makes it much more difficult for all of the nodes in a network to reach consensus quickly and easily. Nevertheless, we can’t just throw our hands up and stop here. We need blockchains and smart contracts to be able to connect to the outside world and APIs so that we can do more interesting and complex things such as facilitate Decentralized Finance.

So how do we get there?

The answer to that question is through the use of oracles. For our purpose, an oracle is any trusted third party device or entity that connects deterministic blockchains with real world off-chain external data.

These oracles actually enter data into the blockchain through an external transaction. Instead of calling an API, an off chain oracle will actually get the necessary information from the API itself and report it on chain in a transaction.

This allows there to be no API calling within the Ethereum Virtual Machine itself and is the reason why oracles are often referred to as blockchain middleware because they bridge the gap from the blockchain world to the real world.

In theory this also seems simple but it leads to what is often referred to as The Oracle Problem. A major reason to use smart contracts is the benefits of decentralization. However, data has to come from somewhere and if we report data on a decentralized blockchain using a centralized or single API/data source, we are removing one of the main benefits that blockchains offer.

That single API/data source becomes a centralized point of failure and if it gets compromised so does all of the blockchain history that depends on that data. A central point of failure renders smart contracts no better than regular contracts and is part of the reason why decentralized oracles are so vitally important to the success of the blockchain industry as a whole.

The Oracle Problem can be summarized in two main points:

1. Blockchains themselves cannot access off-chain data on their own, and

2. Using centralized oracles nullifies the advantages of decentralization and introduces major security risks.

At the end of the day despite their importance, oracles aren’t “real” things. They are usually just code programed by someone and trusted by a lot of people. An example of the role these oracles play in practice can be shown when considering the potential implementation of decentralized farmers insurance.

Imagine you are a farmer who wants to buy crop insurance so that way if something happened like a drought or excessive rain which damaged your crop yield, you are protected from the most severe possible downsides. A very simplistic and rough overview of how this might work is that you pay a monthly premium that goes into a large pool of money and the money is stored in that pool alongside other people’s paid premium.

We can use statistics to reasonably predict that the amount we require people to pay will cover their potential issues. So if one year a drought comes along and a farmer’s crops do not grow, that farmer can get a payout from the insurance smart contract. In this situation an oracle would be needed in order to inform the blockchain that there even was a drought by feeding it weather data based on the farmer’s location.

As mentioned this is a very basic example so that we can wrap our head around the concept, but you can be assured that real world applications of insurance contracts would be much more complicated. Nevertheless, this does show you a rough overview of how smart contracts and oracles can be used in tandem to recreate traditional institutions like insurance firms in a decentralized, trustless, and presumably more affordable way by leveraging blockchain technology.

Blockchains are decentralized so that no one person or company can control them and oracles should be too. To reiterate, you don’t want to get your data from just one source because if you did it would then be centralized with a single point of failure, where one inaccurate data input or bias from the data aggregator could lead to a cascading negative system wide failure.

There are three different types of Oracles:

1. Hardware oracles — which read information from real world sensors such as a thermometers or scales

2. Software oracles — which can find information on the web such as stock market data or how many users visit a specific site at a given time

3. Human oracles — which consolidate human data like reviews or important ideas from people with a specialized skill set or knowledge

Currently the leading oracle in the entire blockchain/cryptocurrency space is Chainlink. Chainlink has began to solve many of these problems by supplying dependable data and playing the role of a decentralized oracle. It is a framework for choosing your decentralized network of nodes and data providers to enable your smart contract to reach its fullest potential by leveraging the same reliable and decentralized infrastructural concepts that make blockchains shine.

This allows it to exist in such a way where if any nodes or API sources are compromised, deleted, or hacked, the decentralization of the network allows it to carry on without missing a beat while keeping your smart contracts safe, secure, and reliable.

Chainlink, and its many competitors that have already and will continue to sprout up in the coming years are definitely worth paying attention to as they play an integral role in the development of smart contracts and decentralized applications world wide.

Image credit: chain.link

Previous
Previous

Cardano’s Hoskinson Claims Gargantuan Billions In ADA Inflows Are ‘Just Getting Started’ — And Here’s Why

Next
Next

U.S. Banks Reveal Plans to Create Stablecoin