Overview of the Blockchain Oracle
Blockchain "oracles" are third-party services that provide various real-world information to blockchain programs (smart contracts). Just as typical applications work by obtaining various data from APIs and other sources, blockchain applications (DApps) need data that is outside of the network (off-chain). However, Oracle itself is not the source of the data. It is a layer that "verifies" the source of the data and passes the verifiable information to the smart contract.
Data Suorce of Oracle
There are three main sources of information in oracle.
・Humans (Analog Data)
・IoT (Internet of Things) Devices
・API (Application Programming Interface)
When we say human, we mean data generated and processed by humans. Such examples are survey results from questionnaires or documents typed by humans. This way we can acquire a wide range of data that cannot be obtained from IoT devices or APIs. However, the possibility of human errors, such as typos and manipulations remain as a risk.
IoT devices are devices that are connected to the Internet, such as sensors, cameras, displacement meters, and can automatically send various types of information. The information obtained from IoT devices is accurate and precise, making them a highly reliable source of information. However, device malfunction or damage may occur, so there is a cost for maintenance.
API is a method of passing various kinds of information that exists on the Internet in a certain format. APIs can be used to obtain a variety of data in formats such as CSV, XML, and JSON, etc. When creating a new application, APIs make it possible to obtain the data necessary for the program from the outside with a simple implementation. However, if the API provider changes its specifications, the program code must be changed accordingly, resulting in a certain level of maintenance and operation costs.
Oracle is a bridge of data
This section describes the features of oracle from the perspective of information flow and governance.
1. Oracle is not just inbound
Oracle can be divided into two functions: inbound, where external sources are verified and input into the smart contract, and outbound, where data passed from the smart contract is verified and output. However, usually when we say oracle, they have a strong inbound nuance. Oracle cross checks input and output to ensure that data is transferred correctly between off-chain and on-chain, and they act as a bridge between real and blockchain.
2. Decentralized oracles have many challenges
Oracle can be divided into two types: centralized and decentralized. In centralized type, a single individual or group/organization verifies the accuracy of the information source and passes it to the smart contract. Naturally, this type has a risk of falsification or hacks.
Therefore, projects such as Chainlink, which we will discuss later, are working on decentralized oracles. However, models in which multiple actors verify the accuracy of information sources still face a variety of challenges and have yet to become widespread. For example, it is difficult for verifiers to unanimously agree on what constitutes correctness when they want to verify certain information.
Case studies of decentralized Oracle
Here we introduce Chainlink and The Graph, the two case studies of decentralized oracles. Both projects have achieved high reputations and expectations from the market.
1. Chainlink
Chainlink (LINK) is a decentralized oracle officially released on the mainnet in May 2019. Oracle nodes that validate information sources are decentralized and receive a native token LINK as a reward for validating data. Anyone can be an oracle node, but the evaluation system and penalties are designed to make malicious behavior difficult. A recent scalability upgrade, Off-Chain Reporting, will reduce oracle operation fees (gas costs) by 90%. Chainlink oracle has a variety of use cases mainly in De-Fi space and is listed in Japanese exchanges as a promising project.
2. The Graph
The Graph (GRT) is a decentralized protocol for indexing and querying data in blockchain. In a public blockchain like Ethereum, data for transactions and smart contracts can be viewed by anyone. However, in many cases, retrieving those data requires engineering knowledge, which could be a burden to non-experts. The Graph enables anyone to create and publish an API called a subgraph, which service developers can refer to data by executing a query called GraphQL. This means that once a subgraph is created, it is possible to easily obtain necessary data by setting arbitrary variables and executing GraphQL at any time. Alternatively, you can use a subgraph created by someone else. The Graph is already being used by popular projects, such as Uniswap, Synthetix and Decentraland. We look forward to its future development as a new infrastructure in the blockchain world.
Why is Oracle important in blockchain?
So here is a recap of blockchain oracle. Without oracle, many of the smart contracts will not function. Today, many oracles are centralized and do not fit with the Web 3.0 philosophy. Therefore, we can expect decentralized oracles to increase in the future, such as Chainlink that we introduced in the case study.