Smart contracts made a revolution in the blockchain space on par with the creation of Bitcoin and the invention of blockchain. However, it didn’t take long till this otherwise highly disruptive technology revealed its major weak point. To function properly, smart contracts need reliable and up-to-date information to work on, but since they can’t access off-chain data that may be vital to the fulfillment of contractual agreements, this severely limits the application of smart contracts outside their native blockchains. In order to overcome this shortcoming, the concept of a blockchain oracle has been proposed as a bridge between on-chain logic of a smart contract and an off-chain source of external information which is required for its correct execution.
What Is a Blockchain Oracle?
At the lowest level, a blockchain oracle is a middleman service which connects a self-contained world of a smart contract-enabled blockchain with the world beyond. Figuratively speaking, an oracle exposes an external world to a destination blockchain, a window through which the latter can peek outside. Indeed, what it is looking for is ultimately determined by the smart contract logic and the code that powers and brings it to life. Types of data that a smart contract may require are quite diverse. In fact, they can be any. As decentralized finance (DeFi) is starting to gain traction across the crypto landscape, blockchain applications (dApps) often need financial information such as cryptocurrency and foreign exchange rates, stock and commodity prices. But DeFi is certainly not the only pebble on the beach. Oracles have found their use in as disparate fields of application as weather forecasts and sports betting, identity management and supply chains.It should be clear by now that the job an oracle performs is not limited to just querying, fetching, and relaying relevant information. Its veracity, authenticity, and currency are as important. Therefore, to perform its task properly, a blockchain oracle should not only communicate with external data sources and provide an application on a blockchain with some facts of real life, but also verify that the information is authentic, as well as check that it hasn’t been rigged, and do so securely and efficiently. As this task can be performed in a multitude of ways, it’s no surprise that blockchain oracles come in many forms, and making a correct distinction between them is called for.
Centralized Oracles versus Decentralized Ones
Blockchain oracles may offer a wide array of features and can be classified along different dimensions. There can be hardware and software oracles, depending on whether data is obtained through some hardware device like a barcode scanner or from a site on the Web. Inbound and outbound oracles move bits of information to and from smart contracts. Oracles can be designed for a particular contract, hand-tailored to its specific requirements. Ironically, there can even be human oracles. Back to the roots, in a sense.However, without providing information that is trusted, they all are less than useless. Since blockchains are supposed to operate in trustless, decentralized environments, one would reasonably expect blockchain oracles to share the same ethos, which is eliminating the counterparty risk. And he wouldn’t be wrong. It’s little wonder that applications running on top of smart contract-enabled blockchains are sticking to decentralized oracles as opposed to centralized ones. The key idea behind a decentralized oracle consists in querying as many data points as possible so that a single corruptible source of truth would not undermine the integrity of the data feed. An extension to this idea is running an army of oracles fetching the same information from different sources, thereby removing a single point-of-failure in the form of a blockchain oracle itself.
Use Cases and Real Life Oracles
To date, the oracle space is largely dominated by Chainlink, which strives to provide dApps with the largest collection of price reference data. But there are other players trying to pick up where it fails to deliver. Band Protocol backed by Binance claims to offer faster speeds, lower costs, and greater scalability than Chainlink. Tellor is focused entirely on price data feeds instead of trying to create oracles for every potential use and data type. Like Chainlink, it wants to become a source of reference data for the entire DeFi arena. As has already been pointed out above, DeFi is where the majority of blockchain oracles roam freely. DeFi lending platforms such as MakerDAO, Fulcrum, Synthetix, AmpleForth, and their likes need to track real-time market prices of the assets used as collateral for the tokens created on these platforms. Unsurprisingly, oracle systems are the cornerstone of such projects as their success heavily depends and relies on accurate data reporting and up-to-date market prices.Other important fields where blockchain oracles fit in perfectly are prediction and betting markets. Here you bet on the outcome of some future event via a smart contract connected to an oracle that decides your fate. Augur, which claims to be a global, no-limit betting platform, allows you to speculate on any event whose outcome can be objectively verified. Its competitor, Gnosis, aims at building a framework for creating conditional tokens that can be integrated with prediction markets. There are other fields of application and use cases for which blockchain oracles have been developed, for example, decentralised insurance, on-chain gambling, sports betting, payment services, collateralised lending, to name a few. All of them require trustless data feeds which necessitates the use of blockchain oracles to connect a source of reliable information to smart contracts on respective blockchains.
Smart contracts are essential for the crypto space. But without a means to communicate with the “outer” world, they are mostly useless, living in their own closed-off universe. Blockchain oracles as a second-layer solution are intended to deal with this issue. The cryptoverse has seen an expansive growth of the DeFi world in the last couple of years, and oracles are both contributing to this expansion and being fueled by it in a mutually beneficial way.