Blockchain is an independent operating system built in the real world. Data in the encrypted world is generated and used on the chain, but data in the world outside the chain cannot be directly transferred to the blockchain.

However, in some smart contract usage scenarios, it is necessary to obtain data from the world outside the chain. For example, in some DeFi contracts, the price of external assets is used as a parameter for the operation of the smart contract. In this case, Oracle becomes a necessary tool. The oracle acts as a bridge between smart contracts on the chain and the world outside the chain, enabling smart contracts to obtain off-chain data. Without oracles, smart contracts would be limited to using data generated on-chain and would not be able to leverage external data. As the interactions between various protocols increase and data dependence gradually increases, oracles have become an indispensable infrastructure in the blockchain world.

Although on the surface it seems that oracles solve the problem of transferring off-chain data to on-chain, in fact, what really needs to be solved is the problem of trust. The oracle machine must ensure that the data it provides is recognized and trusted by data demanders through clever design of technology and mechanisms.

Oracle classification

As mentioned above, how to generate trust in the data it provides is the top priority of the oracle.

According to different trust generation mechanisms, oracles can be divided into several different types:

  1. Centralized Oracle

  2. Decentralized Oracle

  3. Alliance Oracle

Centralized Oracle

A centralized oracle is a form of oracle in which a single centralized organization is responsible for providing data. In this oracle model, data demanders need to trust that the centralized oracle organization will not deceive them, because the source and processing of the data are completely controlled by the organization.

There are two implementation mechanisms for centralized oracles:

  1. Authenticity proof mechanism: The centralized oracle machine proves through algorithms and other methods that it is running in a trusted execution environment and that the data provided is real and has not been tampered with. Data users do not need to trust the centralized institution itself, only the technology and mechanisms it uses.

  2. Official oracle provided by the data source: In this oracle mode, the official oracle provided by the data source is responsible for providing data. Usually, these data sources are reliable institutions with good credit and reputation. Data users only need to trust the data source institutions themselves, rather than directly trusting centralized oracle institutions.

The advantages of centralized oracles include:

  • Low cost and high efficiency: Since the data is provided by a single organization, there is no need for coordination and gaming among multiple nodes, which saves a lot of time, improves efficiency, and also reduces the cost of multi-node networks.

  • Simplified design and operation: Since it does not involve the cooperation of multiple nodes, the design and operation of a centralized oracle is relatively simple.

However, centralized oracles also have some disadvantages:

  • Single point of failure: Since data is provided by a single organization, if this organization fails or is attacked, the entire oracle system may collapse or be affected.

  • Security and trust issues: Data users must fully trust the data provided by the centralized oracle organization, otherwise the authenticity and reliability of the data may be questioned.

  • Restricted data range: Since centralized oracles cannot easily connect to other oracles, the data range is limited and may not be able to meet some more complex requirements.

Decentralized Oracle

Decentralized oracles are a form of oracles. Contrary to centralized oracles, they do not rely on a single centralized organization, but use a distributed node network to provide data.

In a decentralized oracle, many nodes form a distributed network and work together to provide data. These nodes ensure the credibility and security of data through economic models, reward mechanisms, and punishment mechanisms. User smart contracts can request data from these nodes, and after a series of coordination and confirmation, the final result data is obtained.

The implementation of decentralized oracles needs to solve the following problems:

  1. Node collusion problem: How to prevent multiple nodes from joining forces to commit evil acts to ensure data reliability.

  2. Data privacy: How to protect the privacy of data during node data transmission and query and prevent the leakage of sensitive information.

  3. Data timeliness: How to reduce the coordination and confirmation time of data between multiple nodes to ensure that data can be transmitted in a timely manner.

  4. Prevent nodes from copying data: How to prevent nodes from fetching data from other nodes directly instead of extracting data from the data source.

The size of the node network of a decentralized oracle will affect the reliability of the data. The data provided by a larger network usually has higher credibility. Therefore, the system usually provides some economic incentives to encourage more nodes to participate in providing data.

Nodes participating in providing services usually need to pledge a part of the tokens. Once a node is found to have committed evil acts, the pledged tokens will be confiscated, which can reduce the possibility of evildoing.

The advantages of decentralized oracles include:

  • High security: Since data is provided by multiple nodes, the risk of single point failure is avoided and the fault tolerance of the system is improved.

  • Decentralization characteristics: It conforms to the decentralized design spirit of the blockchain and is consistent with the blockchain ecology.

  • Trust mechanism: Through economic incentives and punishment mechanisms, the data provided is more credible and enhances users' trust in data.

However, the disadvantages of decentralized oracles also need to be considered:

  • High cost and low efficiency: Due to the need for coordination and cooperation of multiple nodes, the cost of data transmission and processing is relatively high and the efficiency is low.

  • Design complexity: The design and operation of decentralized oracles are complex due to the collaboration and competition of multiple nodes.

Alliance Oracle

The alliance oracle is a special form of oracle. It combines the characteristics of centralized and decentralized oracles, and consists of designated trusted institutions and ordinary nodes to form a node network.

In addition to ordinary nodes, the alliance oracle also includes some specific trusted institutions as nodes. These trusted institutions are usually reputable and credible institutions in the industry, and the data they provide are relatively reliable. The node network ensures the credibility and security of data through a series of mechanisms, and incentivizes and restricts nodes through economic models.

The sources of trust in alliance oracles are relatively complex, including trust in trusted institutions, trust in the collaboration and check-and-balance mechanism of the node network, and trust in the mechanism for selecting nodes by the oracle project side. Data users need to trust that all these relevant parties will not choose to act in a way that harms their credibility because of their own interests.

The node network of the federation oracle may have a certain degree of centralization, but in some scenarios, it can be a reasonable choice. Since the alliance oracle integrates specific trusted institutions as nodes, this oracle model may be more practical in the early stages of some industries or when there are specific data needs.

However, there are also some problems with the alliance oracle:

  1. Identity confidentiality of trusted nodes: The degree of confidentiality of a node’s identity affects whether the node will be blackmailed or bribed, which in turn affects the safe operation of the network.

  2. Self-interest relevance of data: Whether the data provided by trusted nodes has self-interest relevance, which may affect the authenticity and reliability of the data.

  3. Restricted data range: Since the federation oracle relies on specific trusted institutions as nodes, the data range may be limited and cannot meet some more complex requirements.

Representative projects of the oracle track

The following will briefly introduce Chainlink, the leading project in the oracle track, and Banksea, a representative project in NFT oracles.

Chain link

The working mechanism of the oracle machine can be summarized as follows: the user smart contract (User-SC Contract) that needs to use data requests data from the oracle machine contract. After the oracle machine obtains the data from the external data source API, it returns a weighted result to the user after aggregation and processing. Smart contracts.

There are several main roles in this process: data demand side (user smart contract), oracles and off-chain data sources.

Chainlink is a decentralized oracle. After receiving data requirements, multiple nodes in its distributed node network will request data from multiple external data sources, and then each node will send the collected data to the chain. Oracle contract for data aggregation. This contract will review the collected data, remove outliers, and then take an average data and send it to the data demander.

There are three main smart contracts in Chainlink, namely reputation contract, order matching contract and summary contract.

The reputation contract is used to record the historical performance of the service provided by the oracle node; the order matching contract matches the data demander with the appropriate node network solution through the Service level agreement (SLA, Service Level Agreement). The reference factors include node reputation, price, node network The number of nodes, etc.; the summary contract summarizes the data provided by the oracle node and gives the final result data.

By selecting parameters such as price level, network scale, node reputation, etc., the user selects oracle node service providers that meet the needs and determines the SLA proposal. The proposal will be submitted to the order matching contract, and then the selected service provider node will choose whether When bidding, you need to attach a pledge (a certain number of LINK tokens). The pledge is used to prevent nodes from malicious behavior. Once malicious behavior occurs, the deposit will be deducted. When the number of bidding nodes reaches the requirement, new node bids will no longer be accepted, and the final service provider will be selected from the nodes that have previously bid. Deposits pledged by nodes that are not selected will be refunded.

The selected node will collect data off-chain, and finally submit the data received from multiple data sources to the aggregation contract. The aggregation contract undergoes various processing, such as eliminating obviously deviating data, performing weighted calculations, etc. User smart contracts use LINK tokens to pay fees to service provider nodes that provide data.

During the process of nodes providing services, the reputation contract records the node's performance. Mainly includes: the total number of assigned requests (completed responses and incomplete responses); the total number of completed requests, the completion success rate; the total number of accepted requests, the total number of requests accepted by the contract, accuracy; average response time; pledge amount, amount of fine, etc.

Banksea

As an important infrastructure in the NFTFi industry, NFT oracles provide a reference for the valuation and pricing of NFTs in the market and support the development of subsequent financial services.

A typical application scenario is NFT mortgage lending. With the help of NFT oracle data, lending service providers can determine the amount that borrowers can lend, and decide whether the mortgaged NFT needs to be liquidated when the market price changes to stop losses in a timely manner.

According to Banksea’s official white paper, Banksea is a decentralized NFT oracle that integrates functions such as NFT data analysis, NFT valuation and NFT comprehensive risk assessment.

Banksea NFT oracle consists of data aggregator, AI analysis and user interface. Among them, the data aggregator collects and processes raw data, including on-chain data, trading activities on the NFT trading market, user opinions on social media, etc.; AI analysis generates NFT valuation, 24-hour average price, floor price, risk through AI model Valuation and other data are provided to the smart contract; the user interface (Oracle Contract / Banksea API) can output these valuations externally.

In the early days, oracles did not attract widespread attention due to lack of practical application scenarios.

However, as the application of smart contracts gradually increases, various applications such as DeFi and NFTFi flourish, and the demand for interaction between blockchain and the real world is growing, Oracles have gradually become indispensable infrastructure.

Although centralized oracles are low-cost and highly efficient, their design violates the concept of decentralization and has always been questioned in terms of reliability and security. In contrast, although decentralized oracles are slightly less efficient, they can effectively avoid the risk of single points of failure. Competition and balance among network nodes can also reduce malicious behavior.

Ultimately, the core goal of oracles is to solve issues of trust and security. Decentralization is a solution direction, and other innovative products may emerge in the future, let us wait and see. #RWA #Chainlink $LINK