What is a Blockchain Oracle?

What is a Blockchain Oracle?

Blockchain Basics Series [ 3/ 8 ]

Definition: Blockchain oracles are entities that connect blockchains to external systems, thereby enabling smart contracts to execute based on inputs and outputs from the real world.

1️⃣ What Is an Oracle Network?

Oracles provide a way for the decentralized Web3 ecosystem to access existing data sources.

Decentralized Oracle Networks (DONs) enable the creation of hybrid smart contracts, where on-chain code and off-chain infrastructure are combined to support advanced Decentralized Applications (dApps) that react to real-world events and operate with traditional systems.

2️⃣ Solving the Oracle Problem

The Blockchain Oracle Problem outlines a fundamental limitation of smart contracts—they cannot inherently interact with data and systems existing outside their native blockchain environment. Resources external to the blockchain are considered “off-chain,” while data already stored on the blockchain is considered "on-chain".

Blockchain oracle mechanisms using a centralized entity to deliver data to a smart contract introduce a single point of failure, defeating the entire purpose of a decentralized blockchain application. If the single oracle goes offline, then the smart contract will not have access to the data required for execution or will execute improperly based on stale data.

3️⃣ Types of Blockchain Oracles

Not only do hybrid smart contracts need various types of external data and computation, but they require various mechanisms for delivery and different levels of security. Generally, each type of crypto oracle involves some combination of fetching, validating, computing upon, and delivering data to a destination.

  1. Input Oracles

    The most widely recognized type of oracle today is known as an “input oracle,” which fetches data from the real-world (off-chain) and delivers it onto a blockchain network for smart contract consumption.

  2. Output Oracles

    The opposite of input oracles is “output oracles,” which allow smart contracts to send commands to off-chain systems that trigger them to execute certain actions. This can include informing a banking network to make a payment and telling a storage provider to store the supplied data.

  3. Cross-Chain Oracles

    Another type of oracle are cross-chain oracle that can read and write information between different blockchains. Cross-chain oracles enable interoperability for moving both data and assets between blockchains, such as using data on one blockchain to trigger an action on another or bridging assets cross-chain so they can be used outside the native blockchain they were issued on.

4️⃣ Applications of Oracles in Blockchain

  1. Decentralized Finance (DeFi)

    A large portion of the decentralized finance (DeFi) ecosystem requires price oracles so smart contracts can access financial data about assets and markets. For example, decentralized money markets use price oracles to determine users’ borrowing capacity and check if users’ positions are undercollateralized and subject to liquidation.

  2. Dynamic NFTs

    A large portion of the decentralized finance (DeFi) ecosystem requires price oracles so smart contracts can access financial data about assets and markets. For example, decentralized money markets use price oracles to determine users’ borrowing capacity and check if users’ positions are undercollateralized and subject to liquidation.

    dynamic NFTs—Non-Fungible Tokens that can change in appearance, value, or distribution based on external events like the time of day or the weather.

5️⃣ What is the Blockchain Oracle Problem?

The Blockchain Oracle Problem refers to the inability of blockchains to access external data, making them isolated networks, akin to a computer with no Internet connection. Bridging the connection between the blockchain (on-chain) and the outside world (off-chain) requires an additional piece of infrastructure—an oracle.

That's it for this time around folks.

See you in the next one.