Bitget App
Trade smarter
Buy cryptoMarketsTradeFuturesCopyBotsEarn

A Brief Overview on RGB — Can RGB Replicate The Ordinals Hype

TokenInsightTokenInsight2023/11/02 09:18
By:Kernel Ventures

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

Author: Jerry

Editor(s): Rose, Mandy, Joshua

TLDR:

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

  • 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 executed on the Bitcoin mainnet and are tied to the transfer of 1 sat bringing high handling fees and 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 improvements to Ordinals, 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, and analyzes the possible future direction of RGB narrative.

Market Overview

BTC accounts for 49.25% of the market value of the entire crypto market. However, due to the scripting language's lack of Turing completeness, missing of smart contracts on the main network, and the transaction speed of 7 transactions per second, BTC's long-term development has been severely hindered. In order to improve these problems, Bitcoin developers have made a lot of attempts to expand storage and speed up the transaction speed.

  • 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.
  • RGB Protocol: RGB is a second-layer protocol built on the Bitcoin network whose core transaction data 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.

But for a long time, these attempts ended in failure, until the emergence of the ordinals protocol this year, completely opening the door to smart contracts in the Bitcoin world. The nft, memecoin based on the BTC network rushed out like a flood from the dam built by scripting language, announcing the return of the BTC ecosystem.

<figure class="image"> <figcaption> BRC20's transaction number, Picture Source: Dune </figcaption> </figure>

Since March of this year, the Bitcoin network has experienced a surge in transaction fees and the number of transactions for BRC20 protocol assets. BTC mainnet transaction fees reached the peak around May, while the number of transactions on BRC20 assets has not declined significantly, remaining at a high level. This means that the development of the smart contract ecology of the Bitcoin network has not slowed down with the bursting of memecoin bubbles on BTC. Developers are trying to find the optimal solution for the development of smart contracts on the Bitcoin network.

Ordinals Protocol

satoshi number

  • 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^{10$$-1] sats, and what E obtained is the sats with serial number [$$2.5*10^{10$$,$$3*10^{10$$-1] .
<figure class="image"> <figcaption> Satoshi distinguish, Picture Source: Kernel Ventures </figcaption> </figure>

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.

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, many problems with it are still criticized by people, especially BTC Builder.

  • The centralization of ordinals: The security of the Ordinals protocol cannot be 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.

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.

Core Technology In RGB

  • Client-side verification

Different from the broadcast of transaction data in the Bitcoin main network, RGB protocol complete the process off-chain, with information only transmitted between the sender and receiver. After verifying the transaction, there is no need for recipient to record all transaction data in the network like the Bitcoin main network. Also, the synchronization of entire network nodes is unnecessary. The receiving node only needs to record the data related to transaction to meet the requirements for on-chain verification. This improvement greatly improves the scalability and privacy of the network.

<figure class="image"> <figcaption> Client-side Verification, Picture Source: Kernel Ventures </figcaption> </figure>
  • single-use seals

In the process of handing in materials in real life, materials often change hands many times, which poses a great threat to the authenticity and integrity of materials. One solution to this problem is to use the method of adding seals to determine whether the materials inside have been tampered with. The role of single-use seals in RGB network is similar. The only difference is that the seal is a naturally single-use electronic seal on the Bitcoin network - UTXO. Similar to smart contracts on Ethereum, when issuing tokens under the RGB protocol, we must specify the name and total amount of the currency first. The difference is that the RGB network does not have a specific public chain to store data. So, we should designate a specific UTXO on Bitcoin network to correspond to the RGB token. Someone who owns a certain UTXO in the Bitcoin network has the sovereginty over the RGB token corresponding to the UTXO, which is recorded in the RGB protocol. If wanting to complete the transfer of RGB token, you need to spend the UTXO. Due to the one-time nature of UTXO, it is destroyed once spent,with the corresponding RGB asset being spent. This process of spending UTXO is the process of opening the one-time seal.

<figure class="image"> <figcaption> Single-Use-Seals, Picture Source: Kernel Ventures </figcaption> </figure>
  • 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.

<figure class="image"> <figcaption> Blinded UTXOs Picture, Source: Kernel Ventures </figcaption> </figure>

RGB vs ordinals

  • Security: Each transaction or state change in ordinals should be achieved through a UTXO expenditure and confirmed through a Bitcoin block,while this process is completed by Lightning Network or off-chain channel in RGB,with the transaction data stored on RGB client (client local cache or cloud server). The whole course is highly centralized, with the data vulnerable to be exploited by centralized organizations. Also, once the server goes down or the local cache is lost, customer assets will suffer from a loss. As to safety, ordinals win.
  • Verification speed: Since RGB uses client-side verification, every verification of a transaction needs to start from the beginning of asset issuance. This will take a lot of time to determine the correctness of each step during the RGB asset transfer, which greatly slows down the verification speed. 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: A large number of transfers in RGB are carried out through the client's RGB channel or the Lightning Network. This process has nearly zero transaction fees. No matter how many transactions are there in the middle, it only needs to be submitted to the blockchain for confirmation by spending one UTXO. However, every step of the ordinals transfer needs to be recorded in the tapscript. In addition to the cost of recording inscription, a considerable amount of transaction fee will be incurred. At the same time, the RGB protocol proposes a method of batch packaging transactions. Multiple recipients of RGB assets can be specified in a tapscript script. In ordinals, the recipient of UTXO output is seen as the recipient of ordinals assets by default, with only peer-to-peer transfers can be made. RGB greatly reduces the cost of this process by amortizing it.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.

Projects on RGB

Only after the release of RGB v0.10.0, did it provide a friendly environment for developers to develop on the RGB network. Such being the case, large scale development of RGB just happened in this half year. Therefore, most of the RGB ecological projects introduced below are still in the developing stage.

  • Infinitas

Infinitas is a Turing-complete Bitcoin application ecosystem that combines the advantages of Lightning Network and RGB protocol, supporting and complementing the two to achieve a more efficient Bitcoin ecosystem. It is worth mentioning that Infinitas has also proposed a recursive zero-knowledge proof method to solve the inefficiency problem of client verification. If the improvement can be completed, it will completely solve the problem of RGB network's verification speed.

  • 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.

The prospect 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.

References

  • RGB protocol:https://rgb.tech/
  • RGB-lightning-sample:https://github.com/RGB-Tools/rgb-lightning-sample
  • RGB info:https://rgb.info/
  • Infinitas' official website:https://www.iftas.tech/#/home?id=about
  • Cosminimart official website:https://cosminmart.com/#/
  • DIBA official website:https://diba.io/
  • RGB Explorer official website:https://rgbex.io/
  • RGB生态万字研报:引领Crypto大规模采用,点亮比特币的未来*:*https://www.odaily.news/post/5189052
  • 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
  • 解读比特币Oridinals协议与BRC20标准 原理创新与局限: https://zhuanlan.zhihu.com/p/631275714
  • BRC20 transaction data's origin: https://dune.com/cryptokoryo/brc20
174

Disclaimer: The content of this article solely reflects the author's opinion and does not represent the platform in any capacity. This article is not intended to serve as a reference for making investment decisions.

‌Spot copy trading

More
AIOnline
AIOnline
insight1000/1000
10363.85%
ROI
Total profit $52855.64
HappyPlanets
HappyPlanets
insight500/500
15814.34%
ROI
Total profit $31628.65

Bot copy trading

More
BGUSER-FFF8CNJ4
BGUSER-FFF8CNJ4
insight8/150
$1609.89
Total profit
Total subscriber profits $97.94
TopTrader85
TopTrader85
insight150/150
$13284.03
Total profit
Total subscriber profits $137.16