Casa Blog - Bitcoin Security Made Easy

In this Bitcoin 101, we’ll cover Lightning liquidity—what it is and how it affects the Lightning Network.

Picture this: you’re in your home, feet up on the desk, Good Morning Cyberspace on in the background, slinging some sats and bracing yourself to receive the coveted Lightning Torch. You share your Casa Node’s public key with the sender, cross your fingers and...nothing happens. You shuffle around frantically, wondering what the heck happened. You did everything right—made sure your node is on, triple-checked your public key—so what happened?

It’s probably a liquidity issue. Solving channel liquidity issues for merchants and individuals is important to the scalability of the Lightning Network. Let’s start by defining liquidity, then we’ll move on to current issues, solutions, and future implications.

What is liquidity?

First, let’s review a couple of key definitions:

  • Channel capacity is the total amount of funds in a Lightning channel.
  • Channel balance refers to the allocation of those funds within a specific channel.

For example, Bob and Alice may have a channel capacity of 0.1 BTC, with the channel balance recorded as:

Bob: 0.05 BTC

Alice: 0.05 BTC

Make sense? Great! If not, go here and revisit this article after.

In the context of Lightning channels, there are two types of liquidity: inbound and outbound.

Inbound liquidity is the amount of funds you’re able to receive, determined by the amount of funds in your channel counterpart’s balance. A merchant would be more concerned with inbound liquidity, so that they can receive various payment amounts.

Outbound liquidity is the amount of funds you’re able to send, determined by the amount of funds on your side of the channel. The average user is likely more concerned with outbound liquidity so that they have greater purchasing power.

In the above example, Bob’s inbound and outbound liquidity are equal—both at 0.05 BTC.

When liquidity becomes an issue

Once a channel connection is established, the liquidity in that channel is largely bound by its initial capacity.

Until recently, obtaining greater liquidity wasn’t a very user-friendly experience. In the example above, if either party wants to send their channel partner more than 0.5 BTC, they’ll need to open other, larger channels. This is pretty straightforward if you’re looking for outbound liquidity, but inbound liquidity isn’t as easily attained. For this, people often do one of two things:

  1. Close some of their existing channels to reallocate funds to a larger channel
  2. Connect to third-party nodes like Bitrefill’s Thor, where users can pay for Bitrefill’s well-connected node to open a channel with them.

Thor and similar services will get the job done, but paying another node to open a channel with you (and still being liable for anything #reckless that happens afterward) isn’t the most ideal user experience. In addition, you’re still subject to routing fees that these services charge.

That’s why Lightning Labs have developed Lightning Loop—a way for users to increase their inbound liquidity without closing their channels. There are two facets of Lightning Loop: Loop In (for outbound liquidity) and Loop Out (for inbound liquidity). We’ll cover them at a high level for now and will give them a dedicated Crypto 101 later.

Loop Out

Let’s pretend Alice sells t-shirts in her online shop and accepts bitcoin payments via Lightning. Eventually, if enough people purchase a t-shirt without directly opening a channel with the store, the store’s channel capacity will fill up and Alice will have no more inbound liquidity for receiving transactions.

Loop Out allows Alice to transfer received funds from Lightning into any on-chain wallet (including cold storage) or exchange. In doing so, she creates more room for receiving payments, and the sats start flowing again.

Another big benefit of Loop Out is that it can be used by merchants that are new to the network to immediately obtain inbound liquidity and start receiving payments, instead of having to wait for customers to open direct channels.

Loop In

If you’re guessing that Loop In does the exact opposite of Loop Out—congratulations, you win a virtual pat on the back! To really drive the point home, let’s look at an example.

Bob wants to buy a bunch of t-shirts from Alice’s sick new tie-dye line, so he directly opens a channel with a capacity of 0.1 BTC, this is his starting outbound liquidity. Every time he buys a shirt for 0.01 BTC, he chips away at his channel balance, using more of that outbound liquidity until it’s completely tapped out.

Oh no! Bob ran out of liquidity just before he could buy the super cool, limited edition, Casa Purple t-shirt. With Loop In, Bob can dip into any on-chain bitcoin wallet or exchange account to add more funds to the existing channel and pick up that coveted t-shirt.

Implications and unanswered questions

Lightning Loop will allow businesses to keep channels open indefinitely since users don’t have to open or close new channels to obtain liquidity. Less frequent channel reorganization can leads to more efficient use of block space. While this is a significant improvement for the Lightning Network, merchants may frequently need to lean on Lightning Loop’s services. Thus, there’s still room for optimization in the way Loop uses blockspace.

Loop also requires that users pay on-chain fees for liquidity swaps. Lightning Labs have stated that lowering these costs is one of their primary goals for the future of Loop. They’re also looking to bolster the service’s privacy and scalability, with Taproot and Schnorr as likely integrations.

Liquidity issues are improved thanks to services like Lightning Loop that bring stability to the network and create a much smoother user experience. Developments are being made rapidly, and we’re excited to see how the network evolves in the coming months.