Bitcoin's fully decentralized cross-chain solution will detonate Layer 2
01. What is BTC Layer 2?
BTC Layer 2 is an overlay network on top of the BTC network. Its main purpose is to solve the problems of insufficient transaction throughput and difficult expansion of the BTC network. The current Bitcoin network is still unable to process thousands of transactions per second (TPS), and higher throughput is required for effective and wider use of the BTC network. In this case, "Layer 2" refers to the various solutions proposed to the blockchain scalability problem. In layman's terms, Layer 1 refers to the Bitcoin public chain. In order to solve the problems of low throughput and high handling fees of the BTC network, transactions can be transferred to Layer 2 for processing, and the results will be returned to Layer after the processing is completed. 1, so as to relieve the pressure on the BTC network, and then expand the liquidity and scalability of BTC.
02. Comparison of three mainstream Layer 2
As the world's top two public chains, Bitcoin and Ethereum are vigorously developing Layer 2 at this stage. At present, BTC Layer 2 mainly has three mainstream products: Liquid Network, Lighting Network, and ChainX.
“Liquid Network”
Three mainstreams | NO.1
Liquid is a sidechain of the Bitcoin main chain developed by Blockstream. It is a sidechain-based settlement network for traders and exchanges. Its development team, Blockstream, is a global leader in Bitcoin and blockchain technology, responsible for BTC Operation and maintenance of the core code. In the Liquid network, faster and more private Bitcoin transactions and issuance of digital assets can be realized, but Liquid has a single function, multi-signature custody is too centralized, and the handling fee is expensive.
“Lighting Network”
Three mainstreams | NO.2
The Lightning Network is also a product developed by Blockstream. As the second-tier payment protocol of Bitcoin, the Lightning Network solves the inefficiency problem under the Bitcoin PoW mechanism in a certain sense. The project cleverly uses RSMC (serial expiry revocable contract) and HLTC (hash time-locked contract) to build an off-chain payment network. The Lightning Network is based on the on-chain and off-chain collaboration realized by the state channel, providing users with instant and low-cost bitcoin micropayments, but it also has the problem of single function and high handling fee, which is not suitable for ordinary people to use at present .
“ChainX”
Three mainstreams | NO.3
ChainX is developed by the PolkaX team. The team has been committed to the exploration of cutting-edge technologies in the field of blockchain and privacy encrypted communication, and is committed to the development and research of BTC Layer2 expansion, digital asset gateway and Polkadot secondary relay chain. ChainX supports EVM/WASM contract expansion through the cross-chain technology implemented by light node + multi-signature hosting. ChainX allows users to realize convenient asset cross-chain, fast payment and secure transactions. However, at present, multi-signature is too centralized, and the settlement fee is too expensive. EVM/WASM technology has been in the test network state and has not been applied on the main network.
03. Taproot upgrade will be BTC
technological revolution
While Bitcoin Improvement Proposals (BIPs) are design documents that introduce new features and information to Bitcoin, the Taproot upgrade is a compilation of three BIPs, namely Schnorr Signatures (BIP 340), Taproot (BIP 341) and Tapscript (BIP 342), these three upgrades are collectively referred to as BIP Taproot, which will bring a more efficient, flexible, and private transmission method to Bitcoin, the core of which is the use of Schnorr signatures and Merkel Abstract Syntax Trees (MAST) .
image description
▲Figure 1
image description
▲Figure 2
Most current blockchains use the ECDSA multi-signature algorithm. For block data, each node generates an independent digital signature with its own private key and broadcasts it to other nodes. Other nodes will verify the signature and write it into the next block of data. Using this method, when the number of consensus nodes is large, the signature data stored in each round of consensus blocks will continue to increase, occupying storage space. Whenever a new node joins the network and needs to synchronize historical blocks, a large amount of signature data will pose a great challenge to the network bandwidth.
After using the aggregated signature technology, each node will collect aggregated signature fragments broadcast by other nodes, and then save the aggregated signature fragments, as shown in Figure 2. In this way, when a new node joins, it only needs to download the aggregated signature data to synchronize the historical blocks, which greatly reduces the occupation of network bandwidth and reduces the expenditure of transaction fees.
image description
▲Figure 3
MAST (Merkle Abstract Syntax Tree) uses a Merkle tree to encrypt complex locking scripts, and its leaves are a series of non-overlapping scripts (for example, multi-signature or time lock). When spending, just disclose the relevant script and the path from that script to the root of the Merkle tree. As shown in Figure 3, to use script 1, you only need to disclose script 1, script 2 and hash 3.
The main advantages of MAST include: First, it supports complex spending conditions. The second is to provide better privacy protection without disclosing unexecuted scripts or untriggered spending conditions. The third is to compress the transaction size. As the number of scripts increases, the non-MAST transaction size grows linearly, while the MAST transaction size grows logarithmically.
However, there is a problem in the Taproot upgrade, that is, P2SH is not the same as the common Pay-to-Public-Key-Hash (P2PKH) in performance, and there are still privacy protection issues. Is it possible to make P2SH and P2PKH look the same on-chain?
To this end, Taproot proposed a set of solutions. For a script with a limited number of signers, it can be decomposed into two parts: the first part is multi-signature, and all signers agree on a certain expenditure result, which is called "cooperative expenditure"; The second part is called "non-cooperative spending" and can have a very complex script structure. These two parts are in an "or" relationship.
As shown in Figure 3, Script 3 is a 2-of-2 multi-signature, which requires both Alice and Bob to sign to be valid. It is a "cooperative expenditure"; Script 1 and 2 are "non-cooperative expenditures". Both "Collaborative Spend" and "Non-Collaborative Spend" can spend this output, where:
(1) For the "non-cooperative expenditure" script, the above-mentioned MAST method is adopted, and MerkleRoot is used to represent the root of the Merkle tree.
(2) For the "cooperative expenditure" script, a multi-signature algorithm based on Schnorr signature is adopted. Let Pa and Pb denote Alice's and Bob's public keys respectively, and Da and Db denote Alice's and Bob's private keys respectively. Therefore, the aggregate public key public key is P=Pa+Pb, and the corresponding private key is Da+Db.
(3) Combine "cooperative expenditure" and "non-cooperative expenditure" into P2PKH form, and its public key is: P=P+H(P||MerkleRoot)G; the corresponding private key is Da+Db +H(P||MerkleRoot).
(4) When Alice and Bob agree to "cooperative spending", they use Da+Db+H(P||MerkleRoot) (only one of them needs to add H(P||MerkleRoot) to their private key ) can be. On-chain, this behaves like a P2PKH transaction, with a public key and corresponding private key, without revealing the underlying MAST.
04. ChainX combined with Taproot
image description
▲Figure 4
image description
▲Figure 5
To transfer the assets of the aggregated multi-signature address, a multi-signature transaction needs to be initiated, and the execution of the multi-signature transaction needs to reach the specified threshold, which is generally set to 2/3 of the total proportion. In the form of aggregated signatures, users and trusts can jointly initiate a multi-signature transaction, in which the user's signature accounts for 1/3 of the total weight, and the signature weight of other trusts is close to 2/3. Under this setting, the premise for the BTC in custody to complete the transfer is that the user signs the transaction, and the total weight of other trusts is less than 2/3, even if all of them pass, the multi-signature transaction cannot be completed. Therefore, when users participate in aggregated signatures, users themselves have effective control over custody assets, reducing the centralized management of trust in previous schemes.
The scheme of aggregated signatures can effectively compress the number of transaction script bytes to significantly reduce transaction fees, and there is no maximum number of custodians. With the increase of the number of custodians N, the degree of decentralization of ChainX will continue to increase.
05. Layer2 Who is the biggest market?
As the leader of cryptocurrency, Bitcoin is already developing towards "digital gold". Next, it will focus more on the security and decentralization of the BTC network, and the development of BTC Layer 2 is to strengthen Bitcoin. The liquidity allows Bitcoin to be used for micropayments and daily consumption, expanding the influence of Bitcoin.
However, BTC Layer 2 has not developed for a long time. For example, the Lightning Network (Lightning Network), which is dedicated to Bitcoin micropayments, has gone through several years of hard work. Compared with the number of BTC issued on ETH, the number of locked Bitcoins , but not even a fraction, the reason is the poor scalability of Bitcoin technology. But the upgrade of Taproot this time perfectly solves this pain point, and the number of BTC Layer 2 applications will inevitably increase exponentially. At the same time, the development of BTC Layer 2 will further stabilize BTC’s status as a global currency. Make it more advantageous in the competition with the positioning of "digital gold".
Looking back at the current stage of ETH Layer 2, it has already occupied most of the market, so the BTC Layer 2 network will be in the catch-up stage in the early stage of development, but it is undoubted who can win the largest Layer 2 market in the end, BTC Technically, there is not much difference between Layer 2 and ETH Layer 2, but in terms of market value, it is clear that Bitcoin is in an absolute leading position.







