ScaleBit

Jul 18, 2023

Linea Introduction and Risk Analysis

Abstract

Linea represents a cutting-edge ZK-Rollups solution, harnessing the power of Consensys zkEVM to tackle Ethereum’s scalability challenges. As a significant achievement, Linea has recently achieved a crucial milestone with the release of its Mainnet Alpha. This article aims to provide you with a comprehensive introduction to Linea while conducting a risk analysis of this innovative protocol.

What is Rollup

In recent years, Ethereum has been heavily focused on addressing scalability challenges. Rollups have emerged as one of the primary methods for scaling Ethereum, allowing the network to accommodate more users and activity while maintaining security.

Rollups operate as layer 2 blockchains, adding an additional layer on top of the Ethereum network. This second layer serves as a space for executing activities within the rollup network, such as interacting with decentralized applications (dApps) and processing transactions. What sets rollups apart from other networks is their periodic submission of transaction batches to the Ethereum mainnet for confirmation, leading to the origin of their name. These batches are formed by ‘rolling up’ bundles of transactions together.

By submitting multiple transactions to the mainnet simultaneously, rather than individually, considerable gas fee savings are achieved. This cost-effectiveness is why rollups offer significant advantages to users. Instead of paying for the computation of each individual transaction, users pay a fraction of the cost for computing a larger group of transactions.

There are two types of rollups with different security models:

  • Optimistic Rollups: assumes transactions are valid by default and only runs computation, via a fraud proof, in the event of a challenge.

  • ZK-Rollups(Zero-Knowledge Rollups): runs computation off-chain and submits a validity proof to the chain.

In ZK-Rollups, the term “Zero-Knowledge” refers to the use of zero-knowledge proofs for on-chain transaction verification without requiring interaction or trust. Zero-Knowledge proofs are cryptographic proofs that can demonstrate a statement’s truth without disclosing any information about the statement itself.

While Optimistic Rollups gained an early edge in adoption due to their simplicity and reduced likelihood of implementation bugs, ZK-Rollups enthusiasts perceive them as a more promising long-term scalability solution, leveraging cryptographically verifiable validity proofs.

Optimistic Rollups are thriving, with impressive projects like Arbitrum and Optimism already making significant strides.

However, recent technological breakthroughs in ZK-Rollups have sparked numerous innovations, garnering increasing attention and acclaim. As highlighted in this article, Linea is a prominent ZK-Rollups project at the forefront of these advancements.

Introduction to Linea

Linea is a network that scales the experience of Ethereum. Its out-of-the-box compatibility with the Ethereum Virtual Machine enables the deployment of already-existing applications, as well as the creation of new ones that would be too costly on Mainnet. It also enables the community to use those dapps, at a fraction of the cost, and at multiples the speed of Mainnet.

It does this by leveraging quantum-resistant lattice-based cryptography to create zero-knowledge proofs that include every transaction performed on the network, and rolling them up to Mainnet. This ensures that every transaction is recorded to the Ethereum ledger while dividing the cost of that security by magnitudes.

Linea’s feature

  • Next gen scalability

Low gas fees and low latency with high throughput backed by the security of Ethereum.

  • Developer ready

Fully compatible with popular tools, infrastructure, IDEs and wallets with MetaMask distribution and EVM equivalence.

  • Unrivalled performance

Award winning prover enables fast finality and trustless withdrawals in minutes.

  • Growing Ecosystem

Launching alongside a growing ecosystem of over 100 partners, Linea empowers users, builders and developers to build a new generation of scalable Ethereum dapps.

Li

Linea’s Architecture

Linea’s ideal state​

Linea has the goal of being a fully decentralized, permissionless network. To that end, its architecture is made up of three main elements:

  • Sequencer
  • Prover
  • Bridge Relayer

Current state​

As Linea is still a alpha mainnet, and there’s lots of development to be done, we’re not quite there yet. Currently, the first two sections above are kind of rolled into one:

  • Centralized Sequencer & Prover
  • Bridge Relayer

The Sequencer is the heart of Linea’s execution client, responsible for ordering, building, and executing blocks in a way that allows the subsequent zero-knowledge proof to be made. The sequencer does a number of things:

  • Determines the order–the sequence–in which transactions will be executed
  • Builds blocks from them
  • Executes those blocks
  • Prepares certain data relating to the traces of that execution for the zero-knowledge prover.

The Prover is responsible for generating the final set of data for a zero-knowledge proof, and producing that proof. It receives several sets of information from the Coordinator and zkBesu, and produces a succinct, non-interactive argument of knowledge, or zkSNARK.

The Bridge Relayer is a combination of smart contracts and other protocols which work together to pass “arbitrary messages”–that is, user-specified data–between Linea and other networks.

Risk Analysis to Linea

Let’s take a look at Linea’s roadmap first.

Li

The roadmap is currently scoped in five phases which the team intends to deliver sequentially in collaboration with the broader Linea ecosystem and community.

  • Phase 0

    • EVM-Equivalence
    • Initiate Security Council
  • Phase 1

    • Open Source Stack
    • 100% Coverage
  • Phase 2

    • Diversify Security Council
    • Censorship Resistant Withdrawals
  • Phase 3

    • Decentralize Operators
    • Decentralize Governance
  • Phase 4

    • Multi-Prover
    • Limit Governance Powers

Phase 0 is the initial phase, it begins with the launch of the Linea Mainnet Alpha.

Phase 1 will improve the EVM Coverage to 100%, and make Linea open source to improve the transanparency.

Phase 2/3/4 have many goals and those aim to improve the security of Linea. Currently in Phase 0 means Linea lack of the features in later phases, so it has some potential threats listed below.

Software Bugs

Given that the current network is an Alpha version of the Linea Mainnet, rather than a full release, we are currently in the process of ongoing security audits and assessments. As such, your data and crypto-assets might face certain risks, potentially originating from software bugs or similar issues.

Linea employs novel, cutting-edge technology which could potentially harbor unanticipated risks and issues. Possible consequences could include data loss or the disappearance of crypto-assets.

Cyber attacks

Processes involving cross-blockchain bridging could potentially become targets for cyber threats and attacks, including but not limited to exploits that target vulnerabilities in the software, hardware, infrastructure, or equipment associated with bridge components, smart contracts, and other related systems.

Network Accessibility and Efficiency


Given the Alpha status of the Mainnet, there may be occasional periods where Linea’s performance slows down or becomes temporarily unavailable without advance warning. These instances could potentially result in the unforeseen loss of access, data, or crypto-assets. Users engaging in high-value transactions should be aware that transaction completion might be delayed.

State Validation

The underlying ZK proof is ZK-SNARKS. ZK-SNARKS are zero-knowledge proofs that ensure state correctness, but require trusted setup.

Upgradeability

The code that secures the system can be changed arbitrarily and without notice.

Sequencer Failure

There is no mechanism to have transactions be included if the sequencer is down or censoring.

Proposer Failure

Only the whitelisted proposers can publish L2 state roots on L1, so in the event of failure the withdrawals are frozen.

Trust of Operator

  • The system has a centralized sequencer

Only a trusted sequencer is allowed to submit transaction batches. A mechanism for users to submit their own batches is currently disabled. So it has the below possible risks:

  1. MEV can be extracted if the operator exploits their centralized position and frontruns user transactions.

  2. Funds can be frozen if the sequencer refuses to include an exit transaction (CRITICAL).

  • Users can’t force any transaction

There is no general mechanism to force the sequencer to include the transaction, so users can be censored if the operator refuses to include their transactions.

  • Withdrawals

The user initiates the withdrawal by submitting a transaction on L2. When the block containing that transaction is proven the funds become available for withdrawal on L1. Finally the user submits an L1 transaction to claim the funds. This transaction does not require a merkle proof. Note that withdrawal requests can be censored by the Sequencer, so funds can be frozen if the operator censors withdrawal transaction.

Conclusion

Linea combines the power of zero-knowledge proofs with full Ethereum Virtual Machine (EVM) equivalence, allowing builders to create scalable decentralized applications (dapps) or migrate existing ones without the hassle of changing code or rewriting smart contracts. That’s exciting! And Linea is still in the early phase, it still has many steps to grow, let’s wait to see.

References

Linea Documents: https://docs.linea.build/overview

Linea L2BEAT: https://l2beat.com/scaling/projects/linea

ZERO-KNOWLEDGE ROLLUPS: Zero-Knowledge rollups | ethereum.org

The different types of ZK-EVMs: https://vitalik.ca/general/2022/08/04/zkevm.html

About ScaleBit

ScaleBit is a blockchain security team that provides security solutions for Mass Adoption of Web3. With expertise in scaling technologies like blockchain interoperability and zero-knowledge proofs, we provide meticulous and cutting-edge security audits for blockchain applications. The team comprises security professionals with extensive experience in both academia and enterprise. Our mission is to provide security solutions for Web3 Mass Adoption and make security accessible for all.

Website: https://www.scalebit.xyz/

Twitter: https://twitter.com/scalebit_


ScaleBit Research Group

OLDER > < NEWER