Scan to download
BTC $71,546.47 +4.21%
ETH $2,237.34 +6.10%
BNB $615.94 +2.76%
XRP $1.37 +3.72%
SOL $84.68 +5.84%
TRX $0.3150 -0.45%
DOGE $0.0943 +3.99%
ADA $0.2617 +6.74%
BCH $442.82 +2.19%
LINK $9.22 +4.80%
HYPE $38.24 +4.74%
AAVE $94.62 +1.54%
SUI $0.9615 +10.27%
XLM $0.1639 +4.86%
ZEC $317.52 +24.27%
BTC $71,546.47 +4.21%
ETH $2,237.34 +6.10%
BNB $615.94 +2.76%
XRP $1.37 +3.72%
SOL $84.68 +5.84%
TRX $0.3150 -0.45%
DOGE $0.0943 +3.99%
ADA $0.2617 +6.74%
BCH $442.82 +2.19%
LINK $9.22 +4.80%
HYPE $38.24 +4.74%
AAVE $94.62 +1.54%
SUI $0.9615 +10.27%
XLM $0.1639 +4.86%
ZEC $317.52 +24.27%

YBB Capital: The Crazy Multi-Chain Universe, The Crazy OP Stack

Summary: Hyperlinks and hyper-expansion have always been key areas of focus for everyone. Although currently, various projects are still in the early stages of development, they collectively bring a stronger narrative to Ethereum.
YBB Capital
2023-08-03 17:28:04
Collection
Hyperlinks and hyper-expansion have always been key areas of focus for everyone. Although currently, various projects are still in the early stages of development, they collectively bring a stronger narrative to Ethereum.

Author: YBB Capital Researcher Ac-Core

Introduction

The main narrative direction of ETH has shifted from Layer1 to Layer2. If we still understand it as the "one-click token issuance" ERC-20 narrative, let's broaden our perspective and imagine that a frenzy of "one-click chain issuance" is about to arrive! Relying on its unparalleled ecosystem and consistently high TVL, Arbitrum has been leading the war among Layer2 solutions. But can this temporary victory last long? Unlike the Layer3 solutions that build on Arbitrum Orbit, OP Stack is a "super chain" that allows for one-click creation of Layer2. This article will provide a comprehensive analysis focusing on three core aspects: the OP Stack architecture, the ZK elements within OP, and the security issues of Rollups.

OP Stack Opens the "Super Chain Universe"

YBB Capital Researcher Ac-Core Original

Where will the narrative of the next bull market begin? Will it be from high-performance Layer1, the increasingly stacked Layer3, ZK series Layer2, or from the super chain of OP Stack? This is a very interesting and thought-provoking question. As long as Ethereum does not act recklessly, in the next bull market, the title of Ethereum killer will still be the ultimate goal that all public chains strive to surpass. Within this giant, there are many significant super cores, 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 Ethereum using Optimistic rollups. It moves most computation and storage off-chain while relying on Ethereum for security and finality. From a technical perspective, Optimism mainly manifests in its ability to save users a significant amount of on-chain fees. 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: Provide data availability, data synchronization, and communication services between Layer1 and Layer2;
  • Tools: Facilitate the development, testing, deployment, monitoring, and debugging of blockchains based on OP Stack.

Strong Openness:

OP Stack will be built as the infrastructure for modular and forkable scalable blockchains. To achieve this vision, various Layer2 solutions need to be integrated into a single super chain, combining originally isolated Layer2 into a system with interoperability and composability. Launching Layer2 will be as simple as deploying smart contracts to Ethereum today, shifting the narrative from "one-click token issuance" to "one-click chain issuance." Essentially, the super chain is a horizontally scalable blockchain network that shares Ethereum's security, communication layer, and development toolkit among various chains. YBB Capital Researcher Ac-Core Original

OP Stack (Over Powered Stack) will become the unified modular development stack behind the super chain, with countless interlinkable and communicable blockchains. The OP Stack stack is developed and maintained by a dedicated Optimism Collective, supporting a shared open-source system for deploying new aggregation networks. At the same time, it is also a standardized open-source module. So, isn't it a Cosmos completely based on Ethereum's security? Initially, it was said that ETH and ATOM would complement each other, but now OP Stack has become the killer of Cosmos? Next, let's break down the definition of OP Stack:

Modules are data bits that any developer can insert into OP Stack. The "standardization" of this super chain means there is a consensus on the standards for a module, and it can be implemented by everyone. Complete open-source means it can be freely provided for anyone to develop, iterate, and request messages. Developers have the ability to switch modules across different execution layers, consensus layers, settlement layers, and data availability layers of a chain.

For example, dYdX chose to leave Ethereum for a Cosmos application chain, primarily because they wanted greater modularity in the consensus layer on their chain. I think this is a great start, allowing more independent Dapps to choose public chains that better suit their needs, with Luna being the most representative case, although it was destroyed for various reasons. Fortunately, OP Stack addresses this issue, as its design allows for easier code forking, enabling developers to easily abstract different components of a blockchain and modify it by inserting different modules.

OP Stack Design Principles:

  • Efficiency: Anything can be built using OP Stack and issued as a blockchain with one click;
  • Simplicity: Utilizing reusable code and ready-made development kits to enhance security and reduce maintenance complexity, thereby lowering the overall barrier;
  • Scalability: The Optimism Collective will fully open-source the main code of OP Stack.

Architecturally, OP Stack can be divided into six layers from bottom to top: DA Layer (Data Availability Layer), Sequencing Layer, Derivation Layer, Execution Layer, Settlement Layer, and Governance Layer. Each layer of OP Stack is a modular API component that can be freely combined and decoupled. The most critical are the DA Layer, Execution Layer, and Settlement Layer, which constitute the main workflow of OP Stack.

  • DA Layer: The original data source of OP Stack, which can use one or more data availability modules to obtain input data. Currently, Ethereum is the primary DA layer, but more chains will join in the future;
  • Execution Layer: The state structure within OP Stack, which can provide possibilities for EVM or other VMs, increasing support for Layer2 transactions initiated on Ethereum while adding additional Layer1 data fees for each transaction, thus increasing the comprehensive cost of publishing transactions to Ethereum;
  • Settlement Layer: The destination for Layer2 transaction data on OP Stack, which sends information to the target blockchain after confirmation on Layer2 for final settlement. In the future, it is expected to integrate validity proof mechanisms like ZK to bridge gaps between different chains, potentially linking OP series Layer2 and ZK series Layer2 islands.

We have observed that some projects with ZK elements have recently emerged in the OP ecosystem. Let's boldly imagine that if an Optimistic rollup wants to transform itself into a ZK rollup, no problem! Just replace its fraud proof module with a validity proof module in the settlement layer. If a chain wants to use Celestia for its data availability layer, no problem! Just replace Ethereum with Celestia. If one wants to replace the EVM in the execution layer with another virtual machine, unfortunately, this can only be a technical possibility of OP Stack. Just as the emergence of this super chain situation has given rise to a popular meme------"Polygon: I want to be the Cosmos of ZK Layer2! Optimism: I want to be the Cosmos of OP Layer2! Cosmos: Then who am I?"

OP Stack Principles:

YBB Capital Researcher Ac-Core Original

Ethereum's infinite block space is a key step in achieving large-scale applications, but this diffusion has also brought about fragmentation. Permissionless deployment has also encountered new challenges. Nowadays, each new OP Stack chain grows independently in its own domain, with no direct method for sharing standards and improvements. Users and builders also face significant challenges: individually assessing numerous different chains based on security, quality, and neutrality. To achieve a super chain, OP Stack needs to transform from independent, decentralized block spaces into a unified chain collective, collectively committed to an open, decentralized block space. The "Chain Law" sets guiding principles for optimistic governance and the super chain. Optimistic governance shifts from managing a single chain to managing shared standards across multiple chains, defining the attributes required to be part of the super chain while prioritizing the protection of users conducting transactions on the super chain. Fundamentally, the "Chain Law" is a social contract (rather than a legal contract), making active community discussion crucial. Its existence will enable the super chain to guarantee the following characteristics:

  • Ensure that block space remains homogeneous, neutral, and open: Commitment to the Chain Law is a commitment to protecting users, developers, and other stakeholders of the chain. Regardless of the size of the chain, if it is part of the super chain, it can credibly prove the homogeneity, neutrality, and openness of its block space with the support of optimistic governance;
  • Benefit from continuous improvement: Shared upgrades mean that the super chain can always access the best technology without worrying about maintenance;
  • Provide better and more usable infrastructure: Since all chains in the super chain are credibly committed to a standard, they can work together to ensure the availability and economy of key services like indexing and sorting.

Questions Worth Considering:

Can OP Stack benefit OP?

What is the purpose of the OP Token? If they operate in a Basechain manner, they will return a portion of their revenue to the Optimism Collective, so the "treasury" will rely on its own "value," depending on creating more narratives to ultimately feedback into the token price, making OP's performance logic in the secondary market similar to that of ATOM. However, this solution may be the most optimal at present. If more chains imitate the Basechain method of feedback, the Optimism Collective will ultimately benefit. Does this remind us of UNI? Both projects have strong foundations, but the tokens themselves have no other value besides voting and governance. In contrast, current Layer2 solutions face the issue 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 Rollup tokens.

At the same time, the OP team released the Law of Chain proposal on July 25, aiming to standardize the "profit feedback" model for all chains adopting OP Stack to bring more benefits to the entire OP ecosystem (as mentioned in the OP Stack principles). This is quite similar to the shared security model of Cosmos.

Differences Between OP Stack and ZK Stack:

OP Stack: Multi-chain 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 because OP Stack pursues that each chain must validate the transactions of other chains. Otherwise, it would need to wait several days on Layer1 for results. Therefore, a single shared sequencer, centralized MEV distribution, and protection under the Chain Law and governance are the only possibilities for Optimistic rollups to achieve seamless interoperability between different chains.

ZK Stack: Multi-chain Multiple Choices

In contrast to OP Stack, ZK Stack can also have multiple chains, but it offers various choices, allowing for the selection of its own sequencer and handling MEV in its own way, protected by mathematics and code (note: OP Stack is protected by the Chain Law and governance). This is because if ZK adopts a designated shared or very few thread sets, they can blindly trust each other based solely on mathematics, which undermines the value of zero-knowledge proofs.

ZK Elements in OP Stack

YBB Capital Researcher Ac-Core Original

Because OP Stack is a completely open architecture, it allows for the emergence of zkvm, zkmips, zkwasm, and zkevm within the ecosystem. However, compared to "orthodox ZK," OP Stack only produces some different ZK elements. This inevitably leads us to think that perhaps in the near future, there will be a dream collaboration between OP rollups and ZK rollups.

Achieving Zero-Knowledge Proofs (ZKP) for OP:

According to the latest developments, the team behind Mina plans to use their own plonk system + kzg commitment + folding algorithm nova to implement zkmips vm on OP Stack. Although this is just a recent proposal and may have many immature aspects, it is certainly worth exploring. The mission of the project team is to enable secure, low-latency cross-chain communication between Layer2 and Layer1, as well as among various OP chains through zero-knowledge proofs. This is a zero-knowledge proof (ZKP) for a well-supported instruction set architecture (ISA) that can prove the behavior of the Optimism fault tolerance program, laying the foundation for proving any blockchain system based on OP Stack. YBB Capital Researcher Ac-Core Original

Completing this task means implementing a zero-knowledge proof (ZKP) system that can use instruction set architectures (ISA) supported by golang compilers (like MIPS, RISC-V, or WASM) to prove the OP fault tolerance program [1]. Additionally, the proof system must also demonstrate state transitions between two blocks of a standard OP Stack chain, proving its practical feasibility. Besides proving the standard execution trajectory of the ISA, support for the fault tolerance program introduces additional requirements [2].

Specifically, the fault tolerance program introduces the concept of 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 in a specific location in memory and executed by a system call, after which the pre-image of that hash value is loaded into memory for use by the program. The Pre-image Oracle is also used to guide the initial input of the program.

Attempts at Decentralized Sequencers:

Espresso Systems tweeted on July 21, 2023, announcing that their proposal for building decentralized sequencer verification for OP Stack leadership elections has been accepted, making them contributors to OP Stack and the Superchain. The main protocol of the project, HotShot, is a high-speed consensus protocol that allows Ethereum validators to participate in the protocol through re-staking, aiming to achieve the same scale as the Ethereum validator set. The project also developed Espresso Sequencer, which integrates with fully functional ZK rollups, particularly the branch of Polygon zkEVM.

What is Leadership Election?

Leadership election [6] refers to the ability in distributed systems to use different leaders responsible for creating the next canonical state transition. In blockchain, leader elections allow different block producers to generate blocks at different times, and the leadership election algorithm can be either competitive or non-competitive.

In proof-of-work scenarios, competitive leader election algorithms mean that many potential units compete to become leaders at the same time. Non-competitive leader election algorithms mean that at a specific point in time, there is only one known leader. In the case of Ethereum's Gasper, the non-competitive leader election algorithm means that at a specific point in time, there is only one known unit, 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 and the builder network (i.e., the block builder network is only responsible for selecting transaction ordering, while the proposer network is only responsible for signing blocks), it transforms the single entity responsible for producing blocks at a given moment into many possible entities, allowing them to compete to build the most profitable potential blocks within the builder network at that moment. Meanwhile, due to the existence of MEV, this competition may return.

Understanding the various second-order effects of the leadership election mechanism between different OP Stack chains is quite challenging. Currently, using leadership election as a mechanism is the most popular choice, as it allows for more decentralized ordering. It should be noted that this solution does not guarantee that the sequencer is absolutely decentralized, so extra caution is needed when considering the issue of decentralized sequencers.

Are Rollups Really Secure?

How Ethereum Works:

The principle of Ethereum is that each node stores and executes every transaction submitted by users. This high level of security also makes the entire network quite expensive, so Rollup solutions have been adopted to scale the network. In simple terms, Rollup = a set of Layer1 contracts + Layer2's own network nodes, i.e., on-chain smart contracts + off-chain aggregators, relying on Ethereum for settlement, consensus, and data availability while only being responsible for executing the Rollup.

  • On-chain smart contracts represent its trust model as a smart contract on Ethereum, borrowing Ethereum's security;
  • Off-chain aggregators indicate that they will execute and aggregate transactions off-chain, compressing large volumes of transactions and ultimately placing them on the Ethereum mainnet to achieve faster and cheaper goals.

Layer2 network nodes consist 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 sequences into batches, which are then sent to the Rollup project's contract on Layer1. It is important to clarify one fact before proceeding: as shown in the reference image, all Layer2 Rollups on Ethereum currently have centralized sequencers. Image Source: Official Tweet Screenshot

The Problem of Centralized Sequencers:

Layer2 full nodes can obtain transaction sequences in two ways: one is directly from the sequencer, and the other is by reading the transaction batches sent to Layer1 by the sequencer. However, the latter has stronger immutability. Since transaction execution changes the state of the blockchain ledger, to ensure consistency, Layer2 full nodes must not only obtain the transaction order but also synchronize the ledger state with the sequencer. Therefore, the sequencer's task is not only to send transaction batches to the Rollup contract on Layer1 but also to transmit the updated results of the state after transaction execution (StateRoot/StateDiff) to Layer1. In simple terms, the sequencer's job is to process and order transactions to be added to the blockchain, responsible for batch processing transactions and publishing them to Layer1 smart contracts.

For Layer2 full nodes, as long as they obtain the transaction sequence on Layer1's Rollup 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 does not match the StateRoot published by the sequencer to Layer1, it indicates fraudulent behavior by the sequencer. In summary, compared to Layer2's own network, Layer1 is more decentralized, trustless, and secure. YBB Capital Researcher Ac-Core Original

OP Stack:

So the question arises, can Layer2 forge some non-existent or erroneous transactions, such as transferring Layer2's token assets to the address of the sequencer's operator and then transferring those token assets to Layer1, thereby stealing user assets? The answer is: yes, it is entirely possible to do so. Therefore, in the face of potential fraud risks from sequencers, different types of Rollups have adopted different countermeasures.

Taking Optimistic Rollup as an example, it allows Layer2 full nodes to provide fraud proofs, demonstrating that the data published by the sequencer on Layer1 is incorrect. However, for Optimism, which does not have fraud proofs, if it truly wants to steal Layer2 user assets through the sequencer, it only needs to have the sequencer operator forge transaction instructions and transfer other people's assets on Layer2 to their own address, ultimately using the Rollup's built-in Bridge contract to transfer the stolen coins to Layer1.

To address this potential issue, the current solutions are either relying on community members and social media for public opinion supervision to reach a so-called "consensus," or relying on OP as the official credit endorsement. Therefore, in theory, the security of OP Rollup relies on having at least one honest Layer2 full node capable of publishing fraud proofs, as mentioned in the previous section "Differences Between OP Stack and ZK Stack": OP Stack is a multi-chain single choice. YBB Capital Researcher Ac-Core Original

ZK Stack:

Now let's discuss ZK Stack. In ZK rollup networks, there are Prover nodes specifically responsible for publishing transaction batches for the sequencer while generating validity proofs. These validity proofs have dedicated verification contracts on Layer1. As long as the transaction batch and its corresponding StateRoot/StateDiff proof pass verification by the Verifier contract, the transaction is finally confirmed. Unlike OP Stack, ZK rollups address the fraud issue of sequencers not only by relying on Layer2 full nodes but also by utilizing Validity Proofs. The official bridge of ZK rollups will only allow withdrawal transactions that are verified through validity proofs, making it significantly more secure than Optimism, as mentioned in the previous section "Differences Between OP Stack and ZK Stack": ZK Stack is multi-chain multiple choices.

From a theoretical perspective, the security of ZK rollups is guaranteed by the Verifier contract on Layer1, or it can be said that the final confirmation of transactions is completed by Layer1 nodes. Compared to the security of OP rollups, which relies on at least one honest Layer2 full node capable of publishing fraud proofs, both inherit the security of Layer1 (ETH). However, in strict terms, this may not be entirely accurate, but this is currently the optimal solution. Compared to other public chains, Ethereum has undergone many years of development, and its security is undoubtedly the most trustworthy.

Just like the blockchain trilemma, the overall user experience of a "product" seems to also have a trilemma: security, simplicity, and efficiency. ZK Stack, compared to OP Stack, relies more on mathematics and code to enhance overall security properties, thus significantly increasing overall complexity. Therefore, there are several well-known issues regarding ZK: YBB Capital Researcher Ac-Core Original

  • Latency Issue: ZK rollups still need to address the latency issue of Layer2 nodes publishing data to Layer1. Similar to how a courier needs to prepare a packaging box, each time the sequencer or Prover sends data to Layer1, a fixed cost is incurred;
  • Speed Issue: ZK rollups face a challenge in that generating validity proofs is relatively slow. Although the sequencer can execute thousands of transactions in one second, generating validity proofs for these transactions may take several hours;
  • Cost Issue: 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 will not immediately send a proof to Layer1 after generating it but will wait until multiple proofs are completed, aggregating them together and sending them to the Verifier contract on Layer1 in one go;
  • Quantity Issue: If the number of initiated transactions is not large enough, the sequencer may delay sending 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 more suitable decentralized sequencer solutions, modularization may be the optimal solution, as modularization equates to greater customization. Currently, the main decentralized tools consist of the following five types:

-- Single Sequencer & POA -- Based Rollup

-- DVT x Sequencer -- Shared Sequencer

-- Bootstrap a New Sequencer Set

We believe that in the not-so-distant future, many of the above issues can be further resolved through technology. For instance, reducing the generation time of validity proofs, Optimism has promised to release a fraud proof system soon, and Ethereum's Danksharding plan will significantly reduce the data costs of Rollups. The challenge of decentralized sequencers will also be tackled, providing effective solutions to the aforementioned problems.

Conclusion: Narrative Direction

YBB Capital Researcher Ac-Core Original

Super chains and super scalability have always been key focus areas for expansion. Although various projects are still in the early stages of development, they collectively bring a more powerful narrative to Ethereum. We can now see that OP Stack has gained considerable adoption, with many star public chains joining, such as Coinbase, opBNB, Zora, Worldcoin, and others providing strong brand endorsement for OP Stack. Additionally, on the evening of June 26, zkSync announced the launch of a modular open-source framework, ZK Stack, for building custom ZK rollups, which many believe is zkSync's ace in the hole against OP Stack. On one side is the OP Stack with its first-mover advantage, and on the other side is the ZK Stack with its mathematical advantages. In summary, any value of Layer2 can accumulate into the tokens of Rollups, and the battle for Layer2 expansion has just begun. What are your thoughts on this war without gunpowder regarding Layer2?

References:
[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

Reference Articles:

https://mp.weixin.qq.com/s/ezSpKkoUoyFtoYd2cLoOzw

warnning Risk warning
app_icon
ChainCatcher Building the Web3 world with innovations.