Ethernet Layer 2 solution three powerful competition, which one do you pick more?

This article compares three promising Layer 2 solutions optimism, Arbitrium and Metis based on optimistic rollup.

Over the past few months, the price of ETH has soared and the use of the ethereum network has increased significantly. The main reasons for this trend are the renewed interest in NFT and the integration of DeFi applications, as well as the significant growth of the cryptocurrency market. This has had some “unpleasant” consequences for DApp developers in the ethereum ecosystem: mainly the network’s inability to accommodate the increased usage, resulting in high gas costs (even higher if you want to validate your transactions in the next few blocks). As of writing this article, the average gas fee on the main Ethernet network is about $15.

This new scenario we face in the ethereum ecosystem transforms Layer 2 improvements overnight from a “nice to have” feature to the highest requirement for “Dapps to be able to run sustainably in terms of performance and cost”.

Fortunately, we already have several consistent Layer 2 platforms and protocols to help us accomplish this task. Many projects are built on top of them, but how do we choose a Layer 2 solution based on the optimistic rollup that best meets our needs? This article compares three promising Layer 2 solutions based on optimistic rollups. Let’s get started right away!

Where optimistic rollup excels
In order to be able to compare different Layer 2 solutions based on rollup, we first need to take a quick detour to understand what optimisticrollup is. rollup is the bundling (or “aggregation”) of sidechain or off-chain transactions into a single transaction, which is then submitted to the L1 solution. To protect all these bundled transactions and make them individually verifiable, a cryptographic proof is generated from the bundle.

The requirement for the rollup to work is to have some kind of standalone blockchain compatible with Ethernet, with a reduced number of nodes or high performance additions that take care of signature verification, contract execution, etc. This allows the standalone blockchain to verify the legitimacy of transactions that are subsequently bundled in the main Ethernet chain. the L2 Rollup sidechain is responsible for verification and contract execution, while the L1 is dedicated to storing immutable transaction data.

In an optimistic rollup, participants are “optimistic” about the validity of the transactions executed in the sidechain. The aggregator submits the sidechain transactions to the main chain without additional computation.

How can we be sure that a sidechain transaction is actually valid?
The optimistic rollup uses fraud to ensure that all transactions are legitimate. If someone notices a fraudulent transaction by an aggregator, they can challenge the rollup by sending a fraud-proof proof to run the computation of the transaction and verify its validity. this means that we do not validate each transaction as in other rollup solutions (e.g. zk -rollup) and perform the proof computation only if we suspect that the transaction is in fraud.

This significantly reduces the cost of gas compared to zk -rollup and opens the door to achieving x10-x100 improvements in transaction processing throughput. After an invalid block is submitted and a fraud proof is finalized, the block chain in Layer 2 can be rolled back and restored from the previous non-fraud block.

Comparison of Competitors
After a brief introduction to rollup, we have all the bases we need to solve the Layer 2 comparison. For comparison purposes, I have chosen three of the Layer 2 solutions that have a more interesting set of features for DApp developers (i.e., those that I would personally consider for deploying my own applications).

All of these builds (more or less) share the same building blocks:

An Ether-compatible EVM to run the user’s Solidity contract in L2.

A sequencer/aggregator for batch processing transactions from the bundle from L2 and then submitting them to L1.

a set of L1 smart contracts for coordinating interactions and submitting data from L2.

the use of different fraud proofs to enable the counterparty to rebut invalid or forged transactions made by the aggregator.

The use of equity to coordinate the incentives and economics of the L2 system.

Despite having a common building block, these three solutions differ significantly in the way they implement the rollup protocol. Let us examine each of them in detail to speed up our comparison.

  1. optimistic

optimistic takes all the existing tools in the ethereum ecosystem and modifies them to implement their optimistic protocol and Layer 2 solution.

VM: Their L2 VM is the optimistic VM (OVM), which is a modification of the Ether VM (EVM) that replaces the context-dependent EVM opcode with a new opcode suitable for L2 contract execution. the VM behaves as a sandbox environment that ensures deterministic smart contract execution and state transitions between L1 and L2.

Client: optimistic also modifies the widely spread ethereum client Geth so it can be used as a client for the L2 blockchain. The client modifies messages so that other L2 clients can understand them, and it includes all the processes needed for transaction sequencing and batch processing to build rollups.

Rollup construction: For their rollup construction, optimistic uses the Geth client as a single sequencer. In optimistic, transaction data is compressed and then sent to a sequence entry point contract on L2. The sequencer is responsible for “batch aggregating” these transactions and publishing the data on Ether to provide data availability so that even if the sequencer disappears, a new sequencer can be started to continue from where it left off. Anyone can send new transactions to L1, and these transactions are added to the L1 contract, which behaves as an “append-only log” for each L2 transaction.

Validation: For each transaction posted by the sequencer, the validator is responsible for downloading the transaction and applying it to its local state. If everything matches, they do nothing, but if there is a mismatch, the validator needs to commit all previously valid transactions on the chain and re-execute any published state to show that the published state is actually wrong. If the fraud validation is successful, the incorrect state and batch are removed from L1.

Economic model:The batch sequencer for each epoch needs to be marked as collateral by a smart contract called a bond manager. In order to become a collateral sequencer, a fixed amount of ETH needs to be added to the contract.

This collateral is cut each time a sequencer fraud is detected. The sequencer can reclaim this share after 7 days of deposit, and from then on, the sequencer batch processing can be considered final as verification is no longer possible. If fraud is successfully proven, a percentage (X%) of the proposer’s margin is destroyed and the remaining percentage (1-X)% is distributed proportionally to each user who provided fraud proof data.

This economic model prevents the sequencer from becoming dysfunctional, but does not address the potential situation where the verifier is trying to send a large number of different batches of fraud proofs to the blockchain (forcing a large number of L1 calculations).

  1. Arbitrium

VM and client:Arbitrium implements the Arbitrium Virtual Machine.The AVM is responsible for running the L2 contract and maintaining its state.The state of the VM is organized as a Merkle tree and executed in a generative state transition on that Merkle tree.Arbitrium also implements its own custom L2 client.

rollup construction: Arbitrium uses a single on-chain contract to coordinate its rollup protocol. At any point in the protocol, some state of the VM can be fully confirmed and finalized, i.e. its hash is stored on the chain. a new transaction in L2 triggers a state update of this Merkle tree, which stores every state in the chain. In order to verify the stored state, the participants of the protocol can use the so-called “disputed assertion (DA)” in Arbitrium to prove that starting from a certain state of the hash, the VM can perform a specified number of computation steps leading to a specified new hash state (and its corresponding contract execution, payment and event issuance). The DA may end up being valid (i.e., successfully computed) or invalid. If the DA is valid, the system will enter a new state with a new state hash in the tree and its corresponding side effects (payments and logs) specified in the DA. If the DA is invalid, the fork is rejected and the state remains unchanged. Each state can follow at most one DA. if the DA does not follow a state, then anyone can create a DA that follows it, thus creating a new fork. The result will be a tree of possible futures. Thus, we can see that Optimism uses multiple L1 smart contracts to commit states and execute them in L2.

Economic model: Collateralization plays a key role in Arbitrium’s rollup. Anyone can collateralize one state of the tree. By locking a state (shown in the diagram) you assert that the state will eventually be agreed upon. In other words, you assert that you have branched correctly at each DA along the path from the current state to the square you are mortgaging. If you are wrong, your mortgage will be cut. You can move the mortgage to the right, choosing either above or below the branch, but not to the left, because that would be a revocation of the mortgage commitment you made earlier; or you can mortgage up and down two parallel branches at the same time. The benefits of the participant pledging on the wrong branch are distributed among the participants on the receiving branch. The agreement is constructed to ensure that eventually all independent histories (branches) will come together to form a DA and ultimately resolve the dispute.

Validation: Once the pledge deadline for a DA has passed and all remaining timely (pledged before the pledge deadline) shares are on the same branch as the DA, the system can confirm the outcome of the DA. the DA is accepted or rejected and the current status moves to the appropriate box on the right side of the DA. If the DA is confirmed as valid, then its side effects (e.g. payments) are realized on the chain. This is how the VM’s state is moved forward. The protocol is completely trustless, as any participant has the right to verify the VM’s state by what is considered correct on the branch.

  1. Metis

VMs and Clients: Metis uses the Metis VM (MVM), a virtual machine compatible with EVM. Compared to all the VMs in the above project, the MVM has significant differences in functionality and features. In MVM, L2 compute and storage are completely separated. metis introduces the concept of decentralized autonomous corporation (DAC). a DAC is a separate entity in the system that can represent, for example, a large enterprise that performs many of its daily operations on the platform. the DAC is key to metis operations. When a new DAC is instantiated in the system, a new storage layer is created specifically for the DAC. Thus, from a blockchain interaction perspective, the DAC has its own storage space.

On the other hand, Metis’ L2 compute layer (i.e. block mining, consensus, cross-layer communication, etc.) is shared by all DACs in the network, but it contains an interesting feature: all compute processes are implemented as a single service (following a microservices approach), thus allowing scaling up and down the compute layer according to the demand and throughput of the entire network.

In addition, MVM introduces the role of providers that can register and contribute computational power to make the Layer 2 structure truly decentralized (these providers can be seen as sorters from the Optimism platform). Providers will be incentivized based on the blocks generated. Finally, a really powerful feature included in MVM and the Metis client that is lacking in other L2 platforms is the support not only for contract execution but also for decentralized storage associated with smart contract computation.

Thus, Metis integrates with the IPFS network through an IPFS parser in MVM that allows contracts to point to invariant data stored in IPFS. This can be used, for example, to point to confidential data stored in the IPFS network.

rollup construction: In Metis, the sorting and batching of L2 transactions is not done by individual sorters, but by a pool of funds. A pool of sorters is randomly selected to aggregate status and submit transactions to L1. in L1, Metis deploys a combination of contracts to coordinate L2 to L1 batch commitments.

Economic model: each sequencer needs to commit multiple Metis tokens to qualify. the Metis ecosystem has strong real economic ties and the value of transactions can reach billions of dollars, a fact that requires the use of a dynamic bond threshold (DBT) in order to link the risk and reward of malicious behavior to the real economic value managed by the DACs involved in the transaction. using the DACs allocated to the sequencers The DBT is calculated using the maximum economic capacity of the DACs assigned to the sequencer as a benchmark. the economic capacity of a DAC is calculated based on its total balance. Therefore, if the number of collateralized Metis tokens (MT) for a particular sequencer is less than the DBT of the DACs assigned to it, it will not be able to process transactions for that DAC in bulk. sequencing of DACs will be blocked until a qualified sequencer is found in the pool of sequencers. New deposits or withdrawals from a DAC’s balance will trigger an automatic update of its DBT. Thus, new withdrawals from the DAC balance will reduce the DBT of the sorters and vice versa. This ensures that the required sorting collateral always follows the actual economic value of the DAC.

Validation: To perform validation, the Metis platform introduces the concept of L2 Rangers in its MVM. L2 Rangers are members of special DACs that are responsible for collateralizing a certain range of blocks and validating the state against transactions assigned periodically from random DACs. Rangers can not only validate sequential transitions for other DACs, but also for their own DACs ( Rangers are rewarded with some Metis tokens (MT) for each completed verification. A successful challenge to the chain state (i.e., proof of fraud) will award a portion of the “malicious” sequencer margin to the verifier. On the other hand, a failed challenge will cause the Ranger verifier to lose contact and eventually access to MVM RANGERS.

This approach to verification requires collateralization of both the sequencer and the verifier, which addresses one of the key issues we identified in the verification process of the Optimism platform, namely the lack of interest of the verifier in generating fraudulent proofs. The well-coordinated collaboration of collateralized sorters and verifiers (i.e., L2 Rangers) also shortens the proof window, thus improving network efficiency.

Like the protocol proposed by Optimism, the transaction cannot be considered final until the validation window, and the verifier has enough time to send all proofs. This is a direct consequence of the verifier’s lack of collateral.

Although detecting invalid status updates is an incentive, there is no significant penalty for the verifier’s misbehavior. Therefore, to prevent potential misbehavior, a deterministic window is added to “allow all to speak”. In Metis, this is not needed because the validators are collateral and misbehavior from their side will translate into lost funds. The validator and sequencer have a “risk sharing” feature that reduces the certainty window, which is why Metis is able to validate transactions in a matter of hours, rather than the 7 days required by other protocols such as Optimism.

Ethernet Layer 2 solution three powerful competition, which one do you pick more?

Comparison of Layer 2 solutions
So, without further delay, let’s place all the contenders side-by-side to get a final look at the situation.

Ethernet Layer 2 solution three powerful competition, which one do you pick more?

As shown in the diagram (and described in our explanation above), these three platforms are well suited for deploying DApps as high-performance L2 solutions supported by the Ethernet mainnet as L1.

The specific decision may depend on your performance, scalability, flexibility and feature requirements. metis is the most feature-rich platform of the three we described: by default, it supports decentralized storage and includes other performance and security options.

The decoupling of storage, the use of DAC and the dynamic DBT scheme make it perfect for companies (large or small). For Ethernet minimalists, optimistic is a good choice because it uses all the tools available in the Ethernet ecosystem (no new concepts needed). Finally, Arbitrium’s unconditional dedication to state history verification makes it a really effective and interesting proposition, offering faster verification times compared to the standard rollup architecture that prevents latency attacks (although still a bit slower than Metis due to the flat architecture it uses).

In short, there is no single right answer, but rather consistently OPTIMISTIC L2 platforms to choose from. I hope this comparison will help you make a more informed decision about L2 to choose whether you plan to deploy a new DApp or migrate from L1 to L2.

Posted by:CoinYuppie,Reprinted with attribution to:https://coinyuppie.com/ethernet-layer-2-solution-three-powerful-competition-which-one-do-you-pick-more/
Coinyuppie is an open information publishing platform, all information provided is not related to the views and positions of coinyuppie, and does not constitute any investment and financial advice. Users are expected to carefully screen and prevent risks.

Like (0)
Donate Buy me a coffee Buy me a coffee
Previous 2021-05-13 16:25
Next 2021-05-13 16:36

Related articles