About RGB: OP Crypto Weekly X (Twitter) thread and it got longer

Inception Capital
Inception Capital
Published in
5 min readNov 16, 2023

Written by OP Crypto @Serein_Guo and @calvindhx (X handle)

1/5 The Evolution of BTC Smart Contracts

While the Lightning Network offers unlimited scalability, it doesn’t solve smart contracts issues. Two main approaches to address this are:

· Sidechains: Like Ethereum, sidechains with smart contract capabilities are linked to Bitcoin via two-way pegging, allowing BTC transfer to the sidechain. However, no decentralized method for two-way pegging exists yet, and sidechains still face blockchain limitations.

· Colored Coins: Using Bitcoin’s OP_RETURN script, this method allows defining assets or simple contracts within 80 bytes, but is limited for complex functions. Technologies like ordinals and BRC20 utilize Bitcoin’s SegWit space, expanding from 80 bytes to 3 megabytes, but affect Bitcoin’s transaction efficiency and face strong community opposition due to centralization issues.

OP_RETURN and Ordinals both suffer from high centralization, as its interpretation relies on an off-chain centralized server instead of the blockchain or miners. This led to USDT switching from the colored coin method to RGB.

2/5 What is RGB?

RGB establishes a user-managed contract system based on the Bitcoin blockchain. Users autonomously verify and execute state changes, including assets and contracts.

In RGB, when a user initiates a transaction and invokes contract logic, the execution and asset state change don’t require network-wide consensus. Instead, they are validated and agreed upon between the transaction parties, using a “client-side validation” method.

However, this user-to-user validation can lead to fraud and double-spending issues.

In RGB, parties validate asset trades by exchanging historical data for sole ownership and accuracy of balances.

To prevent double spending, RGB uses a “single-use seal” method, where each asset balance is tagged with a unique seal checked by the counterparty. This concept ties into the UTXO model in Bitcoin, where a UTXO denotes asset ownership and its spent/unspent status, ensuring secure and accurate transaction records.

In BTC, a UTXO represents the ownership of BTC assets and has two states: spent or unspent. For example, a UTXO marked with 0.5 BTC indicates that a user has 0.5 BTC unspent. When this 0.5 BTC is spent, the UTXO either “disappears” or generates a new UTXO, marking the remaining balance after the expenditure.

The “seal” mentioned in the context of the RGB protocol refers to creating corresponding UTXOs for assets issued under RGB.

RGB decentralizes asset and contract statuses’ management to the users off-chain, where they update it independently after reaching consensus. Data storage is also off-chain. For security, UTXOs record hashes of these off-chain transactions, leveraging Bitcoin’s blockchain for its secure, immutable verification.

Through “Schema”, users and developers can set asset standards and build contract logic, concentrating most computations within the contract system itself.

3/5 RGB vs Ethereum

Smart contract solutions on blockchains, whether it’s Bitcoin or Ethereum, require broadcasting and publicizing every process of contract signing and transactions. This approach leads to two problems: the first is a lack of privacy, and the second is low efficiency.

· RGB’s Inherent Privacy

Client-side validation in RGB doesn’t adopt the blockchain-based smart contract approach. Instead, it reverts to the original concept of smart contracts, mimicking the traditional contract signing and execution process. In RGB, all smart contracts are completed between the interested parties, making it impossible for third parties to trace the participants’ asset status.

For example, if I want to transfer 100 units of a currency to Alice, only our confirmation and signatures are required. After the transfer, I no longer possess these 100 units, and only the two of us are aware of this transaction. This redefines decentralization.

· RGB’s Potential for High Scalability

In fact, maintaining every user’s asset data and contract status on a global ledger is not necessary, making the concept of global consensus inherently inefficient.

However, each off-chain transaction in RGB must correspond to a Bitcoin transaction, as UTXOs are used to mark assets and their states issued on RGB. This implies that if RGB relies on Bitcoin’s security, treating BTC as the Data Availability (DA) layer, it will also be limited by the performance of the Bitcoin blockchain, since UTXO state changes are not client-side but are processed by Bitcoin miners.

Interestingly, on the Bitcoin blockchain, it’s possible to create a 0 Satoshi (the smallest unit of BTC) UTXO. This means when spending a UTXO, one can spend RGB assets without needing to spend Bitcoin assets on the chain simultaneously, preserving the native properties of RGB assets. Additionally, this scalability can potentially be further enhanced by the Lightning Network.

· The Problem of RGB

RGB, in theory, is fully decentralized, as transactions are executed once the trading parties, or clients, reach a consensus. This redefines decentralization, but its degree is contingent on users setting up their nodes to fully control their data and the transaction verification process.

To make the RGB protocol more user-friendly for average users, some simplified solutions might emerge, like light client solutions or services relying on trusted nodes. These services aim to maintain a degree of decentralization while offering ease of use.

However, despite proposing this approach, RGB has not effectively integrated with the Lightning Network, which limits its potential scalability.

4/5 Risk

The Lightning Network, as a solution to Bitcoin’s scalability challenges, still has issues that require further exploration. The market’s views on the Lightning Network’s reliability and the complexity of its technical development are mixed, with both positive and negative opinions.

5/5 Conclusion

The design of the RGB architecture fundamentally redefines consensus rules, allowing for higher efficiency and privacy under this new consensus model. Regarding security, RGB posits that the security of consensus does not rely on public disclosure but on bilateral agreement.

The security within this bilateral consensus is ensured through the UTXO model, which guarantees the immutability of assets issued on RGB and serves as evidence for data availability verification during consensus. However, this approach sacrifices scalability.

Therefore, I believe it’s crucial to develop expansion solutions for RGB, including integrating RGB with the Lightning Network, providing better tools for developers, light clients, and new economic models within the Bitcoin ecosystem.

Ultimately, RGB’s design has the potential to overcome the blockchain trilemma, becoming a superior decentralized infrastructure. We might see an ecosystem completely distinct from Ethereum, with entirely different applications and business models in the future.

Original tweet:

https://x.com/OPCryptoVC/status/1725284787282145365?s=20

Please follow OP Crypto Twitter to get our latest weekly research thread:

https://twitter.com/OPCryptoVC

--

--

Inception Capital
Inception Capital

Inception Capital is an early-stage Web3 venture capital firm guiding founders from east and west.