🌑

Hello, friends!

Blockchain Oracle

I often hear people talking about ‘Oracle’ in Chinese (预言机), but it can be challenging to understand its meaning. Is it a mechanism for predicting something? It seemed quite perplexing.

However, upon conducting online research and delving into the details, I discovered that Oracle is actually a mechanism that connects offline data to the blockchain.

Why Do We Need Oracle?

As we know, the blockchain doesn’t inherently connect with the offline world. For instance, if we want to know the price of Apple stock in the stock exchange, the blockchain lacks data related to Apple stock prices. So, how do we bring this external data into the blockchain and ensure its alignment with real-world situations?

Enter the ‘Oracle.’ It functions like an API, bringing offline data onto the blockchain and vice versa. This allows people to use the data for various activities, ultimately recording offline activities on-chain. Returning to the stock example, when the Oracle fetches real-time Apple stock prices, it feeds them to the smart contract. The smart contract, constantly operating and receiving data from the Oracle, can execute certain actions or transactions based on pre-defined rules when the stock price reaches a specific range.

Process

Oracle networks can be centralized or decentralized. Here, I’ll focus on decentralized Oracle networks, such as Chainlink.

In a decentralized Oracle network, numerous nodes collaborate to collect offline data, ensuring its accuracy. Each node is required to pledge a certain amount of tokens. If a node creates a fraudulent event, the pledged tokens will not be returned.

  • Request: Smart contracts initiate requests, and nodes on the network listen for these requests.
  • Fulfillment: Nodes collect data from various offline providers. The results from each node are sent back to the Oracle contract for data aggregation. The Oracle contract verifies the data, eliminates outliers and abnormal data, and computes an average.
  • Response: The final result is then returned to the smart contract.

This decentralized Oracle network, exemplified by Chainlink, provides a robust solution for bringing external data reliably onto the blockchain, enhancing the capabilities of smart contracts.

— Jan 24, 2024

Search