Launching Liquid Swaps - Unfairly Cheap Rebalancing of Your Lightning Node! ⚡🌊
Liquid Swaps give you an edge in your Lightning node operations by rebalancing your channels for reliably low fees in a sustained high-fee market.
Earlier this month we had to make the tough decision of taking Boltz’ swap services offline to avoid a UX nightmare: users starting swaps that were guaranteed to fail.
TL;DR of how we got there (for the long version check this thread):
Beginning May 4th, fees rose, dramatically and continuously. Block by block. One of the main problems encountered during this extreme week-long fee hike were fee estimations. In other words, when submitting transactions with mempool.space’s “High Priority” fee, transactions were consistently lagging behind the next block’s fee rate and didn't get mined. At least not in time for swaps to complete, in our case. Once a swap timed out, the situation worsened: locked-up on-chain coins needed to be claimed back with yet another on-chain transaction that, you guessed it, failed to get mined for a long time too. Atomic swaps ftw. 😶
On May 8th, we finally ended up with all our UTXOs, all our working capital, stuck in the mempool with fee rates nowhere near current rates, and we had to pull the trigger and switch off.
Not solely high, but volatile fees. This is not only a problem for us as a LSP, but for everyone operating a Lightning node. Whether it be individual routing node runners or businesses that depend on sufficient inbound capacity to accept payments or deposits. Most of these parties rely on some sort of⚡ ⇄ ⛓️ swaps to keep their channels balanced and functioning, either as a main strategy or fallback. It’s the only thing that works reliably. Until now.
Rebalancing costs via mainchain swaps can easily double or even go 10x within an hour in a high-fee environment. Most business models make it impractical to dynamically pass these costs on to users, let it be the PPM setting in a routing node or charging users of your Lightning PoS terminal.
Liquid to the rescue! Shifting rebalancing chain footprint to the Liquid Network, one of Bitcoin’s longest-running sidechains, not only makes sense economically, but it also makes Lightning more reliable and independent from Bitcoin’s mempool. 💪
Liquid’s feature list is long: fast 1-minute block times, transaction finality within 2 minutes, confidential transactions, asset issuance, Liquid Bitcoin (L-BTC) provably backed 1:1 by mainchain Bitcoin and more. But really important for us are these:
It’s grossly underutilized.
This makes it the perfect base for reliable and cheap Lightning channel rebalancing.
How Does it Work?
Let’s say you are a merchant accepting Lightning payments and need to rebalance your channels to make sure you have enough inbound capacity. What we’ll do to get inbound capacity is swap Lightning Bitcoin for Liquid Bitcoin - moving Lightning Bitcoin to the inbound side of the channel. Let’s walk through the steps one-by-one:
Head to 👉 liquid.boltz.exchange 👈 and enter the amount of inbound capacity you want to obtain in the upper “Lightning” field.
Enter a Liquid address to receive L-BTC and press “Create Atomic Swap”
Pay the Lightning hold invoice of about 100,000 sats in the next step and wait for your L-BTC to arrive. This should take ~2 minutes since the atomic swap protocol consists of two transactions on Liquid: first locking your L-BTC and then atomically unlocking it together with your Lightning payment. And… that’s it!
And YES, these are actual atomic swaps! This means no trust in Boltz is required as we never have custody over your funds, not even for a split-second. It is deeply-rooted in Boltz’s DNA to build the best possible UX non-custodial products.
Talking UX. The current swap box interface can merely serve as a proof of concept for rebalancing channels. What we are considering adding next is a “Liquidity” tab that provides an optimized UI to obtain a certain inbound/outbound liquidity or an entire channel with a configurable amount of inbound liquidity.
Running the Numbers
So how much can we expect to save compared to rebalancing with regular mainchain swaps? Some of our beta users were quick to come up with fee comparisons. Let’s give it a closer look using a specific scenario:
Scenario: 100,000 sats inbound liquidity at 50 sats/vB on mainchain: Mainchain: 291 bytes * 50 sat/vbyte + 500 sats Boltz fee (0.5%) = 15050 sats Liquid: 3881 bytes * 0.11 sat/vbyte + 100 sats Boltz fee (0.1%) = 527 sats ========== 96% savings *Please note that fee values on liquid.boltz.exchange can slightly differ because of how rounding is applied.
In a 500 sat/vB fee environment, like we had it earlier this month on Bitcoin’s mainchain, savings are >99%. A similar picture for obtaining outbound liquidity. Some quick math also tells us that mainchain miner fees had to permanently go back to 1 sat/vB to compete with Liquid swaps fees. We strongly believe they won’t.
So even though we decided for the much larger confidential transactions on Liquid for the privacy gain, the reliably ultra-low fees of 0.11 sat/vB beat Bitcoin’s mainchain easily. Here is why we think we can rely on 0.11 sat/vB on Liquid in the foreseeable future: because of the shorter block times Liquid’s transaction capacity is actually greater than Bitcoin’s. So until Liquid attracts more activity than the Bitcoin mainchain, we can rely on low fees.
Completing the Circle: Converting L-BTC Back to BTC
Experience with our mainchain swap product tells us that we should expect most users to use Liquid Swaps to obtain inbound liquidity and thus accumulate L-BTC. Those users will want to go back to mainchain BTC at some point (to open more channels or use BTC otherwise) and that is fine, of course. Naturally these users would need a different way than Lightning to go back to the mainchain since this would otherwise reverse all rebalancing.
Only Liquid Federation members have keys to use the official peg-out mechanism, so we must refer to the custodial “peg-out” service offered by SideSwap for the time being. But we are well aware that this needs an equally convenient and non-custodial way back, so we are going to build it: L-BTC/BTC chain-to-chain atomic swaps.
👨💻 We’ll continue to improve UX for rebalancing and bring our new web app live on boltz.exchange.
🌊 Depending on feedback, we’ll prioritize a dedicated “Liquidity” tab in our WebApp or a solution for automated/unattended rebalancing.
🥕 We’re working on moving to Taproot native swaps for enhanced privacy and significantly reducing on-chain footprint of swaps, especially important for mainchain swaps.
⛓️ Taproot-based L-BTC/BTC chain to chain swaps.
That’s it for today, stay tuned by subscribing to our Substack!