Bitcoin Layer2: Rebuilding Ethereum on Bitcoin

This article is machine translated
Show original

Original title: "Bitcoin Layer2: Rebuilding Ethereum on Bitcoin" Original source: Xiaozhu Web3

What is Layer2

When it comes to Layer2, people usually think of Ethereum's Layer2 Rollup, such as Arbitrum, Optimism, zkSync, and StarkWare. In fact, the Layer2 expansion plan originated from the white paper of Bitcoin's Lightning Network in 2015.

Public chains such as Bitcoin, Ethereum, and Solana are collectively referred to as Layer 1. The main function of Layer 1 is to ensure security, decentralization, and final state determination, achieve state consensus, and act as a "crypto court" to arbitrate through rules designed by smart contracts, transferring trust to Layer 2 in the form of economic incentives.

Layer2 pursues extreme performance and can undertake most of the computing work for Layer1, such as separating Ethereum transactions from the main chain, reducing the burden of the first layer of the network, and improving business processing efficiency, thereby achieving capacity expansion. Layer2 can only achieve local consensus, but it can meet the needs of various scenarios.

Bitcoin Layer2

In general, Layer2 is an independent blockchain network built on Layer1. Its purpose is to package most of Layer 1 transactions into Layer2 to reduce pressure and expand capacity.

At present, the Bitcoin network can process an average of about 7 transactions per second. In comparison, Alipay in the web2 world can process 100,000 transactions per second. With the inscription design represented by the Ordinals protocol, Bitcoin provides a decentralized storage capability on the chain. The new standard represented by BRC-20 realizes Bitcoin ecological tokens similar to ERC-721 and ERC-20. The outbreak of these Bitcoin ecosystems has made the already inefficient Bitcoin network even more "congested", and the rise of Ethereum Layer2 (including Rollup) has given Bitcoin developers hope to transplant these mature experiences into the Bitcoin ecosystem. It can be said that Bitcoin Layer2 will undoubtedly become one of the biggest narrative spring breezes in 2024.

The Bitcoin Layer2 network is designed to meet the growing demand for faster and more efficient transactions within the Bitcoin ecosystem. By releasing certain transaction processing tasks from the main network, it aims to alleviate the congestion problem of the Bitcoin mainnet and significantly reduce the time required for transaction confirmation.

Bitcoin Layer2 Development and Classification

Each Bitcoin block is 1MB, and the average transaction size is 250 bytes, so only 1024*1024/250=4194 transactions can be recorded. It takes an average of 10 minutes to generate a block, so the number of transactions per second is 4194/10/60=6.99 transactions, which is why we usually say that Bitcoin has 7 transactions per second.

There are three variables here, namely block capacity, transaction size, and block time. Among them, only the method of increasing transaction speed by changing block capacity is feasible. For example, if the block capacity is increased from 1M to 32M, the transaction speed per second will increase from 7 to 224. If you want to increase the transaction speed without expanding the capacity, you can only do it through the side chain.

On December 12, 2010, when Satoshi Nakamoto disappeared from the public eye, he handed over the rights to develop Bitcoin to Gavin Andresen. Gavin then gave the code management rights to four developers, including Gregory Maxwell, who later served as CTO of Blockstream.

Blockstream focuses on sidechain technology and lightning network. According to Gregory Maxwell, Blockstream was established for Bitcoin development.

The Lightning Network white paper was released in February 2015, and the Segregated Witness (Segwit) solution was proposed in December 2015. After that, Gregory Maxwell wrote the Lightning Network into the Bitcoin roadmap, forming the "Segregated Witness + Lightning Network" technical route. This expansion route does not actually change the block size, but speeds up the Bitcoin confirmation speed through clever design and off-chain processing.

Segregated Witness means not writing the witness information of the transaction into the block, so that the block size remains unchanged and more transactions can be accommodated by reducing the amount of information in a single transaction.

The Lightning Network builds a prepaid pool in the form of a margin between counterparties with frequent transactions. As long as the amount does not exceed this amount, all transactions are not recorded in the main chain block. Only a transaction occurs at the time of settlement, thereby reducing the pressure of small transactions on the mainnet.

After the Segregated Witness upgrade, although the Bitcoin block size limit was changed to 1M for transaction data blocks and 3M for witness data blocks, with a total size of 4M, this limit has not changed to date. As Bitcoin's influence continues to grow, the issue of capacity expansion has become more prominent. Capacity expansion is still one of the core issues facing the Bitcoin ecosystem, and various technical routes are actively exploring solutions. The main directions of Bitcoin capacity expansion are as follows.

State Channels

A state channel is a virtual channel established on the blockchain to enable two-way communication and state services between different users. It allows users to conduct multiple transactions within the channel without having to record the transactions on the blockchain each time, greatly improving the efficiency and speed of transactions. These channels can be jointly created by two or more users, and will only be settled with smart contracts on the blockchain when necessary, thereby reducing the load on the blockchain network and transaction fees.

The most famous example of a state channel is the Lightning Network mentioned above. The two parties to a transaction establish an off-chain payment channel at the time of the first transaction, which is essentially a ledger held by both parties to keep transaction records. The two parties to the transaction lock a certain amount of funds in the channel and then sign the transaction with their private keys.

The transfer of funds between the two parties is not carried out on the chain, but is only saved in each other's ledgers. When one or both parties decide that they no longer need the channel, the settled balance is broadcast on the main network.

However, the Lightning Network is not just a direct connection between two parties. It can connect a large number of single channels in series to form an interconnected and vast payment network. In other words, assuming that C and A have a channel, C and B do not have a channel, but A and B have a channel, then C can trade with B indirectly through A, and A as a middleman can charge routing fees. In the Lightning Network, the network will find the path with the least nodes and the least transaction fees to complete the transaction.

Sidechain

Sidechain is the most common solution, and the most popular sidechain technologies include Stacks, Liquid and Rootstock.

As Bitcoin's leading sidechain project, Stacks is anchored on the Bitcoin blockchain on the one hand, and as an independent protocol, it introduces smart contract functions similar to Ethereum and permanently settles transactions on the BTC blockchain. As Bitcoin L2, it unlocks Bitcoin's programmability and opens up new possibilities for applications such as DeFi and NFT.

If we look at the overall system, Stacks actually has its own chain, compiler, and programming language, and runs synchronously with Bitcoin to ensure its transactions and integrity. However, because it uses a "peg" method to achieve BTC cross-chain - achieved by issuing sBTC on the Stacks network, it is essentially a centralized mapping method, which has certain centralized single-point risks. At the same time, its network Gas uses its mainnet token STX instead of BTC. Miners participating in Stacks' network mining will consume pledged BTC to mine its network tokens. Through this system, miners earn STX coins and transaction fees, while STX pledgers earn Bitcoin, which will also cause miners to hesitate to participate in the trade-offs.

Emerging sidechain technologies such as BEVM adopt a fully decentralized Bitcoin Layer2 solution.

BEVM is a BTC Layer2 that uses BTC as Gas and is compatible with EVM. Its core goal is to expand Bitcoin's smart contract scenarios, help BTC break through the constraints of the Bitcoin blockchain being non-Turing complete and not supporting smart contracts, and allow BTC to build decentralized applications with BTC as native Gas on the BEVM Layer2.

When a user transfers BTC from the Bitcoin mainnet to BEVM, the user's BTC will enter the contract address hosted by 1,000 nodes, and then new BTC will be generated in BEVM, the BTC Layer2 network, at a 1:1 ratio.

When a user issues an instruction to transfer BTC from BEVM back to the mainnet, the BEVM network node will trigger the Mast contract, and the 1,000 nodes that hold custody assets will automatically sign according to the established rules and return BTC to the user's address. The entire process is completely decentralized and trustless.

Client Validation

Currently, most public chains use a global consensus model (Global Consensus), where all nodes verify all transactions, all transaction information is transmitted between nodes, and the entire network shares a unified global state.

Problems caused by the global consensus model:

Scalability limitations, which make it expensive to verify all contract interactions;

2. High costs prevent more users from participating in running nodes, leading to node centralization;

3. Lack of privacy, transaction information is public.

Client-Side Validation (CSV) only requires the consensus layer to maintain a cryptographic commitment to the ledger events, and the actual event information (ledger) is stored outside the blockchain.

The representative project of CSV is RGB. In RGB, there is no global network that broadcasts all transactions to create the equivalent of the Bitcoin UTXO set. This means that when receiving an asset transfer, the RGB client must not only verify whether the most recent state transition is valid, but also perform the same verification on all previous state transitions dating back to the genesis state of the issuance contract. Therefore, RGB needs to verify the transaction history step by step from the bottom up to prevent double spend attack.

RGB improves scalability by verifying only relevant transactions, but may also present issues like data availability, requiring data sharing to optimize payment verification.

RGB's client needs to store more data. If the off-chain data used to verify transactions is lost, users will no longer be able to spend, and more than just the key needs to be saved.

Rollup

ZK Rollup and Optimistic Rollup are basically similar to Ethereum, with Bitcoin serving as the consensus layer, data layer, and settlement layer. However, the technical challenges are enormous, especially if ZK-Rollup is to be supported, which requires a huge upgrade of the Bitcoin mainnet, making it difficult to reach community consensus and weakening the Bitcoin network’s narrative of currency and value storage.

The representative project of ZK Rollup is Alpen, and the representative project of Optimistic Rollup is BitVM. Both are relatively ideal and are in the theoretical stage.

Sovereign Rollup is another "incomplete" Rollup solution. Bitcoin only serves as the consensus layer and data availability layer. Layer2 has its own status and asset data, which is not stored in the Bitcoin network. It is verified through Layer2 nodes, that is, the settlement is placed in Layer2. It is technically easy to implement, so it is also hotly discussed in the Bitcoin community.

Rollkit, an open source technology framework developed by Celestia, allows developers to customize the data availability layer and execution layer, supports storing Rollup data directly on the Bitcoin network, and supports developers to deploy Sovereign Rollup. Therefore, developers can use Rollkit to deploy the Rollup protocol on the Bitcoin network to improve scalability and minimize network operation costs.

Full chain

Omnichain connects all blockchains together by building a base layer (Layer 0), regardless of their smart contract technology, on which all other networks and DApps can be built.

The full chain is a super multi-chain ecosystem that is compatible with everything. Therefore, as long as it is compatible with Bitcoin, it can also be regarded as Bitcoin’s Layer 2, represented by the project MAP Protocol.

MAP Protocol is a Bitcoin Layer2 network for peer-to-peer cross-chain interoperability. It uses Bitcoin's security mechanism to enable assets and users of other public chains to interact seamlessly with the Bitcoin network, thereby enhancing the security of the network and realizing BRC-20 cross-chain capabilities.

Summarize

Bitcoin Layer2 is still in its early stages, as Bitcoin itself is extremely restrictive and difficult to program. In addition, on-chain expansion has long been a difficult problem for the Bitcoin community. The support behind the community comes from teams or institutions with different development backgrounds, lacks coordination, and collaboration is difficult. The debate between Bitcoin fundamentalism and the emerging Bitcoin ecosystem still exists.

In the long run, the ability to introduce Rollups and smart contracts is crucial to the development of the Bitcoin ecosystem, and may become a key driving force for innovation and diversification in the Bitcoin ecosystem, producing practical products such as Inscription Defi.

But is Bitcoin, which is becoming more and more like Ethereum, still the Bitcoin we know?

Source
Disclaimer: The content above is only the author's opinion which does not represent any position of Followin, and is not intended as, and shall not be understood or construed as, investment advice from Followin.
Like
5
Add to Favorites
4
Comments