A Layer 2 (L2) network is an off-chain extension that integrates with the underlying Layer 1 (L1) blockchain to increase transactional throughput. Its primary focus is the optimization of blockchain networks by providing transaction verification support and offloading specific tasks from Layer 1. Notably, these L2 protocols derive their security from the underlying strength of the L1 blockchain. 
Layer 1 blockchain networks, such as Bitcoin and Ethereum, are limited in their processing capacity and can only handle a few transactions per second (TPS). This often results in network congestion and high gas fees. To increase the throughput of these networks and make them more scalable, Layer 2 solutions were developed. 
Layer 2 networks, like rollups and sidechains, create a secondary framework that allows blockchain transactions and processes to take place independently of the main chain. This makes them "off-chain" scaling solutions that can increase the overall efficiency and speed of the blockchain system. 
The Lightning Network by Bitcoin is often considered one of the earliest Layer 2 scaling solutions. It was proposed by Joseph Poon and Thaddeus Dryja in their 2015 whitepaper. Lightning Network enables faster and cheaper transactions by conducting most transactions off-chain and settling them on the Bitcoin blockchain only when necessary. 
Layer 2 is a part of a blockchain system responsible for processing transactions quickly. It has two main components: a network that processes transactions and a smart contract that resolves any disputes and achieves consensus on the state of the Layer 2 network by connecting it to an underlying blockchain. 
Although the methods of achieving throughput vary significantly among Layer 2 networks, they all have a common feature in finalizing transactions on the primary blockchain. To ensure the reliability of any suggested changes in state, Layer 2 solutions must provide a cryptographic and verifiable form of 'proof' to the blockchain. Smart contracts can differ between various Layer 2 solutions, but their core functions remain consistent: holding and releasing funds transferred to Layer 2, validating proofs generated by Layer 2, resolving disputes, and finalizing transactions. Rollups, sidechains, plasma chains, and state channels are some examples of Layer 2 implementations. 
Rollups bundle multiple transactions into a single batch, which is then submitted to the main blockchain to reduce the number of individual transactions on-chain. There are two main types of rollups: optimistic rollups and zero-knowledge rollups (ZK rollups). These rollups provide increased throughput and reduced costs by executing modifications to smart contract states off-chain and subsequently validating them on-chain through proofs. Rollups attain scalability through the implementation of the following three approaches: 
- Conduct off-chain execution of transactions, which requires that the underlying base blockchain only executes small proofs to verify network activity and store raw transaction data.
- Batch transaction data together when submitted to a blockchain, thereby distributing the on-chain gas cost across multiple transactions.
- Require the presence of at least one honest validator to prove the validity of transactions on the base layer blockchain. This enables the utilization of smaller validator sets and higher hardware demands while maintaining security standards.
Sidechains are blockchain networks that link to a main chain, such as Bitcoin’s, allowing for the open transfer of cryptocurrency from the main chain to a Layer 2 chain with a degree of third-party trust. They function by supporting L1 blockchains to validate transactions, thereby relieving the main chain of problems caused by network congestion. 
Key Aspects of Sidechains
- Sidechains are independent blockchain networks derived from the main chain.
- They are frequently linked to the main chain using a two-way peg system.
- Sidechains offer opportunities for advancing solutions to scale blockchain technology.
- Polygon, Ethereum's Layer 2 solution, operates as a network grounded in the concept of sidechains. 
In a standard sidechain setup, assets are locked on the first blockchain (the main chain) through a transaction. Subsequently, a transaction is generated on the second blockchain (the sidechain), accompanied by cryptographic proofs confirming the correct locking of assets on the initial blockchain. 
Plasma is a Layer 2 scalability solution introduced by Vitalik Buterin and Joseph Poon designed for the Ethereum blockchain. It involves creating sidechains (child chains or plasma chains) that can process transactions independently and periodically commit a summary to the Ethereum main chain. The plasma architecture comprises a hierarchical tree of sidechains, and because each sidechain operates autonomously, running simultaneously with the mainchain and other sidechains, it maximizes speed and efficiency. 
State channels are channels established between two users seeking to interact through transactions. State channels enable participants to conduct off-chain transactions and settle on the mainnet by utilizing multi-signature contracts, which mandate signatures from multiple parties for execution. This approach results in high transaction throughput, reducing congestion and fees significantly. 
A typical activity involved in a state channel is a game of tic-tac-toe played by two users. Here, the 'game logic' defines the game rules, while the 'state logic' keeps track of the game's current status. In addition, it determines the allocation of funds in the smart contract based on the game's outcome. The state channel mechanism allows the introduction of play-to-earn (P2E) games and various decentralized applications (dApps) on a Layer 2 platform, even if they aren't purely financial. 
Bitcoin Layer 2 Scaling Solutions
The Lightning Network is one of the earliest Layer 2 scaling solutions. It was proposed in 2015 by Joseph Poon and Thaddeus Dryja in their whitepaper. Lightning Network enables faster and cheaper transactions by conducting most transactions off-chain and settling them on the Bitcoin blockchain only when necessary. 
It also introduces smart contract capabilities to Bitcoin, marking a significant enhancement to the overall network. The Lightning Network focuses on providing Instant payment, Scalability, Low cost, and Cross-blockchain swaps. 
Liquid is a settlement network operating on a sidechain that integrates with Bitcoin's Layer 2 infrastructure. It connects multiple cryptocurrency exchanges and institutions worldwide, enabling faster and more private Bitcoin transactions. In addition, the Liquid network allows the creation of digital assets, such as stablecoins, security tokens, and other financial instruments, on the Bitcoin blockchain. 
Liquid network offers a variety of features to Bitcoin exchanges and traders, including: 
- Rapid, Irrevocable Settlements: Bitcoin transferred to the Liquid sidechain (L-BTC) can achieve conclusive settlement within a mere two minutes.
- Confidential Transactions: Liquid ensures the confidentiality of transaction amounts and asset types by default, ensuring the protection of users' financial information.
- Secure Tokenization: The Liquid sidechain (Issued Assets) permits the creation of new tokens representing fiat, securities, or other digital assets, ensuring a secure tokenization process.
- Interoperability: A single Liquid integration provides support for both L-BTC and Issued Assets. All tokens adhere to the same standard, enabling users to capitalize on features like atomic swaps and Bitcoin-style multisig.
Rootstock (RSK) is a Layer 2 EVM-compatible smart contract platform that addresses specific limitations of the Bitcoin blockchain by utilizing Bitcoin as its native asset. It operates as a permissionless system, employing a consensus mechanism known as merge-mined proof of work (PoW) with over 50% of Bitcoin's hash power currently mining Rootstock. This means that Rootstock is mined by more hash power than any other chain, except Bitcoin itself. 
RSK is compatible with Ethereum, enabling the migration of Ethereum smart contracts to its platform. By transferring these contracts, RSK ensures compatibility of all Ethereum applications with the Bitcoin blockchain. 
Ethereum Layer 2 Scaling Solutions
Polygon is a protocol and framework used for creating Layer 2 blockchains and sidechains, both running parallel to the Ethereum network while interacting with it. Due to its compatibility with Ethereum, over a thousand decentralized apps (dApps) are compatible with Polygon chains. The Polygon Technology includes some of the following: 
- Polygon PoS: An EVM (Ethereum Virtual Machine)-compatible sidechain using a proof-of-stake (PoS) consensus mechanism.
- Polygon zkEVM: A zero-knowledge EVM-compatible Layer 2 blockchain that uses zk-STARK rollups and runs Ethereum smart contracts.
- Polygon Miden: It is a Starkware-based zk-rollup that uses zk-STARK.
- Polygon Nightfall: A privacy-focused Layer 2 blockchain that uses optimistic rollups. It is suggested for DAO voting, private NFT marketplaces, and supply chain orchestration.
- Polygon Avail: A standalone Layer 2 chain for storing transaction data that is separate from smart contracts. It works by decoupling the data and execution layers.
Optimism is an EVM-compatible optimistic rollup chain. It allows users to move assets in and out of the network by employing the Optimistic Ethereum Gateway. Also, Optimism can whitelist projects within two weeks when submitted forms are approved. An example of a project launched on the optimistic Ethereum mainnet is the Uniswap V3 Alpha product. 
Arbitrum is a Layer 2 solution developed to enhance the speed and scalability of Ethereum smart contracts. It includes additional privacy features and presents itself as the optimal scaling solution for DeFi applications, offering the capability to employ an Arbitrum rollup to scale any Ethereum contract. 
How was your experience?
Give this wiki a quick rating to let us know!