The Takeaway
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.
Read more: A Protocol for Issuing Tokens Launches on Bitcoinâs Lightning Network
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.
Read more: Writing Bitcoin Smart Contracts Is About to Get Easier With New Coding Language
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.Â
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.Â
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.
Read more: Money Reimagined: Bitcoin and Ethereum Are a DeFi Double Act
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.
Read more: High Ethereum Fees Push Tether to Its Eighth Blockchain, OMG Network
â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.
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.