Why is it said that the Bitcoin RGB protocol may be the ultimate form of smart contracts?

CN
PANews
Follow
1 year ago

This research report is jointly produced by Infinitas and LK Venture.

Authors: Echo | Infinitas; Leo | LK Venture

Guidance: Hong Shuning

Why is the Bitcoin RGB protocol considered the ultimate form of smart contracts?

Introduction

While most people associate Bitcoin with money, it has another lesser-known important use case - smart contracts. Smart contracts are the foundation of Bitcoin and were first proposed by Nick Szabo in 1995. It is a computer protocol designed to negotiate or execute contracts, essentially contracts rather than code. Smart contracts allow for trusted transactions without a third party, enabling automatic trust and execution of agreements without the need for a central authority, providing a more secure and convenient way to execute contracts than traditional contracts.

Before discussing the potential role of Bitcoin's RGB protocol in smart contracts, it is worth mentioning that the concept of smart contracts itself is controversial. Ethereum's co-founder Vitalik Buterin once expressed regret in 2018 for calling Ethereum's core functionality "smart contracts." Buterin believed that a more technical and mundane term, such as "persistent scripts," should have been chosen to more accurately reflect its nature as a continuously executing program. This reflects the different views on how to define and understand smart contracts even among pioneers in the blockchain field.

In this article, we will uncover the world of Bitcoin smart contracts and discuss how they have evolved into a vast ecosystem built on the network.

What limits the development of smart contracts?

The concept of the blockchain trilemma was proposed by Ethereum's founder Vitalik Buterin, which refers to the inability to simultaneously achieve decentralization, security, and scalability on the blockchain. Smart contracts also face a similar trilemma: decentralization, scalability, and Turing completeness. While Bitcoin and Ethereum share many similarities, they have become two different blockchain networks due to long-term vision differences and limitations.

Why is the Bitcoin RGB protocol considered the ultimate form of smart contracts?

Comparison of Bitcoin and Ethereum

Ethereum has long struggled with scalability. Ethereum's throughput is low and its processing speed is slow because it prioritizes decentralization and security over scalability (the scalability trilemma). It is precisely because of Ethereum's scalability bottleneck that, despite its Turing completeness, it is still difficult to be considered the ultimate form of smart contracts.

How does Bitcoin overcome the scalability challenge of smart contracts?

Scalability on the Bitcoin chain has been a long-standing challenge. To implement smart contract solutions on Bitcoin, they need to be created either on the Bitcoin main chain or on Bitcoin's layered solutions. Layered scalability solutions on the Bitcoin chain, such as the RGB protocol, have emerged in recent years, enabling rapid iteration of smart contract functionality on Bitcoin and addressing the scalability limitations of the trilemma.

Why is the Bitcoin RGB protocol considered the ultimate form of smart contracts?

Blockchain trilemma

Smart contracts on the Bitcoin main chain

Bitcoin's script language, Script, is too simple, making it difficult to deploy complex smart contracts at the base layer. Since its inception, Bitcoin has been designed to be simple and relatively unmodifiable to ensure the integrity and persistence of the blockchain. While protocol upgrades occur regularly, they do not mean a complete change to the blockchain, but rather provide marginal improvements.

The underlying Bitcoin still has many basic smart contract functionalities.

• Pay-to-Public-Key-Hash (P2PKH)

Pay-to-Public-Key-Hash is a common contract for Bitcoin transactions, where the script creates a contract executed by a public key and signed by the corresponding private key.

• Multisig

Multisig is a type of Bitcoin address that requires multiple approvals to complete a transaction, commonly used for executing agreements between parties where a predefined number of signatures must be collected to release funds or perform other operations.

• Hash Time Locked Contract (HTLC)

HTLC is a conditional Bitcoin transaction with a time limit. These time limits are hard-coded, and BTC is only released at specific times and dates (or blocks). If certain requirements in the contract are not met before the preset deadline, the transaction will be canceled.

• Discreet Log Contract (DLC)

DLC utilizes oracles to execute trustless peer-to-peer transactions. These oracles can assess the outcome of real-world events and provide on-chain information for Bitcoin smart contracts. DLC is most commonly used when two parties commit to a monetary agreement based on future outcomes.

• Pay-to-Taproot (P2TR)

Pay-to-Taproot is a script for sending Bitcoin that introduces Merkle trees and Schnorr signatures. These transactions offer improved security, lower transaction fees, and greater flexibility. This form of contract has recently been implemented due to the Taproot upgrade.

Advantages of layered execution of Bitcoin smart contracts

The unique aspect of Bitcoin's layers is that they can introduce new features to the network without modifying the main chain. By introducing innovations and other experimental developments without changing the Bitcoin code, the core of Bitcoin can remain simple and unaffected by what is built on top of it.

All Bitcoin layer transactions ultimately settle on the Bitcoin base layer, meaning the history of each transaction is written into Bitcoin's ledger. The level of verification is what sets blockchain apart from any other network, as changing layer transactions requires changing main chain transactions.

Layered execution of Bitcoin smart contracts has several key advantages.

• Greater programmability: Layered smart contracts overcome the limited functionality of Bitcoin script language by accessing their own global state, expanding the possibilities of building on top of Bitcoin.

• Higher scalability: Deploying smart contracts on scalable solutions means transaction processing speed can be significantly increased. Currently, the base layer can only process about 5-7 transactions per second. Layered solutions can bundle transactions before sending them to the main chain for final settlement, greatly increasing Bitcoin's throughput and the feasibility of it being a scalable network with millions of daily transactions.

• Improved efficiency: Improved scalability goes hand in hand with faster transactions and lower costs. Shorter block times can speed up confirmation, and transaction costs for layered transactions are significantly lower compared to the main chain. In addition, layered transactions reduce the chaos that occurs at the base layer and improve the overall network performance.

Looking at the Bitcoin ecosystem, after completing Segregated Witness, it has fully focused on developing Layer2 solutions such as the Lightning Network and sidechains. The complexity of Bitcoin Layer1 scaling solutions is more accepted by the community to build new Layer2 solutions based on Bitcoin Layer1, which are compatible and do not affect the Bitcoin system while solving on-chain congestion. Therefore, the imagination space for Bitcoin smart contracts falls on Turing completeness.

Why might the RGB protocol be the ultimate form of smart contracts?

As a form of Bitcoin layered solution, the RGB protocol has exploded with huge potential to realize future large-scale applications in the field of smart contracts. In Bitcoin layered solutions, the RGB protocol and BitVM are the only two that can achieve a balance of "scalability," "Turing completeness," and "decentralization."

RGB is an open-source protocol that executes smart contracts based on the Bitcoin protocol using the Lightning Network (LN). It is a protocol built on top of the Bitcoin blockchain's proof-of-work (PoW) consensus layer. It leverages the Lightning Network without the need to modify the protocol, and it enables the issuance and management of programmable assets and private assets. RGB addresses scalability issues by executing private smart contracts between parties (e.g., LN channels). Its development aims to improve colored coins and tokenize digital assets on the Bitcoin blockchain.

Client-side validation

One of the core features of RGB is client-side validation, a concept proposed by Peter Todd. Client-side validation is supported by the RGB schema, which is the way users create smart contract protocols between parties. This validation method utilizes the strength and security of the Bitcoin blockchain's consensus mechanism while taking the smart contract code and data off-chain. Due to Bitcoin's limited support for smart contract execution environments, RGB brings execution and validation off-chain, and RGB transactions are not included in Bitcoin or Lightning transactions, allowing participants to benefit from the security of the Bitcoin consensus layer while increasing flexibility and scalability.

In addition to off-chain storage of transaction data, RGB transactions are also assigned to UTXO sets using one-time seals to close Bitcoin transaction outputs as an additional security measure. Seals prevent different versions of the same data from being provided by different parties. Thus, they allow conditional parties to verify the history of smart contract states.

RGB smart contracts, architecture, and validation

RGB smart contracts consist of operations that update states, owners, and participants. The Schema of RGB defines validation rules at the genesis level for each state, ensuring that consecutive state owners use the same Schema to validate the history. Therefore, the schema guarantees social consensus, validation, and smart contract states.

The core validation logic uses Rust, a deterministic smart contract language equivalent to a Turing machine. All contract-specific validation logic runs on the Alluvium Virtual Machine (AluVM), a highly deterministic and exception-free VM that provides a platform-independent instruction set.

Other Bitcoin smart contracts that can achieve Turing completeness:

• BitVM: Released in October 2023, the BitVM whitepaper adopts a similar approach to Rollups to execute complex programs off-chain and then place key evidence on-chain. Similarly aiming to bring Turing-complete smart contracts to Bitcoin, BitVM has extremely high requirements for computational power and is only theoretically executable. Scalability and commercial implementation require further understanding.

Why is the Bitcoin RGB protocol considered the ultimate form of smart contracts?

Overcoming the smart contract "impossible triangle" with RGB and BitVM

Conclusion

Bitcoin is decentralized "digital gold" and also a platform for executing smart contracts. Currently, a large amount of Bitcoin is idle, with approximately 76% of the Bitcoin supply still lacking liquidity and transaction history. Through the expansion of smart contracts, there is an opportunity to elevate Bitcoin's productivity to new levels. With protocols in the Bitcoin ecosystem, such as the RGB protocol, that integrate Turing-complete smart contract functionality, developers can program more smart contracts into the network, accelerating Bitcoin's mainstream adoption as a value store and financial services layer.

As a highly decentralized, secure, and persistent blockchain, Bitcoin has the potential to serve as the foundation for more on-chain economic activities in the future. It is believed that Bitcoin may soon become the top ecosystem for smart contracts, decentralized applications, and Web3 infrastructure. In this ever-changing field, Bitcoin's role and capabilities may exceed our current imagination, just as our understanding of the meaning of "smart contracts" continues to evolve and deepen.

免责声明:本文章仅代表作者个人观点,不代表本平台的立场和观点。本文章仅供信息分享,不构成对任何人的任何投资建议。用户与作者之间的任何争议,与本平台无关。如网页中刊载的文章或图片涉及侵权,请提供相关的权利证明和身份证明发送邮件到support@aicoin.com,本平台相关工作人员将会进行核查。

Share To
APP

X

Telegram

Facebook

Reddit

CopyLink