update 19 August 2021

What are Oracles and Why Do Smart Contracts Need Them?

What is an Oracle?

“An oracle is a person or agency considered to provide wise and insightful counsel or prophetic predictions or precognition of the future, inspired by the gods” – this is the literal definition of an oracle. When moving to the world of Software, the word keeps much of what they used to mean, with a few tweaks here and there.

Leaving aside predictions and Godly figures, Oracles are, in a strict software sense, external data feeds used by software engineers and developers to embed applications that collect real-time data. Oracles are entirely based on the needs of the application. An Oracle is usually a third-party service that responds to queries and answers questions. It is, in essence, a data provider.
In common practice, the data provided by Oracles is manually and periodically updated by a third party, who is trusted to provide true and fair information. Oracles retrieve and verify external data for all forms of applications and software through methods such as web APIs or market data feeds.

Say Yahoo Finance needs to show the price of Gold at a particular time. Its back end API is assigned an oracle service, to which it will contact and receive the current price. Big enterprises and data providers like Yahoo Finance, Facebook, Google, etc., cannot depend on just one oracle for propagating information as it might be prone to manipulation. In such cases, a consensus-based oracle is used, which takes in information from numerous sources and projects all means.

Where do Oracles Fit in on the Blockchain?

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, it is vital for many contractual agreements to have relevant information from the outside world to execute certain agreements.
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 minimal use as they would only have access to data from within their networks.

Smart Contracts and Their Reliance on Oracles

Ever since the advent of Ethereum, Smart Contracts are the buzz within the community. Hundreds, if not thousands, of prospective use cases have been developed, some even finding their usefulness in real-world use cases. Among others, IBM, Microsoft, and Ethereum have already successfully developed applications that rely heavily on Smart Contracts.

Smart Contracts by themselves are just pieces of code that bind two or more parties together in a virtual agreement. The agreement that binds the parties may be simple or could have clauses that involve third party reliance. There may be contracts that need data fed to them to make the necessary decisions. This is where a Blockchain, and Smart Contracts specifically, stretch out a hand into the outside world. Oracles solve the problem of third party reliance.

The reliance is justified because Smart Contracts are the first usable and scalable medium on the internet that can execute pre-specified arrangements without the fear of hindrance. Meaning, one can make a smart contract and have it executed on a blockchain with full confidence that it will be fulfilled, given the conditions are met, and no party will hinder its outcome.

But, as the saying goes, every cloud has a silver lining. People often forget that a silver lining has a cloud in return. On paper, smart contracts seem to be the ultimate solution to the immutable agreement problem on the internet. Still, when trying to develop, one faces difficulties that could not have been foreseen.

Is Third-Party Reliance Justified on a Blockchain?

Since smart contracts execute decisions based on oracles’ data, they are key to a healthy blockchain ecosystem. The main challenge with designing oracles is that if the oracle is compromised, the smart contract relying on it is also compromised. This is often referred to as The Oracle Problem.

For Smart Contract to rightly execute as per the agreement, they have to rely on outside information providers, which in most cases are oracles. For instance, say I get into a bet with my friend that my favorite team will win the world cup, and he says otherwise. We decide to enforce the same on a smart contract and tag it on a particular blockchain, ensuring the execution.

Since a Smart Contract is not Smart, it has to rely on other entities’ information to execute itself. Considering the locked amount in a Smart Contract is sufficiently large enough to motivate either party to hinder the outcome, one of us can manipulate the Oracle provider to propagate wrong information, thus profiting without actually fulfilling the agreement. Oracles, being outside the blockchain, are subject to the influence, just like any centralized entity.

Oracles are not part of the main blockchain consensus. They are, unfortunately, not part of the security mechanisms that public blockchains can provide. The trust conflict between third-party oracles and the trustless execution of smart contracts remains a mostly unsolved issue.

And thus, the debate arises: what can be done to solve the censorship problem? Is it still legit to call a blockchain immutable and censorship-resistant when something as novel as oracles can be manipulated to change the outcome? What can be done to bridge the gap between the blockchain’s virtual immutability and the apparent problem of information propagating Oracles?

price change

The Concept of Decentralized Oracles, i.e., Oracles that are consensus-based, is often thrown around as a possible solution to the infamous Oracle Problem. Projects like Chainlink are spearheading this idea by developing tools that allow you to distribute trust among oracles. We will look further into the concept in the future.

More posts

What Are Crypto Validators and How do They Work?

Validators are new "payment processors" in decentralized networks, and as such, they produce blockchain rewards. It sounds simple, doesn’t it? However, the definition of validators in crypto is much more complex than that. Also, the role of a validator may change depending on the consensus mechanism that each blockchain uses. In this guide to validators in blockchain, we take a closer look at this entity and its indispensable role. Furthermore, we analyze four validator use cases in different blockchains and…

How Many ETH Will Burn After the London Fork?

Since its launch in July 2015, Ethereum has grown exponentially to be the second leading cryptocurrency in market value after Bitcoin. The platform’s growth has primarily been attributed to its smart contract feature, which powers the deployment of a wide range of applications, including oracles, decentralized finance (DeFi), decentralized exchanges (DApps), marketplaces, crypto-collectibles (NFTs), and developer tools.  Despite its growth, Ethereum faces numerous challenges that hinder its usability. The scalability challenge is one of the biggest ones that Ethereum faces. The current state…

The Impact of Adoption of Cryptocurrencies on E-commerce Business

E-commerce is the short form of electronic commerce. It is the buying and selling of merchandise over the internet networks. It also involves the transfer of funds and the keeping of records to certify the transactions made. E-commerce is of three types; business-to-consumer (B2C), business-to-business (B2B), and business-to-government (B2G). The main reason for using cryptocurrencies in e-commerce is to get rid of third parties that control the transactions. This relationship can make online shopping much easier and safer since blockchain technology that backs up cryptocurrencies is…

What it Means to Make Bitcoin a Legal Tender

June 9, 2021, marks the first move that would make history in Bitcoin's timeline. El Salvador passed a bill where 62 of 84 congressional voters would make Bitcoin a legal tender. Fast forward to September 7, and El Salvador became the first country to make Bitcoin a legal tender. In this article, we shall look into what it means for Bitcoin to be a legal tender in detail; What is Legal Tender? "This note is legal tender for all debts, public and…

The Correlation Between Blockchain Activity and Transaction Fees

Miners and validators are essential cogs in any crypto project. They're the ones who process transactions on a blockchain (BC) activity. For their efforts, crypto projects compensate them for their efforts from transaction fees. A transaction is only valid when it has undergone validation. The process ends in the validators adding it to the BC. Mining consumes a lot of computing power. As such, it's an energy-intensive exercise. The motivation for the miners is the block reward that consists of…

Understanding Shrimpy’s New DEX Trading Feature

DEX trading is one of crypto's newest but also most complex investment options as of late. Decentralized exchanges are trustless peer-to-peer (P2P) trading environments relying on smart contracts that help facilitate crypto exchanges. The clear benefits of DEX trading are security, anonymity, and greater user control. Although decentralized exchanges, and DeFi as a whole, have gained immense popularity over the past two years, the segment is still considered new by many in the community. A large chunk of crypto investors still does not feel…

Why Do Exchanges Freeze User’s Crypto Funds?

cryPicture this: you've finally mustered the courage to take the plunge into crypto. Everything is going right for you. You're mastering the hacks to optimize your investment and are looking forward to a fulfilling experience within the space. Then it happens. You log in to your account and find that you can't access it anymore, let alone transact in it. In a panic, you try customer support to no avail. Next, you can't help asking how you got here. Is it…

Determining the Initial Value of Cryptocurrencies

It is quite obvious that the total market cap of cryptocurrencies has enjoyed impressive growth since their inception. It was able to hit the magic $2trn figure, standing at $2.064trn as at the time of writing. That is close to 2.5 times the value of crypto at the start of this year, 2021, as per coinmarketcap data. While all these huge figures are truly impressive, things haven't been like that. The increased market capitalization has been more of a result…

Factors Driving the Price of a Crypto Project to Skyrocket

Cryptocurrencies continue to showcase outstanding crypto performance since the launch of Bitcoin in 2009. Global investors are looking forward to establishing financial stability with digital assets. Due to the growing interest, crypto prices are making a drastic shift to the top.  Still, in some scenarios, the market trend keeps decreasing for specific periods. A coin's bearish momentum creates fear and panic for users who believe in the future of the asset.  The opposite is a bullish market that records skyrocketing prices of…

Vivid Indicators of a Bull Run in the Crypto Market (Bull Market)

In the cryptocurrency space, a bull market is one whereby the prices are expected to rise significantly or are rising. Due to the volatile nature of crypto, the term “bull market” is reserved for more extended periods characterized by the rise of a large portion of the prices. To be categorized as a rise, the price must be up 20% after two declines of 20% each. There is optimism, expectations of solid results, and investor confidence in a bull market,…