Did Oracles make Web3 better?

IOSG Ventures
2022-04-06 23:56:39
Collection
If we define blockchain as a trust machine, then oracles can essentially be called machines that maintain and build trust.

Author: Sally, IOSG Ventures

Oracles are often regarded as the bridge and window for on-chain and off-chain data. In short, an oracle is a middleware that provides real-world data services for blockchain projects.

image

Source: IOSG

If we define blockchain as a trust machine, then oracles can essentially be called machines that maintain and build trust. In fact, blockchains themselves do not generate trust; the input of trust comes from oracles. The vast majority of blockchain projects would struggle to survive without access to oracles, akin to walking in the dark without a sense of direction.

It is well-known that blockchain is a closed black box and does not have the capability to initiate network calls. However, smart contracts require third parties to verify data due to consensus mechanisms. To facilitate understanding, we can think of the role of oracles as messengers between two civilizations, similar to the "Sophon" in "The Three-Body Problem" that maintains communication between humanity and the Trisolaran civilization. Only through the data transmission of oracles can smart contracts obtain deterministic information from the internet and the real world, including stock prices, exchange rates, and the final results of presidential elections.

Four Major Categories

Based on form, we can categorize oracles into four types: software oracles, hardware oracles, centralized oracles, and decentralized oracles:

1. Software Oracles

Software oracles connect to the internet and can access and transmit data and information from any third-party server or website in real-time via APIs, such as product prices, weather indices, flight numbers, etc., and write them into smart contracts.

2. Hardware Oracles

Hardware oracles are widely used in IoT as electronic sensors and data collectors. They convert physical events into digital values so that smart contracts can understand them. Barcode scanners, POS machines for bank cards, and medical devices that collect various medical data can all be considered hardware oracles.

3. Centralized Oracles

Centralized oracles are oracles that rely on a single data source, typically provided by trusted third parties such as governments or reputable companies. They can prevent data tampering and loss by separating data from untrusted operating systems on local devices. However, a single centralized data source also poses potential risks to smart contracts.

4. Decentralized Oracles

Decentralized oracles refer to oracles that have a distributed consensus mechanism, also known as consensus oracles. They obtain data from multiple rather than a single external source, making them more reliable and trustless. Based on relevant research theories from Huawei Labs, decentralized oracles can be divided into four categories based on their data processing methods:

  • Aggregation-based processing: Multiple data sources aggregate to eliminate the impact of individual malicious data, e.g., Chainlink
  • Staking-based processing: Requires participants to hold assets to enhance credibility, e.g., Band
  • Game-theory-based processing: Provides non-hostile economic incentives, e.g., NEST
  • Reputation-based processing: Limits hostile nodes by reducing their reputation, e.g., Witnet

Compared to centralized oracles, although decentralized oracles have relatively lower operational efficiency, they solve the single-node failure problem, thus reducing the likelihood of security risks. Due to concerns about risks, most DeFi applications prefer to operate on decentralized oracles.

image

Source: IOSG

Oracles in Web3: More Than Just Infrastructure for DeFi

Based on the above, we have a foundational understanding of the value of oracles in blockchain. However, when discussing the application value of oracles in web3.0, many current studies still adopt an ambiguous tone.

Last year, the Chainlink 2.0 white paper introduced the concept of DON (Decentralized Oracle Network) for the first time. DON is a network maintained by a group of Chainlink nodes that can flexibly guide any oracle service, enabling Chainlink to provide external data to the blockchain through trustless off-chain computation in the near future. To realize this vision, Chainlink has launched a series of products and services such as VRF, Keepers, and CCIP, and the deployment of these services has significantly opened up our imagination regarding the application scenarios of oracles in web3.

image

Source: Chainlink 2.0 White Paper

To better showcase the immense potential of oracles in the future web3 world, we first list several typical use cases for brief explanation, and then we will discuss them in detail according to different application scenarios:

image

Source: IOSG

1. DeFi

While native cryptocurrencies and stablecoins remain mainstream in DeFi today, it is foreseeable that the emerging market based on tokenization of real assets will attract increasing attention. For example, foreigners without legal status in the U.S. may not be able to directly participate in the U.S. stock trading market, but they can achieve similar investment effects by purchasing tokens linked to certain U.S. stocks in the real asset token market. Additionally, users can leverage tokenized properties as collateral to gain greater liquidity.

Another emerging use case for oracles in DeFi is fair sequencing. In the existing trading system, transactions are reviewed and sorted by miners, which leaves them with significant opportunities for arbitrage and manipulation. By utilizing transaction information that is about to be submitted to the mempool but has not yet been on-chain, miners and validators can modify the transaction order to benefit themselves. The term MEV (Miner Extractable Value) is specifically used to describe this phenomenon.

To address such fairness issues, oracles like Chainlink have proposed solutions for fair sequencing services (FSS). FSS aims to help DEXs achieve fair trading by designing deterministic algorithms to prevent MEV, front-running, or any other schemes that lead to transaction chaos. This solution mainly consists of three mechanisms: transaction monitoring, transaction sequencing, and transaction posting. You can quickly grasp the overall concept of FSS through the following diagram:

image

Source: IOSG

2. NFT & GameFi

The issuance mechanism of NFTs and the user experience of GameFi can also be greatly enhanced through oracles linking off-chain external data. A typical use case is random number generation provided by oracles off-chain. For instance, artists can generate NFTs of varying rarity based on verifiable random numbers, ensuring fairness in airdrops. Similarly, game developers can use random numbers to create more diverse combat equipment and battle scenarios.

In theory, random numbers refer to statistically randomly generated numbers, playing an indispensable role in network security, gaming, and scientific simulations, among other areas. The generator that produces random sequences is called a Random Number Generator (RNG). Depending on the nature of the generated random sequences, they can be classified into "True Random Number Generators (TRNG)" and "Pseudorandom Number Generators (PRNG)." TRNGs typically generate true random sequences using uncertain physical phenomena such as noise, chaos, and quantum random processes. PRNGs, on the other hand, are deterministic algorithms that require an external initial value to serve as a seed. Common algorithms include Linear Congruential, Cryptography, ANSI X9.17, Mersenne Twister, etc.

image

Source: IOSG

It is evident that the random numbers generated on the blockchain are all pseudorandom numbers. Moreover, due to the transparency of blockchain content, random numbers generated on-chain are easily susceptible to attacks from dishonest nodes, facing significant security risks. Typically, miners can discard blocks unfavorable to themselves through "Block Withholding Attacks," gaining a relative advantage in gambling. In this case, aside from increasing the cost of miner attacks through repeated hashing, the most convenient solution is to treat oracles as TRNGs, generating verifiable true random sequences through integrated off-chain data, ensuring the confidentiality and fairness of random numbers. At this stage, besides methods proposed by oracles like Randao, such as Commit Except and BLS agreements, the VRF (Verifiable Random Function) provided by decentralized oracles is the most common service. The workflow of VRF can be summarized as follows:

image

Source: IOSG

3. SocialFi & DAO

In some cases, oracles can also serve as Decentralized Identity (DID) tools in the application scenarios of SocialFi and DAOs. By utilizing DON to integrate internet and off-chain activity data, oracles can help users verify and manage their identity credentials in web3, while providing traditional compatibility and privacy protections that conventional DID tools lack. For example, by using oracles to integrate DAO members' off-chain activity participation information and qualification certification information, DAO managers can issue corresponding POAPs (Proof of Attendance) and certify members' capabilities and qualifications.

CanDID is an internal tool that helps DON achieve such functionality. By integrating oracles, CanDID allows users to securely import identities from existing systems and prevents the creation of multiple identities. For instance, Xiao Wang can use his social security personal profile page to generate a protocol certificate proving his social security number. Mechanically, CanDID mainly consists of two subsystems: Identity System and Key Recovery System.

In the Identity System, CanDID can achieve secure identity migration in existing online services such as social media and electronic banking accounts by utilizing two oracles, DECO or Town Crier, without requiring data providers to explicitly create DID-compatible credentials, greatly facilitating the convenience of the credential ecosystem.

In the Key Recovery System, CanDID allows users to utilize existing online authentication solutions to recover keys through a quick and simple workflow. Users can store keys on any device they frequently use and pre-select recovery policies or share them through secret sharing. The specific recovery process can be referenced in the following diagram:

image

Source: CanDID: Can-Do Decentralized Identity with Legacy Compatibility, Sybil-Resistance, and Accountability

In Conclusion

In summary, it can be seen that oracles have opened a new chapter in the web3 era and are ready to transcend past concepts and functions. Although discussions about the emerging applications of oracles in web3 are still relatively scarce, we believe that as technology continues to evolve and web3 gradually engulfs web2, more astute market participants will recognize the potential value of oracles and their significant contributions to web3.

Discover the undiscovered, imagine the unimaginable. In subsequent research, we will delve deeper into the innovative pricing of oracles and cross-chain solutions, along with more emerging use cases and mechanism details.

ChainCatcher reminds readers to view blockchain rationally, enhance risk awareness, and be cautious of various virtual token issuances and speculations. All content on this site is solely market information or related party opinions, and does not constitute any form of investment advice. If you find sensitive information in the content, please click "Report", and we will handle it promptly.
banner
ChainCatcher Building the Web3 world with innovators