How does oracle make Web3 a better place?

Oracle:trust builder

Oracle is usually reckoned as the bridge and window of on-chain and off-chain data. In short, oracle is a middleware providing real-world data services for blockchain projects.

Source: IOSG
Source: IOSG

If we recognize the definition that blockchain is the trust machine, then oracle can be essentially referred to as the trust-maintenance machine. As a matter of fact, the trust generated by blockchain itself is usually not sufficient to support all the demands of upper layer applications. More trust is needed to be fed in from the oracle and the vast majority of blockchain projects cannot survive without oracles because it will directly make them blind.

As we all perceive, blockchain is a closed black box with no capability to initiate network call, but smart contracts are required to validate the data by third-party according to the consensus mechanism. To use a simple analogy, the role oracle played is the ambassador between two civilizations, like “Sopho” between the humans and the three bodies in “The Three-body Problem ”. Only by the data feed of oracle can smart contracts access the deterministic information from the Internet and real world, including the stock price, exchange rate, final results of presidential election, etc.

Family tree

In terms of format, oracles can be classified as software oracle, hardware oracle, centralized oracle and decentralized oracle:

1.Software Oracle

Software oracle is connected to the Internet and can access, transmit and input data and information from any third-party servers or websites by API, such as commodity prices, weather index, flights number, into smart contracts in real-time.

2.Hardware Oracle

Hardware oracle is widely adopted in IoT, working as the electronic sensor and data collector. It transfers physical events into digital values so that smart contracts can understand them. Barcode scanners, bank card POS machines, medical equipment for collecting all kinds of medical data, etc can all be identified as hardware oracles.

3.Centralized Oracle

Centralized oracle is a type of oracle with single-source data, usually backed by trustworthy third-party like government or reputable corporations. It can make data tamper-proof and loss-proof by separating data from untrusted operating systems of local equipment. Yet the sole source of data also brings certain vulnerabilities towards smart contracts.

4.Decentralized Oracle

Decentralized oracle refers to an oracle with a distributed consensus mechanism, also known as consensus oracle. It is more reliable and trustless since it achieves data from multiple external sources rather than a single source. Regarding to the data processing methods, decentralized oracles can be categorized into 4 sectors based on the theory of Huawei Lab:

  • Aggregation-based processing: It eliminates single malicious data impact by multi-data source aggregation, i.e. Chainlink
  • Staking-based processing: It requires participants to hold assets for greater credibility, i.e. Band
  • Game-theory-based processing: It provides non-adversarial economic incentives, i.e. NEST
  • Reputation-based processing: It restricts adversarial nodes by reducing their reputations, i.e. Witnet

Compared with centralized oracle, decentralized oracle is less likely to bring security risks since it defused the sing-node failure issue, though its operation efficiency is relevently lower. Most DeFi applications prefer running on decentralized oracle based on such concerns.

Source: IOSG
Source: IOSG

Oracle in web3.0: Transcending DeFi infra

Based on the cognition above, we have an essential understanding towards the significance of oracle adopted in blockchain. But when it comes to the application value of oracle in web3.0, we are somehow still viewing it through a blurred lens.

Last year, the concept of DON (Decentralized Oracle Network) was first introduced in the Chainlink2.0 whitepaper. DON is a network maintained by a group of Chainlink nodes and can bootstrap any oracle services flexibly, so that in the near future Chainlink would be able to provide external data to the blockchain via completely trustless off-chain computation. To realize this vision, Chainlink has launched a series of products and services such as VRF, Keepers, CCIP and the deployment of those services opened up our imagination to the application scenarios of oracle in web3 to a large extent.

Source: Chainlink 2.0 Whitepaper
Source: Chainlink 2.0 Whitepaper

To better demonstrate the immense potential of oracle in future web3 world, we briefly illustrate here with a few examples and discuss them based on different scenarios:

Source: IOSG
Source: IOSG

Defi

Though nowadays native cryptocurrency and stable coins are the mainstream in DeFi, predictably a novel market based tokenized real-world assets will be more and more appealing. For example, foreigners without legal identity in the US in such scenarios are able to purchase tokens pegged to certain US stocks. Also, users can extract liquidity by mortgaging tokenalized properties.

Another emerging usecase of oracle in DeFi is the fair sequencing. In the existing transaction regime, transactions are censored and ordered by the miners, which leaves great arbitrage and manipulation space to make use of. By exploiting information about upcoming transactions submitted to the mempool but not yet on-chain, miners and validators can modify the transaction sequence to benefit themselves. The term MEV(miner extractable value) is consequently generated to describe such phenomena.

Hence, to sort such issues out, oracles like Chainlink has developed certain solution called Fair Sequencing Services (FSS). FSS is poised to help DEX achieve fair transactions by designing deterministic algorithms so as to prevent MEV, front-running or any other schemes causing transaction disorder. It mainly consists of three sections: transaction monitoring, transaction sequencing and transaction posting. You can get a quick peek at the FSS mechanism via the schematic below:

Source: IOSG
Source: IOSG

NFT & Gamfi

The NFT issuing mechanism and gamefi user experiences can also be enhanced significantly by the adoption of oracle. A typical usecase is the generation of verifiable random numbers based on the off-chain external data. In one case, artists could generate NFTs with varying rarity based on a verifiable random number and ensure fairness in airdrops. In another, game vendors could also use random numbers to generate more diversified combat gear and battle scenarios.

Academically speaking, random numbers are usually recognized as statistically randomly generated numbers, playing an integral role in cyber security, games, scientific simulations and many other critical fields. The generator that produces random sequences is called Random Number Generator (RNG). According to the nature of the random sequences generated, it can be divided into two categories: True Random Number Generator (TRNG) and Pseudorandom Number Generator (PRNG).

TRNG generally utilizes uncertain physical phenomena such as noise, chaos, and quantum stochastic processes to generate true random sequences. Whereas, PRNG is a definitive algorithm that requires an initial external input to act as seed. Algorithms including Linear congruential, Cryptography, ANSI X9.17, Mersenne twister, etc. are relatively popular ones.

Source: IOSG
Source: IOSG

Apparently, the random number generated on-chain is the pseudorandom number. Also, given the transparent nature of blockchain content, random numbers generated on-chain are prone to be attacked by dishonest nodes and thus face considerable security risks. Typically, miners can gain comparative advantages in gambling by dropping unfavourable blocks through “Block Withholding Attacks”.

Apart from boosting the cost of miner attacks through repeated hashing, the most expedient solution is to employ oracle as a TRNG to produce verifiable true random sequences by integrating off-chain data, and so as to ensure the confidentiality and impartiality of random numbers. At current stage, except approaches like Randao’s Commit Reveal and BLS contract, the VRF(Verifiable Random Function) provided by decentralized oracles are the most common services, which can be simply demonstrated in the following workflow:

Source: IOSG
Source: IOSG

SocialFi & DAO

In some cases, oracle can also act as a Decentralized identity (DID) tool in application scenarios of socialfi and DAO. By summoning DON to assemble Internet and off-chain activity data, users are empowered by oracles to verify and manage their own identity credentials with legacy compatibility and privacy preservation. For example, by integrating off-chain information on the activities participation and accreditation of DAO members via oracle, DAO administrators are capable to issue the corresponding POAP (proof of attendance protocol) and certify the competence qualifications of members.

And CanDID is the inside tool that helps DON to realize such functions. By adopting an oracle, CanDID allows users to import their identities from existing systems securely and prevents the possible duplication of identities. For instance, Alice and Bob can use their Social Security Profile pages to generate a certificate attesting to their Social Security numbers. In terms of mechanism, CanDID is mainly composed of two subsystems: identity system and key-recovery system.

In the identity system, CanDID can enable secure identity migration across existing web services such as social media, e-banking accounts, etc. by leveraging oracles especially like DECO or Town Crier. Additionally, CanDID doesn’t require data vendors to explicitly create DID-compatible credentials, which tremendously facilitates the convenience of the credential ecosystem.

In the key-recovery system, CanDID allows users to exploit existing network authentication schemes to recover keys through agile and simple workflows. Users can store keys on whatever device they use regularly and pre-select recovery policies and pre-store them via secret-sharing. The brief recovery process is shown in the following figure:

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

Looking forward

To conclude, it’s well perceived that oracle has opened a new chapter in the web3 era, ready to go beyond its restricted envision and obsolete functions. Whilst discussion on oracle’s burgeoning applications in web3 is still sparse, we expect that as the technology continues to evolve and crypto gradually engulfs the world, more and more savvy players will acknowledge the potential value of oracle and its significant contribution to web3.

Discover the undiscovered. Imagine the unimagined. More usecases and scenarios like data feeding innovations, and cross-chain solutions will be elaborated in our subsequent research.

(Acknowledgements: Chainlink China)

Subscribe to IOSG Ventures_EN
Receive the latest updates directly to your inbox.
Verification
This entry has been permanently stored onchain and signed by its creator.