Kernel Ventures: Can RGB Replicate The Ordinals Hype

Author: Kernel Ventures Jerry Luo

Editor(s): Kernel Ventures Rose, Kernel Ventures Mandy, Kernel Ventures Joshua

TLDR:

Many smart contract plans are found on the Bitcoin network nowadays, with the Ordinals protocol and the RGB protocol being the mainstream.

  • The birth of the Ordinals protocol enables the development of smart contracts on the Bitcoin network and binds its security to the Bitcoin blockchain. However, the confirmation and recording of Ordinals asset transfers are performed on the Bitcoin mainnet and are tied to the transfer of 1 sat. This brings high handling fees and also makes the Bitcoin mainnet with low TPS more congested.
  • In RGB protocol, off-chain channels and batch packaging transactions are proposed. These methods significantly reduce the handling fees of asset transfers in RGB and increase the speed. What’s more, the client verification method also greatly reduces the amount of data recorded to maintain normal network operation, thereby improving network scalability.
  • While RGB made great improvements in both transaction speed and scalability, it also brought many new problems. Off-chain channels optimize transaction fees and speed but bring security issues on account of off-chain records. Client-side verification reduces the amount of recorded data while greatly slows down the verification speed.

This article compares Ordinals and RGB protocols from the dimensions of security, scalability, transaction fees, transaction speed, etc. Analyzing the possible future direction of RGB narrative.

1. Market Overview

Currently, BTC accounts for about 49% of the market value of the entire crypto market. However, due to the fact that its scripting language does not have Turing completeness, the main network smart contract is missing and the transaction speed is slow, its long-term development is seriously hindered. In order to improve the above problems, Bitcoin developers have made a lot of attempts to expand and speed up, mainly the following 4 solutions:

  • RGB Protocol: RGB is a second-layer protocol built on the Bitcoin network whose core transaction datas are stored on the BTC mainnet. RGB leverages Bitcoin’s security model to enable the creation of tokens with custom properties and smart contract functionality on the Bitcoin network. The protocol was originally proposed by Peter Todd in 2016, gaining attention again in 2023 during the boom of the smart contract ecosystem on Bitcoin.
  • SegWit: In August 2017, Bitcoin implemented the Segregated Witness (SegWit) upgrade, which raised the upper limit of transaction data blocks from 1M to 4M, alleviating the congestion problem. However, as the transaction volume of the network continues to increase, the improved network cannot keep up with the increase in transaction volume. Also, it cannot support the construction of a more complex ecosystem.
  • Lightning Network: The Lightning Network is a second-layer expansion solution based on Bitcoin which allows transactions without accessing the blockchain, greatly improving throughput. Lightning Network has been implemented on the Bitcoin mainnet by now, and existing Lightning networks include OmniBOLT, Stacks, etc. But the Lightning Network faces centralization risks.
  • Side chain: Side chain is to build a side chain outside the Bitcoin network.The assets on the side chain are ratioed 1: 1 with bitcoin. Side chain also provides relatively high privacy and security. Although its transaction and speed have been massively optimized comparing to the Bitcoin network, the new side chain is far from the security of the BTC mainnet.

Source: Dune

Since March of this year, the transaction fees of the Bitcoin network and the transaction volume of BRC20 protocol assets have experienced a surge. BTC mainnet transaction fees reached their peak in early May. Although transaction fees have declined since then, the transaction volume of BRC20 assets has remained at a high level. This means that the development enthusiasm of the Bitcoin network smart contract ecosystem has not slumped with the decline in the popularity of inscriptions in the BTC ecosystem. Developers continue to try to find the optimal solution for the development of Bitcoin network smart contracts.

2. Ordinals Protocol

2.1 Satoshi Number

Satoshi on the Bitcoin network is different from wei on Ethereum, which is recorded in the form of data. It is calculated by the UTXO owned by each address. In order to distinguish different sats, we must first distinguish different UTXOs, and then distinguish sats under the same UTXO. The former is relatively simple. Different UTXOs are mined in different blocks, which will correspond to different block heights. Only mining produces the initial sats, so only the UTXO in the coinbase transaction is numbered. The main difficulty lies in how to number sats under the same UTXO. The Ordinals protocol proposes a new solution, which is numbering based on the first-in-first-out principle.

  • Distinguishing for different UTXOs: Satoshi on the Bitcoin network is not recorded the form like wei on Ethereum, but calculated by the UTXO owned by each address. To distinguish different sats, we must distinguish different UTXOs first, then distinguish sats in the same UTXO. The former is relatively simple. For different UTXOs are mined in different blocks which correspond to different block heights. Only mining will produce initial sats, so only the UTXOs mined by miners need to be numbered. The difficulty mainly lies in how to number sats in the same UTXO. The solution proposed by the ordinals protocol is to number according to the first-in, first-out principle.
  • The distinction between sats under the same UTXO: First, through the block height, we can determine the approximate range of sats under the UTXO. To begin with, 100 BTC could be mined in one block, which has 10^{10} sats, then the sats in the block with a blockchain height of 0 are numbered [0, 10^{10}-1]. Then, sats in the block with a block height of 1 are numbered [10^ 10,2*10^10 -1], the sats number in the block with block height 2 is [2*10^10,3*10^10-1] …….. If you want to make a specific distinction between sats in the UTXO, it must be completed through the consumption of UTXO with the first-in, first-out principle. When UTXO A is spent, it will correspond to an equal amount of UTXO output B,C,D(serialed by output order), then the sats in the UTXO B will get the forward number in UTXO A. For example, miner E mines a block with a height of 2 wants to transfer 50 of his 100 BTC to F. The first output is assigned to F, and E gets the second output. Then, F will get the number [2*10^10,2.5*10^1{0-1] sats, and what E obtained is the sats with serial number [2.5*10^10,3*10^10-1].

Source: Kernel Ventures

2.2 Ordinals Inscription

To begin with,Bitcoin network provided an 80-byte storage space for each transaction by adding the OP_RETURN operation code. However, the 80-byte area cannot satisfy the writing of complex code logic. Additionally, writing data to the blockchain also increased transaction costs and the possibility of network congestion. In order to solve the problem, Bitcoin network has carried out two soft forks, SegWit and Taproot. The Bitcoin transaction process provides a 4M space through a Tapscript script that starts with the OP_FALSE opcode which will not be executed. In this area we can write ordinals inscriptions to satisfy implement text, picture uploading or BRC20 protocol token issuance, etc.

2.3 Shortcomings of Ordinals

Ordinals has greatly improved the programmability of Bitcoin network, broken the restrictions on the narrative and development of BTC ecosystem, and provided functions beyond transactions in Bitcoin network. However, there are still many problems criticized by people, especially BTC Builder.

  • The centralization of ordinals: The security of the Ordinals protocol is not equal to Bitcoin network. Although the recording and changes of the status are all done on blockchain, it cannot prevent the repeated uploading of inscriptions on chain. So, the final authenticity should be judged by centralized ordinals protocol,while hidden problems may not be eliminated in the cainozoic protocol. At the same time, any underlying problem with the service of Ordinals protocol may also lead to the loss of user assets.
  • Limitations of transaction fees and transaction speed: For the engraving of inscriptions is ultimately done in the Segregated Witness Zone,meaning an asset transfer in Ordinals must have a UTXO expenditure, which will last for 10 minutes or so. Due to the low TPS, it is difficult to speed up the transaction process. What’s more, the inscriptions will contribute to a surge in transaction costs.
  • Damage to the original attributes of Bitcoin: Since the assets on Ordinals are bound to the sats which have value in the Bitcoin network itself. The use of Ordinals itself will cause alienation of original assets of Bitcoin. At the same time, the inscriptions has brought a surge in mining fees, which caused many BTC supporters to worry whether this will damage the original payment function of Bitcoin.

3. RGB Protocol

With the surge in transaction volume, flaws of the ordinals protocol are exposed. In the long run, with these problems unsolved, Bitcoin’s smart contract ecosystem can not compete with Turing-complete public chains. Among countless competitors to ordinals, RGB is one of the most powerful, which has made huge breakthroughs in scalability, transaction speed and privacy. Ideally, Bitcoin assets based on RGB can reach similar levels to assets on Turing-complete public chains in terms of transaction speed and scalability.

3.1 Core Technology in RGB

Client-Side Verification

Unlike the broadcasting of transaction data on the main Bitcoin network, the RGB protocol keeps this process off-chain, with the information being transmitted only between the sender and the receiver. Once the receiver has verified the transaction, it does not need to synchronize the nodes across the network to record all the transaction data, as is the case on the main Bitcoin network. Instead, the receiver node only needs to record the data related to the transaction to fulfill the requirements of on-chain verification, which greatly improves the scalability and privacy of the network.

Source: Kernel Ventures

Single-Use Seals

In the process of submitting materials in real life, materials often have to go through many hands, which poses a great threat to the authenticity and integrity of the materials. In order to prevent malicious tampering of materials before they are submitted for verification, people in real life use seals to determine whether the contents have been tampered with based on the integrity of the seals, and disposable seals in the RGB network work in a similar way, as evidenced by the naturally Single-Use Seals in the Bitcoin network, the UTXO.

Similar to smart contracts on ethereum, the issuance of tokens under the RGB protocol also specifies the name and total amount of coins to be issued. The difference is that the RGB network does not have a specific public chain as a carrier; each token in RGB must be assigned to a specific UTXO on the Bitcoin network. A person who owns a UTXO on the Bitcoin network also owns the RGB token corresponding to that UTXO as documented in the RGB protocol. To complete the transfer of an RGB token, the holder needs to spend the UTXO. Since UTXOs are disposable, once they are spent, they are no longer available, and in the RGB protocol, this corresponds to the spending of the RGB asset. The process of spending the UTXO is the process of opening the one-time seal.

Source: Kernel Ventures

Blinded UTXOs

In the Bitcoin network, each transfers can find the corresponding input UTXOs and output UTXOs. This improves the traceability of UTXOs on the Bitcoin network and can effectively prevent double-spending attacks. However, since the transparent transaction process, privacy can not be guaranteed. In order to improve transaction privacy, blinded UTXOs is proposed.

During the transfer process, the sender A of the RGB token will not be able to obtain the specific address of the receiving UTXO, but the hash result of a receiving UTXO address followed by a random password value. When receiver B wants to use the received RGB protocol token, it not only needs to inform receiver C of its UTXO address, but also the corresponding password value to verify that it indeed has the UTXO.

Source: Kernel Ventures

3.2 RGB vs Ordinals

  • Security: Each transaction or state transfer of Ordinals smart contract needs to be completed through a UTXO spend, while this process is implemented through the Lightning Network or the off-chain RGB channel in RGB. A large amount of data in the RGB transaction process is stored in the RGB client (client’s local cache or cloud servers), and this process has a high degree of centralization, and there is a possibility that the data can be exploited by the centralized institutions. This process is highly centralized and the data can be exploited by centralized organizations. Also, if the server goes down or the local cache is lost, the customer’s assets will be lost. As to security, ordinals win.
  • Verification speed: Since RGB utilizes client-side validation, each transaction validated in the RGB protocol needs to be started from scratch, which takes a significant amount of time to determine the transfer of RGB assets at each step of the transaction process, which slows down validation significantly. As to verification speed, ordinals win.
  • Privacy: The transfer and verification process of RGB assets are performed outside the blockchain, establishing a specific channel between the sender and the receiver. At the same time, the form of blinded UTXO can even confirm that the sender can not trace the address of receiving UTXO. The transfer process of ordinary assets achieved through the UTXO spending record on Bitcoin. Both the input and outputs of UTXO are visible in blockchain, which has no privacy at all. As for privacy, RGB wins.
  • Transaction fees: Transfers in RGB are leveraged on the client’s RGB channel or the Lightning Network, which has almost zero transaction costs. Regardless of how many transactions there are in between, they are ultimately just submitted to the blockchain for determination by using the correspondent UTXO . However, each transfer of ordinals needs to be recorded in a tapscript script, which, together with the cost of recording the inscription, will incur a significant fee during the transaction. Meanwhile, the RGB protocol proposes a method of batch packing transactions, in which multiple recipients of RGB assets can be specified in a tapscript script, whereas the recipients of the default output UTXOs in ordinals are the recipients of the ordinals assets, and only one-to-one transfers can be made, whereas the RGB greatly reduces the cost of this process through the apportionment of the cost. As to transaction fees, RGB wins.
  • Scalability: In RGB smart contracts, transaction verification and data storage are completed by the client (receiving node), without broadcasting and global verification in the main network. Each node only needs to ensure the data related to the receiving transaction, while the inscription data in ordinals needs to be recorded on blockchain. Due to the processing speed and scalability of the Bitcoin network itself, its ability to withstand huge amounts of transactions won’t be so powerful.With regards to scalability, RGB wins.

4. Projects on RGB

Only after the release of RGB v0.10.0, did it provide a more user-friendly environment for developers to work. As a result, the large-scale development of the RGB protocol ecosystem is only half a year old, and most of the following RGB ecosystem projects are still in the early stages of development:

  • Infinitas

Infinitas is a Turing-complete Bitcoin application ecosystem that combines the strengths of the Lightning Network and the RGB protocol and supports and complements each other to achieve a more efficient Bitcoin ecosystem. Notably, Infinitas also proposes a recursive zero-knowledge proof approach to address client-side validation inefficiencies, which, if implemented effectively, would go a long way toward solving the RGB network’s validation speed problems.

  • RGB Explorer

RGB Explorer is the earliest browser that can query and support the sending of RGB assets (Fungible token and None Fungible token). The assets in the browser include the status of RGB20, RGB21, and RGB25.

  • Cosminmart

Cosminimart is a Bitcoin lightning network that is compatible with the RGB protocol, trying to create a new Bitcoin ecosystem that can deploy smart contracts. Unlike the former lighting network, Cosminmart offers wallets, derivatives trading markets, and early project discovering markets which provide one-step services for the development, promotion, and trading of smart contracts in Bitcoin networks.

  • DIBA

DIBA is committed to creating a leading NFT market for Bitcoin networks through the use of lightning networks and RGB protocols.It is expected to be launched on the main network soon.

5. The Future Prospects of RGB

With the advent of RGB v0.10.0 version, overall framework of the protocol program has become stable, and the incompatibility issues with diffferent version will be gradually improved. At the same time, developer tools and various API interfaces are rolled out, making it easier for developers to develop with RGB.

Today #Tether announces the ending of the support of 3 blockchains $USDt: OmniLayer, BCH-SLP and Kusama. Customers will be able to continue to redeem and swap $USDt tokens (to another of the many supported blockchains), but Tether won’t issue any new additional $USDt on those 3 blockchains.

Recently, tether officially issued an announcement to transfer the deployment of USDT contracts on the Bitcoin second-layer network from OmniLayer to RGB. This action by tether is seen as a signal that the crypto giant is trying to enter RGB. RGB has mature development protocol, large developer community, and recognition from crypto giants today. Finally, RGB developers are now trying to use recursive zero-knowledge proofs to compress the size of client verification. If this improvement can be completed, the verification speed of the RGB network will be greatly improved, thereby alleviating the network delays in large-scale use.


Kernel Ventures is a research & dev community driven crypto VC fund with more than 70 early stage investments, focusing on infrastructure, middleware, dApps, especially ZK, Rollup, DEX, Modular Blockchain, and verticals that will onboard the next billion of users in crypto such as Account Abstraction, Data Availability, Scalability and etc. For the past seven years, we have committed ourselves to supporting the growth of core dev communities and University Blockchain Associations across the world.


References

  1. RGB protocol: https://rgb.tech/
  2. RGB-lightning-sample: https://github.com/RGB-Tools/rgb-lightning-sample
  3. RGB info: https://rgb.info/
  4. Infinitas’ official website: https://www.iftas.tech/#/home?id=about
  5. Cosminimart official website: https://cosminmart.com/#/
  6. DIBA official website: https://diba.io/
  7. RGBExplorer official website: https://rgbex.io/
  8. RGB生态万字研报:引领Crypto大规模采用,点亮比特币的未来: https://www.odaily.news/post/5189052
  9. ViaBTC Capital Insight丨A Brief Analysis of RGB: A Scalable, Confidential Smart Contract Protocol Built on Bitcoin: https://medium.com/@ViaBTC_Capital/viabtc-capital-insight丨a-brief-analysis-of-rgb-a-scalable-confidential-smart-contract-protocol-b449f7dbb323
  10. 解读比特币Oridinals协议与BRC20标准 原理创新与局限: https://zhuanlan.zhihu.com/p/631275714
  11. BRC20 transaction data’s orgin: https://dune.com/cryptokoryo/brc20