Crazy multi-chain universe, crazy OP Stack

Author: YBB Capital Researcher Ac-Core

Word count: Over 10,000 Reading time: 18 minutes


The narrative direction of ETH has shifted from Layer1 to Layer2. If we still understand it as the narrative of “one-click issuance” of ERC-20, let’s expand our imagination and envision the upcoming madness of “one-click issuance of chains”! With its unmatched ecosystem and high TVL, Arbitrum has been leading the war among Layer2 solutions, but can this temporary victory last long? Different from the Layer3 solution Arbitrum Orbit that builds on top of Arbitrum, OP Stack is a “super chain” that can create Layer2 with one click. This article provides a comprehensive analysis of OP Stack architecture, ZK elements in OP, and the security issues of Rollup.

OP Stack Opens the “Super Chain Universe”

YBB Capital Researcher Ac-Core self-made

Where does the narrative of the next bull market start? Is it from the high-performance Layer1, the continuously stacking Layer3, the ZK-based 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 countless public chains cannot surpass, and within this massive giant, there are many super cores that cannot be ignored, 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 for security and finality. From a technical perspective, Optimism mainly manifests in its effective cost savings for users on-chain. 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);

  • Contracts: Smart contracts that implement the core logic and functionality of OP Stack. OP contracts include the State Transition System (STS), Fraud Prover (FP), State Commitment Chain (SCC), and Canonical Transaction Chain (CTC);

  • Services: Provides data availability, data synchronization, and communication services between Layer1 and Layer2;

  • Tools: Facilitates the development, testing, deployment, monitoring, and debugging of blockchains based on OP Stack.

Superb openness:

OP Stack will be built as the infrastructure for a forkable modular scalable blockchain. To achieve this vision, various Layer2 solutions need to be integrated into a single superchain, integrating previously isolated Layer2 solutions into a system with interoperability and composability. Starting a Layer2 solution will be as simple as deploying a smart contract on Ethereum today, transitioning from “one-click issuance of tokens” to “one-click issuance of chains”. Essentially, a superchain is a horizontally scalable blockchain network that shares Ethereum’s security, communication layer, and development toolkits among different chains.

YBB Capital Researcher Ac-Core

OP Stack (Over Powered Stack) will be the unified modular development stack behind the superchain, connecting countless interlinked and communicable blockchains. The OP Stack stack is developed and maintained by the dedicated Optimism Collective, which supports the deployment of new aggregation networks with a shared open-source system. At the same time, it is also a standardized open-source module. Isn’t it a Cosmos completely based on Ethereum security? The original plan was for ETH and ATOM to complement each other, but now OP Stack has become a Cosmos killer? Let’s break down the definition of OP Stack:

Modules are the data slots that any developer can plug into OP Stack. The “standardization” of this superchain means that there is consensus on the standards for a module, and it can be implemented by everyone. And being completely open-source means that it can be provided for free to anyone for development iterations and message requests. Developers have the ability to switch modules across different execution layers, consensus layers, settlement layers, and data availability layers of a chain.

Just like dYdX chose to leave Ethereum for Cosmos application chains, the fundamental reason is that they wanted greater modularity in their chain’s consensus layer. I think this is a good start, allowing more independent Dapps to choose a public chain that better suits their needs for development. The most representative one is Luna, although it was destroyed for some reasons. Fortunately, OP Stack solves this problem. Its design allows for easier code forking, enabling developers to abstract different components of a blockchain and modify them by inserting different modules.

OP Stack Design Principles:

  • Efficiency: With OP Stack, you can build anything and issue a blockchain with just one click;

  • Simplicity: Utilize reusable code and ready-made development toolkits to enhance security and reduce the complexity of maintenance, achieving an overall lowering of entry barriers;

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

In terms of architecture, the OP Stack can be divided into six layers from bottom to top, namely the DA Layer, Sequencing Layer, Derivation Layer, Execution Layer, Settlement Layer, and Governance Layer. 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, Execution Layer, and Settlement Layer, which together form the main workflow of the OP Stack.

  • DA Layer: It is the source of raw data for 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, adds support for Layer2 transactions initiated on Ethereum, and adds additional Layer1 data fees for each transaction, which is the comprehensive 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 after confirmation on Layer2 for final settlement. In the future, there is also the possibility of integrating effective proof mechanisms such as ZK to bridge the gap between different chains, even to connect the islands between OP Stack’s Layer2 and ZK’s Layer2.

We have observed that some projects with ZK elements have emerged in the recent development of the OP ecosystem. Let’s imagine that an optimistic rollup wants to transform itself into a ZK rollup, no problem! Just replace its fraud proof module with the validity proof module of the settlement layer. If a chain wants to use Celestia for its data availability layer, no problem! Just replace Ethereum with Celestia. Unfortunately, it is only a technical possibility for OP Stack to replace the EVM in the execution layer with another virtual machine. As the emergence of this superchain situation, a hot catchphrase is born – “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 自制

The unlimited block space of Ethereum is a crucial step in achieving large-scale applications, but this diffusion has also brought about division. The lack of permission deployment has also brought new challenges. Nowadays, every new OP Stack chain is growing independently in its own domain, without direct methods for sharing standards and improvements. Users and builders also face significant challenges: 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 that is committed to an open and decentralized block space. The “chain rule” provides guidelines for optimistic governance and superchains. Optimistic governance shifts from managing individual chains to managing shared standards among multiple chains, thus defining the attributes required to be part of a superchain while prioritizing the protection of user 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 allows 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 protect 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 credibly demonstrate the homogeneity, neutrality, and openness of its block space with the support of optimistic governance;

  • Benefit from continuous improvement: Shared upgrades mean that the superchain can always have the best technology without having to worry about maintenance;

  • Provide better and more usable infrastructure: Since all chains in the superchain are committed to a standard, they can work together to ensure the availability and economy of key services such as indexing and sorting.

Thought-provoking questions:

Can OP Stack benefit OP?

What is the use of OP Tokens? If they follow the Basechain approach, they will allocate a portion of their income to Optimism Collective. The source of income for the “treasury” will rely on its own “value” and create more narratives to ultimately reflect on the token price, making the performance logic of OP in the secondary market similar to ATOM. However, this may be the optimal solution at present. If more chains follow the Basechain approach for allocation, Optimism Collective will ultimately benefit. Does this feeling remind us of UNI? Both projects have strong capabilities, but their tokens have no other value or use cases besides voting and governance. In contrast, Layer2 currently faces the problem of centralized sorters. Even if Layer2 tokens are only used for some form of leader selection (rather than consensus voting), the value of sorting rights will still accumulate on the Rullop token.

At the same time, on July 25th, the OP team released the Law of Chain proposal, which enables chains that adopt the OP Stack to launch a shared governance model and sorter. This aims to standardize the “profit feedback” model and bring more benefits to the entire OP system (as mentioned in the above OP Stack rules). This is similar to Cosmos’ shared security model.

Differences between OP Stack and ZK Stack:

OP Stack: Multiple chains, single choice

From the above, we can see that OP Stack adopts a multi-chain model similar to Cosmos, but there is only one choice in terms of selection. This is because OP Stack requires each chain to verify transactions of other chains. Otherwise, it would take several days to get results on Layer1. Therefore, a single and shared sorter, centralized MEV distribution, and protection under legal contracts and governance are the only means to achieve seamless interoperability between Optimistic rollups on different chains.

ZK Stack: Multiple chains, multiple choices

Unlike OP Stack, ZK Stack also supports multiple chains, but it allows multiple choices. It can choose its own sorter and handle MEV in its own way, protected by mathematics and code (note: OP Stack is protected by legal contracts and governance). This is because if ZK adopts a specified shared or a very small set of threads, they can blindly trust each other based on mathematics alone, rendering zero-knowledge proofs worthless.

ZK Elements in OP Stack

YBB Capital Researcher Ac-Core homemade

OP Stack is a completely open architecture that enables the possibility of zkvm, zkmips, zkwasm, and zkevm in the ecosystem. However, compared to “traditional ZK,” OP Stack has also generated some different ZK elements. This makes us can’t help but think that there may be a dream combination of OP rollup and ZK rollup in the near future.

Implementing Zero-Knowledge Proof (ZKP) for OP:

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

YBB Capital Researcher Ac-Core homemade

Completing this task means implementing a zero-knowledge proof (ZKP) system that can prove OP fault-tolerant programs using an instruction set architecture (ISA) supported by golang compilers such as MIPS, RISC-V, or WASM [2]. In addition, the proof system must also prove the state transition between two blocks of a standard configuration OP Stack chain, thus proving its feasibility in practice. In addition to proving the standard execution trace of the ISA, support for fault-tolerant programs introduces additional requirements [1].

Specifically, the fault-tolerant program introduces the concept of a Pre-image Oracle [3], which uses special System calls [4] to load external data into the program. Each Fault Proof VM [5] is responsible for implementing a mechanism through which the hash value of certain data is placed at 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 use by the program. The Pre-image Oracle is also used to bootstrap the initial input of the program.

Attempt at Decentralized Sorter:

Espresso Systems announced on July 21, 2023, in a tweet, that the proposal for decentralized sorting and verification of OP Stack leadership elections has been accepted, making it a contributor to 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 using re-collateralization, aiming to achieve the same scale as the Ethereum validator set. The project has also developed Espresso Sequencer, which integrates with the feature-rich Zk-rollup, especially the branch of Polygon zkEVM.

What is leadership election?

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

In the case of proof-of-work, a competitive leader election algorithm refers to many potential units competing to become leaders at the same time. A non-competitive leader election algorithm refers to only one known leader at a specific point in time. In the case of Ethereum’s Gasper, a non-competitive leader election algorithm refers to 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 from 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 is transformed into many potential entities, and they compete to build the most profitable potential block in the builder network at that moment. At the same time, due to the existence of MEV, this competition will occur again.

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

Are Rollups really secure?

How Ethereum works:

The principle of Ethereum is that each node stores and executes every transaction submitted by users, which is a highly secure way but also makes the entire network very expensive. Therefore, the Rollup solution is adopted to scale the entire network. In simple terms, Rollup = a set of Layer1 contracts + its own Layer2 network nodes, which means on-chain smart contracts + off-chain aggregators. Settlement, consensus, and data availability all rely on Ethereum, and Rollup is only responsible for execution.

  • On-chain smart contracts represent that their trust model is a smart contract on Ethereum, leveraging the security of Ethereum;

  • Off-chain aggregators mean that they execute and aggregate transactions off-chain, compressing large batches of transactions and eventually putting them on the Ethereum mainnet, achieving faster and cheaper purposes.

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 the transaction sequence into batches, which are then sent to the Rollup project’s contract on Layer1. It should be noted that before proceeding with the following, it is necessary to clarify a fact: as shown in the reference image below, the sequencers of all Layer2 Rollups on Ethereum are currently centralized.

Image source: Official tweet screenshot

Centralized Sequencer Issue:

Layer2 full nodes can obtain transaction sequences in two ways: directly from the sequencer or by reading the batches of transactions sent by the sequencer to Layer1. However, the latter has stronger immutability. Since transaction execution can change the state of the blockchain ledger, Layer2 full nodes not only need to obtain the order of transactions but also need to synchronize the ledger state with the sequencer. Therefore, the task of the sequencer is not only to send transaction batches to the Rollup contract on Layer1 but also to transmit the updated state results (StateRoot/StateDiff) after transaction execution to Layer1. In simple terms, the sequencer’s job is to process and order transactions for inclusion in blocks on the blockchain, 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 of the Rollup on Layer1 and the initial StateRoot, they can reconstruct the Layer2 blockchain ledger 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 to Layer1, it means that the sequencer is engaging in fraudulent behavior. In comparison to the Layer2 network itself, Layer1 is more decentralized, trustless, and secure.

YBB Capital Researcher Ac-Core

OP Stack:

So the question is, can Layer2 forge non-existent or incorrect transactions, such as transferring Layer2 token assets to the address of the sequencer operator and then transferring these token assets to Layer1 in order to steal user assets? The answer is: it is completely possible to do so. Therefore, when facing the potential fraud risk of the sequencer, different types of Rollups have adopted different response measures.

Let’s take Optimistic Rollup as an example. It allows Layer2 full nodes to provide fraud proofs, proving that the data published by the sequencer on Layer1 is incorrect. However, for Optimism without fraud proofs, if it really wants to steal Layer2 user assets through the sequencer, it only needs to have the sequencer operator forge transaction instructions and transfer the assets of others on Layer2 to its own address, and finally transfer the stolen tokens to Layer1 through the Rollup’s built-in Bridge contract.

In order to solve this potential problem, the current solution is to rely on “consensus” reached through community members and social media for supervision, or to rely on OP as the official endorsement of credibility. Therefore, based on the above theory, the security of OP Rollup relies on the presence of an honest Layer2 full node that can issue fraud proofs, as mentioned in the “Difference between OP Stack and ZK Stack” section: OP Stack is a multi-chain single choice.

YBB Capital Researcher Ac-Core 自制

ZK Stack:

Now let’s discuss ZK Stack. In the ZK rollup network, there is a Prover node that is responsible for publishing transaction batches for the sequencer and generating validity proofs. These validity proofs have dedicated verification contracts on Layer1. As long as the proofs for the transaction batches and their corresponding StateRoot/StateDiff pass the verification of the Verifier contract, the transactions are finally confirmed. The difference between ZK Stack and OP Stack is that ZK rollup, in addition to relying on Layer2 full nodes to solve sequencer fraud, also utilizes Validity Proofs. The official bridge of ZK rollup will only allow withdrawal transactions that have been verified by validity proofs to be executed. From a security perspective, this is obviously much more reliable than Optimism, as mentioned in the “Difference between OP Stack and ZK Stack” section: ZK Stack is a multi-chain multi-choice.

In theory, the security of ZK rollup is ensured by the Verifier contract on Layer1 or, in other words, by the Layer1 nodes that finalize the transactions. Compared to OP rollup, which relies on at least one honest Layer2 full node that can issue fraud proofs, they both inherit the security of Layer1 (ETH). However, strictly speaking, this may not be the case in practice. Nevertheless, it is currently the best solution. Compared to other public chains, Ethereum has gone through many years of development, and its security is unquestionably the most trustworthy.

Similar to the blockchain trilemma, there seems to be another trilemma for the comprehensive user experience of a “product”: security, simplicity, and efficiency. Compared to OP Stack, ZK Stack relies more on mathematics and code to enhance overall security, thus significantly increasing overall complexity. Therefore, there are several common topics when it comes to ZK:

YBB Capital Researcher Ac-Core 自制
  • Delay Problem: ZK rollup also needs to solve the delay problem of Layer2 nodes publishing data to Layer1. Similar to the need for preparing packaging boxes for delivery, every time the sequencer or Prover sends data to Layer1, it incurs a fixed cost;

  • Speed Problem: ZK rollup faces a challenge in that the speed of generating validity proofs is slow. Although the sequencer can execute thousands of transactions within 1 second, it may take several hours to generate validity proofs for these transactions;

  • Cost Problem: To reduce overall costs, many ZK rollup solutions adopt 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 waits for multiple proofs to be generated, aggregates them, and sends them to the Verifier contract on Layer1 at once;

  • Quantity Problem: If the number of transactions initiated is not sufficient, the sequencer may delay publishing data to Layer1. For example, in a period of market inactivity, certain Rollup networks may only send transaction batches to Layer1 every half hour.

About the problem of a more suitable decentralized sorter solution, modularity may be the optimal solution because modularity is equivalent to greater customization. Currently, the main decentralized tools are mainly divided into the following five:

Single Sequencer & POA Based rollup

DVT x Sequencer Shared Sequencer

Bootstrap a New Sequencer Set

We believe that in the near future, many of the above problems can be further resolved through technology. For example, reducing the generation time of proof of validity, Optimism promises to release a fraud proof system in the near future, and Ethereum’s Danksharding solution will also significantly reduce the data cost of Rollup. The problem of decentralized sorters will also be overcome, providing effective solutions for the above problems together.

Conclusion: Narrative Direction

YBB Capital Researcher Ac-Core Homemade

Layer1 and Layer2 have always been the focus of attention for scalability. Although various projects are still in the early stages of development, they have brought more powerful narrative stories to Ethereum as a whole. We can now see that OP Stack has gained more adoption, and many well-known 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 recently on the evening of June 26th, zkSync announced the launch of ZK Stack, a modular open-source framework for building customized ZK rollup. This is also regarded by many as zkSync’s trump card to deal with OP Stack. On one hand, there is OP Stack with the advantage of being the first mover, and on the other hand, there is ZK Stack with the advantage of mathematics. In short, any value of Layer2 can be accumulated into the tokens of Rollup. The battle for Layer2 scalability has just begun. How do you view this smokeless war about Layer2?

Explanatory documents:







Like what you're reading? Subscribe to our top stories.

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

Follow us on Twitter, Facebook, YouTube, and TikTok.


Was this article helpful?

93 out of 132 found this helpful

Gambling Chain Logo
Digital Asset Investment
Real world, Metaverse and Network.
Build Daos that bring Decentralized finance to more and more persons Who love Web3.
Website and other Media Daos

Products used

GC Wallet

Send targeted currencies to the right people at the right time.