An article to understand the Bitcoin layer RGB: background, working principle and latest developments
火星财经
2023-05-06 09:30
本文约1412字,阅读全文需要约6分钟
An important step towards enabling Bitcoin DeFi

Original title:There’s a Bitcoin layer you’re not probably paying enough attentionto: RGB

Author: Trust Machines

Original Compilation: Kate, Marsbit

Original Compilation: Kate, Marsbit

There's a Bitcoin layer you probably haven't paid enough attention to: RGB

Their team has been hard at work for several years. Their latest release, v 0.10, is a big step towards enabling Bitcoin DeFi.

Here's how it works

RGB may be new to many, but it was actually first proposed in 2018.

UTXO

2019,@dr_orlovskyand@giacomozuccoand@LNP_BPFounded

A standards association that brings RGB and its associated tools to life.

What started as a token protocol with the concept of "colored coins" has now grown into a full-fledged Bitcoin smart contract system.

Here's what makes RGB unique:

⚡Lightning Compatible

💱Turing complete smart contract

🔐 Based on zero knowledge

🔍 Client Verification

🔥Disposable seals

Let's take a deep dive into each 🏊

⚡Lightning Compatible

RGB can use their Bifrost extension to connect with the Lightning Network, allowing near-instant settlements without having to wait for new Bitcoin blocks to be mined.

💱Turing complete smart contract

Turing complete means that as a programming language, RGB Networks can perform both simple and complex calculations. Consider statements such as "if > then" based on some condition.

(The Bitcoin network cannot do this by itself.)

🔐 Based on zero knowledge

Transactions on the RGB network use zero-knowledge (ZK) proofs, making each transaction private. Through these algorithms, the recipient of an asset is able to verify its validity without seeing any additional information about the asset's origin.

🔍 Client Verification

This zero-knowledge verification is not performed on Bitcoin, but on the client side. If you use the RGB network, you don't need to verify everyone's transactions, only your own. This is huge for scalability! 📈

🔥Disposable seals

Whenever the state of a smart contract on the RGB network changes, a Bitcoin-native UTXO is created in the owner's wallet. This UTXO is spent/closed when the owner submits a transaction on the RGB network.

Let's see it in practice:

🕒Example time🕒

Let's say Matt wants to issue 100 new $MATT tokens on the RGB network.

He will issue himself 100 new $MATT tokens on the RGB network. The state of these $MATT tokens will then be assigned to native Bitcoin UTXOs owned by MATT.$MATTNext, Matt wants to convert the 50

Send it to his friend Pam.$MATT

Matt would spend the native UTXO (remember, one time...) and issue 50 to Pam on RGB$MATTThis is recorded as a new native UTXO in the wallet owned by Pam, and the remaining 50

Matt's new native UTXO.

Pam's UTXOs are blockchain blind, which means the Bitcoin network is unaware of the RGB layers.

Because the Matt > Pam transaction happens on the RGB layer, Matt has no way of knowing which native UTXO Pam chose. Pam also cannot know about Matt's new UTXO. Privacy is protected 🔒

Matt then sends 10 $MATT to his friend Bob.

His 50 $MATT UTXO is spent, a new 10 $MATT UTXO is sent to Bob, and 40 $MATT remains in Matt's wallet as a new UTXO.

Now, Bob sends his 10 $MATT to his other friend, Jerry.

Bob's 10 $MATT UTXO is spent, and Jerry receives a new UTXO containing 10 $MATT.

Jerry then sends 10 $MATT to his friend Lisa. Once again, a new UTXO is prepared for Lisa.

Using zero-knowledge proofs, Lisa is able to verify the origin of these tokens using Jerry's data without knowing anything about Bob, Matt, or Pam.

/ end example time (you did it!) 🕟

Cool, but what's up with the new v 0.10 update? Glad you asked 🧑🏫

This major milestone introduces the last consensus-breaking change, which means that future RGB versions will be backward compatible from here, allowing its consensus layer to get stronger over time 💪

V 0.10 unlocks the last remaining features developers need to implement fully functional smart contracts, such as:

• Numerous API improvements

• Support for the RUST programming language

• A new command line tool for easier access to the web

In addition to token issuance, RGB can also support NFTs, DAOs, and full DeFi applications such as exchanges or liquidity pools.

It's still early days for this protocol, but we're excited to see how RGB evolves over time, and how developers get their hands on it!

By the way, we are Trust Machines👋

We are building the largest Bitcoin application ecosystem to maximize the value of the Bitcoin network.

火星财经
作者文库