Opinion: With the rising popularity of the DeFi space, oracles are becoming more relevant. What are the different types of oracles and why are they useful?
Oracles Defined
In cryptocurrency, to be more specific, an oracle provides real-world off-chain data and submits this information to a blockchain to be used by smart contracts. Typically, this is a data feed provided by a third party service.
Fantastic! No third party escrow bank must be trusted to ensure the funds were fairly distributed to the rightful party. This seems like a small thing, but removing intermediaries in finance has huge implications on the freedom, accessibility and privacy of these types of products.
But wait, how did the smart contract know what the price of BTC/USD was? That information does not live on Ethereum. Usually, a major crypto exchange is used to reference that information, like Coinbase or Binance, and they have APIs that allow people to query that data. How your smart contract gets that information is referred to as the “oracle.”
Since smart contracts on Ethereum are fully self-contained and any information or access to off-chain data is restricted, certain types of smart contracts are reliant on an outside provider (an oracle) of off-chain data points. This is known as the “oracle problem” and is a key hurdle for decentralization.
Luckily, the space has come up with solutions. Oracles truly enable the potential of smart contracts by allowing access to use cases that would be otherwise out of reach. Oracles merge and expand the new crypto world with existing “real” world assets. In fact, the biggest and most important users of oracles — the DeFi space — is probably the largest industry overall within crypto in late 2020.
Let’s now take a look at some of the various ways people have sought to tackle the oracle problem.
Oracle Designs
Centralized Oracles
This is the simplest form of oracle, where a single party provides the data. It can be a third-party provider (someone you whitelist) or done by the same protocol (yourself). Centralized oracles are typically much faster and more capable than more decentralized options.
Distributed Multi-Sig Oracle
This is basically when a handful of parties are each whitelisted to place the data on-chain, and then the user can do any transformation they want (median, average, etc…) before using the data. The issue with this design is that the degree of centralization is still high. It is a better design than a centralized oracle, but still susceptible to manipulation and liveness guarantee is limited.
A variation of this oracle is to use a relaying mechanism, which is where multiple parties sign prices and then one party (or a list of a few parties) pushes the value on chain. The issue with this design is that adding a relayer actually centralizes the entire design and makes it more vulnerable to
manipulation and decreases the liveness guarantee gained in the original multi-sig oracle design.
DPos Oracle
This is a system where whitelisted staked nodes can provide data and lose their stake if they provide bad data. This is arguably better than a multi-sig, since it includes economic incentives for data providers to behave well, but parties have to pay close attention to the whitelister and the whitelisting process. Can they un-whitelist everyone at will? What’s the security mechanism for slashing? How do nodes get added? As in any dPoS system, you need to know how well the nodes communicate and how easily they can collude.
Prediction Market Oracle
This is where participants vote on the right outcome by placing a bet on it (placing their money where their mouth is). If you assume 51% honesty in the system and parties don’t want to lose money, it works and is decentralized. This method has a higher degree of liveness and lower degree of manipulation (per assumptions above) than a centralized oracle, but unfortunately regulatory, speed, liquidity and even cost concerns have made them relatively untenable for many DeFi needs.
Decentralized Oracle
This is an oracle system with an open network of data providers that reach consensus similar to how a blockchain reaches consensus, using game theory and economic incentives.
Decentralized oracles are slow and expensive, but manipulating them is expensive as well, and they have a higher degree of liveness guarantee. It is tough to decentralize the process by which off-chain data gets used on-chain, which is why it is often part of a “gradual decentralization” plan.
The ability to begin as only partly decentralized — with plans for full decentralization to follow — enables a broader marketplace of ideas to be tested. In fact, there are many DeFi protocols out there that simply can not use a decentralized oracle without greatly reducing the user experience of their product — so they’d rather wait and progress towards decentralization over time.
The counterpoint to this notion is that it can be hard to climb out of centralization once you are an established project. The incentives aren’t always there unless you build them in from the ground up.
Current Oracles
Some of the major and innovative oracles on Ethereum are discussed below. This is focused on oracles live on Ethereum, since currently one of the biggest industries in crypto is DeFi on Ethereum.
Provable
Provable (formerly Oraclize) is a centralized oracle provider and the biggest name for this method in the Ethereum space. It’s been live for a long time and is simple, easy to understand and great for testing on MVPs. The obvious risk here is that the central party can either manipulate the data feed or if they shut down their servers, the smart contracts won’t get the data they need (there is no liveness guarantee).
Chainlink
As a disclaimer, this is our best knowledge of how Chainlink works currently (not a proposed version).
Maker
Compound
Tellor
Tellor is a decentralized oracle that provides price data on Ethereum. It uses a network of staked miners that compete to solve a PoW challenge and submit the solution along with requested data. Tellor uses game theory and crypto-economic incentives to maintain the security of the system, similar to how layer ones have harnessed the power of these methods to reach consensus. Tellor is decentralized and currently provides a price feed every 10 minutes. The speed and potential costs are the areas of concern, but it is decentralized and expensive to censor or manipulate the data. The economic incentives are also set up properly to provide a proper liveness guarantee even in times of stress on the Ethereum network.
Conclusion
This article contains links to third-party websites or other content for information purposes only (“Third-Party Sites”). The Third-Party Sites are not under the control of CoinMarketCap, and CoinMarketCap is not responsible for the content of any Third-Party Site, including without limitation any link contained in a Third-Party Site, or any changes or updates to a Third-Party Site. CoinMarketCap is providing these links to you only as a convenience, and the inclusion of any link does not imply endorsement, approval or recommendation by CoinMarketCap of the site or any association with its operators.
This article is intended to be used and must be used for informational purposes only. It is important to do your own research and analysis before making any material decisions related to any of the products or services described. This article is not intended as, and shall not be construed as, financial advice.
The views and opinions expressed in this article are the author’s [company’s] own and do not necessarily reflect those of CoinMarketCap.