Renaissance of Bitcoin Scaling IV - RGB
LBank Labs
Discover the untapped potential of Web3 from the other angle with LBank Labs
Author: F.F from LBank Labs Research team
TL;DR
In our recent article, we introduced Lightning Network, which is considered the most native scaling solution for Bitcoin. By "native," we mean that it is specifically designed to work seamlessly with the features of Bitcoin. However, Lightning Network's main goal is to improve payment throughput and offer an additional solution for asset issuance through Taproot Assets. But it's important to note that Lightning Network is not intended to be a general-purpose scaling solution.
In this article, we will delve into an old protocol called RGB, which despite being initiated many years ago, has been continuously developed without gaining much attention. RGB draws inspiration from Colored Coin, which is where its name comes from.
RGB is both an asset and smart contract protocol for Bitcoin and Lightning Network. Although it is referred to as a smart contract protocol, it differs greatly from platforms like Ethereum. RGB began with the idea of client-side validation and has led to a paradigm shift in Bitcoin scaling solutions. It utilizes various components, such as Taproot Script for state operations, Witness for state storage, and UTXO for transactional functionality.
It's worth noting that RGB is not limited to Bitcoin alone. It can be seamlessly integrated with Lightning Network (referred to as "LN" hereafter), providing LN with smart contract capabilities and significantly enhancing the throughput of RGB in return. Additionally, due to its UTXO-based nature, RGB can also be integrated with other Bitcoin ecosystem protocols.
The reason we are highlighting RGB at this particular time is the upcoming launch of v0.11, the second stable version following v0.10. Many ecosystem protocols are eagerly awaiting this release to launch the first RGB token. While this may lead to some scams, it also paves the way for a thriving ecosystem.
Client-side Validation Brings Paradigm Shift
Years of?Precipitation Technology
In 2014, the RGB journey began with the introduction of the OpenTimeStamps protocol by Peter Todd, laying the foundation for what would become RGB.
In 2016, Peter Todd led the development of Client-side Validation (CSV), which proved to be a significant milestone in the evolution of RGB. CSV highlighted the idea that validating a state in a decentralized protocol doesn't always require global participation. This realization opened up new possibilities for decentralized systems, allowing for more efficient and scalable validation processes.
The following year, in 2017, the BHB Network, founded by Giacomo Zucco with support from Poseidon Group, launched the Minimum Viable Product (MVP) of RGB. This marked a crucial step forward in the development of the protocol, as it provided a functional and practical implementation that showcased the potential of RGB. The MVP demonstrated the capabilities of RGB in terms of asset and contract issuance, paving the way for further advancements and improvements.
Continuing on its path, RGB gained significant momentum in 2019 with the involvement of Maxim Orlovsk as the architect and core contributor. Alongside Giacomo Zucco, Maxim Orlovsk played a pivotal role in shaping the direction and development of RGB. The project received funding from various organizations, including iFinex Inc, Fulgur Ventures, Pandora Prime, Hojo Foundation, and DIBA Inc in the following years. This financial support allowed RGB to continue its growth and expand its capabilities.
Throughout its development, RGB underwent several notable updates and enhancements. In 2021, the introduction of AluVM further advanced the functionality and versatility of RGB. This addition expanded the capabilities of the protocol, providing a more robust and flexible framework for asset and contract issuance. Then, in April 2023, RGB reached a significant milestone with the release of RGB v0.10. This version represented a major leap forward in terms of features, stability, and usability.
Currently, RGB v0.11 is undergoing testing and audit, bringing RGB even closer to its goal of revolutionizing asset and contract issuance in the Bitcoin ecosystem. This version represents the latest iteration of RGB, incorporating important improvements and refinements based on feedback and real-world usage.
Overall, the history of RGB showcases a steady progression and continuous evolution, driven by the vision and dedication of its contributors. RGB remains at the forefront of innovation in the Bitcoin ecosystem. With each milestone, RGB moves closer to its mission of revolutionizing the way assets and contracts are issued, providing greater efficiency, scalability, and decentralization.
Technology Stack
In simple terms, RGB is a protocol that separates the state and operations of a contract from the consensus level. This allows the blockchain to prioritize maintaining the order of transactions.
The essential elements of RGB include on-chain commitment using Bitcoin as a commitment layer, off-chain data and contract code, and CSV.
Contracts State Based on UTXOs
Contract State Evolution
In the RGB protocol, contract states are linked to an unspent transaction output (UTXO) on the Bitcoin blockchain. Each contract state is associated with an issuer, which consists of the genesis state and a schema that defines the validation rules for client-side validation.
The ownership of a contract state can change through various actions, such as spending the UTXO, transferring ownership, or making it a global state. When a new state is created, a wallet creates a partially signed Bitcoin transaction (PSBT) that contains the underlying witness transaction. This PSBT is then sent to RGB nodes, which compile a state transfer consignment that includes the complete history of the spent outputs.
Wallets, equipped with software or libraries that understand the contract schema and semantics, create bundled new state transitions for the state transfers. The RGB nodes finalize the consignment and prepare a disclosure, which is then sent to the beneficiary. The beneficiary returns a signature on the transfer, and signers sign the witness transaction from the PSBT and publish it to the network.
The state chain in RGB forms a directed acyclic graph (DAG) of state transitions. It is maintained as client-validated data, allowing participants to trace the UTXO record and verify the history of state changes. Each contract state in RGB is independent of others, offering flexibility and modularity within the protocol.
This approach to managing contract states in RGB ensures the integrity and security of state transitions while utilizing the scalability and privacy advantages of client-side validation.
Inherited Security from Single-us Seals
In the RGB protocol, the idea of using single-use seals is employed to define rules for state transitions. This concept was introduced by Peter Todd, who took inspiration from the philosophy of physical single-use seals used to sell commodities only once, trusting notary services or issuances.
In RGB, the UTXOs serve as the single-use seals. When a new state is created, the previous state is revealed and closed, and a new UTXO is generated. This process ensures that the state transition rules require spending the UTXO and creating a new one.
The main purpose of single-use seals is to prevent double spending. By following the Bitcoin consensus rules, which ensure that the seal can only be opened once, RGB inherits the strong security of the Bitcoin network. This approach guarantees the integrity and reliability of state transitions within the RGB protocol.
Client-Side Validation Unleash the Unexploited Potential
Client-side validation is an important part of the RGB ecosystem. It ensures that predefined state transition rules in the genesis state are verified. This validation is done using Turing-complete scripts called schemas, which define the business logic for client-side validation. Compared to running a full node, CSV has several advantages.
One of the main benefits of CSV is that it allows nodes to verify state transitions related to their own contract state without needing to validate all transactions globally. This reduces the computational and storage requirements for validating the entire blockchain. It also makes it easier to operate a node.
However, CSV does lead to an accumulation of state pressure. To validate a state transition, the sender must include a data structure that contains all the information needed to validate the transfer. This includes the complete history of previous state transitions up to the genesis contract. To facilitate communication and data sharing, the RGB ecosystem incorporates the Storm-WG communication layer and the RGB proxy server.
In addition, there are ongoing efforts to develop a Data Availability (DA) layer using SNARK (Succinct Non-Interactive Argument of Knowledge) technology. This layer aims to enhance data sharing capabilities within the RGB network.
Bitcoin Commitment Layer
The Bitcoin Network serves as the foundation for RGB, introducing several important features and mechanisms. It utilizes Pedersen commitments as a cryptographic tool to enable various capabilities. In comparison to Ethereum, Bitcoin provides the proof of publication (PoP) and the Deterministic Bitcoin Commitments (DBC) in UTXOs.
Here are some notable features of the Bitcoin Commitment Layer:
The Bitcoin Commitment Layer offers two forms of commitment placement:
These features and commitment forms make the Bitcoin Commitment Layer a powerful tool for enhancing the functionality, privacy, and scalability of RGB.
Paradigm Shift in Scaling
By utilizing CSV and its related components, the RGB protocol ensures a secure and efficient validation of state transitions. This provides a scalable and privacy-preserving solution for asset and contract protocols on the Bitcoin and Lightning Network.
RGB is not just a protocol; it also introduces a new paradigm of scaling that can be adopted by other protocols as well. As mentioned earlier, moving away from a global state unleashes the untapped potential of the blockchain, which is also the core concept of sharding. The only difference is that validators in sharding validate the state of their own shards, while the contract state of RGB is kept and validated by contract participants. This means that contracts function similarly to shards but with native privacy and scalability.
Recently, we have not only witnessed the emergence of RGB but also its influence on the architecture designs of many other protocols. Due to the limited functionality of Bitcoin native scripts, scaling solutions on Bitcoin need to explore alternative mechanisms to verify state transitions. Throughout Bitcoin's long history, RGB's CSV has proven to be the most reliable and well-developed approach. If more protocols adopt CSV, the proposed RGB standard may be embraced by a wider range of Bitcoin scaling solutions.
Beyond the Bitcoin ecosystem, numerous other layer 1 protocols are also embracing CSV to reduce the verification cost of the global state, such as Mina. Therefore, we should reconsider the necessity of maintaining a global state if we truly want to achieve widespread adoption.
Integration Brings More Possibilities
A Match Made in Heaven with Lightning Network
To address the challenges posed by the speed and cost of the Bitcoin mainnet, RGB should be integrated with the Lightning Network. The Lightning Network offers a seamless solution for RGB, ensuring compatibility without the need for any extra modifications to the Lightning Network protocol. This integration is a perfect match to scale Bitcoin effectively.
Initiating a Channel
To start a channel, you need to lock the state transition into a 2/2 multi-sig UTXO. This includes creating the multi-sig and transferring the RGB assets to the multi-sig UTXO.
Updating a Channel
When updating a channel, the state transition is recorded within the channel itself. For two parties, the state transition occurs from the multi-sig to an output created by the lightning commitment transaction. This ensures that the security properties of the lightning commitment transaction are maintained. The input always remains the original UTXO, while the allocation of RGB may change in the commitment. The BTC balance within the lightning channel may or may not be altered.
For more parties, a new allocation of RGB is made to HTLCs (Hashed Time Lock Contracts) outputs. It is important to note that the HTLC output must contain a bitcoin amount higher than the dust limit.
Closing a Channel
When a channel is closed, the state transition is finalized using the lightning commitment. If someone tries to steal using an outdated state, there will be economic consequences. This includes not only the loss of the sats amount (which may be small), but also all the RGB assets that were locked in the channel.
In most cases, after the time-lock has expired, the party initiating the broadcast can claim both BTC and RGB assets.
领英推荐
Other Possible Integrations
In addition to its core features, RGB is designed to smoothly integrate with various other bitcoin technologies, ensuring compatibility with existing and future developments in the bitcoin ecosystem. It fully supports scripts, DLCs (Discreet Log Contracts), and atomic swaps, without requiring any changes to the underlying bitcoin layer. This compatibility extends to potential future bitcoin softforks, making it adaptable to evolving standards.
Moreover, the system serves as the foundation for client-side-validation, using deterministic bitcoin commitments, single-use seals, and multi-protocol commitments. While these protocols are utilized by RGB, they are not exclusive to RGB and are designed to facilitate collaboration with other protocols that adopt the client-side-validation paradigm. Besides the standard-setting mentioned in the previous "Paradigm Shift in Scaling," this approach enables smooth integration and avoids conflicts with other present or future protocols leveraging client-side-validation.
By embracing these integrations and protocols, the system ensures flexibility and compatibility within the broader bitcoin ecosystem, promoting innovation and the seamless coexistence of diverse bitcoin technologies.
Wild Ecosystem Brings More Opportunities
Division of Community Development
The project development is divided into various fields, basically being overseen by the LNP/BP Standards Association. Here are the main fields and their corresponding responsibilities.
Core Protocol
The core protocol is overseen by the LNP/BP Standards Association. The development is carried out by RGB core maintainers, although it is expected to eventually become ossified with no further development activity. The main language used for the core protocol development is Rust.
Toolchain
The toolchain for the project is also overseen by the LNP/BP Standards Association. The development of the toolchain is a collaborative effort involving the association and member companies. Similar to the core protocol, the toolchain is developed primarily using Rust.
Schemata
The development of schemata is another important aspect of the project. The LNP/BP Standards Association oversees this field as well. Independent companies and developers contribute to the development of schemata. The LNP/BP maintains a registry where the community can submit pull requests, but the community also has the freedom to initiate new schemata. The main language used for schemata development is Contractum, although Rust can also be used as an alternative.
Smart Contracts
Unlike the previous fields, smart contracts do not have a specific overseer. Instead, they are developed by independent companies, teams, and DAOs. These entities are responsible for issuing assets and creating smart contracts. The main languages used for smart contract development are JSON and any languages that work with the web. Importantly, no coding is required for utilizing smart contracts.
Integration (Wallets, Exchanges, etc.)
The integration of wallets, exchanges, and other components is crucial for the success of the project. The LNP/BP Standards Association proposes integration standards for this field. Applied software companies, including exchanges, wallet developers, and outsourcers, play an active role in the development process. Multiple languages such as JavaScript, TypeScript, Python, C, Java, Kotlin, Swift, and Rust are used for integration purposes.
These different fields cover various aspects of the project's development, ensuring a comprehensive and diverse approach to meet the needs of the ecosystem.
Potential Use Cases
Because of the inherent privacy and scalability, RGB protocol could unlock a wide range of potential use cases, both in the financial and non-financial sectors.
In the realm of Bitcoin finance, RGB can be used for various purposes. Corporate and project tokenized shares can be issued centrally but traded in a decentralized manner, thanks to the transparency and security provided by the protocol. Furthermore, RGB enables the facilitation of loans and bonds, whether centralized or decentralized.
Another area where RGB could shine is the issuance of Bitcoin and other assets with higher programmability and confidentiality. These assets can be wrapped into RGB and issued in a decentralized manner, while still allowing for a semi-federated pegout. Additionally, RGB-wrapped stablecoins can operate on the Lightning network, serving as a means of payment, and can be issued either in a centralized or decentralized manner.
Decentralized exchanges can also benefit from the RGB protocol. By leveraging its features, these exchanges can ensure efficient and secure trading, enhancing liquidity and transparency in the ecosystem. Additionally, AMM (Automated Market Maker) solutions, such as algorithmic overcollateralized stablecoins, can be implemented using RGB.
Moving beyond the financial realm, RGB offers exciting possibilities for non-financial applications. Self-sovereign identity solutions can be built using the protocol, giving individuals control over their personal data and enhancing privacy. Decentralized global name registries can also be created, enabling the establishment of unique and verifiable identifiers.
Digital ownership right management systems can leverage RGB's transparency and security features to ensure accurate ownership tracking of various assets. Non-fungible collectibles and tokenized art can be created and traded using RGB, providing a secure and decentralized platform for artists and collectors to exchange their creations.
Decentralized Autonomous Organizations (DAOs) can also benefit from RGB. The protocol can be used for governance and decision-making processes within these organizations, enhancing transparency and enabling efficient collaboration among members. Lastly, RGB can be utilized to implement provable and verifiable audit logs, allowing for transparent and tamper-proof record-keeping.
These examples highlight the versatility and applicability of the RGB protocol across various domains, showcasing its potential to revolutionize both financial and non-financial sectors.
Existing Wild Ecosystem
As mentioned earlier, the introduction of RGB has the potential to bring numerous new projects to the Bitcoin ecosystem. The highly anticipated release of RGB v0.11 is expected in the near future, prompting several projects to gear up and compete for a leading position in their respective fields. Today, we aim to provide a list of existing projects and their current activities. Please note that this is not financial advice, as these projects are still in the early stages and may undergo sudden changes or cease operations.
Drawing from the experiences of other ecosystems, it is common for early-stage ecosystems to experience a surge in meme activity initially, followed by a shift in focus to other areas.
Multi-Product?line
BitMask / DIBA
BitMask is a key player in the RGB ecosystem, and they have even become a member of LNP/BP. In recent years, they have made donations to various associations. Their founder hails from Nigeria, but the entire team operates remotely on a global scale.
They initially launched the BitMask wallet, which is currently the only extension wallet available. Currently, they have three products in the pipeline. In addition to the wallet, they are developing a NFT marketplace called DIBA, which could potentially be the first and only one of its kind.
In addition to their user-focused products, they are also working on Carbonado, a data storage format designed to be resistant to apocalyptic scenarios for those who are truly concerned about their data security in the RGB ecosystem.
Pandora Prime
Pandora Prime is currently developing three products simultaneously. They have already launched $$RGBTC and$$CHFN, which may be integrated into LN (Lightning Network) in the future.
Their first product is MyCitadel, a wallet app available for Linux, Windows, and MacOS desktop platforms. Their second product is Colorshift, an exchange designed for RGB assets. Lastly, they have developed RGBEX, a registry for RGB assets and a smart contract explorer. However, it appears that their product development and operational progress have been stagnant for several months.
BiHelix
BiHelix is rebranding from Infinitas, and they are building upon the RGB and LN protocols. Their main goal is to commercialize nodes in order to expand RGB and incentivize more participants to join. In their node implementation, they intend to integrate a storage layer into the core node.
Additionally, they plan to develop a wallet SDK and provide assistance to centralized exchanges and other user wallets.
Bitlight | Bitwap
Bitlight and Bitswap were originally two separate teams, but Bitlight later acquired Bitswap. Bitlight is currently developing a wallet with an integrated RGB core, similar to BitMask. On the other hand, Bitswap is a decentralized exchange, as its name implies.
Wallets
Iris
Iris is a wallet developed by Bitfinex for Google Play. The Iris Wallet allows for RGB asset operations, including issuance, spending, and receiving. It provides a user-friendly wallet application that hides technical complexities behind a familiar interface.
Shiro
Shiro wallet is a server for the RGB protocol on Umbrel.
MEME
$PPRGB
$PPRGB was initially launched on Liquid and promised to be mapped to RGB when v0.11 is ready. Currently, it can be traded on SideSwap, which is the settlement infrastructure of the Liquid Network.
$Single-Use-Seal
$Single-Use-Seal is derived from the native terminology in RGB. Currently, it is awaiting the v0.11 launch and distributing whitelists through various activities.
$UTXO
UTXO was utilized to create the spank exchange. They introduced $UXTO within their own exchange on December 25, 2023. It is unclear where exactly the token was launched, as they have provided limited information.
$PANDA
$PANDA is another MEME may launch on UTXO exchange. And it is still wait for the release of v0.11.
$RGBS
$RGBS is the first token fair minted on BitRGB, and the mint price is 4 Sats /\RGBS. The initial market cap is around 2~3M. It claimed they launch RGB token, but actually issued on Nostr.
Reference
Disclaimer: This article is provided for informational purposes only and should not be considered as financial advice. The cryptocurrency market is highly volatile and unpredictable. Always conduct thorough your own research and consult with a qualified financial professional before making any investment decisions.
Edited by El Bachir Essamari