bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 5쪽 중 1쪽
Brevis: An Omnichain ZK Data Attestation Platform
Brevis Network
v1.0
Abstract.
Web2 applications often operate as walled gardens with limited data interoper-
ability, resulting in user lock-ins and fragmented identities. Web3 decentralized ap-
plications (dApps) built on blockchains have the potential to overcome these issues.
However, smart contracts, which are the core of dApps, currently lack a trust-free way
to access and utilize the vast amount of data stored in the full history of multiple
blockchains. To address this limitation, we propose Brevis, a ZK omnichain data
attestation platform that enables dApps to access, compute, and utilize
arbitrary data across multiple blockchains in a trust-free way .
Brevis’s architecture comprises three components: zkFabric, zkQueryNet, and zk-
AggregatorRollup. zkFabric collects block headers from all connected blockchains and
generates ZK Consensus Proofs that attest to the validity of these block headers.
This component is essential for dApps to trustlessly access block headers from various
blockchains. zkQueryNet is an open marketplace of ZK Query Engines that accepts
data queries from dApps, processes them using the attested block headers from zk-
Fabric, and generates ZK Query Proofs. These engines can range from highly special-
ized functions to generalized query languages, catering to a diverse set of application
requirements. zkAggregatorRollup is a ZK rollup blockchain that acts as the aggrega-
tion and storage layer for zkFabric and zkQueryNet. It verifies the proofs from both
components, stores the verified data, and commits its zk-attested state roots to all
connected blockchains, allowing dApps to access the attested query results directly
in their on-chain smart contract logic. This modular approach allows for flexibility in
query engines and reduces costs by minimizing communication overhead and enabling
cross-chain and cross-application query results sharing. Brevis has wide-ranging use
cases, including data-driven DeFi, zkBridge, novel user acquisition solutions, zkDID,
social account abstraction, and more.
In the initial Proof of Concept of Brevis, we built some of the fastest ZK light client
circuits as parts of zkFabric for Ethereum PoS, Cosmos and BNB Chain to enable
any EVM and non-EVM chains to access states of these three chains in a completely
trust-free way. Using these ZK light client circuits, we implemented a user-facing asset
zkBridge between Ethereum Goeril and BNB Chain to enable trust-free cross-chain
bridging.
Contents
1 Introduction 4
2 Background 8
2.1 Web 2.0: data in walled gardens . . . . . . . . . . . . . . . . . . . . . . 8
2.2 Web 3.0: great promises, disappointing reality . . . . . . . . . . . . . . 9
2.3 Computation Migration Using Zero-Knowledge Succinct Proof . . . . 10
3 Overview of Brevis by An Example 11
4 Brevis zkF abric 13
4.1 Existing Interoperability Solutions . . . . . . . . . . . . . . . . . . . . 13
4.2 zkFabric: Interoperability via ZKP-based Light Client . . . . . . . . . 14
4.3 Example Light Client Implementations . . . . . . . . . . . . . . . . . . 16
4.3.1 Ethereum PoS . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.3.2 Cosmos Tendermint . . . . . . . . . . . . . . . . . . . . . . . . 18
4.3.3 BNB Chain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
5 Brevis zkQueryNet 20
5.1 Agent Smart Contract and Application Design Pattern . . . . . . . . . 21
5.2 ZK Query Engine Network . . . . . . . . . . . . . . . . . . . . . . . . 23
5.3 Keeper Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
6 Brevis zkAggregatorRollup 25
6.1 System Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
6.1.1 System Components . . . . . . . . . . . . . . . . . . . . . . . . 26
6.1.2 Data Store . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
6.1.3 Interfaces with Other Modules . . . . . . . . . . . . . . . . . . 28
6.1.4 Rollup Fee Model . . . . . . . . . . . . . . . . . . . . . . . . . . 29
6.1.5 Basic Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
6.2 Rollup Sequencer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
6.2.1 Insert Block Headers . . . . . . . . . . . . . . . . . . . . . . . . 30
6.2.2 Insert Query Results . . . . . . . . . . . . . . . . . . . . . . . . 31
6.2.3 Fetch Attested Data . . . . . . . . . . . . . . . . . . . . . . . . 32
6.3 Rollup Prover Network . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
2
6.3.1 Single Rollup Block Proof . . . . . . . . . . . . . . . . . . . . . 33
6.3.2 Multi-Rollup-Block Aggregation Proof . . . . . . . . . . . . . . 35
7 Use Cases 35
7.1 ZK Multi-blockchain Interoperability . . . . . . . . . . . . . . . . . . . 35
7.2 Data-driven DeFi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
7.3 User Acquisition with Trust-free Revenue Sharing . . . . . . . . . . . . 36
7.4 zkDID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
7.4.1 Prevent Sybil Attacks . . . . . . . . . . . . . . . . . . . . . . . 37
7.4.2 User Life Cycle Management . . . . . . . . . . . . . . . . . . . 38
7.5 Account Abstraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
8 Conclusion 39
3
1. Introduction
Web2 applications, despite being built on open protocols like TCP/IP, HTTP, and
HTML, often operate as walled gardens. User data is stored in centralized databases
controlled by the application providers, which limits the ability of users to control and
share their data across different applications and services. This leads to issues such as
financial and social data lock-ins, fragmented identities, and limited interoperability
and composability.
Web3 decentralized applications (dApps) have the potential to break these informa-
tion silos by being built on top of blockchains, which have append-only and publicly
accessible data storage. With the growing adoption of dApps and multi-blockchain ex-
pansion, L1 blockchains and L2 rollups have accumulated a wealth of raw data, such
as asset transfers, contract function calls, in-contract events, and blockchain state
roots, which makes it possible to extract valuable information such as ownership of as-
sets, user activity profiles, social graphs, financial connections, market pricing trends,
trading volumes and more. Intuitively, blockchains application should be able to easily
access and utilize these omnichain data insights in a completely trust-free way, because
after all, these dApps are “native residents” inside of blockchains.
However, in reality, Web3 dApps simply have no way to access the vast majority of
the data stored in the blockchains in a trust-free way. This is because smart contracts
deployed on a single blockchain can only access data: (1) via explicitly defined inter-
faces of other smart contracts; (2) on the same blockchain; (3) in the most current state
instead of with a complete historical view. Solutions based on off-chain Oracles [3] in-
troduce unnecessary external trust assumptions, and direct on-chain computation by
expanding state roots is prohibitively expensive. This issue is aggravated by the re-
cent explosive growth of the multi-blockchain ecosystem. Therefore, it is impossible
today to build a dApp whose internal business logic relies on information extracted
and computed from arbitrary data residing on a combination of blockchains.
To lift such limitations and further unleash the potential of Web3 applications, we
propose Brevis, a ZK omnichain data attestation platform that enables dApps to ac-
cess, compute and utilize arbitrary data across the full history of multiple blockchains
by leveraging the power of Zero-Knowledge (ZK) succinct proof.
As shown in Figure 1, Brevis’s architecture consists of three main components: zk-
Fabric, zkQueryNet, and zkAggregatorRollup. zkFabric collects block headers from all
4
Brevis
zkFabric
zkAggregatorRollup
zkQueryNet
Blockchains
Figure 1. Brevis High Level Architecture
connected blockchains and generates ZK Consensus Proofs that attest to the valid-
ity of these block headers. These block headers are further zk-verified and stored in
zkAggregatorRollup. zkQueryNet accepts data queries from dApps and generates ZK
Query Proofs based on the attested block headers stored in zkAggregatorRollup. These
query results are also zk-verified and stored in the zkAggregatorRollup. Essentially,
zkAggregatorRollup is a ZK rollup that acts as the aggregation and storage layer for
zkFabric and zkQueryNet. By committing its zk-attested state roots to all Brevis con-
nected blockchains, zkAggregatorRollup allows dApps to access attested query results
and utilize them directly in its on-chain smart contract logic in a trust-free way.
With this high-level overview, we now walk through each component.
First, to utilize arbitrary data across multiple blockchains, dApps need to have a
trust-free way to access block headers from blockchains other than its native chain.
This is because block headers contain state roots that can be used to access data
and states in blockchains. To fulfill this need, zkF abricis introduced to generate ZK
Consensus Proofs for block headers of all the supported chains. A Consensus Proof is
generated by a light client circuit proving that the block header in question is generated
according to the consensus rule of the corresponding blockchain. zkFabric itself is a
decentralized system consisting of a network of block header relayers and provers as
discussed in more detail in Section 4.
To actually extract valuable information from the zk-attested block headers, zk-
QueryNet is built as an open marketplace of ZK Query Engines that directly in-
terface with dApp developers and smart contracts. A dApp developer can choose a
ZK Query Engine that fits her need and write queries via high-level APIs in smart
contracts.
5
At run time, a smart contract can call the Agent Smart Contract of zkQueryNet
targeting a specific ZK Query Engine. This query will be picked up by the Provers
of this ZK Query Engine. Using the already zk-attested block headers provided by
zkFabric, the ZK Query Engine can then compute the query results and generate a
ZK Query Proof attesting that computation is done correctly.
Different ZK Query Engines can have very different APIs ranging from generalized
query languages to highly specific function calls with a fixed number of parameters. For
example, on one side of the spectrum, a specific ZK Query Engine may only expose
a function that accepts two block numbers and two chain IDs and will return the
Time Weighted Average Price for ETH/USDC pair during the specified time period
on Uniswap on the specified two blockchains. On the other side, a generalized ZK
Query Engine can present developers with a blockchain indexing abstraction using
high-level database queries such as SQL or GraphQL, which is very much like what
they can do in off-chain data solutions such as Dune Analytics [10] and Graph [11].
Brevis will provide a set of ZK Query Engines that address many immediate use
cases with reasonable flexibility and high performance. As zkQueryNet is an open
marketplace, we expect dApp developers and other third parties to provide other ZK
Query Engines to better serve a diverse ecosystem of applications.
Finally, zkAggregatorRollup is a ZK rollup blockchain powered by a lightweight
ZK virtual machine that aggregates different proofs and their inputs from zkQueryNet
and zkFabric. Specifically, zkAggregatorRollup VM runtime has the following func-
tionalities: (1) recursively verify proofs generated by zkQueryNet and zkFabric; (2)
store the zk-verified block headers from zkFabric; (3) store queries and the zk-verified
results. When plugging in a ZK Query Engine or adding a new type of consensus,
zkAggregatorRollup will be extended to support the verification of the corresponding
ZK proofs. Moreover, unlike many ZK rollup chains where the proofs of state root
progression are only committed to one single blockchain, zkAggregatorRollup’s state
root proofs are committed to all the blockchains supported by Brevis.
With zkAggregatorRollup’s state roots available on all connected chains, smart
contracts can access the query results and block headers via data inclusion proofs.
The primary benefit of using zkAggregatorRollup as an aggregation point is to reduce
the block header communication/verification overhead from O(N 2) to O(N ) (where
N is the number of blockchains supported by Brevis), and to share query results
6
on-demand efficiently across all connected blockchains.
To sum up, Brevis has the following key advantages.
• T rust-free: Brevis does not rely on any off-chain party to attest data and com-
putation integrity; instead, it relies solely on ZK succinct proofs. Therefore,
applications using Brevis do not need to post any additional trust assumptions
other than those of underlying blockchains and cryptographic protocols.
• Omnichain: Brevis integrates with multiple blockchains running on different
consensus and therefore enables an omnichain data access and computation.
• Modularized: Brevis uses a highly modularized design in its zkQueryNet and
therefore can cater to a wide range of application requirements through different
flavors and implementations of ZK Query Engine.
• Low-cost: Brevis’s zkAggregatorRollup essentially works as a batching and ag-
gregation layer for block headers and query results. Therefore, zkAggregator-
Rollup significantly reduces the on-chain costs by removing the otherwise N-to-
N communication overhead and by enabling cross-chain and cross-application
query results sharing.
It is important to note that the key difference between Brevis and off-chain data
indexing solutions such as Dune Analytics [10] and Graph [11] is that Brevis can
generate zk-attested query results that can be directly utilized by the business logic
of on-chain smart contracts in a trust-free way while off-chain solutions’ data results
can only be used in the web2-based data analytic context. Brevis has a wide range of
use cases such as data-driven DeFi, zkBridge, novel user acquisition solutions, zkDID,
social account abstraction, and many more.
In the initial Proof of Concept for Brevis, we built some of the fastest ZK light client
circuits as parts of zkFabric with gnark for Ethereum PoS, Cosmos, and BNB Chain
to enable any EVM and non-EVM chains to access the states of these three chains in
a completely trust-free way. Some of the key circuit performance benchmark numbers
are summarized in Table 1 (using a Linux Server with 20 cores@2.3GHz and 384GB
of memory without any GPU acceleration). Using these ZK light client circuits, we
implemented a user-facing asset zkBridge between Ethereum Goeril and BNB Chain.
In the rest of the white paper, we will discuss the background, motivation, and intu-
ition for Brevis in Section 2 and provide a system overview via an example in Section
3. Then we will dive into the design and implementation of zkFabric, zkQueryNet, and
7
#Constraints Prove+Witness Gen. Time
Batch of 8 Ed25519 Sig Verifications
(over BN254) 7.4m 15s
BLS12-381 Sig Verification
(over BN254) 8.7m 25s
SSZ Sync Committee Update 88m 72s
T able 1. Benchmark results for the key circuits used in the light clients of Ethereum PoS,
Cosmos Tendermint and BNB Chain. The circuit is implemented in gnark. The machine is a
Linux server with 384GB memory and 20 cores@2.3GHz.
zkAggregatorRollup in Sections 4, 5, and 6, respectively. Finally, we will discuss some
use cases in more detail in Section 7.
2. Background
2.1. W eb 2.0: data in walled gardens
Web 2.0 applications have transformed the internet landscape, empowering users to
generate content and interact in ways previously unimagined. However, despite the
open and layered protocols underlying Web 2.0, many applications operate as walled
gardens where user data is stored in centralized databases owned and managed by the
platform providers. This presents a multitude of challenges for both developers and
users, such as limited data interoperability, fragmented identities, and financial and
social data lock-ins, leading to various consequences such as stunted innovation, vendor
lock-in, privacy concerns, limited transparency, and fragmented user experiences.
Take an example of financial data lock-ins, where users are unable to transfer their
financial data to other services or platforms. A user may have their credit card in-
formation stored on an e-commerce platform but be unable to transfer this data to
another platform, such as a budgeting app. This creates a barrier to entry for new
applications and services, as users may be hesitant to switch to a new platform if it
means losing access to their financial data.
This lack of data interoperability does not only exist in financial applications. For
example, a user may have a wealth of data about their workouts, such as their heart
rate, distance run, and calories burned. However, this data is often siloed within the
fitness app and not easily accessible to other applications or services. This limits the
potential uses of the data, such as sharing it with a nutrition app to get personalized
recommendations for meals based on the user’s workout history.
8
2.2. W eb 3.0: great promises, disappointing reality
Web 3.0 holds great promise to break down the barriers of data isolation, as decen-
tralized applications (dApps) are built on top of public blockchains. Unlike Web 2.0
databases, blockchains, which can be seen as append-only data structures, store all
past transactions and historical states in the public domain.
One might argue that Web 2.0 databases can also store historical data, but it
is critical to note that this historical data is stored via explicit business logic built
into the application itself. If there is no such business logic, historical user actions
will be forever lost. In contrast, for dApps built on blockchains, every transaction
is permanently stored in the blockchain, regardless of whether the app itself has the
business logic to record that history. Moreover, as blockchains progress, state snapshots
of each block are contained in the block header in succinct digest forms such as Merkle
Roots.
Many products and projects are already leveraging this unique property. Products
like Dune Analytics [10] and Graph [11] provideoff-chain data indexing or data ana-
lytics for blockchain applications across time. They can also be used to provide stateful
data, such as user transaction history, for dApps’ frontend UIs. These applications ac-
cess blockchain data in an off-chain way , recording, indexing, and computing data
via blockchain nodes’ RPC endpoints.
With full blockchain data access being this simple for off-chain programs , one
would assume that smart contracts, which are on-chain programs acting as the core
component of decentralized dApps, should also be able to easily access this complete
set of blockchain data. After all, smart contracts are “native residents” of blockchains.
However, this is not the case.
The scope of a smart contract’s data access is highly limited and, in fact,
resembles the pattern of W eb 2.0 applications today .To understand this coun-
terintuitive fact, we need to discuss the important concept of virtual machine runtime
and smart contract life cycle. When a smart contract is deployed on a blockchain,
its life cycle starts in the context of the virtual machine runtime. The virtual ma-
chine’s system clock moves forward monotonically as new blocks are built. Therefore,
the smart contracts running in this virtual machine will only have visibility of
blockchain states in the present time . Additionally, an on-chain smart contract
can only access data that is either internal or explicitly defined as a function
9
call in another smart contract . Finally, because a blockchain VM can only access
states and execute programs within the same blockchain, smart contracts haveno way
to acce프로젝트로 돌아가기