SevenX Ventures Understanding the Concepts and Differences of zkOracle and zkCoprocessor in One Article

SevenX Ventures A Comprehensive Guide to Differentiating zkOracle and zkCoprocessor

Author: Hill, SevenX Ventures Research; Translator: 0xjs@LianGuai

0. Introduction

In this article, we will explore the concepts of zkCoprocessor and zkOracle, which have recently gained popularity, and compare their differences.

1. Definition of zkCoprocessor

When a term is created, its true meaning is not defined by itself. We have seen many such cases in the example of blockchain.

We see a similar phenomenon in the term zkCoprocessor. Everyone uses this term, but they may not be referring to the same thing.

So, we want to express the project’s own view of zkCoprocessor, the community’s understanding of zkCoprocessor, and the true meaning and role of zkCoprocessor from our perspective.

a) From the project itself

Axiom’s definition 1: zkCoprocessor proves historical data on-chain.

The concept of zkCoprocessor was popularized by Axiom, initially envisioned as zkAttestor. From Axiom’s perspective, zkCoprocessor represents a component that “proves historical data on-chain and allows the use of that data in smart contracts without trust.”

Please note that the Brevis team states that this type of zkCoprocessor is essentially an API/DSL layer on top of underlying zk circuits. So, it is not programmable.

RISC Zero’s definition 2: zkCoprocessor offloads computations from on-chain to off-chain.

RISC Zero also often refers to itself as zkCoprocessor. From their perspective, they see zkCoprocessor as a broader concept, “a tool that offloads computations from on-chain to off-chain using ZKP”. X3vGxi9CDvZEk9C0SEPgvDHpITilOcZb33RiWk0T.png

b) From the community

Peteris’ definition (same as 1): zkCoprocessor can access historical on-chain states.

Peteris from Aera Finance believes that zkCoprocessor functions very much like an oracle, with its primary function being to access historical data. At the same time, both he and Rishabh from BananaHQ believe that the description of definition 2 sounds more like zkVM, rather than a subclass of zkCoprocessor.

Messari, Modular Media, and Kobi’s definition (same as 2): zkCoprocessor offloads computations from on-chain to off-chain.

Messari also provides its own definition of zkCoprocessor. Sami, a researcher at Messari, believes that zkCoprocessor allows smart contract developers to easily offload complex logic off-chain without requiring new trust assumptions. Modular Media also presents the same concept. Kobi from Geometry compares rollup with coprocessor, and Brevis adds that zkCoprocessor balances the cost of maintaining permanent state storage with greatly improved performance. Taiko proposes the design of Booster Rollup, further exploring the idea of Rollup Coprocessors. These align with the definition of RISC Zero. FJ0e2a7byA8rWWnHFSIB7bPWwOVdcP6ZKf6litFr.png

c) From us

In conclusion, we have identified two types of zkCoprocessors in practice, as follows:

  • Data access zkCoprocessor: mainly feeds certain data (historical blocks, historical states) to a certain location (smart contract).

  • zkVM computation zkCoprocessor: computed by off-chain zkVM and then the result is fed back to the chain. It compresses O(n) calculations into O(1) verifications.

vdgIjXoRIv2Wkp4XWuU35hIx3TJXOWuzryNv7epL.png

2. Definition of zkOracle

a) Oracle

Hyper Oracle provides us with an explanation of Oracle in Defining zkOracle for Ethereum.

Oracle actually summarizes the “infrastructure” in any blockchain space, as a better definition than the Copocessor.

If the input of the infrastructure/oracle is off-chain data and the output is on-chain data, it is an input oracle (such as Chainlink Price Feed). Conversely, if it is an output oracle (such as The Graph). If the output oracle comes first, followed by the input oracle, it is an I/O oracle (such as Gelato Network).

3o6zeGgESVrFw5o23JVn1K62PmmXMeoz0RWKH9L4.png

In summary, the concept of oracle is very similar to the Coprocessor, but the Coprocessor has both data access and computation characteristics.

b) zkOracle

Using Hyper Oracle as an example, what is the relationship between zkOracle and zkCoprocessor?

The zkOracle discussed in Defining zkOracle for Ethereum actually has the functionality of two zkCoprocessors.

JaXidZqJAxOx1qh5Tgqw5t1p2gLMBqNsvqy3ycZN.png

For example, zkOracle like Hyper Oracle:

  • Access historical data in a trustless manner.

  • Can perform programmable computations.

3. zkCoprocessor and zkOracle

When we directly compare the two types of zkCoprocessors with zkOracle, we can see that zkOracle has all the functionalities of zkCoprocessor:

  • Asynchronous processing of smart contracts

  • Interoperability with existing applications on L1 or L2 and enhancing their functionalities

  • Offloading computations in resource-constrained systems

By direct comparison, zkOracle is a more end-to-end solution that can provide developers with a more comprehensive tech stack.

The two types of zkCoprocessors have expanded in their respective vertical areas. For example, data access zkCoprocessor unlocks cross-chain scenarios, while zkVM computation zkCoprocessor represents zk rollup based on zkVM.

4. Building with zkCoprocessor or zkOracle

Which one should you choose when building?

According to the step-by-step order, we can make some decisions about building applications.

a) Pure Smart Contract DApps
Firstly, a pure Solidity implementation of smart contracts is still a very good choice. Although pure smart contracts may not provide some of the best novel features, they are still sufficient in certain scenarios. Furthermore, the current availability of Arbitrum Stylus unlocks many new applications through pure smart contracts.

b) DApps that require richer data access
In many cases, developers may want to use data access zkCoprocessor or zkOracle to access richer data sources in smart contracts.

In this scenario, if data access zkCoprocessor is used alone, the computation is still handled within the smart contract. The role of zkCoprocessor is to reduce the complexity of traditional methods of obtaining data, rather than making the computing power of smart contracts stronger.

In this scenario, we see many small projects related to data, rather than mature DApps in the traditional sense:

– Using zkCoprocessor Axiom: better LP management, MEVictim rebates
– Using zkOracle Hyper Oracle: Uniswap v2 prices, OpenSea transaction activities, USDT trading volume monitoring

c) DApps that require a large amount of computation
Generally, some complex algorithms cannot be directly computed on-chain. For games, the computation logic is very complex, such as with etherquake and GameOfLife, where one step costs $2000. Or complex algorithms related to machine learning are not possible to run on-chain. Therefore, we need zkVM zkCoprocessor or zkOracle to run the computation off-chain and then submit it to the chain in the form of ZKP (Zero Knowledge Proof).

In this example, we can see some of their infinite computational potential:

– Using zkCoprocessor Bonsai: Zeth (prove Reth in zkVM), zk-sentiment
– Using zkOracle Hyper Oracle or zkWASM: zkGo (prove L2-Geth in zkVM, Type-0 zkEVM), zkAMM

d) Full-featured next-generation DApps (DeFi 3.0)
Finally, we discuss applications built solely using zkOracle. Taking DeFi applications as an example, a complete DeFi is very complex. Next-generation DeFi applications, or DeFi 3.0 DApps, will require:

– Richer data access
– Unrestricted computation
– Autonomy (for liquidation, parameter updates, protocol governance)

We have discussed how zkOracle can share the functionality of two zkCoprocessors while meeting the first two functional requirements. How zkOracle achieves autonomy, and how zkCoprocessor does not achieve autonomy?

So what does it mean for zkCoprocessor to lack autonomy:

  • Lack of decentralization

  • Risk of potential complex mechanisms

  • Developer psychological burden

Therefore, for complete applications like DeFi, zkOracle is a perfect and sufficient choice.

It’s worth noting that Hooks can also handle some of the functions that zkCoprocessor lacks, but only in specific scenarios like DeFi, rather than being universally applicable.

We will continue to update Blocking; if you have any questions or suggestions, please contact us!

Share:

Was this article helpful?

93 out of 132 found this helpful

Discover more

Blockchain

A Hilarious Hack: HTX Loses $13.6 Million, But the Jokes Are On the Hackers

Exciting new information has come to light regarding the HTX hacker, who managed to swindle $13 million from hot wall...

Blockchain

US SEC Plays Judgement Card in Do Kwon Case - Will It Win?

The US SEC has requested a summary judgment in its fraud lawsuit against Do Kwon and Terraform Labs.

Market

Bonk: The Meme Coin That’s Going Barking Mad on Binance

Great news for fashion lovers! Binance has officially listed the BONK token and will allow withdrawal starting tomorr...

Blockchain

Crypto Mixer Under Fire: Blockchain Association Throws Shade at OFAC

The Blockchain Association voices its support for six plaintiffs fighting against the US OFAC's sanctions on Tornado ...

Bitcoin

The $4 Billion Bitfinex Bitcoin Heist: The Untold Story

Exciting news for cryptocurrency enthusiasts as Amazon and MGM Studios have teamed up to bring the gripping story of ...

Blockchain

Crypto Exchange One Trading Set to Launch the Lightning-Fast Trading Unit F.A.S.T

One Trading is introducing a new venture that promises quick and seamless digital asset trading for users.