liquid
Lightning + Liquid = ♥
July 31, 2019
|

The c-lightning team is happy to announce experimental support for the Liquid Network in c-lightning. The Liquid Network is a Bitcoin sidechain which provides asset issuance, fast settlement times, and transaction confidentiality. Now users can take advantage of early Lightning support for instant Liquid Bitcoin (L-BTC) micropayments; with support for other Liquid assets coming soon.

Getting Lightning to work on Liquid

Due to the similarities between Bitcoin and Liquid, porting c-lightning to these sidechains proved to be rather simple. Bitcoin and Liquid use the same UTXO-based model, and we only faced a couple of minor challenges:

But thanks to the use of libwally, an open source component of the Blockstream Green wallet, overcoming these was a breeze. The addition of Lightning support serves as an example of how easy it is to port an existing Bitcoin application of any complexity to Liquid, and Lightning is relatively complex, trust me on that!

Why Lightning on Liquid?

Now you may be wondering why we have ported c-lightning to Liquid. After all, Liquid is not yet experiencing the scalability issues that Bitcoin mainnet is facing, and final confirmation of a transaction (two blocks) only takes two minutes. There were three key drivers for porting Lightning to Liquid:

In The Longer Run

Liquid and Lightning are two complementary technologies, each with their own strengths and weaknesses, but their combined potential is greater than the sum of them taken individually. Liquid for example, brings a host of advanced features, such as Confidential Transactions and Issued Assets.

Liquid
Liquid
APPLICATION
SETTLEMENT TIME
TRANSACTION SIZE
TRANSACTION COST
ON RAMP
OFF RAMP
TRUST MODEL
TOKEN INSURANCE
MULTISIG
SMART CONTRACTS
OTHER ADVANTAGES
Trading
Retail
2 minutes
Instant
Medium to large
Micro to small
Higher (fee market-based)
Lower (routing-based)
Peg-in (102 confirmations)
Open a channel
Peg-out via Federation member
Close channel
Federation
Counterparty
Yes
No
Yes
No
Yes
No
Supports Lightning
Chain-agnostic
APPLICATION
Liquid
Lightning
Trading
Retail
SETTLEMENT TIME
Liquid
Lightning
2 minutes
Instant
TRANSACTION SIZE
Liquid
Lightning
Medium to large
Micro to small
TRANSACTION COST
Liquid
Lightning
Higher (fee market-based)
Lower (routing-based)
ON RAMP
Liquid
Lightning
Peg-in (102 confirmations)
Open a channel
OFF RAMP
Liquid
Lightning
Peg-out via Federation member
Close channel
TRUST MODEL
Liquid
Lightning
Federation
Counterparty
TOKEN INSURANCE
Liquid
Lightning
Yes
No
MULTISIG
Liquid
Lightning
Yes
No
SMART CONTRACTS
Liquid
Lightning
Yes
Mo
OTHER ADVANTAGES
Liquid
Lightning
Supports Lightning
Chain-agnostic

What’s Next?

Getting Lightning on Liquid working with L-BTC is only the first step. The top of our list of updates is the addition of Issued Asset support. Similar to our recently released Liquid Swaps Tool, asset channels can be used to atomically trade one asset—be it L-BTC, tokenized fiat, or even a security token—for another, at the speed of light. We also plan to add support for Confidential Transactions, allowing users to set up more private channels.

How To Get Started

We recently published a tutorial for installing c-lightning for Liquid on our new Blockstream Engineering Blog. We always welcome contributors to our code, so if you have any ideas for potential improvements, head to our c-lightning Github.