Blockchain Oracles: What are they and how do they work?

  • Home
  • zone
  • Pro
  • Blockchain Oracles: What are they and how do they work?

In the past few articles, I have written about blockchain, smart contract, smart contract audit and cryptojacking. I saw it fit to do a piece on blockchain oracles and we will be exploring this topic on the borders of:

What are blockchain oracles?

Blockchain Oracles Use case

Types of oracles

The oracle problem

Blockchain oracles are third-party services that provide smart contracts with external information not available to them. They function primarily as a “go-between” the blockchain and the outside world. It functions just like an API (application programming interface) which allows interoperability between independent applications or products without explicit knowledge of the internal workings of the connected application. It’s important I bring to the fore that the blockchain oracle is not a datasource on its own, all it does is to connect the blockchain domiciled smart contract to an external data source. 

Signup for Newsletter

Blockchain Oracles Use case

Let me further break things down by painting a scenario. Imagine Lola and James place a bet on the probability of the price of a barrel of crude oil surpassing the price of a barrel of cocoa at a set date, and this condition is coded in a smart contract. At the set date, the smart contract not having the price of both commodities “on-chain” will have to connect via an oracle to an “off-chain” datasource to retrieve the price of both commodities and release the funds to whoever wins the bet.

Blockchain Oracles Projects

The use of oracles on blockchain has been experiencing increase in adoption, as it expands the scope of smart contracts. Without oracles, smart contract will only be limited to on-chain events and would not be able to extract relevant data from off-chain sources which might be relevant to its operations. 

Some projects that facilitate the use of oracles are:

Chainlink: Through the use of secure oracles, Chainlink extends the functionality of blockchains by connecting smart contracts to real-world data, events, payments, and more in a highly tamper-resistant and reliable manner.

Band Protocol: Band Protocol is a cross-chain data oracle platform that aggregates and connects real-world data and APIs to smart contracts.

Decentralized Information Asset (DIA): DIA (Decentralised Information Asset) is an open-source oracle platform that enables market actors to source, supply and share trustable data. It leverages crypto-economic incentives and the wisdom of the community to source, validate and deliver trusted financial data.

Tellor: This is a permissionless community of data providers, validators, and token holders that crypto-economically secure the process of putting real-world data on-chain.

Types of Blockchain Oracles

  1. Software Oracles: This type of oracles connects with internet-enabled assets to retrieve data/information for real-time decision making. Examples of software oracles are price of commodities, exchange rate, poll results etc
  2. Hardware Oracles: These oracles connect with physical devices to extract information valuable to research, completion of transactions, etc. Examples are barcode scanners and sensors.
  3. Human Oracles:  People with domain-level knowledge or authority can serve as oracles providing off-chain insights to on-chain smart contracts for decision making
  4. Inbound and Outbound Oracles Inbound oracles provide information from an external source to the smart contract while outbound oracles provide on-chain data/information to off-chain environments.
  5. Contact Oracles: These are oracles built specifically for a smart contact. It does not leverage the use of third party oracle projects.

The Oracle Problem

On-chain projects are largely secured by the consensus mechanism (such as Proof of Work (POW) and  Proof of Stake (POS)) and based on the explanation made so far, we know that oracles fetch data from off-chain sources, as they are the go-between. If the oracle is compromised the smart contract relying on the oracle for decision making is also affected. This is largely a security concern that remains unsolved and is receiving attention from various researchers.

That’s it! I hope you were able to grasp the concepts?

Leave A Comment