What is an Oracle

An oracle is a price feed (data interoperability) service that acts as a bridge between the blockchain and the outside world. It can transmit off-chain data into the blockchain network, enabling smart contracts to utilize off-chain data; or send on-chain data to off-chain clients, allowing them to take actions based on on-chain information. Mainstream blockchain oracles include Chainlink, UMA Oracle, Witnet, Band Protocol, and others.

Two important components of an oracle are the Oracle Contract and the Oracle Node.

The Oracle Contract is a type of smart contract. It receives data requests from other smart contracts on-chain, forwards these requests to oracle nodes, and upon receiving feedback from the oracle nodes, broadcasts the data results to the requester.

The Oracle Node is the off-chain component of the oracle service. It obtains and verifies information from external sources and transmits the data to the Oracle Contract.

Importance of Oracles

The on-chain environment is a closed system; smart contracts cannot access networks or information outside the blockchain. Because off-chain data sources are manipulable, opaque, and can be tampered with, this makes it difficult for blockchain nodes to reach consensus, which in turn affects the security of the blockchain network.

For example, suppose a smart contract needs to execute a transaction based on the current ETH-USD exchange rate, obtained from a traditional price API. Data from different sources may be inconsistent (not to mention that APIs can be deprecated or hacked), meaning nodes executing the same contract code might produce different results. This could lead to a failure to reach consensus across the network, weakening the value of the blockchain as a decentralized computing platform.

Therefore, it is crucial for blockchain that when a smart contract inputs a specific value, it produces a unique, consistent result.

Additionally, on-chain smart contracts need to combine with off-chain data to enable various applications, such as prediction markets, insurance, and more.

To address these issues, oracles upload and store external data on the blockchain. Since on-chain data is immutable and publicly accessible, on-chain nodes can securely use off-chain data to execute transactions without compromising consensus.

Applications of Oracles

Lending

For decentralized lending markets, protocols need to know the current market price of assets (e.g., ETH) to determine the value of user collateral. This allows them to assess a user’s borrowing capacity and check whether their positions are safe.

Insurance

When users file claims, insurance protocols require on-chain/off-chain data to verify whether insurable events have occurred. For example, when certain weather phenomena happen, the insurance protocol needs to pay compensation to users who purchased crop insurance. Weather data in this case is provided by the oracle.

Cross-Chain Oracles

Cross-chain oracles refer to oracles that read and write information across different blockchains. They provide middleware for blockchain protocols, enabling them to connect to any blockchain without spending extra time and development costs. #预言机#oracle **$ORCA **$CORE **$NAORIS **

LINK-0,29%
UMA-1,9%
BAND-1,02%
View Original
This page may contain third-party content, which is provided for information purposes only (not representations/warranties) and should not be considered as an endorsement of its views by Gate, nor as financial or professional advice. See Disclaimer for details.
  • Reward
  • Comment
  • Repost
  • Share
Comment
0/400
No comments
  • Pin

Trade Crypto Anywhere Anytime
qrCode
Scan to download Gate App
Community
  • 简体中文
  • English
  • Tiếng Việt
  • 繁體中文
  • Español
  • Русский
  • Français (Afrique)
  • Português (Portugal)
  • Bahasa Indonesia
  • 日本語
  • بالعربية
  • Українська
  • Português (Brasil)