The L2 ecosystem is continuously growing, but there is still a need for improvement in user experience related to proof systems and interoperability between networks.
Layer N is a network of L2s designed for financial applications in the Ethereum ecosystem. Its most notable feature is the ZKFP proof system, which addresses the drawbacks of fraud-proof systems by introducing ZK technology.
Additionally, Layer N adopts EigenDA to provide affordable data availability and incorporates the IRC protocol to resolve interoperability issues.
Following the latest market dip, the blockchain sector remains somewhat stagnant. Yet, there's an unstoppable growth in the L2 ecosystem. The L2's TVL (Total Value Locked) consistently climbs upwards. On the project front, since the introduction of Optimism and Arbitrum, there's been a steady release of general-purpose rollups such as zkSync Era, Base, Polygon zkEVM, and Linea. Moreover, new app rollups, leveraging frameworks like OP-Stack and Polygon CDK, are constantly emerging.
While it's true that the L2 ecosystem has seen significant growth and various technical improvements, there are still many challenges to address. Beyond direct security concerns tied to the rollup network, such as the development of proof systems and escape hatch and the upgradeability of rollup contracts, there's much to be improved regarding user experience.
1.2.1 Fraud Proof System
The first area of improvement relates to user experience issues arising from the fraud proof system. Optimistic rollups rely on this system to depend on Ethereum network security. Optimistic rollups operate under the assumption that network executions are initially valid, setting aside a dispute window of about 7 days to verify the validity of the executions. During this period, a verifier checks 1) the state root summary of the optimistic rollup submitted to the Ethereum network and 2) the transaction data submitted to the data availability layer (Ethereum). If something isn't valid, they can produce a fraud proof.
The current fraud proof system faces multiple challenges. One notable issue is the roughly 7-day dispute window. Although nowadays, thanks to third-party bridges like LayerZero and Orbiter, transferring funds between optimistic rollups and other networks can bypass the 7-day dispute period, a direct transfer from optimistic rollups to the Ethereum network still requires waiting through this 7-day period, which significantly degrades the user experience.
Secondly, the fraud proof system is inefficient and could compromise safety. The most straightforward method for producing fraud proof is to re-execute the problematic rollup block in its entirety on the Ethereum network on-chain. However, this approach comes with the downside of incurring significant gas fees. To address this, Arbitrum uses an interactive fraud proof system rather than replaying the entire block. This involves both the prover and verifier interactively narrowing down the erroneous execution by bisecting the transactions continuously until the wrong instruction is found. Only this instruction is executed on-chain, which has the advantage of consuming less gas fees.
Source: Arbitrum
Despite this, there's an issue with the fraud proof system, specifically regarding how to verify that on-chain and off-chain executions took place in the same environment. For the fraud proof system to function correctly, instructions must execute identically in both the rollup and Ethereum. To achieve this, Optimism uses MIPS, and Arbitrum employs WASM, both of which are virtual machines conducive to generating fraud proofs. Then, the Geth EVM Go language is compiled into a low-level language suitable for these systems.
Source: Specular
This process increases the overall complexity of the system, thereby enlarging the size of the TCB (Trusted Computing Base). The TCB refers to components, including software and hardware, that can influence the security of a system. A larger TCB signifies more attack vectors, potentially compromising the system's overall stability. To counteract this in optimistic rollups, a project called Specular attempts to establish an EVM-native fraud proof system.
1.2.2 Validity Proof
Contrary to optimistic rollups, zk-rollups utilize a validity proof system based on zero-knowledge technology. This proves the validity of off-chain executions, eliminating the need for the approximate 7-day dispute period. Hence, zk-rollup users can withdraw to the Ethereum network in just a matter of hours. However, zk-rollups have a drawback: the significant computational power and cost associated with verifying validity proofs on-chain. Since zk-rollups continuously generate validity proofs, there's an ongoing expense and computational demand to create and verify them on-chain.
1.2.3 Interoperability
Interoperability stands out as one of the primary points for improvement across various rollup networks and frameworks. Thanks to rollup frameworks like OP-Stack and Arbitrum Orbit and Rollup-as-a-Service (RaaS) projects such as Caldera, Conduit, and AltLayer, numerous rollup networks have been launched. However, these remain essentially isolated or siloed networks, with almost no communication infrastructure for asset transfers or synchronous messaging between rollup networks. Two main proposed solutions to address this are: 1) Using ZKP for cross-chain messaging as Polygon CDK, and 2) employing a shared sequencer. For more on interoperability within rollup networks, see 'Interoperability in Ethereum Rollup Frameworks: Polygon CDK, OP-Stack, ZK-Stack'.
Layer N aims to serve as the financial hyper-layer for Ethereum, designed as a network of L2s tailored for the financial applications of the Ethereum ecosystem. Given the limited scalability of the Ethereum network, building applications atop it is challenging. The L2 networks launched to address this often lack robust interoperability and composability. Layer N sets out to resolve these shortcomings. The advantages of Layer N include:
Hyper Performant - One of Layer N's products, Nord, is an L2 network optimized for trading, aiming to become an on-chain NASDAQ.
Inter-Rollup Communication - L2 networks within Layer N come with built-in communication protocols, allowing them to communicate seamlessly.
Shared Liquidity - Layer N's L2 networks share sequencers, which, in conjunction with the Inter-Rollup Communication (IRC) protocol, enable instant bridging. This offers users an experience as if they're tapping into a singular liquidity pool.
Ethereum L2 - The L2 networks of Layer N leverage the Ethereum network and the ETH re-staker of EigenDA, hence benefiting from Ethereum's security.
So, what differentiates Layer N technically, enabling it to achieve these objectives when compared to other L2 solutions? Layer N has been able to 1) improve interoperability and composability between rollups by using a shared sequencer and 2) enhance the UX issues traditional proof systems had by adopting a Zero-Knowledge based Fraud Proving system (ZKFP), which is a compromise between fraud and validity proof systems.
Thanks to these innovative approaches, Layer N was able to secure investments from prominent VCs. The seed round was co-led by Founders Fund and dao5, with participation from SALT, Kraken Ventures, Mirana Ventures, GSR, Amber Group, Spencer Noon, Karthik Raju, and others.
2.2.1 Layer N Rollups
Layer N is a collection of multiple L2 networks. The L2 networks within Layer N can utilize EigenDA's data availability, Layer N's shared sequencer, and RISC Zero's zkVM. The L2 networks included in Layer N are:
N-EVM - A public EVM rollup network, allowing anyone to deploy smart contracts written in EVM-compatible languages.
Nord - An orderbook rollup network optimized for trading, aiming to match the performance of Web 2.0 financial infrastructure. Since it is implemented in Rust, its performance is exceptional, boasting up to 100,000 tps and latency under 100ms. It also allows cross-margin and cross-collateral features. Furthermore, Nord can seamlessly communicate with N-EVM through the IRC protocol. Nord will be the first product to launch in 2023.
NordX - An institutional-grade rollup solution allowing institutions to custom-build a rollup network tailored to their needs.
2.2.2 Data Availability
Rollup networks rely fully on the security of the Ethereum network by storing transaction data on it as calldata. Given the limited space in Ethereum blocks, this leads to significant costs, acting as a bottleneck to the scalability of rollup networks. In fact, during August 2023, Arbitrum spent anywhere from $26K to $201K daily on Ethereum network gas fees just for storing transaction data, while zkSync Era consistently paid $70K-$80K in gas fees.
Layer N cuts costs associated with storing transaction data by employing EigenDA as its data availability layer instead of the Ethereum network. EigenDA is a data availability service that leverages EigenLayer. EigenLayer is a protocol that allows ETH tokens, already staked on the Ethereum network, to be re-staked in other protocols, allowing nodes to obtain additional rewards without introducing new slashing conditions. Essentially, nodes operating the EigenDA service are validators on the Ethereum network. Thus, while rollup networks using EigenDA might not benefit entirely from the security of the Ethereum network, they do have the advantage of aligning with the value of ETH.
Source: EigenLayer
For reference, EigenDA is not a blockchain network like Celestia or Avail but is a decentralized Data Availability Committee (DAC) integrated with a token economy. ETH re-stakers are responsible for handling the transaction data of the rollup network based on economic incentives. The basic flow of data in EigenDA is as follows:
The Sequencer sends the rollup block to the Disperser.
The Disperser applies erasure coding to the rollup block, divides it into chunks, and creates KZG commitments and proofs for them, which are then sent to the EigenDA operator nodes. Notably, the rollup network can operate the Disperser itself, or third parties like EigenLabs can handle it.
EigenDA operator nodes validate and store the chunks received from the Disperser using the KZG commitments and proofs. They then generate signatures for them and send them back to the Disperser.
Furthermore, some Layer N rollups are said to be able to introduce signature aggregation techniques, which could compress data by around 8-10 times, leading to extremely low transaction fees.
2.2.3 Inter-Rollup Communication (IRC) Protocol
Rollup networks within the Layer N ecosystem share a sequencer. The sequencer receives transactions from users within the rollup network, arranges them in order, and creates blocks. Since the same set of sequencers produces blocks across multiple rollup networks, the states of these rollups settle together, providing an environment for the rollups of Layer N to communicate across rollups natively. This means various DeFi protocols that exist across several rollups can achieve atomic composability as if they're on a single network.
Specifically, Layer N plans to collaborate with Hyperlane to introduce Hyperlane Interchain Security Modules (ISM) to EVM and SVM rollups. The ISM is a smart contract responsible for validating and transmitting interchain messages.
In the initial stages, rollups of Layer N plan to share a single sequencer. However, there are plans for future decentralization to improve censorship resistance and fairness and address liveness issues. Decentralization of the sequencer will leverage EigenLayer, allowing ETH re-stakers to participate as sequencers. Each rollup also plans to differ in consensus among sequencers. For instance, N-EVM plans to introduce a consensus algorithm for decentralized sequencers. For the orderbook rollup, Nord, latency is of utmost importance. Instead of integrating a consensus algorithm, it plans to adopt a leader auction mechanism to reduce latency significantly.
2.2.4 Zero-Knowledge Fraud Proving (ZKFP) System
Source: Layer N
Rollups in Layer N utilize a new proof system called ZKFP, which is a compromise between the advantages of fraud proofs and validity proofs. As mentioned in the introduction, the fraud proof system requires a dispute period of approximately 7 days, and the validity proof system has the issue of continuously incurring costs for verification. In Layer N's ZKFP system, a fraud proof system is primarily used, but in the case of malicious activities, it is proven through ZKP. The process of the ZKFP system is as follows:
Replay - The Verifier re-executes locally based on transaction data from the DA layer.
Detection - (In case of fraud) The state calculated through the Replay process is detected to be different from the state submitted to the Ethereum network.
Initiate Verification Process - The Verifier calls the fraud proof contract on the Ethereum network, stakes funds, and freezes deposits and withdrawals on the rollup network.
Proof Generation - The Verifier runs a state simulation using Risc Zero's zkVM and creates a ZKP that proves the state is incorrect.
On-chain Verification - The Ethereum on-chain verifies the ZKP.
State Recovery Mode - If the ZKP submitted on-chain is valid, the Ethereum rollup contract enters a recovery mode to revert the state.
In Layer N's ZKFP, utilizing ZKP improves the inefficiencies arising from multiple interactions in the traditional fraud proof system and further reduces the approximately 7-day withdrawal period. Moreover, there's no need for additional virtual machines like Optimism's MIPS or Arbitrum's WASM to generate fraud proofs since disputes can be resolved through ZKP, which has the advantage of reducing attack vectors.
For reference, Layer N ultimately plans to transition from the ZKFP system to a zk rollup by utilizing the Bonsai Network developed by Risc Zero.
2.2.5 Transaction Lifecycle
Source: Layer N
Lastly, let's delve into the transaction flow of users within Layer N. When users submit transactions to the network, their sequence is determined by a shared sequencer before the VM processes them. Once the VM handles these transactions, they're classified as 'soft confirm'. Only when the transaction data gets included in the DA layer do they shift to a 'hard confirm' status. If the transaction data is successfully submitted to the DA layer, the calculated state is settled and finalized on the Ethereum network. The Verifier constantly checks the transaction data included in the DA layer and the state submitted to the rollup contract for any fraud. If they do not match, the ZKFP system is used to submit fraud proof.
In summary, Layer N 1) enables rollup networks within the ecosystem to communicate atomically through a shared sequencer and 2) improves the issues of existing proof systems and provides a high user experience through the ZKFP system.
Layer N's direction aligns very well with the mass adoption of blockchain. For the widespread application of blockchain, the pillars of security and scalability are indispensable. Given that Layer N operates on Ethereum, it extends a secure space for a vast user base. Assuming a single network can't handle numerous users, the future inevitably leans towards multi-chains. A deficit in cross-chain capabilities within an ecosystem can adversely impact the UX. However, Layer N provides an environment where various rollups can interact through a shared sequencer, solving this problem.
From the user experience standpoint, the network not only incorporates the ZKFP system but also inherently offers 'Supercharged Features'. These are a range of tools, like multi-chain wallets, designed to elevate the developer experience. Thus, Layer N envisions the most ideal future in terms of infrastructure and user experience. Building on this groundwork, rollup networks such as N-EVM, Nord, and NordX are expected to play a role in Ethereum's financial layer.
Thanks to Kate for designing the graphics for this article.
We produce in-depth blockchain research articles
zkRollup is emerging as a major pillar of layer 2 solutions, leveraging the technical advantages of zero-knowledge proofs. It is particularly impressive that Ethereum, which has the largest ecosystem, has officially chosen zkRollup as the direction for its layer 2 rollup. Additionally, Bitcoin is also seeking to achieve scalability by utilizing zkRollup. Following the emergence of Optimistic Rollup, zkRollup has been rapidly growing, offering advantages such as faster processing and lower operational costs. Let's take an in-depth look at zkRollup from its basics to the current market status and future prospects.
Initia’s future growth plans include the launch of its mainnet and the development of various DeFi, social, and NFT projects, potentially positioning it as a favorable option for launching rollups due to its user-centric and interconnected infrastructure.
Arbitrum and Optimism are striving to improve the technological aspects of fraud proof, while other projects are also implementing interesting approaches. Let's walk through their current activities and ongoing developments.
The strategic decisions and journey of Mantle, from BitDAO's inception to the Mantle V2 upgrade, offer valuable insights into building a successful Layer 2 blockchain.