A Deep Dive into Oracles
What are Oracles, and why should we care?
Oracles serve a function that at first glance may not seem too complicated. They are used to transmit data from the real world onto blockchains. For a small fee any user can print whatever information they like to most chains, so why is this necessary or difficult?
The answer lies in the very nature of crypto and blockchain. Everything that exists on-chain, including Smart Contracts, is cut off from the outside world. Out here users can access data streams on almost everything, from price feeds to weather data, but there is no way for a Smart Contract to reach out from the chain and connect to information sources. They are limited to connecting to other entities that exist on-chain.
Oracles solve this problem. They exist both on- and off-chain. When data is needed by a Smart Contract, it can reach out to an Oracle platform and purchase it. The data provider takes information from the real world, usually in the form of publicly available data streams, and sells that information to the Smart Contract.
This difficulty in incorporating trusted off-chain data has been a significant bottleneck in the growth of DeFi. As the DeFi market grows, so the need greatly increases for trusted outside data. Oracles are crucial for solving this bottleneck, making them integral to the DeFi space and the potential of Smart Contracts as a whole.
Anatomy of an oracle platform
So the magic that oracles do is good. But how does it actually work? Well, there are a number of oracle platforms out there, but they all have the same basic components we can break them down into. An oracle platform must have:
- A data protocol, which determines what data can be provided and how to read it.
- Network incentives for providing accurate data.
- A mechanism for resolving disputes.
Data protocols are fairly straight forward. Oracles provide information — great. The protocol tells you what kind of data can be traded, and it standardizes how to format it so that the data buyer can actually read it. Many websites tweak their APIs more frequently than you might think, especially in growing industries. If you have a portfolio tracker, you may have seen how something as simple as an exchange platform adding new financial products can cause your tracker to start spitting out error messages until the developers can update the client. But Smart Contracts have to be lean, and can’t just ‘update themselves’ whenever a data stream stops making sense. Therefore oracles, which can be tweaked by their owners, take outside information and normalize it so it conforms exactly to the same format over time.
Network incentives are the hearts of Oracle platforms, and vary greatly between projects. The goal is simple — data providers who reliably provide good data should be rewarded with money, and those who don’t should lose money. Typically this involves putting up some sort of stake that can be confiscated if you try to trick the buyer, as well as a reputation system to keep track of who has been trustworthy so far.
When disputes do occur, the platform also needs mechanisms to resolve them. This can take the form of some kind of trial, with token holders as jurors, or it can be handled automatically by the platform itself.
Comparing and contrasting oracle platforms
Oracles are on the cutting edge of blockchain development, and there are many projects with many approaches on how to optimize their platforms.
The point of oracles is to provide trustworthy, verifiably correct data. In other words, they can’t provide anything that is an opinion, or render something like human judgement. The data provided must then in some way boil down to math or indisputable facts. “The price of Bitcoin at the time of block height X was $55,920” for example, or “The Chicago Cubs won their game against the White Sox on date XYZ.” But beyond that, both Smart Contracts looking to buy data and data providers must support a protocol for transmitting that data, so that both sides understand exactly what the data is. And because Smart Contracts need to minimize functionality and code bloat wherever possible, this has meant that, until very recently, only very simple, shallow data has been traded. The early oracle platforms, Chainlink most well known among them, trade pretty much exclusively in simple financial information — primarily price feeds.
With layer 2 scaling solutions and new proof of stake blockchain projects lowering the price of larger transactions, however, the gates are opening up to allow for a data marketplace which supports richer, more varied information. Combined with ideas like ORAO’s Predefined Data Protocols for creating a greater variety of data products, the oracle space is gearing up to catalyze an even greater explosion in DeFi and smart contract utility.
Network Incentives
Ultimately every decentralized oracle platform has some sort of mechanism for rewarding good data and punishing bad data. With DOS Network, if the data you provide does not match that of the other randomly selected data providers, you lose your stake and the tokens are burned. With Band, other token holders can challenge the data you provide, creating a sort of on-chain trial with your tokens up for confiscation. With ORAO, a neural net compares the data you provide to what you and other providers have sent in the past, punishing you before your customer can even receive the bad data.
Of course, not every imperfection in data is necessarily malicious. With ORAO, a data provider’s Reputation is calculated based on factors like how quickly commissions are fulfilled, the freshness of the data provided, etc. The slight variations in data quality lead to a market place where the very best providers can charge a small premium for their data products, while providers with lower scores can still try to compete on price.
Some projects have made the choice to allow data providers to increase their reputation by staking more tokens. The ORAO team feels that this provides an unfair advantage that doesn’t help data buyers, so we have not used this approach, instead sorting providers into tiers based solely on their past performance. Within each tier, however, larger stakers receive more visibility. We feel that this is the best compromise for both rewarding larger stakes and also protecting the interests of data buyers.
Tokenomics of the oracle space
To fuel the economic incentives that are necessary for data markets to function, each oracle platform has to have a token representing real economic value. The larger and more popular the network, the more tokens are worth. By happy coincidence, the factors that make for a healthy network also make for rising token prices. A larger number of data providers means more tokens staked and more tokens held to trade for data. For networks that span multiple blockchains, like ORAO, this effect is even more pronounced. If you want to provide data on both Ethereum and EOS, for instance, then you must lock ORAO tokens on both chains.
Cross-chain Interoperability
Looking to the future, especially with how quickly crypto and DeFi is expanding, it seems clear that cryptocurrencies must be interconnected. This means that oracle platforms, too, must be ready for a multi-chain marketplace, or risk falling by the wayside.
The ORAO team made the choice to build from the ground up on Polkadot, and run our own parathread. This will ensure our ecosystem can offer the best possible interoperability, scalability and transaction speeds for our data buyers and providers. At the time of writing the vast majority of DeFi and oracle development happens on Ethereum. We have no doubt that Ethereum has a bright future, but it is becoming clear also that it will not be the only popular platform for DeFi and Smart Contracts. We expect that in the next few years, other oracle platforms will either scramble to pursue interoperability as well, or they will fall behind simply from lack of utility.
If you would like to learn more about ORAO, you can check out our website, dig into our whitepaper, or join our Telegram channel to speak directly to members of the team.