Intermediate Series

What Is an Oracle?

In ancient Greece, oracles were sacred people that interpreted the will of the Gods and relayed it to the population. Today, oracles are a new technology that interprets real world data and relays it to the blockchain; and they are bringing the power of the blockchain to the outside world.

In this piece we will explore:

  1. What Is a Blockchain Oracle?
  2. What Are the Different Types of Blockchain Oracles?
  3. The Oracle Problem
  4. Examples of Oracles Being Used in the Real World
  5. How to Buy an Oracle Token
  6. What’s Next For Oracles?

1. What Is a Blockchain Oracle?

Beginner explanation

Oracles are the bridge connecting the blockchain to the outside world. They enable smart contracts to use information such as weather data, stock prices or even election results. Oracles have many practical and powerful applications, from DeFi to crop insurance.

Imagine a farmer in Ethiopia. He pays 120 USDC for drought insurance. An oracle network fetches rainfall datasets for the following 180 days. If his region receives less than 140mm of rain, the farmer is automatically paid 7,500 USDC to his wallet.

As blockchains cannot access off-chain data by themselves, oracles are a valuable third-party service that dramatically expands the use-cases for smart contracts. While oracles can theoretically access any data in the physical world, building consensus from real world information can be challenging.

Advanced explanation

Much like the Bitcoin and Ethereum blockchain, oracle networks can be incentivized using game theory mechanisms. Oracles that provide accurate information to the network are rewarded, while those that submit false information are punished. In this way, oracles aim to provide data with the same degree of immutability, accuracy, and decentralisation.

It’s important to emphasise that oracles are not the actual data. Rather, oracles are the tool that verifies external data sources and relays the information. As oracle network, Chainlink, co-founder, Sergey Nazarov, said “We don’t make contracts. We don’t secure blocks. We don’t secure transactions. We just feed data into various systems.”

In essence, oracles let developers access real world data on the blockchain. They take information from the physical world using off-chain components such as Internet of Things (IoT) devices, online databases, or websites. They then use a smart contract to make that data accessible on the blockchain. This is valuable, as it creates a verifiable and immutable information source that can be embedded within smart contracts. In this way, access to oracles is like giving devs the power of an immutable on-chain API.

2. What Are the Different Types of Blockchain Oracles?

There is a range of blockchain oracles, each serving a different purpose and offering unique advantages. Essentially, oracles are ways to source truthful information. As information has many sources, it makes sense there would be a range of oracles for various circumstances.

Software oracles

Software oracles pull information from online sources, such as temperature, asset prices, or flight times. Key advantages of software oracles are that they can update data in real-time and only require the internet to function.

Hardware oracles

Hardware oracles get their information from the real world, typically using IoT (internet of things) devices such as barcode scanners, actuators, and electronic sensors. Hardware oracles then translate that information into code that can be understood by smart contracts. For example, RFID sensors allow goods to be tracked along supply chains.

Inbound oracles

The examples we’ve discussed so far are inbound oracles. They take information from an external source and send it to a smart contract, like an oracle checking the Ethereum price and sending it to a defi smart contract.

Outbound oracles

Outbound oracles do the opposite of inbound oracles, sending data from smart contracts to the external world. They inform off-chain actors of events that occurred on-chain. For example, with an outbound oracle, you could create a smart contract that sends you a notification on your phone whenever you receive deposits in your bitcoin wallet.

Centralised oracles

Centralised are controlled by a single entity. This means that they’re solely responsible for the information sent to a smart contract. While this type of oracle lacks the trustworthiness for a DeFi application built on a public blockchain, it can be suitable for a logistics company to monitor its supply chain on a private blockchain. However, a single point of failure remains.

Decentralised oracles

Compared to centralised oracles, decentralised oracles produce data that can be verified by multiple sources and is therefore more trustworthy. They aim to eliminate counterparty risks by relying on multiple oracles to determine a reliable source of truth, which is why they are also referred to as consensus oracles.

Contract specific oracles

While most oracles are designed to be used repeatedly by smart contracts, such as reporting the weather every 30 seconds in perpetuity, contract-specific oracles are designed to be used by a single smart contract. For example, a financial institution may create a contract specific oracle to verify a one-off transaction.

Human oracles

An individual (or group of individuals) with specialized knowledge in a specific field can serve as human oracles. They are trusted to verify the authenticity and accuracy of certain information, before submitting the data using a cryptographically secure public and private key.

Game theoretic decentralised oracles

Much like Bitcoin and Ethereum’s blockchain, decentralised oracles can be incentivized by similar game theory mechanics. Oracles first stake tokens, then receive extra tokens when they produce data that the network verified as accurate or lose tokens if they submit false data. With enough decentralised oracles, users can trust the network is free from collusion and rely on the data the network produces.

3. The Oracle Problem

The oracle problem is that blockchains cannot access external data, and if they use centralised oracles to access data, they are creating a major security risk. If you need to trust a third party when using a blockchain, you may as well have used a database.

Blockchains cannot access outside data

Due to the nature of their consensus protocol, blockchains cannot support native communication with external systems. This leaves blockchains as isolated networks, much like a computer without access to the internet. While the limitations of a blockchain are what make it secure, it limits its use cases.

Centralised oracles create major security risks

Centralised oracles give rise to man-in-the-middle attacks, where bad actors attempt to access the data flow to falsify the information. The security threat is clear: If an oracle is compromised, then any smart contract using it is also compromised.

While the oracle problem is a challenge, decentralised oracle networks like Chainlink use a number of tools to prevent malicious actors from altering the data.

Critical tools to protect the integrity of oracle networks include:

  • Advanced cryptography like zero-knowledge proofs
  • Decentralisation at both the node and data source level
  • Reputation systems to identify trustworthy nodes
  • Certification services to increase the transparency of nodes
  • Data signing so users can track node performance
  • Binding service agreements with penalties and rewards
  • External adapters to securely store API keys and logins
  • Open source technology to independently verify the source code

4. Examples of Oracles Being Used in the Real World

Chainlink is currently the most widely used oracle network. It offers both a public commons of decentralised data and the technology to build your own customised data with modular networks. Let’s take a look at three real world examples.

1. Ping - Supply Chain

Ping uses IoT devices with Chainlink’s oracle network to enable automated payments as IoT enabled pallets move through the supply chain. They are planning to incorporate more data from their IoT devices including humidity, altitude and UV index.

2. DeFiDollar - Stablecoin

DeFiDollar is a meta-stablecoin backed by USDT, USDC, and DAI. It used Chainlink Price Feeds to check if any of its underlying stablecoins lose their peg, so it can automatically rebalance to preserve the parity of DUSD.

3. Digital Bridge - Authorisation

Digital Bridge is using Chainlink oracles to help users protect their funds on Polygon. They help prevent unauthorized transfers if a private key is stolen by connecting to a 2FA API oracle authentication service.

5. How to Buy an Oracle Token

You can purchase oracle tokens from online cryptocurrency exchanges like Cointree, and either store your tokens in a wallet on the exchange or transfer them to a hardware wallet. To buy an oracle token on Cointree, all you need to do is create your account, deposit funds, and select an oracle token. Let’s quickly explore three of the most popular oracle tokens.

  1. Chainlink (LINK)

Chainlink is a decentralised oracle network that uses the same security mechanisms as blockchains to provide verifiable and trustworthy data. It lets developers embed highly accurate data within smart contracts. LINK tokens are the digital asset token used to pay for services on the network.

Buy Chainlink

  1. Augur (REP)

Augur is a prediction market platform. It lets users trade assets using prediction markets based on real world events, such as an election, weather, or stock performance. REP is the protocol’s token used for reporting and disputing the outcome of events.

Buy Augur

  1. Band Protocol (BAND)

Band Protocol is a decentralised network of oracles that provides real world data to smart contracts running on blockchains. Band protocol is built on its own blockchain using Cosmos technology, letting it relay data to many different blockchains. The BAND token is used for voting to secure the network through a delegated proof-of-stake network consensus mechanism.

Buy Band Protocol

6. What’s Next For Oracles?

Oracles are vital to the global adoption of blockchains and their implementation into everyday life. Bringing the benefits of blockchain security and decentralisation to new industries will help build more reliable and efficient supply chains, financial ecosystems, payment networks, insurance products, and enterprise systems. Moreover, identity tokens and NFTs will impact culture at large. As blockchains have fundamentally altered our financial ecosystem, oracles will impact society at large.