What is Blockchain Oracles and What Do They Do?

CCxF...FNZy
7 Jan 2024
72


Blockchain technology and crypto assets play an important role in creating a secure decentralized financial ecosystem. Blockchain has succeeded in becoming the foundation for various new sectors such as decentralized financial applications (DApps). However, one of the big drawbacks of blockchain is that it cannot be directly connected to an external network. This weakness brings limitations to various applications that require external data sources. Blockchain oracles is a protocol that solves this problem. So, what are blockchain oracles? How does blockchain oracles work ? We will discuss it in full.

Article Summary


  • 🧠 Blockchain technology has the significant drawback of not being able to interact with external data and systems, which limits its potential in various applications.
  • 🔮 Oracles such as Chainlink and Pyth Network capture and display external data into the blockchain ecosystem , enabling the execution of smart contract- based functions with precise and secure data.
  • ⛓️ Chainlink is the largest blockchain oracles protocol that provides decentralized solutions for off-chain data integration and offers a variety of innovative products such as VRF and smart contract automation .
  • ⚖️ Alternatively, Pyth Network provides a decentralized solution built using the Solana codebase , enabling faster and more cost-efficient off-chain data integration .
  • 🚀 In the context of the ever-evolving crypto ecosystem, blockchain oracles are a critical element that enables applications such as DEX and DeFi to function with accurate and secure real-time data.


What is Oracle Blockchain?

Blockchain oracles play an important role in connecting the blockchain to the real world. Source: Chainlink.


Blockchain oracles are protocols that are tasked with retrieving, verifying and displaying data from outside the blockchain (off-chain) to the blockchain ( on-chain ) . Oracle is a bridge between the blockchain ecosystem and external data. So, oracles facilitate interaction between the blockchain and whatever external systems it requires.

With oracle, various non- blockchain data can be connected to the blockchain ecosystem easily. The oracle protocol eliminates the significant drawbacks of blockchain technology while bringing many advantages to users. Oracle opens up new possibilities for blockchain.

The majority of blockchain and crypto applications utilize the Decentralized Oracle Network (DON). DON can display data from external networks in real-time to the blockchain in a decentralized and secure manner . The two most popular DON protocols currently are Chainlink and Pyth.

Why Does Blockchain and Crypto Assets Need an Oracle?


As explained, blockchain cannot interact with systems and data outside its ecosystem. Blockchains are purposely isolated from external systems to make them more resistant to hacking and attacks . However, this greatly limits the blockchain ecosystem's interactions with external systems.

Blockchain oracles are a solution to bridge different systems. Oracle ensures that smart contract applications can have access to a variety of external data that is accurate and secure. Crypto-based applications usually retrieve external data such as global crypto asset prices, stock prices, weather data, property markets, and so on.

Blockchain Oracles are also needed to create agreement and equality over off-chain data. On the other hand, oracles also play a role when a crypto application carries out a series of instructions that impact external data. For example, DeFi applications require equivalent price data to execute exchange, lending, and buying and selling transactions.

Blockchain oracles have become an important part of various sectors in the crypto industry. DEX applications like UniSwap or GMX utilize oracles to display accurate and aligned prices. DeFi lending protocols also leverage oracles to update price data in real-time. Without oracles, many crypto applications cannot perform their functions.

How Blockchain Oracles work?

How decentralized oracle blockchain works . Source: Chainlink.


So, how does blockchain ensure that the data it pulls is not manipulated, accurate, and secure? How does blockchain always connect to external data? These two questions are commonly referred to as The Oracle Problem.

blockchain oracles needs to fulfill three conditions, namely accuracy, availability, and incentive mechanisms . Precision and availability ensure that off-chain data is accurate and can always be retrieved by smart contracts on the blockchain. The terms of the incentive mechanism relate to the accountability of off-chain data providers. An oracle needs to have an incentive mechanism to reward or penalize off-chain data providers.

Blockchain oracles fulfill the three requirements above by using various protocol designs. Most decentralized oracles have a similarity in their network architecture in that they rely on off-chain nodes and on-chain contracts . Nodes have the task of fetching data off-chain from data providers and passing it to users (in this context applications). Meanwhile, the on-chain component of the oracles blockchain is the oracles smart contract itself.

Each oracles assigns different tasks to its smart-contract . This contract forwards data requests from the application to the nodes and feeds it back to the application. Contracts are also usually tasked with aggregating (combining) data and aligning it for applications.

In displaying data, blockchain oracles are generally divided into two models:

  • Push model : This oracle model pushes data from off-chain nodes constantly to applications that need it. The push model is most commonly implemented but has significant costs (especially on chains like Ethereum) because the data must be displayed without delay.
  • Pull model : The oracle pull model displays data off-chain based on the needs of the applications that use it. The application pulls data by sending a message to the oracle contract which will be forwarded to the data provider.


The Two Most Popular Blockchain Oracles in Crypto


1. Chainlink

Chainlink Ecosystems


Chainlink is the largest and most popular oracle blockchain protocol in the crypto industry. This project has been around since 2014 and was the first protocol to create a Decentralized Oracle Network (DON) for blockchain. Chainlink already has more than 984 oracle networks, is connected to 17 blockchains and 1871 crypto projects, and transmits 10.3 billion pieces of data .


With so many oracles , Chainlink's network architecture is highly decentralized. The Chainlink oracle model is a push model that can be combined or replaced with a pull model. However, the push model remains Chainlink's primary way of displaying data off-chain.

Chainlink is proven to have a secure oracle network infrastructure because it has never been hacked or successfully attacked. Chainlink's security makes it the oracle network that is the first choice of many crypto projects.


To reduce the high cost of the push model, Chainlink released an Off-Chain Reporting (OCR) update. OCR reduces Chainlink node operator costs by as much as 90% by moving complex computations from on-chain to off-chain . So, intensive calculations such as data aggregation are done off-chain by Chainlink's DON. The latest version of OCR (2.0) also connects Chainlink's network of operator nodes , creating the foundation for CCIP ( Cross-Chain Interoperability Protocol) features.

Apart from carrying out the general functions of an oracle such as sending data off-chain and displaying price data in real-time, Chainlink has several other innovations. Chainlink's two innovative products are VRF ( Verifiable Random Function) and smart contract automation.

Chainlink VRF has become an industry standard as a protocol for conducting random number generators (RNG) or randomization . This feature is used by many projects for lottery randomization and mechanisms that require RNG such as NFT minting , loot boxes, and random elements in blockchain-based games. VRF is used by Axie Infinity, NBA Topshot, and AAVEGotchi.

Meanwhile, automation is a Chainlink product that provides smart contract instruction automation services that require off-chain data . Smart contract automation allows developers to trigger certain functions automatically. For example, an application will automatically mint NFTs after a user stakes a certain amount or triggers the liquidation of a loan whose collateral value no longer meets the requirements.

Chainlink has become the industry standard for decentralized oracle network services . Currently, Chainlink is focusing on building an economy that revolves around its LINK token and DON ecosystem. In addition, the CCIP Chainlink protocol will open up opportunities for various traditional financial institutions such as banks who want to enter the blockchain ecosystem.

2. Pyth Network


Pyth Network Visualize


Pyth Network is a decentralized oracle blockchain built using the Solana software framework . The Pyth project was created in 2021 and initially only provided oracle services on Solana. Now, Pyth has its own network called Pythnet and provides oracle services to 16 blockchains, is connected to more than 90 data providers, and is used by around 200 applications.

The Pyth network infrastructure has two important components, namely publishers (data providers) and oracle programs. Publishers are tasked with sending data to oracle programs in Pythnet and Solana which work in tandem. Then, the Pyth oracle program combines all the incoming data and sends the data with a certain confidence interval to the application that needs it.

Pyth, in contrast to Chainlink, does not directly send price data in exact numbers. Pyth uses confidence interval (CI) because it considers it more realistic and appropriate for liquidity in many applications and blockchains. So, an ETH price at $1,500 with a CI of 97.7% would show a price range between $1,485 and $1,515.

Pyth leverages the Pythnet blockchain network to send data to all blockchains except Solana because Pyth installs a custom oracle network on Solana. Then, there is one main differentiating aspect between Pyth and Chainlink. Pyth does not have a network of off-chain data providers. All Pyth off-chain data providers are on Pythnet and Solana . Additionally, because Pythnet is built on the cheap and fast Solana blockchain framework , all computing can be done directly on-chain.

Another fundamental difference between Pyth and Chainlink is that Pyth uses a pull model that utilizes the Wormhole cross-chain messaging protocol . Retrieval of Pyth oracle data is carried out based on requests from the application via messages sent via Wormhole. The Pyth Oracle program then verifies all incoming messages before sending them back.

The combination of the pull and Wormhole models makes Pyth have fast performance in displaying data . Pyth is able to provide high update frequency with more efficient transaction costs. In contrast to Chainlink which has many products, Pyth focuses on providing accurate and real-time price data .

Conclusion


Blockchain technology has formed the basis for the development of a number of decentralized financial sectors and applications. However, blockchain's main drawback is its inability to interact directly with systems and data outside its ecosystem. Blockchain oracles address this problem by retrieving, verifying, and delivering external data to the blockchain , bridging the gap between on-chain and off-chain data . Oracle enables smart contract- based applications to execute their functions with precise and secure external data.

Chainlink and Pyth Network are two leading oracle protocols that provide decentralized solutions for off-chain data integration . Chainlink, as a pioneer and industry leader, offers a wide range of innovative products and has a proven reputation for security and reliability. Pyth, built on the Solana framework , is an alternative solution that offers speed and accuracy of captured data.

Thanks For Reading


Read other articles here :

Write & Read to Earn with BULB

Learn More

Enjoy this blog? Subscribe to 0xDiablo

15 Comments

B
No comments yet.
Most relevant comments are displayed, so some may have been filtered out.