Understanding Blockchain Oracles 

Blockchain oracles bridge the gap between on-chain and off-chain environments, enhancing the functionality and reliability of decentralized applications.

Share

Intro

Blockchain and smart contracts running on them are deterministic and isolated by design, meaning they are closed systems that can only access and manage on-chain data and activities. Because of this closed design, they cannot access or retrieve data from external environments (off-chain data).

This closed nature of blockchains is crucial as it ensures the security and trustworthiness of the blockchain. To address this limitation, blockchains and smart contracts require an intermediary to bridge the gap between them and off-chain or real-world data.

Source: Chainlink

Blockchain oracles act as the blockchain’s gateway to the real world, serving as intermediaries by fetching off-chain data and integrating it into blockchain and smart contracts.

On-chain simply means the data, transactions and computation that occurs on a particular blockchain while off-chain refers to data and information stored outside of a blockchain.

Let’s dive deeper.

What are Blockchain Oracles? 

Blockchain oracles are entities or third-party services that provide off-chain or real-world data to smart contracts, thus enabling smart contracts to execute based on real-world inputs and outputs.

Oracles fetch essential data like price feeds, real-world events, or even web APIs for smart contracts.

For example, in a betting protocol where users stake on certain outcomes of sporting events, information about the results of these events is necessary for settling wins or losses. Oracles provide this data to the smart contract.

How blockchain oracles work

Data request:  Smart contracts/dApps send data requests. Each request depends on the nature of the dApp or protocol, but generally, it specifies the desired data and sources.

 

Data collation: Oracles gather real-time data from off-chain sources like websites, APIs, IoT devices, sensors, and human input to inform smart contracts, aiming to incorporate timely and pertinent information.


Data validation and transmission to smart contracts: Information and data are cross-checked and validated to ensure accuracy before being transmitted on-chain to smart contracts, which rely on this data for executing certain actions.

Types of blockchain oracles

  • Inbound and outbound oracles: the direction of an oracle’s data flow determines whether a blockchain oracle is inbound or outbound. Inbound oracles bring off-chain information into the blockchain, whereas outbound oracles transmit on-chain data outside of the blockchain to external parties, such as regular apps, websites, databases, and other blockchains.
  • Centralized oracles: this type gets its data from a single source; this reliance on a single entity creates a single point of failure vulnerability concerning the accuracy of the data being provided.
  • Decentralized oracles: aggregate data from multiple independent sources. They utilize consensus mechanisms and involve multiple node operators to query, validate, and transfer data in a trustless manner. This reduces the chances of inaccuracy and false data while eliminating the single point of failure vulnerability associated with centralized oracles.
  • Hardware oracles: rely on physical devices for external data, such as sensors and other Internet of Things (IoT) devices, enabling the integration of data from tangible devices into decentralized applications.
  • Software oracles: more widely used than hardware oracles because of their versatility as they are connected to the internet and fetch data from various databases, APIs, exchanges and other digital online platforms.

Some Uses Cases of Blockchain oracles 

Depending on the protocol and the nature of the off-chain data required, the uses of blockchain oracles may vary from one protocol to another.

Oracles generally feed dApps with off-chain data from external systems/entities. Some of the ways blockchain oracles can be used include the following:

  • DeFi protocols rely on blockchain oracles to get real-time prices of cryptocurrencies and other digital assets.
  • Results of sporting events or outcomes of any wagered events are supplied to protocols by oracles.
  • Blockchain-based games and lotteries need an element of randomness and unpredictability. This is a challenge due to the deterministic nature of smart contracts which oracles can solve.
  • Blockchain oracles facilitate supply chain management by leveraging external data sources such as GPS sensors and product databases to track and authenticate commodity movements in real-time, mitigating fraud risks and ensuring accurate delivery to designated destinations.

Problems Associated with Blockchain Oracles 

Apart from the single point of failure associated with centralized oracles, other attack vectors arise due to blockchain oracles, especially in DeFi.

Oracle manipulation attack is one example whereby malicious actors try to cause discrepancies in the price of tokens from that of the broader market by exploiting vulnerabilities in the way price oracles provide asset price data to DeFi protocols then take advantage of this inaccuracy and exploit a protocol.

To combat this, it is usually suggested that DeFi protocols use decentralized oracles and audit their systems to eliminate any loopholes.

Closing Thoughts

Blockchain oracles enable smart contract-supporting blockchains to function beyond static ledgers. By providing essential real-world and off-chain information, oracles transform smart contracts into dynamic and adaptable components of decentralized applications. This significantly expands the possibilities of smart contracts and blockchain technology.

GET IN TOUCH

Drop us a line below and we’ll get back to you as soon as possible.

LABRYS HQ

Suite 1, Level 1/299 Coronation Dr Milton (Brisbane) QLD 4064
🇦🇺 Australia

Get exclusive updates and offers!