banner
CKB 中文

CKB 中文

CKB 是理想的比特币 Layer 2

An Overview of the Bitcoin Layer 2 Protocol RGB++: CKB

Compilation | GaryMa Wu discusses blockchain; Original link: https://mp.weixin.qq.com/s/HHHDmAXCqeByZl6BmPvCXg

Since the emergence of Ordinals & inscriptions on Bitcoin, it has brought further traffic and attention to the Bitcoin network. Although protocols like Ordinals greatly enhance the programmability of the Bitcoin network, they essentially just "cleverly use" the "op_if" opcode in Bitcoin scripts, leading to these new asset issuance methods. Bitcoin is essentially just a decentralized ledger system, and its scripting system lacks Turing completeness, meaning these assets have no application beyond trading. Therefore, to further develop and prosper the Bitcoin ecosystem, it is urgent to explore suitable L2 solutions for smart contract development on the Bitcoin network.

Currently, Bitcoin L2 solutions can be roughly categorized into state channels (like the Lightning Network), sidechains (like Liquid, Merlin), Rollups (like Rollkit), and client validation (like RGB, RGB++, Taro), among others. The most famous is the Lightning Network, which is an excellent choice in terms of scalability, security, and privacy, although progress has been relatively slow so far.

Given the current market heat and trends, we can tentatively categorize the current Bitcoin L2 camp into two types:

  • EVM Camp: Such as the currently popular Merlin and B² for staking airdrops.
  • UTXO Camp: Based on the UTXO model, such as CKB, which proposed RGB++.

For the EVM camp, it primarily adopts sidechain technology, building a sidechain outside the Bitcoin network and using cross-chain bridges to transfer BTC and assets on EVM chains to L2, which can significantly improve performance but cannot achieve the security of the BTC mainnet. At the same time, leveraging the operation of staking airdrops and users' familiarity with EVM and related L2 technologies makes it easier to capture user mindshare and market share.

For the UTXO camp, it belongs to a more native technical faction, with CKB, the main focus of this article, being a popular player in this track, recently proposing the RGB++ extension protocol. However, while the UTXO camp may be relatively native and homogenous in technology, this very understanding barrier makes it difficult for many to grasp the advantages of such designs. This article will explain this type of Bitcoin L2 solution by combining the UTXO public chain CKB and its related Bitcoin L2 technical route.

Technical Background#

UTXO Model and Account Model#

The account model is relatively easy to understand, similar to a bank account, where the total amount of funds is intuitively displayed as an overall balance, and the system only needs to track changes in user account balances. This is the model adopted by most public chains today, such as Ethereum.

The UTXO model, on the other hand, is closer to cash transactions, where you might have many different denominations of bills in hand. Each bill can be seen as a UTXO, which is a sum of money you can use. In a system like Bitcoin, when you receive a Bitcoin transfer from someone, this money is like a new bill in your wallet that you haven't used to pay for anything yet, so it is "Unspent Transaction Output." When you make a transaction, such as using 100 yuan to buy an item worth 40 yuan and receiving 60 yuan in change, this corresponds to using your current unspent UTXO (100 yuan) to create two new UTXOs: one for the item (40 yuan) and one for change (60 yuan). Note: Understanding the UTXO model is key to understanding RGB and subsequent content.

RGB#

In simple terms, we can say that Ordinals are about numbering and tracking the smallest homogeneous unit of Bitcoin, Satoshi, while inscriptions are about writing data content (which can be images, text, or even code) into the witness isolation area based on this, achieving a binding of data and Satoshis to complete the issuance and circulation of assets. However, as the Ordinals protocol has developed, people have gradually realized that storing all data on the Bitcoin mainnet has many drawbacks, including high transaction fees and increased congestion on the Bitcoin network, and fundamentally it cannot bring a programmable smart contract system to the Bitcoin network.

Years ago, developers proposed the idea of "only putting the most important parts of the data on-chain," which is the concept of RGB: only using the Bitcoin blockchain when necessary, removing the verification of token transfers from the full-chain consensus layer and placing it off-chain, verified only by the client of the receiving party, while utilizing Bitcoin's decentralized network to prevent double spending and censorship resistance.

Perhaps comparing the differences between Ordinals and RGB can help readers understand better:

  • RGB binds relevant assets to UTXOs, while Ordinals binds them more specifically to the smallest unit, Satoshi;
  • RGB only writes the transaction commitment (i.e., a hash value) of relevant assets to the Bitcoin main chain, with the specific verification process taking place off-chain, while all data and verification logic of Ordinals rely on the Bitcoin mainnet.

With the above content as a foundation, we can introduce the two core technologies of RGB:

One-Time Seal: Binding with UTXO#

Assets issued under the RGB protocol do not exist on a specific public chain as a carrier (the same goes for current protocols like Ordinals/Atomicals), and each RGB-related asset token must specify a particular UTXO on the Bitcoin network corresponding to it. If someone owns a specific UTXO in the Bitcoin network, they also own the RGB-related asset token recorded in that specific RGB protocol. To transfer RGB-related assets, the holder must spend that UTXO.

Due to the one-time nature of UTXOs, once spent, they are gone. In the RGB protocol, this corresponds to spending that RGB asset. The process of spending this UTXO is the process of opening the one-time seal. The advantage of this design is that when we need to verify a certain state of a contract, we do not need to obtain all the block data. Each state of a contract must be attached to a specific Bitcoin UTXO, and once we want to change this state, we must spend this UTXO and have the transaction that spends it confirmed on the blockchain. Moreover, the relevant transaction information attached to the UTXO allows us to trace back to the initial state of this contract, enabling us to identify the essence of this state. Of course, RGB transactions are not verified like Bitcoin transactions between Bitcoin nodes; the RGB scheme is client-validated, meaning users verify it off-chain themselves.

Client Validation#

Unlike the Bitcoin mainnet, which broadcasts transaction data and synchronizes transaction verification records across all nodes, the RGB protocol places this process off-chain, with transaction information only transmitted between the sender and receiver. After the receiver verifies the transaction, they only need to record the data related to that transaction to meet the on-chain verification requirements.

Challenges and Difficulties Faced by RGB#

Despite the excellent design of the RGB protocol, it still faces numerous challenges:

  • DA Problem: As mentioned earlier, transaction information is only transmitted between the sender and receiver, making it difficult for ordinary users to obtain the necessary information (such as the historical branches of that UTXO). Additionally, the data stored by various clients is independent, leading to data island problems, making it impossible to view the global state of the contract.
  • P2P Network Problem: RGB transactions, as extensions of Bitcoin transactions, need to rely on a P2P network for propagation. When users conduct transfer transactions, they also need to perform interactive operations, and the receiver must provide a receipt. All of this relies on a P2P network independent of the Bitcoin network.
  • Virtual Machine and Contract Language: The virtual machine of the RGB protocol currently mainly uses AluVM, which, as a new virtual machine, lacks comprehensive development tools and practical code.
  • Ownerless Contract Problem: The RGB protocol currently lacks a complete interaction scheme for ownerless contracts (public contracts), making multi-party interactions difficult to achieve.

CKB Enters BTC L2 with RGB++#

CKB's Transformation to BTC L2#

CKB launched its mainnet in November 2019, adopting a PoW consensus mechanism and improving the UTXO model. CKB generalizes the UTXO model and names it the Cell model. Like UTXOs, Cells are also transaction outputs, but Cells generalize the amount in UTXOs into capacity and data, transforming the original space for storing integers into a space that can hold arbitrary data.

Against the backdrop of the rising Bitcoin ecosystem, CKB has formulated the BTCKB "BTC+CKB" plan, aiming to transform into the first Bitcoin Layer 2 that is completely isomorphic to BTC (based on PoW+UTXO) through the characteristics of CKB's "PoW+UTXO."

RGB++: RGB Extension Protocol Based on CKB#

On February 13, CKB officially released the RGB++ Light Paper.

RGB++ is an extension protocol based on the principles of RGB, utilizing the core points of RGB "UTXO" and the underlying architecture of CKB being homogenous, combining two key points of the RGB protocol with the architecture of CKB:

  • Isomorphic Binding: UTXOs as RGB containers can be bound and mapped to CKB Cells.
  • The off-chain client validation of RGB can be transformed into on-chain public validation on CKB, with the verification data and state corresponding to the data and type in the Cell.

In the RGB protocol, the two most important components are UTXOs for ownership identification and commitments for state management and one-time seals. The isomorphic binding of RGB++ maps each Bitcoin UTXO to a CKB Cell, using Bitcoin locks to achieve ownership synchronization and using the data and type of cells to maintain state.

This not only addresses the challenges faced by RGB but also grants RGB more possibilities:

  • CKB Blockchain as an Enhanced Verification Client: All RGB++ transactions will have a corresponding transaction on both the BTC and CKB chains. The former is compatible with RGB protocol transactions, while the latter replaces the client validation process, allowing users to verify the status calculation of this RGB++ transaction simply by checking the relevant transaction on CKB. This eliminates the aforementioned DA problem and data island issues.
  • Transaction Folding: The isomorphic binding of Bitcoin UTXOs and CKB Cells enables Turing-complete Bitcoin UTXO transactions supported by CKB Cell verification. If we further utilize the programmability of CKB Cells, we can correspond multiple CKB transactions to a single Bitcoin RGB++ transaction, allowing the low-speed, low-throughput Bitcoin chain to be scaled using the high-performance CKB chain.
  • Non-Interactive Transfers: One issue with the original RGB protocol is that the receiving party must be online to complete a regular transaction, increasing user comprehension difficulty and product complexity. RGB++ can leverage the advantages of a Turing-complete environment to place interactive behavior within the CKB environment, using a two-step operation of sending and receiving to achieve non-interactive transfer logic.

In summary, RGB++ inherits the core ideas of the RGB protocol, adopting different virtual machines and verification schemes, allowing users to complete all verifications independently without needing a separate RGB++ client, simply by accessing Bitcoin and CKB light nodes. RGB++ also brings Turing-complete contract extensions and dozens of times performance improvements to Bitcoin. It does not use any cross-chain bridges but instead employs a native client validation scheme, ensuring security and censorship resistance.

What Advantages Does CKB Have in the BTC L2 Competition? What Are Its Future Plans?#

Camp Comparison#

As mentioned earlier, based on the current market heat and trends, Bitcoin L2 can be roughly divided into the "EVM Camp" and the "UTXO Camp."

  • The "EVM Camp," led by Merlin and B², is engaged in a heated competition for staking TVL, trying to seize the initial time window of the Bitcoin ecosystem to gain first-mover advantages and capture market share.
  • The "UTXO Camp," led by CKB, occupies a technological high ground with its complete isomorphism to BTC (based on PoW+UTXO) and widely recognized RGB and other extension protocols, capable of providing Turing-complete contract extensions and performance improvements to Bitcoin without cross-chain requirements and without compromising security. However, it may not have the immediate impact of staking airdrop incentives in attracting ecological assets in the early stages.

Roadmap#

CKB's first product, RGB++, is expected to launch by the end of March, at which point RGB++ assets can be issued on the Bitcoin mainnet, potentially reigniting the asset issuance wave seen with protocols like Ordinals/Atomicals/Runes. Therefore, it would be wise to pay attention to related asset issuance tools, as there may be opportunities similar to inscriptions.

To promote the BTCKB plan, CKB has also established a CELL Studio company. For easier understanding, one can liken CELL Studio to ConsenSys in the Ethereum ecosystem, focusing on bridging the BTC and CKB ecosystems.

In terms of market operations, CKB will host two Bitcoin conferences:

  • In March, the Bitcoin Singapore will be held in Singapore, with around 100 participants, mainly targeting those who are very interested in the Bitcoin ecosystem, have some understanding of Bitcoin technology, but are not very familiar with the latest developments.
  • In early April, the Wanxiang Blockchain Summit will co-host a Bitcoin special session with Bitcoin Magazine, which will be larger and more mainstream.

From a long-term perspective, CKB co-founder Cipher has expressed hope to connect RGB++ with the Lightning Network by the end of the year. The Lightning Network will be the main battlefield for CKB's long-term efforts, at which point related RGB++ assets can circulate within the Bitcoin ecosystem through the Lightning Network without the need for cross-chain bridges.

Conclusion#

Previously, CKB may have been seen by most as an "outlier." In the context where Ethereum has chosen to shift to PoS, CKB has opted for the Bitcoin public chain technology route: PoW+UTXO, thus remaining lukewarm amidst the narrative of new public chains and Rollup L2.

Now, the market has ignited the narrative of the Bitcoin L2 ecosystem, and CKB has timely seized this wave of momentum, quickly becoming a leading technical player in the current Bitcoin L2 track with its completely isomorphic characteristics to Bitcoin and the launch of its innovative RGB++ protocol. It is no longer just focused on technology but is also engaging in market operations and brand promotion, establishing the ecosystem-leading company CELL Studio.

Although CKB may not be the fastest to start in the current market for BTC L2, its technical advantages still position it to become an important part of the Bitcoin ecosystem. After all, the Bitcoin L2 narrative does not seem to be a fleeting bubble but rather the beginning of the expansion of the Bitcoin network ecosystem.

References#

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.