banner
CKB 中文

CKB 中文

CKB 是理想的比特币 Layer 2

UTXO: Connecting the development context of Bitcoin Layer 2 focused on script and intent.

The following content is reproduced from OneKey Chinese, with some modifications. Original link: https://x.com/i/web/status/1759039068913197391

A few months ago, Nervos Network announced the promotion of CKB as the first "PoW+UTXO" Bitcoin L2.

Before this, when discussing BTC L2 in the community, it was actually deeply influenced by the L2 Rollup concept of Ethereum. Previously, various quickly built EVM versions of L2, although technically mature and with low ecological development thresholds, have always been criticized for their native security. At the same time, using this type of L2 requires users to switch back and forth between BTC wallets and EVM wallets, which is not a very elegant user experience. In short, before these problems are solved, it may not be easy for the "picky" OG and whales in the BTC community to be "FOMO". Under these various problems, whether the UTXO isomorphic L2 solution can become a new way out has become a hot topic recently.

This article is aimed at beginners and provides an introduction to the development of the "non-cross-chain bridge" BTC L2 based on the starting point of UTXO and CKB.

What are UTXO and eUTXO?#

UTXO (Unspent Transaction Output) means "unspent transaction output" in literal translation. For example, if you receive a transfer of 10 BTC and have not spent it on others, this 10 BTC is an unspent transaction output.

Let's understand through comparison and examples.

Currently, there are two mainstream transaction record models in blockchain, namely UTXO model and account model. The account model used by Ethereum is very easy to understand. This model is similar to bank accounts and Alipay/WeChat accounts. In this model, 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. For example, if there is a balance of 1000 yuan in your account and you purchase a OneKey Classic for 600 yuan, the system will deduct 400 yuan from your account and add 400 yuan to the OneKey account.

Compared with the account model used by Ethereum, the UTXO model of Bitcoin is more like a real "wallet" and "banknote", more like real cash transactions. For example, imagine you have a wallet with many banknotes of different denominations. Each banknote can be regarded as a UTXO, that is, money you can use. In a system like Bitcoin, when you receive Bitcoin transferred by others, this money is like a new banknote in your wallet that you haven't used to pay for other things, so it is "unspent".

Every time you make a transaction, such as using a banknote of 1000 yuan to buy a OneKey Classic for 600 yuan, you will get 400 yuan in change. In the Bitcoin system, this operation is equivalent to creating two new UTXOs (600 yuan and 400 yuan) using one UTXO (1000 yuan) that you spent. You "spent" the original UTXO (1000 yuan) and "generated" new UTXOs (600 yuan and 400 yuan) at the same time.

With the above content, the concept of eUTXO (Extended Unspent Transaction Output) becomes easy to understand. In systems like Cardano that use the eUTXO model, it not only records the amount of money but also can contain more complex data and logic (for example, this money can only be used to purchase specific goods or services). In this way, each transaction can not only transfer funds but also execute some conditions or even the content of smart contracts. This makes transactions more flexible but also more complex.

The relationship between BRC-20 and UTXO#

If you are familiar with the BRC-20 protocol, you will soon realize that "damn, what they are doing is running the account model on top of the UTXO model." After all, the name of the protocol is derived from the ERC-20 token standard of Ethereum, which uses the account model.

In BRC-20, token operations, including deployment, minting, and transfer, are implemented by embedding JSON-formatted data in UTXO transactions on the Bitcoin blockchain. This is equivalent to writing on the "banknotes" mentioned earlier. This allows free issuance of tokens on the Bitcoin chain. However, Bitcoin cannot manage the account model, and the content of BRC-20 is stored in the Taproot script of Segwit, which Bitcoin cannot recognize and calculate. It's like a banking system only recognizes the denomination of banknotes and doesn't care what you write on them.

Fortunately, unlike centralized banks, all Bitcoin transactions are public, and we can see what is written on all "banknotes". As long as we follow certain rules (ordinal theory) to do the bookkeeping and perform calculations off-chain, we can do it. So currently, the BRC-20 protocol adopts the method of building an indexing server off-chain to achieve various ledger calculations of BRC-20 tokens. However, this method obviously carries the risk of centralization—this service that maintains the ledger does not have a fair game mechanism of PoW or PoS to ensure that it does not do evil. This also explains why BRC-20 is seen as redundant and backward in the eyes of some Bitcoin core developers and geeks.

Therefore, various new token protocols have been developed to solve the shortcomings of BRC-20. For example, ARC-20 and Runes have adopted a similar method to calculate the balance of Bitcoin in UTXOs, directly making the quantity of tokens equal to the quantity of Bitcoin in UTXOs (unit: satoshi)—1 token = 1 satoshi, instead of counting separately. This is equivalent to marking "special marks" on banknotes of the smallest denomination to represent another currency. It is actually a "colored coin" that appeared in the ancient history of the cryptocurrency world.

The advantage of doing this is that it does not require any off-chain systems for tracking transactions and calculating balances. It only requires an indexing server to identify this "special mark", reducing the cost of the indexing server.

But this also introduces a new problem. In order to reduce spam transactions, the Bitcoin network has a minimum transaction output limit (546 satoshis), which prevents token protocols like ARC-20 from splitting transactions into finer granularity, resulting in liquidity similar to NFT and not true fungible tokens. However, to introduce the calculation of split transactions, it is necessary to perform centralized off-chain indexing transactions. ARC-20 has been stuck on this issue for a long time, and there has been no solution for splitting transactions for several months. Currently, it seems that the project team hopes to implement staking and splitting calculations inspired by BitVM's AVM, which is not an easy development task.

How does CKB implement non-cross-chain bridge L2?#

From a technical point of view, many meme-based token issuance schemes themselves have limited the advancement of Bitcoin technology. Tokenization has created many new assets, but applications have been limited to asset issuance.

However, the wealth effect and FOMO of these assets have made people see the imagination of the BTC ecosystem. In the practical needs of players on the chain, the various restrictions of the Bitcoin network and UTXO have stimulated people's demand for Bitcoin scalability and more complex ecological applications.

From the perspective of scalability, the Lightning Network is already a great L2 solution. The Lightning Network achieves trustless and running for many years through games (punishment-based revocable commitment transactions). However, the state channel architecture of the Lightning Network is basically limited to payments and cannot achieve more complex intentions.

As mentioned earlier, a relatively secure and elegant L2 may be achieved by using the UTXO model that is isomorphic to BTC and extending it with the eUTXO concept. Public chains such as Ergo and Cardano have made progress on the eUTXO model and have implemented smart contract functionality. However, CKB was the first to think of implementing an L2 solution.

CKB's answer is to propose the RGB extension protocol: RGB++. In fact, it is more like a "major modification" than an extension. CKB's extension inherits the core of the RGB protocol but directly adopts different virtual machines and verification schemes. RGB protocol, as an open-source smart contract system protocol, is designed to run scalable, robust, and private smart contracts on UTXO blockchains such as Bitcoin and Liquid. Currently, v0.11 has not been released yet, and its virtual machine AluVM still has some distance to go before it is fully implemented (some say it may not be possible to complete it even after this bull market ends).

The technical focus is "isomorphic binding", which maps Bitcoin UTXOs to Nervos CKB Cells—a modified version of UTXOs that can combine to implement smart contract capabilities. For the verification scheme, all RGB++ transactions will appear on both the BTC and CKB chains. The original off-chain client verification has been changed to on-chain public verification of CKB, which is much more user-friendly and does not require the use of independent clients or the manual storage of original transaction data.

Roughly speaking, the RGB++ assets issued on the Bitcoin layer can be used to implement various complex intentions on the CKB layer using smart contracts, without the need for any cross-chain bridges.

In a sense, this is a relatively cutting-edge idea—to achieve cross-chain scalability based on intentions, rather than traditional asset cross-chain.

L2 solutions are always trying various ways to lock BTC on L2, but to achieve scalability and complex applications, it may only be necessary to do intention-oriented applications on L2.

Currently, RGB++ has been launched, and the ecosystem is developing rapidly. It is believed that this solution will provide a new path for the exploration of BTC L2's orthodoxy, and the future is promising.

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