Crazy multi-chain universe, crazy OP Stack.

23-08-03 22:00
Read this article in 36 Minutes
总结 AI summary
View the summary 收起
Original author: YBB Capital Researcher Ac-Core



Foreword


The narrative direction of ETH has shifted from Layer1 to Layer2. If we still understand it as the ERC-20 narrative of "one-click issuance", let's expand our imagination and envision a crazy "one-click issuance of chains" coming soon! With the current unparalleled ecology and high TVL, Arbitrum has been leading the war between Layer2, but can this temporary victory last long? Unlike the Arbitrum Orbit's Layer3 solution, OP Stack is a "super chain" that can create Layer2 with one click. This article provides a comprehensive analysis of the OP Stack architecture, ZK elements in OP, and security issues of Rollup.


OP Stack opens "Super Chain Universe"


YBB Capital Researcher Ac-Core Homemade


The narrative of the next bull market, where does it begin? Is it from the high-performance Layer1, the continuing stacking of Layer3, the ZK system of Layer2, or the super chain of OP Stack? This is a very interesting and thought-provoking question. The title of "Ethereum Killer" is still the ultimate goal that all public chains cannot surpass, and there are many super cores that cannot be ignored hidden in this giant, one of which is: OP Stack.


What is OP Stack?


OP Stack can be understood as a set of open-source software components that allow anyone to build their own Layer2 blockchain on top of Ethereum using Optimistic rollups. It moves most of the computation and storage off-chain while relying on Ethereum to ensure security and finality. From a technical perspective, Optimism mainly manifests itself in its ability to significantly reduce on-chain fees for users. OP Stack consists of four main components:


Mainnet: OP Mainnet is a cheap and fast Ethereum Layer2 network that is compatible with the Ethereum Virtual Machine (EVM).


Contract: An intelligent contract that implements the core logic and functionality of OP Stack. The OP contract includes a state transition system (STS), fraud proof (FP), state commitment chain (SCC), and canonical transaction chain (CTC).


Service: Provide data availability, data synchronization, and communication services between Layer1 and Layer2.


Tools: Facilitate the development, testing, deployment, monitoring, and debugging of blockchain based on OP Stack.


Superb openness:


OP Stack will be developed as the infrastructure for a forkable modular and scalable blockchain. To achieve this vision, various Layer2 solutions need to be integrated into a single Superchain, which will provide interoperability and composability. Starting a Layer2 will be as simple as deploying a smart contract on Ethereum today, and the narrative will shift from "one-click issuance" to "one-click chain deployment". Essentially, the Superchain is a horizontally scalable blockchain network that shares Ethereum's security, communication layer, and development toolkit among all chains.


YBB Capital Researcher Ac-Core Homemade


OP Stack (Over Powered Stack) will become the unified modular development stack behind the superchain, and they are countless interconnectable and communicable blockchains. The OP Stack is developed and maintained by the specialized Optimism Collective, and supports a shared open-source system for deploying new aggregation networks. At the same time, it is also a standardized open-source module. At first glance, isn't it a Cosmos based entirely on Ethereum security? Originally, it was agreed that ETH and ATOM complemented each other, but now OP Stack has become the Cosmos killer? Next, let's break down the definition of OP Stack:


The module is a data slot that any developer can insert into the OP Stack. The "standardization" of this super chain means that there is consensus on the standard for a module, and it can be implemented by everyone. At the same time, being completely open source means that it can be provided free of charge to anyone for development iteration and message requests. Developers have the ability to switch modules between different execution layers, consensus layers, settlement layers, and data availability layers of a chain.


For example, dYdX chose to leave Ethereum and turn to the Cosmos application chain because they hoped to have a more modular consensus layer on their own chain. I think this is a good start, allowing more independent Dapps to choose a public chain that better suits their own development needs. The most representative one is Luna, although it was destroyed for some reasons. Fortunately, OP Stack solved this problem. Its design allows for easier code forking, enabling developers to abstract different components of the blockchain and modify it by inserting different modules.


OP Stack Design Principles:


- Efficiency: With OP Stack, you can build anything and deploy it to the blockchain with just one click.


- Concise: Utilize reusable code and existing development kits to enhance security and reduce maintenance complexity, achieving an overall reduction in barriers to entry.


- Expandable: Optimism Collective will fully open source the main code of OP Stack.


From an architectural perspective, the OP Stack can be divided into six layers from bottom to top: DA Layer for data availability, Sequencing Layer for sequencing, Derivation Layer for derivation, Execution Layer for execution, Settlement Layer for settlement, and Governance Layer for governance. Each layer of the OP Stack is modularized API components that can be combined and decoupled as needed. The most critical layers are the DA Layer for data availability, Execution Layer for execution, and Settlement Layer for settlement, which together form the main workflow of the OP Stack.


- DA Data Availability Layer: It is the original data source of the OP Stack, and can use one or more data availability modules to obtain input data. Currently, Ethereum is the main DA layer, but more chains will join in the future.


- Execution layer: The state structure in the OP Stack, which provides possibilities for EVM or other VMs, increases support for Layer2 transactions initiated on Ethereum, and adds additional Layer1 data fees for each transaction, resulting in the overall cost of submitting transactions to Ethereum.


- Settlement layer: The destination of Layer2 transaction data on the OP Stack, which sends information to the target blockchain for final settlement after confirmation on Layer2. In the future, it is also expected to integrate validity proof mechanisms such as ZK to bridge the gap between different chains, and even connect the islands between OP system Layer2 and ZK system Layer2.


We have observed that recently, some projects in the OP ecosystem have incorporated ZK elements. Let's imagine that an optimistic rollup wants to transform itself into a ZK rollup. No problem! Just replace its fraud proof module with a settlement layer's validity proof module. If a certain chain wants to use Celestia for its data availability layer, no problem! Just replace Ethereum with Celestia. Unfortunately, replacing the EVM of the execution layer with another virtual machine is only a technical possibility for OP Stack. As this super chain situation arises, a hot topic emerges - "Polygon: I want to be the ZK Layer2 of Cosmos! Optimism: I want to be the OP Layer2 of Cosmos! Cosmos: Then who am I?"


OP Stack Rule:


YBB Capital Researcher Ac-Core Homemade


The infinite block space of Ethereum is a key step towards achieving large-scale applications, but this expansion has also brought about fragmentation and new challenges for deploying without permission. Today, each new OP Stack chain is growing independently in its own field, without a direct method for sharing standards and improvements. Users and builders also face huge challenges in evaluating numerous different chains individually based on security, quality, and neutrality. To achieve a superchain, OP Stack needs to transform from an independent and decentralized block space into a unified chain collective, dedicated to an open and decentralized block space. The "Chain Rule" provides guiding principles for optimistic governance and superchain development. Optimistic governance shifts from managing individual chains to managing shared standards among multiple chains, defining the attributes required to be part of a superchain, while prioritizing the protection of users in transactions on the superchain. Fundamentally, the "Chain Rule" is a social contract (rather than a legal contract), so active community discussion is crucial. Its existence will enable the superchain to guarantee the following characteristics:


- Ensure that the block space remains homogeneous, neutral, and open: The commitment to chain law is a commitment to protecting the users, developers, and other stakeholders of the chain. Regardless of the size of the chain, if it is part of a superchain, it can, with the support of optimistic governance, credibly demonstrate the homogeneity, neutrality, and openness of its block space.


- Benefiting from continuous improvement: Sharing upgrades means that the super chain can always get the best technology without having to worry about maintenance itself.


- Provide better and more usable infrastructure: Since all chains in the superchain are committed to a standard that can be trusted, they can work together to ensure the availability and affordability of key services such as indexing and ranking.


Thought-provoking question:


Can OP Stack be fed back to OP?


What is the use of OP Token? If they follow the Basechain approach, they will feed a portion of their income back to Optimism Collective. The income source of the "treasury" will rely on its own "value" and create more narratives to ultimately feedback to the coin price, making OP's performance logic in the secondary market similar to ATOM. This solution may be the best currently, and if more chains follow the Basechain approach to feed back, Optimism Collective will eventually benefit. Does this feeling remind us of UNI? Both projects have strong capabilities, but their tokens have no other value except for voting and governance. In contrast, Layer2 currently faces the problem of centralized sequencers. Even if Layer2 tokens are only used for some form of leader selection (rather than consensus voting), the value of sequencing rights will still accumulate to the Rullop token.


Meanwhile, on July 25th, the OP team released the Law of Chain proposal, which adopts a shared governance model and sorter for all chains using the OP Stack. The aim is to standardize the "profit feedback" model and bring more revenue to the entire OP system (as per the aforementioned OP Stack rule), which is similar to Cosmos' shared security model.


OP Stack and ZK Stack Differences:


OP Stack: Multi-chain single selection.



ZK Stack: Multi-chain, Multi-choice.


Unlike OP Stack, ZK Stack can also have multiple chains, but it has multiple options. It can choose its own sorter to process MEV in its own way, and is protected by mathematics and code (note: OP Stack is protected by legal and regulatory protection). This is because if ZK adopts a specified sharing or a very small set of thread sets, they can blindly trust each other only based on mathematics, making zero-knowledge proofs lose their value.


OP Stack里的ZK元素


(The ZK element in OP Stack)

YBB Capital Researcher Ac-Core Homemade


OP Stack is a completely open architecture that makes it possible for zkvm, zkmips, zkwasm, and zkevm to appear in the ecosystem. However, compared to "orthodox ZK", OP Stack also has some different ZK elements. This makes us can't help but think that perhaps in the near future, there will be a dream combination of OP rollup and ZK rollup.


Implementing Zero-Knowledge Proofs (ZKP) for OP:


According to the latest developments, the team behind Mina plans to use their own plonk system + kzg commitments + folding algorithm nova to implement zkmips vm on OP Stack. Although this is only a recent proposal and there may be many immature aspects, it is still worth exploring. The mission of this project team is to achieve secure and low-latency cross-chain communication between Layer2, Layer1, and OP chains through zero-knowledge proofs. This is a zero-knowledge proof (ZKP) for a well-supported instruction set architecture (ISA), which can prove the behavior of the Optimism fault-tolerant program and lay the foundation for proving any blockchain system based on OP Stack.


Completing this task means implementing a zero-knowledge proof (ZKP) system that can prove the correctness of an OP code using an instruction set architecture (ISA) supported by the Golang compiler, such as MIPS, RISC-V, or WASM [2]. Additionally, the proof system must also prove the state transition between two blocks of the standard configuration OP Stack chain, demonstrating its practical feasibility. In addition to proving the standard execution path of the ISA, support for the error-correcting program introduces additional requirements [1].


Specifically, the error correction program introduces the concept of Pre-image Oracle [3], which uses a special System call [4] to load external data into the program. Each Fault Proof VM [5] is responsible for implementing a certain mechanism, through which the hash value of certain data is placed in a specific location in memory and is executed by a system call, and then the pre-image of that hash value is loaded into memory for program use. The Pre-image Oracle is also used to bootstrap the initial input of the program.


Attempt of Decentralized Sorter:


Espresso Systems announced on July 21, 2023 that their proposal for a decentralized sorting and verification system for OP Stack leadership elections has been accepted, making them contributors to both OP Stack and Superchain. The main protocol of this project, HotShot, is a high-speed consensus protocol that allows Ethereum validators to participate in the protocol through re-collateralization, aiming to achieve the same scale as the Ethereum validator set. Additionally, the project has developed Espresso Sequencer, which integrates with the fully functional Zk-rollup, particularly the branch of Polygon zkEVM.


What is a leadership election?


Leader election [6] refers to the ability to use different leaders in a distributed system to create the next canonical state transition. In blockchain, leader election allows different block producers to produce blocks at different times, and the leader election algorithm can be competitive or non-competitive.


Under the proof of work system, the competitive leadership election algorithm refers to the situation where many potential units compete to become leaders at the same time. The non-competitive leadership election algorithm refers to the situation where there is only one known leader at a specific point in time. In the case of Ethereum's Gasper, the non-competitive leadership election algorithm refers to the situation where there is only one known unit at a specific point in time, and there is no other way for another potential unit to become a leader at that time.


By separating the proposer network and the builder network (i.e. the block builder network is only responsible for selecting transaction order, and the proposer network is only responsible for signing blocks), the single entity responsible for generating blocks at a certain moment will be transformed into many possible entities, and they will compete to build the most profitable potential blocks in the builder network at that moment. Meanwhile, due to the existence of MEV, this competitiveness will return again.


It is very difficult to understand the various second-order effects of the leadership election mechanism between different OP Stack chains. Currently, using the leadership election as a mechanism is the most popular because it can make the sorting more decentralized. However, it should be noted that this solution cannot guarantee that the sorter is absolutely decentralized, so extra caution is needed when considering the problem of decentralized sorters.


Rollup are they really safe?


Ethereum's working principle:


The principle of Ethereum is that each node stores and executes every transaction submitted to it by users. This high-level security approach also makes the entire network very expensive, so the Rollup solution was adopted to expand the entire network. Simply put, Rollup = a set of Layer1 contracts + Layer2's own network nodes, which is an on-chain smart contract + off-chain aggregator. Settlement, consensus, and data availability all rely on Ethereum, and Rollup is only responsible for execution.


On-chain smart contract represents its trust model as a smart contract on Ethereum, leveraging the security of Ethereum.


Off-chain aggregator, which means it will execute and aggregate transactions off-chain, compressing large batches of transactions and ultimately putting them on the Ethereum mainnet to achieve faster and cheaper results.


Layer2 network nodes are composed of many parts, among which the Sequencer component is the most important. It is responsible for receiving transaction requests on Layer2, determining their execution order, and packaging transaction sequences into batches (Batch), which are ultimately transmitted to the Rollup project's contract on Layer1. It should be noted that before proceeding with the following text, it is important to clarify a fact: as shown in the reference diagram below, the sequencers of all Layer2 Rollups on Ethereum are currently centralized.


Source: Official tweet screenshot


Centralized Sorter Problem:


Layer2's full nodes can obtain transaction sequences in two ways: one is to directly obtain them from the sorter, and the other is to read the transaction batch sent to Layer1 by the sorter, but the latter has stronger immutability. Since transaction execution will change the state of the blockchain ledger, in order to ensure consistency, Layer2 full nodes not only need to obtain transaction order, but also need to synchronize the ledger state with the sorter. Therefore, the sorter's task is not only to send transaction batches to the Rollup contract on Layer1, but also to transmit the updated StateRoot/StateDiff of the transaction execution result to Layer1. In simple terms, the sorter's job is to process and sort transactions into blocks added to the blockchain, and is responsible for batch processing transactions and publishing them to the Layer1 smart contract.


For Layer2 full nodes, as long as they obtain the transaction sequence and initial StateRoot on Rollup on Layer1, they can restore the blockchain ledger of Layer2 and calculate the latest StateRoot. Conversely, if the StateRoot calculated by the Layer2 full node itself is inconsistent with the StateRoot published by the sequencer on Layer1, it means that the sequencer is engaged in fraudulent behavior. Overall, compared to Layer2's own network, Layer1 is more decentralized, trustless, and secure.


YBB Capital Researcher Ac-Core Homemade


OP Stack:



We take Optimistic Rollup as an example. It allows Layer2 full nodes to provide Fraud Proof, proving that the data published by the sequencer on Layer1 is incorrect. However, for Optimism without Fraud Proof, if it really wants to steal Layer2 user assets through the sequencer, it only needs to forge transaction instructions as the sequencer operator and transfer the assets of others on Layer2 to its own address. Finally, through the Bridge contract built in Rollup, it can transfer the stolen coins to Layer1.



YBB Capital Researcher Ac-Core Homemade


ZK Stack:



From a theoretical perspective, the security of ZK rollup is ensured by the Verifier contract on Layer1 or can be said to be confirmed by Layer1 nodes. Compared with the security of OP rollup, which relies on at least one honest Layer2 full node that can publish fraud proofs, they both inherit the security of Layer1 (ETH), but in strict sense, this may not be the case. However, this is currently the best solution. Compared with other public chains, Ethereum has gone through so many years of development, and its security is undoubtedly the most trustworthy.


Like the blockchain trilemma, there seems to be a triangle problem with the overall user experience of a "product": security, simplicity, and efficiency. Compared to OP Stack, ZK Stack believes more in relying on mathematics and code to improve overall security, thus significantly increasing overall complexity. Therefore, there are several common topics regarding ZK.


YBB Capital Researcher Ac-Core Homemade


- Delay issue: ZK rollup still needs to solve the delay issue of Layer2 nodes publishing data to Layer1. Similar to the need for packaging boxes in express delivery, sending data from the sorter or Prover to Layer1 incurs a fixed cost each time.


- Speed issue: ZK rollup is facing a challenge of slow generation of validity proofs. Although the sorter can execute thousands of transactions within 1 second, it may take several hours to generate validity proofs for these transactions.


- Cost issue: In order to reduce overall costs, many ZK rollup solutions have adopted the strategy of "aggregating multiple proofs and sending them to Layer1 at once". This means that the Prover does not immediately send a proof to Layer1 after generating it, but instead waits for multiple proofs to be generated, aggregates them together, and sends them to the Verifier contract on Layer1 at once.


- Quantity issue: If the number of transactions initiated is not sufficient, the sorter may delay publishing data to Layer1. For example, during periods of low market activity, some Rollup networks may only send transaction batches to Layer1 every half hour.


Regarding the issue of a more suitable decentralized sorting solution, modularity may be the optimal approach, as modularity is equivalent to greater customization. The following five are the main types of modularity in current decentralized tools:


-Single Sequencer & POA -Based rollup


-DVT x Sequencer -Shared Sequencer


-Bootstrap a New Sequencer Set


We believe that in the near future, many of these issues can be further addressed through technology. For example, reducing the generation time of proof of validity, Optimism promises to release a fraud proof system soon, and Ethereum's Danksharding solution will also significantly reduce the data cost of Rollup. The challenge of decentralized sorters is also being tackled, providing effective solutions to the above problems.


Ending: Narrative Direction


YBB Capital Researcher Ac-Core Homemade

Hyperlink and hyperextension have always been the focus of attention for extension directions. Although various projects are still in the early stages of development, they have brought more powerful storytelling to Ethereum as a whole. We can now see that OP Stack has gained more adoption, and many star public chains have joined it, such as Coinbase, opBNB, Zora, Worldcoin, and many other public chains have given OP Stack a good brand endorsement. Including the recent announcement on the evening of June 26th, zkSync announced the launch of the modular open-source framework ZK Stack for building custom ZK rollups, which many people believe is the killer of OP Stack. On the one hand, OP Stack has the advantage of being the first mover, and on the other hand, ZK Stack has the mathematical advantage. In short, any value of Layer2 can be accumulated into the tokens of Rollup. The Layer2 expansion war has just begun. How do you view this smokeless war about Layer2?


Explanation of the literature:
[1]https://github.com/ethereum-optimism/optimism/blob/develop/specs/fault-proof.md#fault-proof-program
[2]https://github.com/ethereum-optimism/ecosystem-contributions/issues/61
[3]https://github.com/ethereum-optimism/optimism/blob/develop/specs/fault-proof.md#pre-image-oracle
[4]https://en.wikipedia.org/wiki/System_call
[5]https://github.com/ethereum-optimism/optimism/blob/develop/specs/fault-proof.md#fault-proof-vm
[6]https://github.com/ethereum-optimism/ecosystem-contributions/issues/63


欢迎加入律动 BlockBeats 官方社群:

Telegram 订阅群:https://t.me/theblockbeats

Telegram 交流群:https://t.me/BlockBeats_App

Twitter 官方账号:https://twitter.com/BlockBeatsAsia

举报 Correction/Report
PleaseLogin Farcaster Submit a comment afterwards
Choose Library
Add Library
Cancel
Finish
Add Library
Visible to myself only
Public
Save
Correction/Report
Submit