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:
- Slight differences in transaction and block formats due to support for multiple assets
- An updated fee estimation mechanism to account for the proofs and the additional fee outputs
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:
- Access to Lightning innovations: The scalability aspect is only one part of the appeal of the Lightning Network, others include the real-time nature of payments, with out-of-the-box support for invoices and proof-of-payments, which opens up a whole range of new real-time use-cases. These range from point-of-sale applications that require instant settlement, streaming machine-to-machine micropayments, or paying for online content with any issued asset such as rewards points, stablecoins, or security tokens.
- Smoother on-ramps and off-ramps: The Lightning Network has native support for atomic swaps. This allows any user to build gateways into and out of the Liquid network considerably speeding up onboarding users into the Liquid network, as well as providing users with a seamless experience to move their funds off of the Liquid network, without going through lengthy peg-in and peg-out processes.
- Future-proofing: While Liquid may currently not have the same load as the Bitcoin mainnet, it is likely that we will eventually reach the throughput limit as well. Having Lightning available right from the start enables us to have a solution ready for when it becomes necessary.
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.
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.