- Under development by the LNP/BP Standards Association, the RGB protocol entered beta in June.
- The second layer network promises to bring smart contracts and tokenized assets to Bitcoin with a Lightning Network-esque technical design.
- RGB could be used to issue tokenize securities and nonfungible tokens (NFT), and to offer a more private means of stablecoin issuance and transfer.
Smart contracts and Bitcoin. These technical phenomena are rarely associated with each other, often because people believe Bitcoin’s paired-down scripting language can’t support the smart contract applications that have become the darlings of the Ethereum ecosystem.
But as the new smart contract-enabling protocol RGB launches its beta, the folks at the LNP/BP Standards Association are trying to change this perception.
The group (whose acronym is short for Lightning Network Protocol and Bitcoin Protocol) is building RGB, a smart contract network built on top of Bitcoin. (The protocol is named after the “RGB” additive coloring scheme because it originally started as a project to improve Bitcoin’s colored coins scheme for tokenized assets.)
The “third layer” network, as one of its architects, Giacomo Zucco, calls it, has entered beta and could help outfit Bitcoin with the tokenizing capabilities that have made Ethereum the go-to blockchain for issuing tokenized assets like securities, collectibles, crypto dollars and more.
The new old thing
RGB was first conceptualized by Bitcoin Core developer and cryptography consultant Peter Todd. With undisclosed funding from Bitfinex/Tether, Fulgur Ventures and Poseidon Group, the protocol entered beta testing at the end of June. LNP/BP head Giacomo Zucco clarified that the “RGB node for the software itself is in beta” but that all RGB-compatible wallets are still in alpha.
The pursuit of Bitcoin-based smart contracts – and more generally, tokenizing assets on Bitcoin – is nothing new.
Bitcoin’s OP_RETURN function has allowed for limited smart contract functionality since the coin’s inception. This function set the technical groundwork for Bitcoin-based NFTs/collectibles through the Counterparty protocol, as well as the issuance of the tether (USDT) stablecoin on Bitcoin through the Omni protocol.
For its own part, the Lightning Network’s hash time-lock contracts – the technical parameters that lock bitcoin (BTC) into payment channels on the secondary network – are a form of smart contract.
Leveraging techniques (and trade-offs) of Lightning
So-called “sidechains” are trusted blockchains in the sense that a federated body of representatives run the nodes that oversee the sidechain’s operations, such as issuing assets and “pegging” bitcoin into the sidechain. These networks, running parallel to a decentralized blockchain like Bitcoin, market smart-contract functions as one of their primary use cases.
RGB, on the other hand, is not a trusted blockchain like RSK or Liquid, nor does it rely on Bitcoin’s main chain to execute transactions like Omni or Counterparty. Instead, its design is taken in the image of its technical cousin, the Lightning Network.
Read more: What Is Bitcoin’s Lightning Network?
The Lightning Network relies on “client-side verification” for its peers to verify the movement of funds. When you send funds to a peer on Lightning, the “state” of the payment channel with this peer is updated on both your Lightning node and your peer’s Lightning node. The final state of the payment channel is not recorded on Bitcoin’s blockchain until the channel is closed.
This delayed verification allows the Lightning Network to process near-instantaneous payments, but this comes at a cost: You must keep your node running at all times or the peer on the other end of your payment channel may try to cheat you by broadcasting a false channel state to the blockchain (a technical service known as Watchtowers are working to mitigate this attack vector).
Zucco said RGB “leverages the techniques and trade-offs of Lightning,” in that assets will be transferred in the same way.
“The RGB design is a client-side validation design. It means that when I send you something, I don’t publish the transfer on the network; I send it to you, peer-to-peer, and I will just use the public network to prevent double-spending. You should use the blockchain only to prevent double-spending, but not for transferring assets.”
He emphasized that the trade-offs are the same as in Lightning and stressed that each RGB node will need to keep backup data of its entire state.
To issue assets on RGB, the issuer creates a “schema” for the asset that defines parameters like fungibility, circulating supply and inflation rate, among others. The asset and its schema are then anchored to a reference point on Bitcoin’s blockchain, such as a UTXO or an address, to index the token and its schema.
RGB use cases
The long-term goal is to make RGB compatible with Lightning, but seeing as the project is still in beta this integration will be some time in the making before it is user-ready.
Until that integration happens, one concrete and logical use case for RGB on its own is for NFTs (although Zucco personally doesn’t find this too exciting). NFTs are unique tokens that typically represent a digital collectible such as a piece of art.
The classic example is CryptoKitties, those breedable NFT felines minted on the Ethereum network. Another perhaps less-familiar example comes from the RarePepe cards issued on Bitcoin using the Counterparty protocol.
RGB could have a leg up on these forms of NFTs because RGB would allow you to send the computer file for the NFT in the same transaction as the asset that represents it. When you send a CryptoKitty as an ERC-721 token on Ethereum or a RarePepe “colored coin” on Bitcoin, the file for the actual collectible has to be transferred separately. With RGB, both asset and collectible can be “sent inside the same channel,” Zucco claimed.
A more salient use case for RGB, according to Zucco, would come from issuing tether on the protocol. Since all transactions are handled off-chain, Zucco said RGB carries with it the promise to be possibly more private than even the Lightning Network.
For something like the stablecoin tether, whose on-chain address on blockchains like Bitcoin, Ethereum, EOS and Tron can be easily tracked and, in extreme scenarios, blacklisted, this could bolster tether’s privacy and censorship resistance.
“RGB is very private. I cannot follow an RGB asset on the blockchain. Only when you receive an asset do you see the history of the asset, but it’s obfuscated cryptographically with Confidential Transactions technology we reused from Blockstream. Once you send an asset, you won’t be able to see where it goes afterwards,” Zucco told CoinDesk.
Battle-testing RGB in beta
Of course, before these use cases can be realized, RGB needs some battle testing in beta. And there’s still Lightning Network integration and wallet design to consider, as well.
The LNP/BP Standards Association won’t be designing a wallet itself, Zucco said, but will work with third-party developers that do.
After all, LNP/BP will have itd hands full hardening the RGB backbone: its source code. As for the protocol’s appendages – its wallets and other integrations – this development will be up to Bitcoin’s distributed community to bring to life.