This page is for information purposes only. Certain services and features may not be available in your jurisdiction.

What is Layer 2?

A layer 2 network (Layer 2, or L2) is a network built on top of a blockchain (layer 1): transactions are processed on it first, and the final results are then handed back to layer 1 for confirmation. The underlying base blockchain is called a layer 1 network (Layer 1, or L1). For the work layer 1 does, see that entry; this article mainly uses Ethereum to explain how the two layers divide the work.

The public Ethereum network that handles assets with real value is called mainnet, and in this article it is layer 1. Ethereum's developer documentation classifies such solutions as layer 2: transactions are processed outside mainnet, and mainnet accepts and records the results according to its rules. There are two common approaches: rollups, which execute multiple transactions off-chain and submit them in batches, and channels, in which participants first lock funds and then update balances off-chain. This article first explains these two approaches and how they relate to mainnet, then compares other off-chain solutions, and finally covers moving assets in and out, fees and risks.

Why layer 2 networks are needed: mainnet's processing capacity is limited

Ethereum needs every computer running the blockchain software (a node) to be able to keep up with transaction processing. Each batch of packaged records is called a block, and each block can hold only a limited amount of computational work. When demand exceeds capacity, transactions may have to wait, and senders competing to be processed may push fees up. See network congestion for details.

Layer 2 completes part of the computation outside mainnet. Mainnet only receives the corresponding data and gives final confirmation of the transaction results, a step called settlement. For example, a rollup groups multiple transactions into a batch for submission, so that a batch of transactions shares the mainnet fees. What it reduces is the work of processing each transaction individually on mainnet; it does not remove all fees, nor does it guarantee that every transaction will be faster or cheaper.

Two common layer 2 approaches: rollups and channels

Rollups serve transactions within a network, while channels mainly handle exchanges between participants who have already opened a channel. Both process transactions outside mainnet, but they do not submit data in the same way.

A rollup executes a batch of transactions on its own network and then publishes the transaction data, or data sufficient to rebuild state such as balances, to layer 1. A program on mainnet that executes automatically according to predefined rules is called a smart contract, and the rollup's contract accepts or rejects the submitted results according to the relevant proof rules. Mainnet can confirm that results are correct in one of two ways, optimistic or zero-knowledge. For the difference, see rollups; this article does not repeat the proof mechanisms.

A channel has participants lock funds first and then confirm balance updates with each other off-chain. Channels on Ethereum usually lock funds in a mainnet contract, and each update is confirmed by the signatures of the participants involved. Signatures are generated with each participant's own private key, so others can verify that the person really agreed. Only when a channel is opened or closed, or when a dispute arises, are the necessary records handed to mainnet. Bitcoin also has payment channels, but the funds are not locked in a contract. Instead, they are locked in an on-chain transaction and can be moved only with both parties' signatures. See offchain for details.

Both approaches rely on mainnet, but for different things. A rollup on Ethereum relies on mainnet for two things. The first is receiving and publishing transaction data, which other participants can use to rebuild state such as balances. The second is settling results: the mainnet contract controls the assets users have deposited, checks whether submitted results comply with the proof rules and then records balances.

Channels also use mainnet to control locked funds and to handle settlement or disputes based on signed records, but they do not publish every off-chain update to mainnet. Participants need to keep their own records and respond under the rules if a dispute arises. So the statement "all layer 2 networks store their transaction data on mainnet" is not true.

When people say layer 2 "draws on layer 1's security", they mean that this work depends on mainnet's rules and records. It is not a security guarantee covering every function of layer 2. In a rollup, the participant responsible for off-chain processing and for submitting batches is called the operator. If the operator stops working, the published data can still be used to check balances, but whether users can exit still depends on meeting the network's contract, proof and exit mechanisms. Having the data should not be described as being certain to withdraw immediately.

How layer 2 networks differ from sidechains and validiums

Being able to process transactions outside Ethereum and to move assets back to mainnet is not enough to show that a solution is layer 2. Ethereum's developer documentation presents sidechains and validiums separately from the layer 2 solutions described above.

A sidechain is a blockchain that runs independently: its own participants accept blocks under its own consensus rules. It moves assets back and forth through a bridge connecting the two chains, and it does not rely on Ethereum to reach consensus for it.

A validium submits proofs to Ethereum so that a mainnet contract can check whether the off-chain computation is correct, but it does not publish to mainnet the data needed to rebuild transaction results. This is the key difference between it and a ZK rollup.

Comparison Rollup Channel Sidechain Validium
Who processes off-chain transactions Rollup operator or nodes Channel participants The sidechain's own nodes Validium operator
Where the data needed to check results is kept Published to mainnet Participants keep signed records Sidechain ledger Outside mainnet, kept by a data custodian
Settlement relationship with Ethereum Mainnet contract handles it according to proof rules Mainnet contract handles settlement or disputes based on signed records The sidechain reaches its own consensus; moving assets relies separately on a bridge Mainnet contract checks proofs, but the data still depends on an off-chain custodian

If a validium's data custodian withholds necessary data, users may be unable to generate the information needed to prove their balances, and withdrawals may be blocked. Channels, by contrast, require participants to keep records and respond to disputes in time. These requirements differ. Whether data is published to mainnet cannot by itself be used to decide whether a solution is layer 2; for a rollup, you need to look both at whether the data is published and at whether mainnet checks the results.

How to deposit, use and withdraw assets on a layer 2 network

The following mainly covers Ethereum rollups. A rollup records balances separately from mainnet, so assets do not automatically appear on both networks just because the address is the same.

Depositing. A user deposits mainnet assets into the rollup's corresponding mainnet contract, and the rollup then records the matching balance. This set of deposit and withdrawal contracts provided by the network itself is often called a native bridge, to distinguish it from bridges that provide separate cross-chain services; the name does not mean it is risk-free. The same asset may circulate on several networks. When transferring through a trading platform, check which networks the platform supports at that time rather than relying on the asset's name alone. Taking a withdrawal on the OKX website as an example, the system usually matches the network automatically based on the withdrawal address. When several networks are available, the user must make sure the selected network matches the network the recipient uses; choosing the wrong network may mean the assets are not received. For more, see mainnet.

Using. Rollup fees usually include the cost of off-chain execution and the cost of publishing data to layer 1. Ethereum measures the computational work consumed by execution in gas; the gas fee is the amount actually paid, and the total fee shown in a layer 2 interface may also include mainnet data costs. The specific fee rules differ by network and transaction type, and channel fees cannot simply be split into these same two parts.

Withdrawing. How long a rollup withdrawal takes depends on its settlement method. An optimistic rollup usually requires waiting until the period for challenging incorrect results ends. A ZK rollup requires waiting for the relevant proof to be generated and verified on mainnet, and some implementations add an extra delay. For waiting periods and fast-exit mechanisms, see rollups and ZK rollups. Channels, on the other hand, distribute the locked funds through their closing or dispute process and do not follow the same withdrawal timeline.

What additional risks come with using a layer 2 network

Mainnet handling settlement does not mean layer 2 has no points of failure of its own:

  • Operators and ordering. The participant responsible for arranging the order of transactions is called the sequencer. It may go offline, delay transactions or refuse to process them. Some rollups provide a way to submit directly to the mainnet contract, but the limits and waiting times vary.
  • Software and contracts. The proof system or contracts may have bugs, and administrative permissions may allow a small number of participants to change important settings. Publishing data to mainnet does not automatically remove these risks.
  • Transfer routes. Other bridges or trading platforms may introduce additional controllers and dependencies. Depending on how assets are transferred in, the resulting asset representation and redemption terms may also differ. See cross-chain.

This article does not evaluate or recommend any specific network. A transaction showing "processed" on layer 2 only means that the system has received or executed the corresponding operation. Whether settlement has been completed on mainnet, whether finality has been reached and whether funds can be withdrawn under the applicable conditions are separate questions.

FAQ

Can an asset with the same name on two networks always be exchanged back as is?

Not necessarily, and you cannot judge by the name alone. For example, ether (ETH), the asset of the Ethereum network, may be represented on other networks as a corresponding balance or as a wrapped asset, depending on how it was transferred in. A wrapped asset is a token that represents an asset on another network; whether it can be exchanged and how it is redeemed depend on the corresponding mechanism. See cross-chain.

Learn more about layer 1 networks, rollups, ZK rollups, offchain, cross-chain, mainnet and gas fees, or return to the cryptocurrency glossary.

References

Disclaimer
This content is provided for informational purposes only and may cover products that are not available in your region. It is not intended to provide (i) investment advice or an investment recommendation; (ii) an offer or solicitation to buy, sell, or hold crypto/digital assets, or (iii) financial, accounting, legal, or tax advice. Crypto/digital asset holdings, including stablecoins, involve a high degree of risk and can fluctuate greatly. You should carefully consider whether trading or holding crypto/digital assets is suitable for you in light of your financial condition. Please consult your legal/tax/investment professional for questions about your specific circumstances. Information (including market data and statistical information, if any) appearing in this post is for general information purposes only. While all reasonable care has been taken in preparing this data and graphs, no responsibility or liability is accepted for any errors of fact or omission expressed herein.

Digital Assets subject to volatility and not insured. Not financial/investment advice. Not all products and services offered in all regions. Exclusions and T&Cs apply.

© 2026 OKX. This article may be reproduced or distributed in its entirety, or excerpts of 100 words or less of this article may be used, provided such use is non-commercial. Any reproduction or distribution of the entire article must also prominently state: “This article is © 2026 OKX and is used with permission.” Permitted excerpts must cite to the name of the article and include attribution, for example “Article Name, [author name if applicable], © 2026 OKX.” Some content may be generated or assisted by artificial intelligence (AI) tools. No derivative works or other uses of this article are permitted.

Related articles

View more
crypto-glossary-cover-v5.contentful

Crypto Glossary A–Z

Explore key crypto, blockchain, and trading terms through concise definitions, organized alphabetically for quick reference. [A](#a) · [B](#b) · [C](#c) · [D](#d) · [E](#e) · [F](#f) · [G](#g) · [H](#
Dec 3, 2026
12-03-glossary-thumnail/zero-knowledge-rollup

What is a ZK rollup?

**A zero-knowledge rollup (ZK rollup) is a type of [rollup](/learn/what-is-a-rollup): it hands the results of a batch of transactions to the main chain together with a proof, and the main chain accept
Dec 3, 2026
12-03-glossary-thumnail/zero-knowledge-proof

What is a zero-knowledge proof?

**A zero-knowledge proof (ZKP) lets someone convince another party that a statement is true without revealing any information beyond the statement itself.** The party that submits the proof is called
Dec 3, 2026
12-03-glossary-thumnail/validator

What is a validator?

**A validator is a participant in a [proof-of-stake](/learn/what-is-proof-of-stake) blockchain that proposes new blocks and votes on other blocks.** It must first [stake](/learn/what-is-staking) the a
Dec 3, 2026
12-03-glossary-thumnail/unspent-transaction-output-utxo

What is an unspent transaction output (UTXO)?

**An unspent transaction output (UTXO) is an amount of bitcoin (BTC) that a transaction has paid to someone and that has not yet been spent again; each record states the amount and the conditions for
Dec 3, 2026
what-is-blockchain

What is transactions per second (TPS)?

**Transactions per second (TPS) is a figure that measures how many transactions a [blockchain](/learn/what-is-a-blockchain) can process, or actually processes, each second. It is also called throughpu
Dec 3, 2026
View more