Cryptocurrencies fill out a variety of use cases, but none of them can amount to anything without decentralized oracles. If we think of our organs as isolated parts that serve a certain purpose in our body, then oracles would be the nerves that help them work in cohesion. Similarly, decentralized applications are organs of the blockchain world that would die off if kept separately forever.
When Vitalik Buterin set his mind to create Ethereum, he did so thinking that Bitcoin has a serious limitation by not being scriptable. While the smart contract ecosystem did, in fact, create a dApp hub that everyone loves, Buterin and the crew forgot that Ethereum has as much of a problem with limitations as Bitcoin does.
Perhaps history repeats itself, but coincidentally the blockchain industry faces the same interoperability issues today that the IT sector once had decades ago. Networks are incapable of connecting with each other, which leaves plenty of room for bad user experience and general inefficiency. If we zoom out and look at how blockchains interact with the real world, we find out that the situation is dire - blockchains cannot be directly connected with legacy systems, which significantly limits their useability and adoption rate.
Experts refer to this limitation as to the Oracle Problem. Without any way to send data or pull data from external systems that are built outside of blockchains, digital ledgers remain isolated, much like a computer without an internet connection. Considering that a majority of smart contract use cases rely on interacting with the real world, the oracle problem is a much more serious problem than anyone can imagine.
To solve this, blockchain developers have created oracles. We are not talking about merely any oracles. In this case, we are referring to decentralized oracles!
We determined that blockchain use cases, especially those relying on smart contracts, require a connection with the outside world. For example, financial smart contracts must have access to market information to determine settlements; a blockchain-based smart city would need to connect smart contracts and IoT data to regulate renting agreements - the list goes on.
In these cases, there is no link connecting a blockchain infrastructure with regular IT infrastructure. For us to bridge the gap and connect the two, we need a middleware service: a piece of technology that connects on-chain and off-chain systems.
We call this piece of middleware a blockchain oracle. Oracles may be complex in nature, but they only serve one purpose: facilitate a connection between blockchains and centralized systems.
All oracles need to offer a specific list of features in order to realize a connection between on-chain and off-chain systems (do note that in some cases we also require oracles between blockchain networks themselves), and the most important ones are:
For an oracle to work, it must serve both on-chain and off-chain systems simultaneously. While one listens, establishes connections, broadcasts data, and extracts information from networks, the other processes requests, retrieves data, and sends blockchain data to off-chain systems.
The question is, if oracles are so crucial for interoperability, why were they not developed years ago? As always, the problem stems from centralization.
Until 2017, most oracles or oracle prototypes were centralized in nature. As deterministic transactions are the bread and butter of smart contracts, meaning that transactions can be verified by all nodes, it was very unreliable for networks like Ethereum to run these oracles.
A centralized oracle is similar to an enterprise database, and if we were to use it, blockchains would lose their decentralization the moment that they interact with an off-chain system.
Since we do not want to ruin a fundamental blockchain feature by introducing a middleware that has the complete opposite ethos behind it, developers have worked on decentralized oracles instead.
The premise of such an oracle is to not rely on a single source. Instead, we improve data authenticity and quality by designing them in such a way that they aggregate data from multiple external sources.
While not pleasant to hear about, a liquidation cascade on lending protocol Compound dating to November 2020 is a fairly good example of why having multiple sources of data matters.
Compound allows its users to borrow and lend crypto funds. Borrowing requires collateral, and if not enough collateral is provided, the borrower’s assets are liquidated. DAI is a stablecoin that is popularly used for loans, and on one particular day, the token’s price suddenly increased by 30% on Coinbase Pro.
Compound’s price oracle at the time sourced prices solely from Coinbase Pro, and since the price surged, borrowers found themselves with undercollateralized loans, which were quickly liquidated. The protocol had a total of $88.4 million in liquidations that day. Additionally, DeFi project dYdX also suffered as a result but only lost $8 million in the process.
As we see, crypto investors lost a total of $96.4 million because of a rookie mistake. If Compound used a decentralized oracle that fetched data from multiple sources and aggregated it, the lending protocol would not have registered DAI’s momentary price increase.
Without oracles, blockchains would have a limited reach. The decentralized networks of today would be like a computer or smartphone without an internet connection. With that level of isolation, we can’t imagine blockchain technology being useful to anyone apart from its existing community.
Decentralized oracles save the day by providing a reliable and trustless connection between on-chain and off-chain systems. Not only do they bridge the gap between legacy and new ledger systems, but they also allow the connection to follow the core ethos of blockchain technology.
Oracles are more important than ever, especially now that absolutely all DeFi projects rely on their use to fetch price data, establish settlements, and make it possible for investors to trade assets without using a traditional exchange. Some say that DeFi wouldn’t hold its $75 billion valuation if it were not for oracles, and the fact that decentralized finance became a thing only after oracle providers like Chainlink matured is enough of a testimony to make us believe that.
Uniswap's immense popularity is helping decentralized exchanges go mainstream. However, success means competition is never far away. Enter PancakeSwap, a Binance Chain DEX aiming for Uniswap's crown. Which one is the best decentralized exchange in 2021?