Oracles
April 14, 2021
Oracles: What and How
An oracle is a bridge between a blockchain and the real world (the name being an allusion to the religious oracles that offered a bridge between laymen and deities). It takes data, such as stock prices and weather conditions, and writes it to the blockchain. This allows smart contracts to reference the state of the world, unlocking a variety of applications. For example, once rainfall measurements are posted to the blockchain, developers can write decentralized insurance contracts that distribute claims in the event of an extreme storm or drought.
Why are oracles needed? Why can’t a blockchain independently fetch data about the real world? The variability this would introduce is incompatible with the determinism of the blockchain’s consensus mechanism. Consensus mechanisms, such as Proof-of-Work and Proof-of-Stake, require that every node in the network be able to replay every transaction and arrive at the same result i.e. they expect determinism. Querying off-chain data introduces the possibility of nodes receiving different responses and computing divergent transaction results. This breaks the consensus mechanism and thus blockchains are barred from independently fetching off-chain data. Oracles circumvent this constraint by proactively publishing data to the blockchain.
Oracles come in a variety of forms. They can be a single person, a company or a network of data providers. The choice of oracle will affect the demand for the decentralized application dependent on it. A decentralized application is only as secure as its least secure link. Users will be wary of applications that depend on centralized oracles due to the risk of hacking or manipulation. Decentralized applications will be adopted to the extent that users have confidence in the integrity and fidelity of the oracle data that they consume.
What Oracle Providers are Doing?
Chainlink and Band have built oracle networks that aim to be reliable and tamper-proof. Both networks use a majority consensus algorithm whereby they aggregate data from an ensemble of data providers and return the median response. The underlying thesis is that by pooling enough disparate sources, consumers can have confidence that the data they’re receiving is a factual. The oracle duo (LINK/BAND) have most visibly made inroads in Decentralized Finance (“DeFi”), where they provide real time data feeds for cryptocurrency prices. Cryptocurrency prices were a natural first product—many exchanges offer public APIs which in aggregate represent a sufficient breadth of data sources to support the oracle network.
Oracles for other classes of data, such as weather conditions and airline flight statuses, are still in their nascency. The oracles reporting this data are typically dependent on a single data source as opposed to a diversified set. Chainlink and Band’s “Any API” (i.e. data source) product, for instance, allows smart contract developers to query any publicly available API through the Chainlink or Band oracle networks. Pulling in data from singular sources sidesteps the ethos of majority consensus and is inherently less secure: the oracle network is only as reliable as the isolated data source it is consuming. Further adoption of decentralized applications that depend on oracles (e.g. insurance) will depend on the oracle networks’ ability to agglomerate enough data sources such that users place confidence in the merits of the end-to-end product.
The Prime Movers of Blockchain Commodities
Oracles are to blockchain economies what railways were to the agrarian and industrial economies of the late 19th and early 20th centuries. Railways provided the circulatory system on which commodities flowed at scale quickly. Freight trains carrying oil, coal, cotton, grain, corn, and sugar could competently and reliably transport these factors of production to those transforming them into finished products. Oracles are the prime movers of data, the key commodity and production input in decentralized applications.
Just as railways empowered upstream producers and downstream converters to specialize, so do oracles allow both data providers and application developers to focus on their core competencies. We can look towards Uber, a Web 2.0/Web 3.0 hybrid, as an example of how eschewing generalism for specialization is a winning formula. Instead of building in-house functionalities for mapping, cloud storage, and payments, Uber outsourced these jobs to Google, Amazon, and Stripe, respectively.¹ By composing ready-built infrastructure, the company could sluice resources into building its core product: a world class ride sharing app that delivered a solution to the end consumer. Web 3.0 developers will benefit similarly by outsourcing and leveraging infrastructure building blocks (e.g. decentralized storage, oracles) that imbue their products with value. By delivering to the blockchain ecosystem a reliable and tamper-proof bridge between data sources and smart contracts, oracles enfranchise smaller development teams to make valuable contributions earlier.
Solving the oracle problem, that is connecting accurate and actionable data to blockchains, is not as simple as merely building the spatial-to-virtual bridge. As with oil’s, the supply chain for data consists of extraction, refinement, and delivery. But unlike crude oil, source data does not carry with it a guaranteed floor on quality. Building a bridge from a blockchain to a single, dirty source of data is only marginally useful to developers and users. Data extracted from a single source is relatively dirty and should be refined through confirmation across independent nodes. Via majority consensus, oracles can “condense fact from the vapor of nuance.” (Snow Crash - Neal Stephenson) We can look to the aforementioned discussion of decentralized majority consensus for further clarity on this point. But what happens when the confidential nature of data proscribes possession by multiple sources and even restricts it by a single one?
Trusted Execution Environment? How Oracles are Grappling with Privacy
One solution that has arrived on the scene is the Trusted Execution Environment (or TEE). A TEE is a secure, isolated enclave that enables a single party to verify certain conditions with immutability and integrity. It is in fact a hardwired environment within the CPU that is purpose-built to deal with sensitive data like identities, passwords, and private keys for cryptos. ² This is an important evolution because data of such a profile is ill-suited to the decentralized majority consensus model. I.e. We don’t want to distribute sensitive data to any more nodes than are required to feed the relevant smart contract. To bolster adoption of and faith in TEE solutions, we expect³ oracle solutions to continue integrating more robust reputation layers—nodes verifying sensitive data will be able to point to a history of good faith, legitimizing their future potential inputs. The keen reader will realize that a combination of the TEE and decentralized majority consensus approaches is more robust than either in isolation. We believe that oracle solutions in development will attempt to bring richer, more sensitive data on-chain by doing just that.
Oracle Rails Helping Developers Explore New Territory
As the oracle rails proliferate, new bridges between off-chain data and smart contracts crop up, and the set of possible applications explodes. Synthetix, a DeFi protocol, has accrued notable total value locked (TVL) by forging synthetic, on-chain equivalents of assets that usually live elsewhere. Derivative contracts are easy to translate because the data is accessible and reliable: the Chicago Mercantile Exchange is a reputable, albeit centralized data source that is simple to query. But Synthetix and others will look to offer a wider and more obscure basket of securities to grow TVL in their applications. To be able to offer synthetic versions of Egyptian government bonds, Uranium futures, or farm equipment CDOs requires a more creative bridge between the real and blockchain worlds.
The gales of creative destruction that strong oracle solutions beckon will transform the remit and scope of insurance. Insurance is simultaneously a critical building block for capital accumulation (See: NFTs - Digital Property Rights) and a notoriously difficult data problem. Data is expensive to collect so coverage availability and premiums reflect that reality. The human-driven claims process introduces uncertainty and malfeasance. Crop, disaster, health, supply chain contingency, life, and equipment insurance are all in their infancy. Insurance offerings that were infeasible under existing data supply chains will become possible. Imagine how health insurance changes if and when wearables data (resting heart rate, sleep patterns, exercise statistics) for a pool’s policy holders seamlessly feed into the policy’s smart contract. Or how equipment insurance broadens and becomes more efficient as IoT sensors are affixed to windmills, solar panels, delivery robots, passenger cars, and farm machinery. As oracles mature, more and broader coverage will be underwritten, premiums will be adjusted dynamically, and claims will be paid automatically via parametric contracts.
Oracles will bring better, richer data on-chain for applications to import. As purer bytes travel more venerable oracle rails, developers will specialize and deliver a cornucopia of finished goods and services for consumption. Rail and telegraph infrastructure catalyzed the production boom during the United States’ Second Industrial Revolution. We think oracles carry similar infrastructural significance for what just may be the blockchain boom.
Citation