
What are Oracles in crypto?
Introduction
Blockchains are closed systems
Blockchain Networks are closed systems by definition. This means that by themselves they cannot access information from the outside world. Needless to say, this intrinsic incapacity to interface and consume data from the real-world limits the utility that can be derived from blockchain technology and from Smart Contracts more specifically.
Bringing in external data with Oracles
Blockchain Oracles solve this issue by positioning themselves as “middleware”, as a layer between the real-world and blockchain networks – Oracles feed or push information from the real world to blockchains (or inversely, they can transmit information from blockchains to the real world). A Blockchain Oracle verifies, queries and authenticates external data sources. Once data points are collected and verified, they are relayed to a blockchain network, where they are used within applications and smart contracts.
Using oracles in smart contracts
Smart Contracts are self-executing programs that live on-chain, that behave in a predetermined manner when certain conditions are met. The execution of a smart contract might depend on information that is not readily available on-chain, such as the price of a real-world asset or even the current temperature. Oracles feed smart contracts with the information they require for proper execution. Since “calling” or invoking data from the outside world is a transaction initself, a cost is incurred every time a smart contract pulls data via an Oracle.
The external data that Oracles provide can come from two sources: software or hardware.
The external data that Oracles provide can come from two sources: software or hardware.
Software Oracles
Software Oracles handle information that originates from online sources, such as websites, servers or databases. They collect and transmit data points such as temperature, prices of commodities and goods, flight or train delays (extremely useful for services that provide transportation insurance services).
Hardware Oracles
Hardware Oracles pull information directly from the physical world – this can be facilitated by Internet of things devices such as temperature and humidity sensors.
Centralized or Decentralized?
Today, we find quite a few Oracles on the market (Chainlink, Band Protocol, among many others) and they distinguish themselves in the manner they address and solve the trust and reliability issues associated with Oracles. All of these Oracles can be classified depending on three specific qualities:
- Source: does the data originate from software or hardware?
- Direction of Information: is it inbound or outbound?
- Trust: Is it centralized or decentralized?
Oracles can be either centralized or decentralized.
Centralized Oracles
In the case of centralized oracles, the main challenge with them is that, since they are the sole providers of information, they need to be trusted. However, as many observers have noted, there is an issue with bringing an element of trust in a trustless blockchain setting.
Decentralized Oracles
Decentralized Oracles, also referred to as consensus Oracles, increase the reliability of the information provided by not relying on a single source of truth. How exactly is consensus achieved within a decentralized Oracle? Every independent node in the decentralized Oracle Network retrieves information independently from an off-chain source and brings it on-chain. The data is then aggregated so the system can come to a determinate value of truth for a specific data point.
What are the risks associated with the use of an Oracle?
Doubts can be raised as to the authenticity and the integrity of the data that Oracles relay to blockchain networks. The reliability of the data can be questioned (has it been tampered with?), the reliability of the code execution within the oracle can also be a contentious point and finally the data transfer procedure used to channel the data from the Oracle to the blockchain network can be challenged.