Get to Know Bitcoin Layer 2 Proposing RGB++ Protocol: CKB

CN
链捕手
Follow
1 year ago

Compile | GaryMa Wu on Blockchain

Since the emergence of Ordinals and Inscription 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 are essentially just "clever use" of the "op_if" opcode in the Bitcoin script, bringing about these new asset issuance methods. Bitcoin is essentially a decentralized ledger system, and its script system does not have Turing completeness. These assets have nowhere to be applied other than in trading. Therefore, in order to further develop and prosper the Bitcoin ecosystem, it is urgent to explore L2 solutions suitable for smart contract development on the Bitcoin network.

Currently, the categories of Bitcoin L2 solutions roughly include state channels (such as the Lightning Network), sidechains (such as Liquid, Merlin), Rollup (such as Rollkit), client verification (such as RGB, RGB++, Taro), and more. The most well-known is the Lightning Network, which can be said to be an excellent choice in terms of scalability, security, and privacy, but progress is relatively slow at the moment.

Therefore, given the current market heat and trends, perhaps we can temporarily classify the current Bitcoin L2 camp into two categories here:

  • EVM Camp: Such as the hot staking airdrop Merlin and B²
  • UTXO Camp: Derived from the UTXO model, such as the proposed RGB++ CKB

For the EVM camp, it is more about using sidechain technology, that is, building a sidechain outside the Bitcoin network and crossing BTC and EVM chain assets to L2 through cross-chain bridges, which can greatly improve performance, but cannot achieve the security of the BTC mainnet. At the same time, with the operation of staking airdrops and users' familiarity with EVM and related L2 technologies, it is relatively easy to capture user mindshare and market share.

For the UTXO camp, it belongs to a relatively native technical school. The protagonist CKB analyzed in this article is a popular player in this field, and it has recently proposed the RGB++ extension protocol. Although the UTXO camp may be relatively native and homogeneous in terms of technology, it is also because of this that the understanding threshold of this technology and concept makes it difficult for many people to understand the advantages of this design. This article combines the UTXO public chain CKB and its related Bitcoin L2 technical route to explain this type of Bitcoin L2 solution to everyone.

Technical Background Introduction: UTXO Model & RGB

UTXO Model and Account Model

The account model is easier to understand, just like a bank account, where the total amount of funds in the account is intuitively displayed as a whole balance, and the system only needs to track the balance changes of user accounts, which is the model adopted by most public chains at present, such as Ethereum, etc.

The UTXO model is closer to the scenario of cash transactions, such as having many banknotes of different denominations. Each banknote can be seen as a UTXO, i.e., money that you can use. Analogous to a system like Bitcoin, when you receive Bitcoin from someone else, this money is like a new banknote in your wallet, which you have not used to pay for anything yet, so it is "Unspent Transaction Output (UTXO)." When you make a transaction, such as using 100 yuan to purchase a 40 yuan item and getting 60 yuan in change, this analogy in the Bitcoin system is that you use your currently unspent UTXO (100 yuan) to create two new UTXOs, one to pay for the item (40 yuan) and one to give change to yourself (60 yuan). PS: Understanding the UTXO model is key to understanding RGB and the following content.

RGB

Simply put, we can say that Ordinals is to assign a number to the smallest unit of Bitcoin currency, Satoshi, and track it, while Inscription is to write data content (such as images, text, or even code) into the witness segregated area based on this, to achieve the issuance and circulation of assets. However, with the development of the Ordinals protocol, people gradually realized that storing all data on the Bitcoin mainnet has many drawbacks, not only resulting in high fees but also causing more congestion in the Bitcoin network, and fundamentally unable to bring programmable smart contract systems to the Bitcoin network.

Many years ago, developers proposed the idea of "only putting the most important part of the data on the chain," which is the concept of RGB: only use the Bitcoin blockchain when necessary, and the verification work for token transfer is removed from the full-chain consensus layer and placed off-chain, verified only by the client of the receiving party, but using the decentralized network of Bitcoin to prevent double spending and censorship.

Perhaps by comparing the differences between Ordinals and RGB, readers can understand more easily:

  • RGB binds related assets to UTXO, while Ordinals is more refined to bind with the smallest unit, Satoshi.
  • RGB only writes the transaction commitment of related assets (i.e., a hash value) into the Bitcoin main chain, and the specific verification process is done off-chain, while Ordinals relies on the Bitcoin mainnet for all data and verification logic.

With the groundwork laid out above, we can introduce the two core technologies of RGB:

One-time Sealing: Binding with UTXO as mentioned earlier

The asset tokens issued through the RGB protocol do not exist on a specific public chain as a carrier (similar to other protocols such as Ordinals/Atomicals), and each asset token related to RGB must be associated with a specific UTXO on the Bitcoin network. If someone owns a specific UTXO on the Bitcoin network, they also own the specific RGB asset token corresponding to that UTXO recorded in the RGB protocol. To transfer the related RGB assets, the holder needs to spend the UTXO. Since UTXO is one-time, once spent, it is gone, and in the RGB protocol, it corresponds to spending this RGB asset. The process of spending the UTXO is the process of opening the one-time seal. The main 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 each contract must be attached to a certain Bitcoin UTXO, and once this state needs to be changed, the UTXO must be spent, and the transaction spending it must be confirmed by the blockchain. And through the relevant transaction information attached to the UTXO, we can trace back to the initial state of this contract, enabling us to recognize the essence of this state. Of course, the RGB transaction here is not verified between Bitcoin nodes like Bitcoin transactions. The RGB solution is client-side verification, allowing users to verify off-chain.

Client Verification

Unlike the broadcast of transaction data by the Bitcoin mainnet and the full-node verification record synchronization, the RGB protocol places this process off-chain, and the transaction information is only transmitted between the sender and the receiver. After the receiver verifies the transaction, only the data related to the transaction needs to be recorded to meet the on-chain verification requirements.

Challenges and Difficulties Faced by RGB

Although the RGB protocol is excellently designed, it still faces many challenges:

  • DA Problem: As mentioned earlier, the information needed for transactions is only transmitted between the sender and the receiver, and it is difficult for ordinary users to obtain and generate the required information (such as the historical branch of this UTXO). Moreover, the data stored by various clients is independent of each other, leading to data island problems, and it is also impossible to view the global state of the contract.
  • P2P Network Problem: RGB transactions, as an extension of Bitcoin transactions, rely on a P2P network for propagation. When users conduct transfer transactions, they also need to perform interactive operations, and the recipient needs to provide a receipt. All of these depend 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. As a new virtual machine, it currently lacks complete development tools and practical code.
  • No-Master Contract Problem: The RGB protocol currently lacks a complete interaction solution for no-master contracts (public contracts), making it difficult to achieve multi-party interaction.

CKB Enters the BTCL2 Arena with RGB++

CKB Transforms into BTCL2

CKB launched its mainnet in November 2019, adopting the PoW consensus mechanism and improving the UTXO model. CKB generalized the UTXO model and named it the Cell model. Similar to UTXO, a Cell is also a transaction output, but it generalizes the amount in UTXO into capacity and data, transforming the original space for storing integers into a space for storing 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 Layer2 completely isomorphic with BTC (based on PoW+UTXO) through CKB's "PoW+UTXO" characteristics.

RGB++: RGB Extension Protocol Based on CKB

On February 13th, the official CKB released the RGB++ light paper.

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

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

In the RGB protocol, the two most important components used for ownership identification are UTXO and commitment for state management and one-time sealing. The isomorphic binding of RGB++ maps each Bitcoin UTXO to a CKB Cell, synchronizing ownership using Bitcoin lock and maintaining the state using the data and type of the cell.

This not only solves the challenges faced by RGB but also gives RGB more possibilities:

  • CKB blockchain will serve as an enhanced verification client: All RGB++ transactions will appear on both BTC and CKB chains. The former is compatible with RGB protocol transactions, while the latter replaces the client verification process. Users only need to check the relevant transactions on CKB to verify the correctness of the status calculation for the RGB++ transaction. There are no longer issues such as the DA problem and data island problem.
  • Transaction Folding: Isomorphic binding of Bitcoin UTXOs and CKB Cells enables CKB Cell verification to support Turing-complete Bitcoin UTXO transactions. If we further utilize the programmable capability of CKB Cells, we can correspond multiple CKB transactions to a Bitcoin RGB++ transaction, allowing the low-speed, low-throughput Bitcoin chain to be scaled using the high-performance CKB chain.
  • Non-interactive Transfers: The original problem with the RGB protocol is that the recipient needs to be online to complete a regular transaction, increasing user understanding difficulty and product complexity. RGB++ can leverage the advantages of a Turing-complete environment to place interactive behavior within the CKB environment, using a send-receive two-step operation to achieve non-interactive transfer logic.

In summary, RGB++ inherits the core idea of the RGB protocol, adopts different virtual machines and verification schemes, and does not require an independent RGB++ client. Users only need to access Bitcoin and CKB light nodes to independently complete all verifications. RGB++ also brings Turing-complete contract extensions and tens of times performance extensions to Bitcoin. It does not use any cross-chain bridges but instead uses native client verification solutions, ensuring security and resistance to censorship.

CKB's Advantages in BTC L2 Competition and Future Plans

Comparison of Camps

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

  • The "EVM Camp," led by Merlin and B², is engaging in a heated competition of staking TVL, attempting to seize the window of opportunity in the Bitcoin ecosystem's early stages to gain a first-mover advantage and capture market share.
  • The "UTXO Camp," led by CKB, with its technical accumulation completely isomorphic with BTC (based on PoW+UTXO) and the relatively recognized RGB extension protocol, holds the high ground in terms of technology, providing Turing-complete contract extensions and performance extensions without the need for cross-chain bridges. However, it may not have the immediate impact of staking airdrops in the early stages of promotion and attracting ecosystem assets.

Roadmap

CKB's first product, RGB++, is expected to go live in early April, allowing the issuance of RGB++ assets on the Bitcoin mainnet, potentially sparking another wave of asset issuance similar to the Ordinals/Atomicals/Runes protocols. Therefore, it may be worth paying attention to related asset issuance tools, as there may be opportunities similar to Inscription.

To advance the BTCKB plan, CKB has also established a company called CELL Studio, which can be likened to ConsenSys in the Ethereum ecosystem, focusing on integrating the BTC and CKB ecosystems.

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

  • Bitcoin Singapore in March, with approximately 100 attendees, 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.
  • The Wanxiang Blockchain Summit in early April, co-hosted with Bitcoin Magazine, will be larger and more public-oriented.

In the long term, CKB co-founder Cipher has expressed hope to integrate RGB++ and the Lightning Network by the end of the year. The Lightning Network will be the long-term main battlefield for CKB, and at that time, related RGB++ assets can also circulate in the Bitcoin ecosystem through the Lightning Network without the need for cross-chain bridges.

Conclusion

Previously, CKB may have been seen as an "oddity" by most people. Against the backdrop of Ethereum's shift to PoS, CKB chose the Bitcoin public chain technology route: PoW+UTXO. Therefore, in the narrative background of new public chains and Rollup L2, CKB has remained lukewarm. Now, with the market igniting the narrative of the Bitcoin L2 ecosystem, CKB has timely seized this wave, rapidly becoming a leading player in the current Bitcoin L2 technical field with its technical advantages and the innovative RGB++ protocol. It is no longer just focusing on technology but also engaging in market operations and brand promotion, establishing the ecosystem-leading company CELL Studio. Although CKB may not be the fastest starter in the current BTC L2 market, with its technical advantages, it still has the potential to become an important part of the Bitcoin ecosystem. After all, the narrative of the Bitcoin L2 is not a short-term bubble but the beginning of the expansion of the Bitcoin network ecosystem.

免责声明:本文章仅代表作者个人观点,不代表本平台的立场和观点。本文章仅供信息分享,不构成对任何人的任何投资建议。用户与作者之间的任何争议,与本平台无关。如网页中刊载的文章或图片涉及侵权,请提供相关的权利证明和身份证明发送邮件到support@aicoin.com,本平台相关工作人员将会进行核查。

注册返10%、领$600,前100名赠送PRO会员
链接:https://accounts.suitechsui.blue/zh-CN/register?ref=FRV6ZPAF&return_to=aHR0cHM6Ly93d3cuc3VpdGVjaHN1aS5hY2FkZW15L3poLUNOL2pvaW4_cmVmPUZSVjZaUEFG
Ad
Share To
APP

X

Telegram

Facebook

Reddit

CopyLink