Crazy Multichain Universe, Crazy OP Stack

YBB
YBB Capital
Published in
19 min readAug 3, 2023

Author: YBB Capital Researcher Ac-Core

Word count: This article is over 10,000

Foreword

The main narrative direction of ETH has shifted from Layer1 to Layer2, and if we still interpret it as the ERC-20 narrative of “one-click coin issuance”, we might as well enlarge the pattern to imagine that this is a “one-click chain issuance” madness in the future! Arbitrum is based on the fact that no one else has been able to do it! Arbitrum has been leading the Layer2 wars with its unrivaled ecosystem and high TVL, but can this temporary victory last long? Unlike Arbitrum Orbit, which is another layer of Layer3 solution, OP Stack is a “super chain” that can create Layer2 with one click. This article provides a comprehensive analysis of OP Stack analysis, ZK elements in OP, and security issues of Rollup in three parts.

YBB Capital Researcher Ac-Core Homemade

OP Stack Opens “Superchain Universe”

Where does the narrative of the next bull market start? Does it start with high performance Layer1, Layer3 which continues to stack higher, Layer2 in the ZK system, or does it start with the OP Stack’s Superchain? This is a very interesting and thought provoking question. The title of Ether Killer is still an insurmountable goal for all public chains, and there are many hidden superkernels in this huge giant, one of which is the 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 Ether using Optimistic Rollups. OP Stack consists of four main components:

  • Mainnet: OP Mainnet is a cheap and fast Ethernet Layer2 network with Ethernet Virtual Machine EVM compatible.
  • Contracts: smart contracts that implement the core logic and functionality of the OP Stack.The OP Contracts include the State Transition System (STS); the Fraud Proofers (FP); the State Commitment Chain (SCC); and the Canonical Transaction Chain (CTC).
  • Service: A service that provides data availability, synchronization, and communication between Layer1 and Layer2.
  • Tools: Tools to facilitate the development, testing, deployment, monitoring and debugging of OP Stack-based blockchains.

Superb openness:

The OP Stack will be built as a forkable, modular, scalable blockchain infrastructure. To realize this vision, all types of Layers2 need to be consolidated into a single Superchain, integrating Layers2 that have been isolated from each other into an interoperable and combinational system, and launching Layers2 will be as simple as deploying a smart contract to Ether today. It is as simple as deploying a smart contract to EtherChannel today, allowing the narrative to change from “one-click coin issuance” to “one-click chain issuance”. Essentially, Hyperchain is a horizontally scalable blockchain network that shares the security of Ether, as well as communication layers and development kits, with each other.

YBB Capital Researcher Ac-Core Homemade

The OP Stack (Over Powered Stack) will be the unified modular development stack behind the hyperchain and the myriad of interlinked, communicating blockchains between them.The OP Stack is developed and maintained in its entirety by the dedicated Optimism Collective and supports a shared open source system for the deployment of new aggregation networks. At the same time it is a standardized set of open source modules. This sounds like a Cosmos based entirely on Ether security, but now the OP Stack has become a Cosmos killer, while ETH and ATOM were said to be complementary. Next, let’s break down the OP Stack definition:

Modules are bits of data that any developer can plug into the OP Stack. The “standardization” of the superchain means that there is a consensus on the standard of a module and that it can be implemented by everyone. It’s also completely open source, meaning it’s free for anyone to develop iterations and message requests. Developers have the ability to switch modules between the different execution, consensus, settlement and data availability layers of a chain.

Like dYdX’s choice to leave Ether and move to the Cosmos app chain, the underlying reason was that they wanted greater modularity in the consensus layer of their chain, and I think it’s a great start to getting more independent Dapps to choose independently developed public chains, most notably Luna, although for some reason it was destroyed. Thankfully OP Stack solves this problem by being designed to fork code in an easier way, allowing developers to easily abstract the different components of the blockchain and modify it by plugging in different modules.

OP Stack Design Principles:

● Effectiveness: You can use OPStack to build anything and issue blockchains with a single click;

● Simplicity: Leverage reusable code and off-the-shelf development kits to enhance security and reduce maintenance complexity for an overall lower barrier;

● Scalable: Optimism Collective will open source the main OPStack code in its entirety.

Architecture, OPStack can be divided into six layers from the bottom up, respectively, DA Layer data availability layer, Sequencing Layer sorting layer, Derivation Layer derivation layer, Execution Layer execution layer, Settlement Layer settlement layer, Governance Layer governance layer. Each layer of the OP Stack is a modular API that can be combined and decoupled at will. The most critical are DA data availability layer, execution layer and settlement layer, which constitute the main workflow of OP Stack.

● DA Data Availability Layer: is the original data source for OP Stack, single or multiple data availability modules can be used to get input data, currently Ether is the most dominant DA layer, but more chains will be added in the future;

● Execution Layer: the state structure in the OP Stack, which provides the possibility for EVMs or the use of other VMs, adds support for Layer2 transactions initiated on Ether, while adding an additional Layer1 data cost per transaction to the combined cost of posting the transaction to Ether.

● Settlement Layer: the place where Layer2 transaction data on OP Stack goes, and sends the information to the target blockchain after Layer2 confirms it, as a way to finalize the settlement. In the future, it is also expected to access ZK and other proof of validity mechanisms, in order to bridge the gap between different chains, and even link the silos between the OP system Layer2 and the ZK system Layer2.

Judging from the recent OP discovery of several projects with ZK elements, it’s worthwhile to imagine boldly, such as a certain Optimistic rollup wants to transform itself into a ZK rollup, no problem! Just replace its proof-of-fraud module with a proof-of-validity module for the settlement layer. If a chain wants to use Celestia for its data availability layer. No problem! Just replace Ether with Celestia. If you want to replace the EVM in the execution layer with a different kind of virtual machine, unfortunately this is only a technical possibility for the OP Stack. As a result of this mega-chain situation, a hot trend was born — “Polygon: I want to be the Cosmos of ZK Layer2! Optimism: I want to be the Cosmos of OP layer2! Cosmos: Who am I then? “

OP Stack Law:

YBB Capital Researcher Ac-Core Homemade

Ether’s infinite block space is a key step towards mass adoption, but at the same time proliferation has brought fragmentation and permissionless deployment has ushered in new challenges; today, each new OP Stack chain is navigating its own domain, with no direct way to share standards and improvements. Users and builders also face a huge challenge: evaluating the many different chains individually based on security, quality and neutrality. In order to achieve superchains, the OP Stack needs to be transformed from an independent, decentralized block space into a unified chain collective working together on an open, decentralized block space. The Law of Chains sets out guiding principles for Optimistic Governance and Superchains. Optimistic governance shifts from managing individual chains to managing standards shared by multiple chains, thereby defining the attributes required to be part of a superchain while prioritizing the protection of users transacting on the superchain. Fundamentally, the Law of Chains is a social contract (not a legal one), so active community discussion is critical.” The “Law of Chains” will enable Superchain to guarantee the following properties:

● Ensure that the block space remains homogeneous, neutral and open: A commitment to chain law is a commitment to protect the chain’s users, developers and other stakeholders. Chains of any size that are part of a superchain can credibly demonstrate the homogeneity, neutrality and openness of their block space, supported by optimistic governance.

● Benefit from continuous improvement: Shared upgrades mean that hyperlinks always have access to the best technology without having to worry about maintaining it themselves.

● Provide better, more available infrastructure: Because all chains in a hyperchain are credibly committed to a standard, they can work together to ensure the availability and affordability of critical services such as indexing and sorting.

Something to think about:

Can the OP Stack feed the OP?

What exactly is the use of OP Token, if Basechain’s way, they will give part of the income back to Optimism Collective, then the source of income of the “treasury” will rely on its own “value”, relying on the creation of more narratives to eventually feed back to the coin price, making OP’s performance logic in the secondary market similar to ATOM, but this scheme may be the optimal at present. Then the “treasury” will rely on its own “value”, relying on the creation of more narratives to ultimately feed back to the coin price, making the OP’s performance logic in the secondary market similar to that of ATOM, but this scenario may be the optimal one at present, and Optimism Collective will ultimately benefit from the feedback of more chains following Basechain’s example. This kind of feeling reminds us of UNI, both of which have strong programs but the Token itself has no value use other than voting and governance. Unlike the centralized sequencer problem that Layer2 is currently facing, even if Layer2 tokens are only used for some form of leader selection (rather than consensus voting), the value of the sequencing rights still accrue to Rullop tokens.

Meanwhile the OP team released the Law of Chain proposal on July 25th, where all chains adopting OP Stack initiate a shared governance model and sequencer, hoping to normalize the model of “ Profit Feedback” to bring more revenue to the whole OP system (as mentioned above in the Law of OP Stack) This is comparable to Cosmos’ shared security model.

Difference between OP Stack and ZK Stack:

OP Stack: Multi-Chain Single Selection

From the above, it is easy to see that OP Stack adopts a multi-chain model similar to Cosmos, but with only one option, because OP Stack pursues the idea that each chain needs to validate the transactions of the other chains, or else it needs to wait for a few days on Layer1 before getting the result, so a single and shared sequencer, centralized MEV allocation, and protection from law and management are the only things that make it possible for Optimistic rollups to seamlessly interoperate between different chains. Optimistic rollups are the only way to achieve seamless interoperability between different chains.

ZK Stack: Multiple Chains, Multiple Options

Unlike the OP Stack, the ZK Stack can also chain multiple threads, but it can have multiple options, can pick its own sequencer, go about MEVs in its own way, and is protected by math and code (note: the OP Stack is protected by fiat and management). This is because if ZK uses a specified shared or very small set of threads, then they can blindly trust each other based on math alone, rendering zero-knowledge proofs worthless.

ZK elements in the OP Stack

YBB Capital Researcher Ac-Core Homemade

OP Stack is a completely open architecture, which makes it possible to have zkvm, zkmips, zkwasm, zkevm in the eco-system, but there are also some different ZK elements in the OP Stack compared to the “ orthodox ZK “. We can’t help but think that there might be a dream link between OP rollup and ZK rollup in the near future.

Implementing Zero Knowledge Proof (ZKP) for OP:

According to the latest development, the team behind Mina plans to implement zkmips vm on OP stack using their own plonk system + kzg commitment + folding algorithm nova. Although this is only a recent proposal and will have a lot of immaturity, it is well worth exploring. The mission of the project team is to enable secure and low-latency cross-chain communication between Layer2 and Layer1 and the OP chains via zero-exponential proofs. This is a Zero Knowledge Proof (ZKP) for well-supported Instruction Set Architecture (ISA) that proves the behavior of Optimism fault-tolerant programs, laying the groundwork to be able to prove any blockchain system based on the OP Stack.

YBB Capital Researcher Ac-Core Homemade

[1] Completing this task implies the implementation of a Zero Knowledge Proof (ZKP) system that can prove OP error-proof programs using the Instruction Set Architecture (ISA) supported by golang compilers (e.g., MIPS, RISC-V, or WASM) [2]. In addition, the proof system must prove state transitions between two blocks of a standard configuration OP Stack chain, thus proving that it is feasible in practice. In addition to proving standard execution traces for the ISA, support for error-proofing procedures introduces additional requirements.

Specifically, the Fault Proof 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 mechanism by which a hash of some data is placed in a specific location in memory and executed by a System call, and then a preimage of that hash is loaded into memory for use by the program.Pre-image Oracle is also used to bootstrap the initial input to the program.

An attempt at a decentralized sequencer:

Espresso Systems tweeted an official announcement on July 21, 2023 that the proposal to build a decentralized sort verification for OP Stack leadership elections has been accepted as a contributor to OP Stack and Superchain. One of the project’s main protocols, HotShot, is a high-speed consensus protocol that can be used to rehypothecate to enable Ether verifiers to participate in the protocol, aiming to reach the same scale as the Ether verifier set. The project has also developed Espresso Sequencer which integrates with the full-featured zk-rollup, specifically the Polygon zkEVM branch.

What is a leadership election?

Leader election [6] is the ability to use different leaders responsible for creating the next canonical state transition in a distributed system. In blockchain, leader election allows different block producers to generate blocks at different times, while the leader election algorithm can be competitive or non-competitive.

In the case of proof-of-work, a competitive leader election algorithm is one in which there are many potential units vying to be the leader at the same time. An uncontested leader election algorithm is one where there is only one known leader at a given point in time, and in the case of Ether Gasper, an uncontested leader election algorithm is one where there is only one known unit at a given point in time, and there is no other way for another potential unit to become the leader at that time.

In the case of separating the proposer network from the builder network (i.e., the block builder network is only responsible for selecting the ordering of transactions and the proposer network is only responsible for signing blocks). It would transform the single entity responsible for generating blocks at a given moment into many possible entities and allow them to compete for the most profitable potential blocks in the builder network at that moment, while at the same time causing this competitiveness to return due to the presence of MEVs.

We are having a very difficult time understanding the various second-order effects of the leader election mechanism between different op-stack chains. For the time being, leadership election as a mechanism is the most popular because it allows for more decentralized sorting. Note that it also does not guarantee that the sequencer is absolutely decentralized, so extra care should be taken when considering the decentralized sequencer problem.

Are Rollups really safe?

How Ethernet works:

The principle of Ethernet is that each node stores and executes every transaction submitted to it by the user, and this high-level security method also leads to the whole network being very expensive, so it needs to expand the capacity of the whole network and adopt the Rollup solution. Simply put, Rollup = a set of contracts in Layer1 + its own network nodes in Layer2, i.e., on-chain smart contract + off-chain aggregator, which relies on ethereum for settlement, consensus, and data availability, and is only responsible for executing Rollup itself.

● The on-chain smart contract, indicates that its trust model is a smart contract on Ether, borrowing the security of Ether.

● An off-chain aggregator means that it will execute and aggregate transactions off-chain, compressing large batches of transactions and ultimately placing them on the main Ether network, achieving the goal of being faster and cheaper.

The Layer2 network node has many components, of which the Sequencer component is the most important. It is responsible for receiving transaction requests on Layer2, determining their order of execution, and batching the sequence of transactions for delivery to the Rollup project’s contracts on Layer1. It is important to note the fact that before we begin the following section, the sequencer for all Layer2 Rollups in Ether is currently centralized, as shown in the following diagram.

Source: screenshot of official tweet

The centralized sequencer problem:

The Layer2 full node can obtain the transaction sequence in two ways: either directly from the sequencer, or by reading the transaction batch (Batch) sent by the sequencer to Layer1 but the latter has a stronger non-modifiable property. Since transaction execution changes the state of the blockchain ledger, to ensure consistency, the Layer2 full node must synchronize the ledger state with the sequencer in addition to obtaining the transaction sequence. Therefore, the task of the sequencer is not only to send the transaction batch to the Rollup contract of Layer1, but also to transmit the status update result Stateroot/Statediff after the transaction execution to Layer1. In general terms, the sequencer’s job is to process and sequence the transactions into blocks added to the blockchain, and it is responsible for the batch processing of the transactions and posting them to the Layer1 Smart Contracts.

For the whole node of Layer2, as long as it obtains the transaction sequence and the initial Stateroot of Rollup on Layer1, it is able to restore the blockchain ledger of Layer2 and calculate the latest Stateroot.Conversely, the Stateroot calculated by the whole node of Layer2 itself is inconsistent with the Stateroot posted by the sequencer to Layer1 means that the sequencer is fraudulent. So compared to Layer2’s own network, Layer1 is more decentralized, trustless and secure.

YBB Capital Researcher Ac-Core Homemade

OP Stack

So the question is, can Layer2 fake some non-existent or some wrong transactions, such as transferring Token assets from Layer2 to the sorting machine’s runner address, and then transferring those Token assets to Layer1 to steal the user’s assets? The answer is: it’s perfectly possible to do that if one wanted to. So in the face of the possible fraud risk of sequencers, different types of Rollups use different ways of countermeasures.

Let’s take the example of Optimistic Rollup, which allows the Layer2 full node to provide a Fraud Proof that the data posted by the sequencer in Layer1 is wrong. But for Optimism, which has no Fraud Proof, if he really wants to steal the assets of Layer2 users through the sequencer, he just needs to let the sequencer runner forge transaction orders and transfer other people’s assets in Layer2 to his own address, and then finally transfer the stolen coins to Layer1 through the Bridge contract that comes with Rollup.

In order to solve this possible problem, the current solution is to rely on community members and social media to reach a so-called “consensus”, and to rely on OP as the official credit endorsement. Therefore, to summarize the theory, the security of OP Rollup at least relies on having an honest Layer2 node that can publish fraud proof to ensure that the OP Stack is a multi-chain single choice, as mentioned in the subsection “Difference between OP Stack and ZK Stack” above.

YBB Capital Researcher Ac-Core Homemade

ZK Stack

Let’s explore the ZK Stack, in the ZK Rollup network, there exists the Prover node, which specializes in posting batches of transactions for the sequencer, as well as generating proofs of validity. These validity proofs have specialized validation contracts on Layer1. As soon as the transaction batch and its corresponding Stateroot/Statediff’s proofs are verified by the Verifier contract, the transaction is finalized. It differs from OP Stack in that ZK Rollup utilizes Validity Proof in addition to relying on Layer2 full nodes in solving the sequencer fraud problem.The official bridge of ZK Rollup will also only allow the execution of withdrawal transactions verified by Validity Proof, which is clearly more reliable than Optimism is much more reliable, i.e., the ZK Stack is multi-chain and multi-option, as suggested in the “Difference between OP Stack and ZK Stack” section above.

Theoretically, the security of ZK Rollup is guaranteed by the Verifier contract on Layer1 or the final confirmation of the transaction is done by Layer1 nodes. In contrast to OP Rollup’s security, which relies on at least a single honest Layer2 node that can issue fraudulent certificates, both of them have inherited the security of Layer1 (ETH), but this may not be the case in the strictest sense of the word, but this is the optimal solution for the time being, and compared to other public chains, Ether has experienced so many years of development, and the security of Ether is undoubtedly the most trustworthy. Ether is undoubtedly the most trustworthy and secure chain compared to other public chains.

Just like the blockchain triangle, there seems to be a triangle of security, simplicity, and efficiency in the overall user experience of a “product”, and the ZK Stack is much more of a believer in relying on math and code to improve overall security than the OP Stack, thus dramatically increasing the overall complexity. So there are a few clichés about ZK as well:

YBB Capital Researcher Ac-Core Homemade

● Latency Problem: ZK Rollup also needs to address the latency of Layer2 nodes publishing data to Layer1. Similar to the need to prepare boxes for courier shipments, so each time a sequencer or prover sends data to Layer1 it incurs a fixed cost. To reduce the cost, the sequencer and prover will try to minimize the number of times they publish data on Layer1 frequently, and instead wait for a large amount of data to come together at one time, and then package and publish it all together.

● Speed Issues: ZK Rollup faces a challenge in generating proofs of validity at a slow rate. While the sequencer can execute thousands of transactions in 1 second, generating Proofs of Validity for these transactions can take hours. To solve this problem, the mainstream ZK Rollup network adopts an innovative approach: the Proof generation task is decomposed into multiple small tasks and processed in parallel by different Prover nodes, which greatly improves the speed of proof generation.

● Cost: In order to reduce the overall cost, many ZK Rollup solutions adopt the strategy of “aggregating multiple Proofs and sending them to Layer1 at once”. This means that the Prover will not send a Proof to Layer1 immediately after it is generated, but will wait for multiple Proofs to be generated, then aggregate them together and send them to the Verifier contract on Layer1 at once. With this aggregation, a Proof can contain and validate the computation steps generated by multiple Proofs, thus further reducing the overall data cost.

● Volume issues: If not enough transactions are initiated, the sequencer may delay releasing data to Layer1. As an example, during periods of market inactivity, some Rollup networks may only send transaction batches to Layer1 every half hour. However, this problem is effectively addressed in some other Rollup schemes, such as Starknet, which employs a reduction in the frequency of Statediff releases to reduce data costs.

Regarding the question of a more suitable decentralized sequencer solution, modularity is perhaps the optimal solution because modularity equals greater customizability, which is dominated by the following five main types of decentralized tools currently available:

  • Single Sequencer & POA
  • Based rollup
  • DVT x Sequencer
  • Shared Sequencer
  • Bootstrap a New Sequencer Set

We believe that in not only the future, many of the above problems can be further solved by technology. For example, to reduce the generation time of the proof of validity, Optimism promises to release the fraud proof system in the near future, as well as Ethernet’s Danksharding program will also significantly reduce Rollup’s data costs, and decentralized sorting machine problems will also be overcome, and together they will provide effective solutions to the above problems.

Ending: where the narrative goes

YBB Capital Researcher Ac-Core Homemade

Hyperchain and hyper-extension have always been the extension direction that has been the focus of everyone’s attention, and although the projects are still in the early stages of development as of now, they have all brought a stronger story narrative to Ether 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 recently on the evening of June 26th, zkSync announced the launch of ZK Stack, a modular open source framework for building custom ZK Rollups, which is also considered by many as the killer app used by the zkSync team to deal with the number one OP Stack. On one side is the OP Stack with a first-mover advantage, on the other side is the ZK Stack with a mathematical advantage, in short, the value of Layer2 can be accumulated into the Rollup tokens, Layer2 expansion battle has just begun, about Layer2 this war without smoke how do you think?

About YBB

YBB is a web3 fund dedicating itself to identify Web3-defining projects with a vision to create a better online habitat for all internet residents. Founded by a group of blockchain believers who have been actively participated in this industry since 2013, YBB is always willing to help early-stage projects to evolve from 0 to 1.We value innovation, self-driven passion, and user-oriented products while recognizing the potential of cryptos and blockchain applications.

Website | Twi: @YBBCapital

--

--

YBB
YBB Capital

A leading Web3 fund driving the future through innovative investments. Learn more: ybb.io 📩business@ybb.io