Original author: Fu Shaoqing, SatoshiLab, Wanwu Island BTC Studio
The rise of Bitcoin's inscriptions has brought new vitality to the Bitcoin ecosystem, making more people start to pay attention to Bitcoin again. Some people say it has opened the Pandora's box of the Bitcoin ecosystem. Among the many technological developments in the Bitcoin ecosystem, the construction of the Bitcoin second layer is of paramount importance. In this direction, I have borrowed some well-known articles on the Internet, exchanged ideas with many friends, and summarized a basic knowledge article on the Bitcoin second layer based on our team's exploration in Web3 product design and development. This approach is easy to summarize and learn, and because of the limitations of individual cognition, I hope to stimulate more people to improve relevant ideas and promote better development in this field.
The world of blockchain starts with Bitcoin and ends with the Bitcoin ecosystem. (This is a summary from Mr. Dashan, a partner at Waterdrop Capital, which I personally agree with.) Ethereum is also an exploration of Bitcoin's sidechain technology.
In this article, we will use the terms "二层建设" or "二层网络建设" interchangeably. Generally, "二层网络建设" is a more narrow term, while "二层建设" is a broader concept. However, in order to accommodate the commonly discussed "一层网络" and "二层网络", we will also use the term "二层网络建设". These two terms are used interchangeably in this article.
In order to understand the basic issues that need to be addressed in the construction of the Bitcoin second layer, we first need to start with an understanding of the fundamental characteristics of blockchain systems.
This article uses a concept proposed by Vitalik: blockchain is a "world computer". Understanding the various characteristics of blockchain from this perspective will be clearer. In the following chapters, we will also analyze the development possibilities of this "world computer" based on the von Neumann structure in computing.
We first summarize some basic features:
Annotation: The demand generated to maintain the normal operation of the "world computer" of the blockchain is called internal demand; the demand to meet the needs of users who use this "world computer" is called external demand.
Public and Transparent: This is a characteristic of the data storage and instruction execution of the blockchain, which is also an internal requirement for global distributed nodes to participate in computing. This characteristic meets the user's right to know about the data and is the result of the internal collaboration requirements of the "world computer" and the external needs of the users. The privacy feature mentioned later meets the external needs of the users while not compromising the collaboration requirements of the "world computer" itself.
Decentralization: This feature is an architectural feature of this "world computer". The degree of decentralization and fault tolerance is theoretically supported by the Byzantine Generals' Problem (the possibility of dishonesty among collaborators, i.e. non-compliance with the agreement). Non-Byzantine General systems are not blockchain systems in theory, and we will see two cases of non-blockchain systems in the second layer construction later. The degree of decentralization is an important indicator of blockchain security and the basis of certain features.
Security: Security is composed of the internal requirements generated by the architecture of this "world computer" and the external requirements of its users. At the micro level, security is ensured by cryptography-related technologies, while at the macro level, decentralization of the architecture ensures security. This ensures that the security of this "world computer" is not affected by the forgery of micro data or the destruction of macro architecture.
Computing Power: One of the main functions of the blockchain world computer is computing power. We generally measure this indicator by whether it is Turing complete. Some chains are intentionally designed to be Turing incomplete in order to maintain their main characteristics. For example, in the Bitcoin network, Satoshi Nakamoto not only made its code instructions Turing incomplete, but also intentionally deleted some instruction sets during development to maintain its stability and security. All Turing complete technologies are designed to expand the computing power of the blockchain. From the perspective of layered design, simpler systems are more suitable for the bottom layer.
Performance: In the case of equal computing power, performance is another major capability to consider in the world of blockchain computing. It is generally measured by TPS, which stands for the number of transactions processed per second.
Storage: Blockchain is described as the "world computer", so it must have a storage function, which is the ability to record data. Currently, most of the storage is within the block, while more professional off-chain storage is still under development.
Privacy: Privacy is a sub-requirement in the "World Computer" industry, which requires maintaining the scope of data producers and users' permissions during the process of computation and storage (we also include resistance to censorship in the privacy section). This is essentially driven by external demands from users.
There is also a comprehensive indicator of scalability, which generally refers to the scalability of the entire architecture. This feature affects most of the basic features, and at the architectural level, the scalability of the system is a very important indicator. There may also be some connectivity or other specific scenario capabilities, which will not be discussed in detail here. When encountering these special scenarios, they will be analyzed in detail.
Among the fundamental characteristics of these blockchains, most are constrained by the impossible triangle in their development relationships. For example, the DSS conjecture, which includes decentralization (D), security (S), and scalability (S), as shown in the following figure:

In distributed systems, the similar impossible triangle is the CAP theorem, which refers to the fact that in a distributed system, Consistency, Availability, and Partition tolerance cannot be achieved simultaneously. Blockchain systems are distributed systems with the Byzantine Generals' Problem, so the CAP theorem also applies to them.
The CAP principle is shown in the following figure:

What roles need to be completed in the second-layer construction? What functions does it provide? Second-layer construction is always used to expand the system's capabilities beyond the first layer, allowing tasks that cannot be completed on the first layer to be completed on the second layer.
From the characteristics of blockchain summarized above, we can draw a preliminary conclusion that the key to expanding these basic capabilities lies in: public transparency, decentralization, security, computing power, performance (throughput), storage, and privacy. In addition to these technological capabilities, there is also an important economic issue that needs to be addressed, which is to reduce costs. Typically, the comprehensive cost of executing transactions on a single-layer network is relatively high, so a second-layer network is needed to reduce these costs.
The summary in one sentence is that the solutions for increasing capacity, reducing costs, and customizing features are all based on second-layer construction. As for customizing features, it is not yet clear enough or often hidden in the first two features, which can be confusing. We can understand it as the characteristics of the first-layer network are needed to varying degrees for many applications, and the implementation degree of various characteristics can be re-adjusted on the second layer for certain applications.
In the construction of layer 2, the basic capabilities of blockchain will be selectively adopted, some features will be reduced, and even some features will be discarded in exchange for significant improvements in certain features. For example, in order to improve performance, some layer 2 solutions will reduce the degree of decentralization and security; some layer 2 solutions, such as the Lightning Network, will change the system structure and settlement methods in order to increase throughput. Some layer 2 solutions will enhance certain features without reducing basic features, such as the RGB processing method, which significantly increases privacy and resistance to censorship, but also increases technical implementation difficulty. In the following cases, we will see layer 2 constructions that simultaneously reduce or change several features.
Reducing cost should be a basic requirement for all Layer 2 constructions. (Are there any Layer 2 constructions that do not aim to reduce cost? I have not seen any.)
Layered design is a means and methodology for humans to deal with complex systems. By dividing the system into multiple hierarchical structures and defining the relationships and functions between each layer, modularity, maintainability, and scalability of the system can be achieved, thereby improving the design efficiency and reliability of the system.
For a broad and extensive protocol system, using layers has obvious advantages. This makes it easy for people to understand, easy to implement division of labor, and easy to improve in modules. For example, the seven-layer model design of ISO/OSI in computer networks, but in specific implementations, some layers can be merged. For instance, the specific network protocol TCP/IP is a four-layer protocol, as shown in the following figure:

The disadvantage of this approach is that the second layer based on the chain is generally limited by the restrictions of the blockchain, which limits the performance improvement. Either the system becomes more centralized or the block generation interval is reduced and the block capacity is increased, which generally reduces security. Therefore, the construction of the second layer on top of the second layer, also known as Layer3 or Layer4, emerged.
The advantage is: This solution maintains most of the basic features of blockchain and generally solves the problem of Turing completeness. Transaction fees are also significantly reduced, and the ability of the network is extended to some extent. Moreover, there are many construction cases for this solution, and the technical implementation is relatively easy. There have been many exploratory cases, and the migration of upper-layer applications is also very convenient. It is a faster way to implement, and it is believed that this approach will generate more second-layer networks.
Roughly speaking, due to the limited scalability of this approach, there should be numerous projects based on the chain structure of Layer 2, with one or more Layer 2s potentially existing in each vertical field. Each project needs to complete its own unique Layer 2 construction to meet the needs of certain applications. Its value will also be determined by the number and total value of applications built on top of it.
A distributed system consists of a finite set of processes and a finite set of channels, which are used to transmit messages. The control of data, events, and channels in a distributed system is a complex problem. Here, we refer to channels as a higher-level concept, such as payment channels in the Lightning Network or message channels in Nostr, rather than the underlying concept of specific technical channels in a distributed network.
In the construction of the second layer of distributed systems, there are two categories:
(1) Only completed value transfer, similar to Lightning Network.
(2) Both value transmission and Turing-complete technology are achieved, such as RGB.
In the distributed second-layer construction scheme, there are many difficulties beyond the original message transmission due to the value transfer, such as the total value capacity in the channel, the rigor of transactions, and the problem of not being able to consume twice, which all exceed the difficulty of message transmission. Therefore, the development of distributed second-layer construction is not as fast as that of chain-based second-layer construction, and there are not many mature cases.
If you want to complete Turing-complete calculations on such a two-layer system, that is, to establish a Turing-complete virtual machine system on the Channel, it will be more difficult. For example, the RGB protocol achieves Turing-complete calculations on a distributed system through client verification and one-time sealing.
The second-layer construction of the distributed system based on Bitcoin includes Lightning Network, RGB, and are there any other famous cases? If we look at the standard of generalized second-layer construction, does Nostr also belong to the second-layer construction of the distributed system of the Channel mechanism? When organizing Ethereum materials, I saw examples of using Channel in the Ethereum documentation: Connext, Raiden, Perun, which can be a direction for in-depth researchers to explore.
In the following chapters, detailed introductions of Lightning Network and RGB will be provided in the already operational Bitcoin layer 2 projects.
What are the advantages and disadvantages of distributed systems based on distribution?
The advantage of this approach is generally a more decentralized system, with the ability to accommodate countless nodes in a second-layer network. It also provides better privacy and censorship resistance, and has unlimited scalability, thus achieving great performance in theory.
Once the breakthrough of distributed second-layer construction is achieved, it will greatly promote the development of upper-layer applications. The decentralized ability formed by its massive distributed nodes and the Turing-complete code execution ability will better support the next generation of Internet applications, which is the "Mass Adoption" scenario that everyone is talking about.
Roughly speaking, there are usually only a few parallel projects in the second layer of a distributed structure based on channels. There are two main reasons for this: one is the infinite scalability of such systems, and the other is the difficulty of implementation. Therefore, such systems require a more open design and concept that can accommodate more people and teams. In addition, development teams based on this second-layer infrastructure will also promote the development of this second layer, such as the BiHelix project based on RGB.
Do we need this category? It may cause controversy.
Centralized indexing structures like Ordinals, or indexers for certain functional nodes, are also centralized structures and are a two-layer construction approach. However, this construction approach is less recognized because the second layer is too centralized, which limits the scalability of the first layer network. The basic characteristics of various blockchains rely on the first layer network for this centralized structure of the second layer construction, and the second layer only serves as some simple computing and statistical functions. The second layer is sometimes like a temporary existence that can be replaced by another second layer at any time, and its importance seems not so high. But from the perspective of On-Chain and Off-Chain, and from the perspective of improving the capabilities of the first layer network, this centralized structure is also a second-layer extension.
There should be other centralized exchanges in addition to Ordinals in the case of this type of system. The projects in the following cases do not introduce projects in this situation.
The advantages and disadvantages of second-layer construction based on centralized systems:
· The advantage is that the centralized system is very mature, with countless available cases and optimization solutions, fully Turing complete and excellent performance.
· The disadvantage is that it is extremely centralized at the second layer, and all the basic characteristics of blockchain rely on a single-layer network.
Roughly speaking, there should be fewer projects, even phased ones, based on the centralized structure of the second layer. After the mature and perfect development of the distributed structure based on the chain structure and Channel, most of the second layer construction based on the centralized structure will disappear, or only a few characteristic scenarios of the centralized second layer will remain. At the current stage, because the centralized system is very mature, it can well meet the scenarios of On-Chain data and Off-Chain computing when data can be written on the basic chain, which is the easiest implementation mode of the primary application of the Bitcoin ecosystem and is widely used.
From the structure of the second layer construction above, there are blockchain-style structure, distributed system structure, and centralized system structure. This is a common classification of system structures: Centralized, Decentralized, Distributed. From this perspective, we can more easily understand the characteristics and applicable scenarios of each type. Each of the three types of second layer has its advantages and disadvantages, and in the future complete Bitcoin ecosystem, all three types should have their place depending on different scenarios.

In addition, the blockchain community often discusses Layer3 and even Layer4 on top of the second layer construction, which is a broad concept of the second layer construction. Layer3 and Layer4 in the 5-layer structure of Gavin Wood's Web3 technology stack are completely different concepts. Layer3 and Layer4 in the Web3 technology stack are a way of classifying application protocols.

Gavin Wood's Web3 technology stack 5 layers and the schematic diagram of the generalized second-layer construction of the chain
What impact will these second-layer constructions have on upper-layer applications? With the basic features provided by the blockchain system, such as openness, transparency, decentralization, security, computing power, throughput, storage, and privacy, upper-layer applications will be built on the extensions of these second layers and will interact with them. Based on the blockchain-based second-layer extensions, distributed second-layer extensions, centralized second-layer extensions, and partially centralized applications, a truly large-scale Web3.0 application will be created.
……。

(1) The expansion of CPU (arithmetic logic unit and control unit) is similar to the current expansion of first and second layer computing power and throughput.

(3) Input and output devices, in the blockchain industry, are known as oracles. These input and output devices have not been fully utilized in the second layer of blockchain development, but there will be more demand for them in the upper layer applications.
(5) On-chain applications and higher-level applications are evolving and separating functions, just like traditional computers did not distinguish between operating systems and application software.
(6) Many current blockchain applications are financial applications, similar to early traditional computers, mostly used for scientific research and military applications. With development, they gradually move towards enterprises, households, and individuals. Blockchain applications will also have similar development trends, from early financial applications to more extensive applications.
There are many topics to discuss regarding the construction of the second layer and the "world computer" of blockchain compared to traditional computers, which will not be further elaborated in this article.
In this article, we mainly introduce the successful Bitcoin layer 2 projects that have been running for a certain period of time, referring to some research reports and industry reports. Most of these layer 2 constructions have been brewing or launched since 2015-2019. Some newer projects, if they have characteristics, will also be introduced. We will see that these cases are basically based on chain-based layer 2 construction, and only the Lightning Network is based on channel-based distributed system construction. If we count Ethereum's layer 2 construction, Raiden Network is also a channel-based design case, but its development seems to be unsuccessful and will not be introduced in this article. Ethereum's Plasma technology is a channel-based sub-chain design solution, which seems to be a combination of chain and channel. I personally think that its main feature is a chain-based layer 2 design, and I will not discuss it too much here.
Lightning Network is a distributed second-layer construction technology in the cryptocurrency industry.
Lightning Network is a second-layer solution built on top of the Bitcoin blockchain, aimed at addressing the scalability and low transaction speed issues of Bitcoin. It was first proposed in 2015 and fully implemented in 2018.
The main characteristics of the Lightning Network are speed, low cost, and scalability. It establishes a series of payment channels that allow Bitcoin transactions to take place within the channels without being directly recorded on the blockchain. This greatly reduces transaction confirmation time and fees, and supports a large number of parallel transactions. The security and reliability of Lightning Network transactions are ensured by the RMSC protocol, while HTLC solves the issue of routing and scalability. Its architecture provides scalability, making it highly performant.
Since its launch, the Lightning Network has received widespread attention and adoption. More and more Bitcoin users, exchanges, and merchants are starting to use the Lightning Network for fast cross-chain transactions and real-time payments. In addition, developers are constantly improving the performance and user experience of the Lightning Network, providing it with more features and scalability.
Despite providing significant improvements in scalability and transaction speed, the Lightning Network still faces some technical and adoption challenges. For example, the stability of the network, routing algorithms, and user interface all need continuous improvement. However, with time and technological advancements, the Lightning Network has the potential to become an important payment solution for Bitcoin and other cryptocurrencies, providing users with faster and lower-cost transaction experiences.
Liquid (chain-based layer 2 construction)
Liquid is a sidechain solution launched by Blockstream in 2015. As the first sidechain of Bitcoin, Liquid aims to provide a faster, more secure, and private transaction solution to meet the needs of professional users such as financial institutions and exchanges.
One of the main features of Liquid is its fast transaction confirmation time. Compared to Bitcoin's confirmation time of about 10 minutes, Liquid's transaction confirmation time only takes 2 minutes. This allows users to trade more quickly and complete fund transfers quickly when needed. Another important feature is Liquid's transaction privacy. Liquid uses Confidential Transactions technology to hide transaction amounts, and only transaction participants can view specific amounts. This helps protect the privacy of transaction participants.
Liquid also has higher transaction throughput. By using Federated Peg technology, Liquid is able to support a large number of parallel transactions and anchor them on the Bitcoin network, achieving interoperability with Bitcoin. This allows Liquid to process more transaction volume and improve the overall system throughput.
Since its launch, Liquid has gradually grown in the cryptocurrency industry. More and more exchanges, financial institutions, and enterprises are adopting Liquid as their solution for trading and fund settlement. At the same time, Blockstream continues to introduce new features and improvements to further enhance the performance and security of Liquid.
Generally speaking, Liquid is a Bitcoin sidechain solution launched by Blockstream, aimed at providing fast, private, and high-throughput transactions. It meets the needs of professional users by shortening transaction confirmation times, providing transaction privacy, and increasing transaction throughput. Over time, Liquid has gained widespread adoption and development in the cryptocurrency industry.
Rootstock (RSK) (based on chain second-layer construction)
Rootstock (RSK) is a smart contract platform built on the Bitcoin blockchain, aimed at providing Ethereum-like functionality to the Bitcoin ecosystem. Rootstock was first proposed in 2015 and officially launched in 2018.
The main features of Rootstock are bi-directional anchoring with Bitcoin and smart contract functionality. Through bi-directional anchoring with Bitcoin, Rootstock is able to use Bitcoin as its primary asset, achieving security and stability. At the same time, Rootstock supports smart contract functionality, allowing developers to build and execute smart contracts with automation capabilities on its platform.
Since its launch, Rootstock has gradually gained recognition and adoption in the Bitcoin ecosystem. It provides more functionality and flexibility for Bitcoin users and developers, enabling Bitcoin to support a wider range of use cases, such as decentralized finance (DeFi), digital asset issuance, and supply chain management.
However, compared to other smart contract platforms, Rootstock has developed relatively slowly. It still needs more effort in expanding its user and developer community. Nevertheless, the development prospects of Rootstock are still considered positive, and it has the potential to become one of the important smart contract platforms in the Bitcoin ecosystem.
RGB (based on distributed + Turing complete two-layer construction)
The story of RGB can be traced back to 2016, when Giacomo Zucco wanted to develop a better colored coin using Peter Todd's client validation and the concept of one-time seals, and bring these tokens into the Lightning Network (hence the name "RGB"). It is an open protocol built on the Bitcoin blockchain, aimed at providing richer functionality for the creation, trading, and management of digital assets. RGB is a scalable and confidential Bitcoin and Lightning Network smart contract system developed by the LNP/BP Standards Association. It adopts the concepts of private and common ownership, is a Turing-complete, trustless distributed computing form, and does not require the introduction of non-block decentralized protocols for tokens.
The design purpose of RGB is to run scalable, robust, and private smart contracts on UTXO blockchains (such as Bitcoin) to achieve all possibilities. With RGB, developers can execute complex multi-category smart contracts such as token issuance, NFT minting, DeFi, DAO, and more.
RGB protocol is based on the concepts of client-side validation and single-use seals, and it is a client-side state validation and smart contract system that operates on the second and third layers (off-chain) of the Bitcoin ecosystem.
Stacks (chain-based Layer 2 construction)
Stacks (formerly known as Blockstack) is a decentralized computing platform built on top of the Bitcoin blockchain. Stacks was first proposed in 2013 and had its initial coin offering (ICO) in 2017. Its main features include decentralized identity verification, storage, and smart contract functionality.
The core feature of Stacks is to support the development and execution of decentralized applications through the security and stability of Bitcoin. It adopts a consensus mechanism called "Stacking", which allows users holding STX tokens to lock a certain amount of tokens and participate in network validation to achieve consensus. This mechanism provides incentives for users and increases network security.
In terms of development, Stacks has become one of the important platforms in the field of decentralized applications. It has attracted a group of developers and projects to join, built numerous decentralized applications, and provided rich tools and development documentation. Stacks also collaborates with other blockchain projects to expand its ecosystem and application scenarios.
Before, I promoted projects that aimed to enter Web3.0 without any technical or community accumulation, and I didn't understand much about them. I probably regarded these projects as CX projects. However, through the phenomenon of inscriptions, those that generated a large community consensus through a certain inscription, such as sats, ordi, rats, not only have many members but also have accumulated certain funds. Such projects can completely start a new layer-two construction from scratch, integrate upper-layer applications into the community through the power of the community, and may also build a layer-two construction. This layer-two construction is likely to be based on the chain because it is simple and fast, and through the power of the community, decentralized identity (DID), DAO tools, DeFi applications, and other upper-layer applications can be built in the community's layer-two without the need to build them themselves, only by introducing mature product parties and sharing revenue. This may form a small ecosystem. Such projects have higher requirements for community construction, foundation management, and decision-making mechanisms.
The development of upper-layer applications.
Regardless, the Web3.0 era has just begun and is still in its infancy and early stages, requiring a lot of exploration and development. Many countries and regions have not fully opened up to many new things in Web3.0. Web3.0 requires a lot of construction and will give project teams more opportunities. Teams that constantly perceive new developments and technologies, constantly adjust, and constantly participate in the construction of Web3.0 will definitely reap rewards in a certain stage and field.
Writing this article is based on my extensive reading of industry articles, as well as participation in various activities such as TwitterSpace and offline communication. Inspired by the speeches of many people, some prominent influential personnel and factors are as follows:
(3) Numerous articles on www.btcstudy.org. The knowledge compiled on this website is very rich.
(6) Other blockchain knowledge, including layered design concepts, comparisons with von Neumann architecture, accumulated from writing several books in the past few years. Five books have been published: "Blockchain Knowledge - Popular Edition", "Blockchain Knowledge - Technical Edition", "Turing Blockchain", "Blockchain Economic Model", and "Web3.0: Building the Digital Future of the Metaverse". Three books on Ethereum have also been partially written but not yet published. These contents have referenced many native protocols, whitepapers, and technical principles of blockchain, and their production is the result of many people's efforts. I only collected and organized them. Gradually, I understood the underlying principles and the correlation between many technologies and their potential future applications.
(7) Discussion and thinking with team members when designing related products in our project.
Thank you very much to Mr. Dashan from SatoshiLab, Elaine Yang, and related technical experts for reading this article and providing feedback and suggestions for revision. They strictly reviewed the accuracy of the concepts cited in the article until we could find the original reference before confirming its qualification. We appreciate this rigorous habit!
Thank you very much to all the contributors and participants who have helped improve my knowledge system.
This article is from a submission and does not represent the views of Blockbeats.
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