Original Article Title: "A Deep Dive into the Bitcoin Layer 2 Concept"
Original Article Author: Fishery Isla, Biteye
When it comes to Layer 2, most people will think of Ethereum's various Layer 2 projects, such as Arbitrum, Zksync, Optimism, StarkWare, etc. Some may also say that the Layer 2 concept originated from Bitcoin's Lightning Network and was later applied by Vitalik to Ethereum to great success. All of these are facts, just seen from different perspectives.
The Layer 2 concept is not unique to Bitcoin or Ethereum but is a major direction of scalability solutions in blockchain technology.
Layer 2 refers to a set of off-chain solutions built on top of the mainnet, with the aim of increasing transaction throughput without sacrificing decentralization or security (emphasis added!!).
As the BTC scalability narrative continues to evolve, a wide range of BTC Layer 2 projects have emerged. Layer 2 has gradually shifted from a technology-driven blockchain scaling roadmap to a vague marketing label.
This article will provide a simple technical review of projects labeled with the BTC Layer 2 tag. It is important to note that in this hype-driven market, the impact of technology on the market trend is often secondary. Additionally, due to the author's limitations, some technical perspectives may differ from those of others. Your participation in group discussions is welcomed.
This article does not constitute any investment advice.
As mentioned earlier, the purpose of Layer 2 technology is to scale the mainnet without sacrificing decentralization or security, so narrowly speaking, it is not a single technical concept but encompasses various solutions and implementations.
Currently, the most common Layer 2 technologies fall into two categories: State Channels and Rollups.
State Channels involve establishing a channel between two or more parties on the mainnet, where multiple transactions can occur within the channel, and transactions only need to be broadcasted on the mainnet when opening or closing the channel.
Bitcoin's Lightning Network officially adopts this approach. In simple terms, a Lightning Network channel can be viewed as a multi-signature address where Bob and Alice each deposit BTC on the mainnet into this channel (address), and they conduct their daily transactions through the Lightning Network.
These daily transactions do not go on the mainnet, thus saving expensive Gas fees. When both parties decide they will no longer transact someday, they can initiate a withdrawal command to the mainnet, and the signature of this command can prove to the BTC mainnet the authenticity of a series of transactions ledgers outside of the mainnet.
At that moment, the mainnet's security consensus will intervene to settle and finalize the transaction for Bob and Alice, so the transactions occurring on the Lightning Network also possess the security level of the BTC mainnet. Currently, this approach has not established a precedent for smart contracts.
Rollup, which many may be more familiar with, refers to Optimistic Rollups and Zero-Knowledge Rollups on Ethereum as Layer 2 scaling solutions, aiming to move complex execution and state storage processes to Layer 2 to enhance throughput.
In simpler terms, the mainnet will verify the Proof periodically submitted to the mainnet from Layer 2 to ensure the ledger's authenticity in Layer 2 (this verification process is particularly important).
Thus, the mainnet can "real-time" monitor the L2 ledger. When L2 funds cross back to the mainnet, the Ethereum mainnet's security consensus will intervene, and the mainnet's Layer 2 finalization contract can verify whether a transaction can be finalized based solely on data generated through mainnet consensus, without relying on third-party information sources.
By now, many readers may realize that the essence of a traditional Layer 2 is a cross-chain bridge with the same security level as the mainnet. With this awareness, we can better distinguish sidechains.
A sidechain refers to establishing an independent blockchain network outside the mainnet (e.g., BSC), where the mainnet's consensus cannot verify the legitimacy of sidechain cross-chain actions.
A cross-chain bridge to a sidechain locks assets on the mainnet and maps them to the sidechain, and subsequently, the assets mapped out on the sidechain can perform functions such as transaction transfers. When the sidechain returns to the mainnet, the mainnet's cross-chain bridge contract will only verify the authenticity of the message for the funds sent out by the sidechain in the cross-chain transaction, without validating the sidechain's ledger.
In other words, if the cross-chain bridge project behaves maliciously, issues malicious signatures, or if the sidechain fabricates a false ledger, the funds on the mainnet side will be at risk.
It is easy to see that following the traditional L2 definition, observing whether the mainnet can verify ledgers outside the mainnet is crucial in determining whether a chain is a key part of Layer 2.
With this concept in mind, it is not difficult to explain why ETH, despite being listed after BTC, was able to overtake and take the lead in implementing Layer 2 solutions.
To understand the technical challenge of BTC Layer 2, one must first understand the BTC Taproot upgrade that enabled BTC Layer 2 possibilities.
Taproot was first proposed by Bitcoin Core contributor Gregory Maxwell in 2018. Taproot is an improvement to the Bitcoin protocol designed to enhance the privacy and efficiency of Bitcoin transactions.
The core idea of Taproot is to make transactions under various conditions appear as regular single-signature transactions, thereby reducing on-chain data usage and leakage, and allowing complex transactions (such as multi-signature and time-locked transactions) to execute like individual Bitcoin transactions.
Taproot introduced two key technologies to pave the way for future BTC Layer 2 solutions.
1) MAST (Merklized Abstract Syntax Tree);
2) Schnorr Signature;
MAST breaks down complex scripts into multiple sub-scripts, organizes them into a Merkle tree structure, and only needs to reveal the hash value and content of a sub-script when the conditions of that sub-script are met. This saves space, increases flexibility, and enhances privacy.
Schnorr Signature is a digital signature algorithm that allows multiple signers to be combined into one, generating a single signature. This simplifies multi-signature transactions, reduces costs, improves security, and enhances privacy.
The significance of MAST is that prior to the Taproot upgrade, to achieve complex script conditions, one could only use a P2SH address and had to generate redemption scripts with the same hash value and include them in the transaction.
For complex conditions under P2SH, the transaction size would become excessively large. In P2SH addresses, to spend BTC, you had to generate redemption scripts with the same hash value and include them in the transaction. If the spending conditions in the script are too complex, the transaction size would become excessively large.
MAST can solve the above problem well, which is why BTC Layer 2 development is possible.
MAST is a mechanism that combines Merkle Trees and Abstract Syntax Trees. Similar to P2SH, it involves paying to a specified hash value's script, but with MAST, you pay to the hash value of a specified Merkle root.
MAST assembles a large set of conditions into a hash tree, known as a Merkle Tree. In this tree, each node is a hash value calculated from its child nodes.
The root of the tree is a hash value representing the entire set of conditions. This way, a transaction only needs to include this root hash, rather than list out all conditions, reducing the transaction size.
First, hash all scripts (conditions) separately; then combine the computed hash values with neighboring hash values to perform a hash calculation, generating a new set of hash values. Repeat this pairwise hashing process until reaching the final hash value.
This hash value is the Merkle Root.

MAST can associate a Bitcoin transaction with a Merkle Tree, where each leaf node on this tree represents a condition to unlock Bitcoin.
To spend these locked bitcoins, you need to construct an unlocking script that matches a condition corresponding to a path on the Merkle Tree.
The network only needs to validate if the condition corresponding to this script belongs to the original condition set of the Merkle Tree, verifying if this condition exists on the Merkle Tree.
Once the network confirms that this script (and its corresponding condition) belongs to the Merkle Root, it knows that this script meets the requirements to unlock the bitcoins, and then proceeds to validate this unlocking script. This way, we don't need to include the full script in the transaction, reducing the size of the Bitcoin transaction.
It should be noted that while MAST significantly reduces the space occupied by transaction scripts and enables complex on-chain operations, the logic achievable by this tree-like structure is relatively limited. Therefore, some claims that "MAST can implement smart contract-like features on Bitcoin" are inaccurate.
Currently, the BTC mainnet does not support implementing ledger validation functions like Ethereum Layer 2, which means that BTC Layer 2 cannot directly replicate ETH Layer 2's technical architecture. To ensure cross-chain bridge security, an alternative approach is required.
If Schnorr signatures are combined with MAST, it can provide a new approach for BTC mainnet to Layer 2 cross-chain bridges, which is also the mainstream technical solution for BTC Layer 2 projects currently on the market.
Schnorr signature is a digital signature scheme proposed by Claus Schnorr, known for its simplicity and efficiency. Its advantage lies in being able to aggregate multiple signatures into a single signature, thus optimizing the verification and authentication process in multisig scenarios.
For example, in a multisig transaction requiring 12 signatures, each signature may need to occupy 20 bytes of storage space, so a total of 240 bytes would be needed to store these 12 signatures.
However, Schnorr signatures can merge these 12 signatures into a unified Schnorr signature that requires only about 60 bytes of space. This saves a lot of storage space, which can be used to accommodate more transaction script information.
Schnorr signatures can provide privacy protection for all n-n multisig contracts. The most typical application is the Lightning Network payment channel because it is essentially a 2-2 multisig contract.
As for general m-n (m<n) multisig contracts, this can be extended from the n-n case. We can use MAST to fold all possible unlock conditions into a branching structure.
For example, in a 2-3 multisig, it is equivalent to A, B unlocking or B, C unlocking or A, C unlocking three scenarios. This can be seen as a multi-condition script, where each condition is a 2-2 multisig, so it can also be defined using aggregated public keys instead of explicit multisig.
This is the fundamental cross-chain technology basis adopted by current projects such as STX, BEVM, etc.: achieving cross-chain by creating BTC addresses controlled by hundreds of Layer 2 nodes.
Based on the above comparison, it is obvious that BTC Layer 2 solutions cannot simply replicate the design of Ethereum's Layer 2 because of inherent differences between the two.
To plan the right path forward, BTC Layer 2 solutions should focus on the secure core essence while also taking into account Bitcoin's unique attributes.
The above mentioned that even with MAST, the BTC mainnet still cannot achieve overly complex OP/ZKP verification logic.
This has destined that, unlike BTC and Ethereum Rollup, Bitcoin's second-layer solution cannot periodically submit on-chain challenge records for verification. Storing data on the Bitcoin blockchain can only serve as an availability checkpoint, not for actual validation.
This is currently a concerning point for the market. For BTC believers, without BTC's consensus participation in validation, the narrative of the BTC Layer 2 is lost; for ETH old users, the security is weaker than ETH Rollup's technical solution, which is not very appealing.
This is a critical definition of Layer 2. Achieving cross-chain bridges with security equivalent to the mainnet consensus on the BTC mainnet is challenging. Currently, traditional Bitcoin cross-chain technologies, such as Hash/Time Lock, Peg, Swap, and Multisig, cannot provide sufficient trust guarantees.
The combination of MAST contracts introduced in the Bitcoin 2021 Taproot upgrade and Schnorr signatures brings hope for decentralized Bitcoin cross-chain, which is a key breakthrough for BTC Layer 2 implementation.
Compared to on-chain validation of Rollups, the current focus of BTC Layer 2 teams in development needs to be primarily on enhancing the security of cross-chain bridge signatures to the maximum extent possible.
As for achieving a perfect Layer 2, only Bitcoin can upgrade the BIP layer, miners can update the underlying code, support OP/ZKP verification and Bitcoin miner computation execution to achieve a second-layer solution similar to ETH Rollup. It is important to note that this will take a very long time and may never be adopted by miners.
Original Article Link
Welcome to join the official BlockBeats community:
Telegram Subscription Group: https://t.me/theblockbeats
Telegram Discussion Group: https://t.me/BlockBeats_App
Official Twitter Account: https://twitter.com/BlockBeatsAsia