Nobody is more critical of Lightning than its most passionate proponents. Guys like me. Guys like Ben Carman. In a recent Stacker News post, he highlights liquidity and offline payments as aspects of Lightning that impede the UX and deter self-custody. This might seem like just another complaint about how the future isn’t living up to its promise. We were promised flying cars, and all we got was the miracle of the internet. Everything is amazing and nobody is happy.
On closer inspection, though, Ben’s got a point. I’ve been talking about the Lightning UX for years, including the challenge of offline payments. We even proposed a solution to the offline payment problem back in 2019 (I’ll explain below why we never implemented it).
It might feel as if the promised future is perpetually out of reach, but building Lightning is a lot like climbing a mountain. Climbers never really see the summit until they’re standing on top of it. They often can’t even see over the next ridge. Planning the ascent is important, but most of the time you’re simply concentrating on the next foothold. But the steps add up. Just like the view from the top is the reward for all that effort, a brighter monetary future will be our reward for building the network bit by bit. That’s how Lightning has progressed from an idea to a functioning bitcoin payment network, and it’s how we’ll reach our destination.
And like mountain climbing, none of us will get there alone. (Image: Sylvain Mauroux) Since offline payments are a longstanding UX challenge, let me review where this problem comes from, what tech is currently available to deal with it, and what’s on the horizon. (I’ll review Ben’s other beef — channel liquidity — in a coming post.)

The Problem

People who’ve only ever experienced fiat, on-chain bitcoin, or custodial wallets might not even be aware that “offline payments” are a thing. Fiat and custodial wallets solve the problem by taking control of users’ money. The bank/custodian receives funds/IOUs from other users’ banks/custodians and sends the funds/IOUs when users ask them to. If the user never actually has custody of the funds, it doesn’t matter whether they’re online or not. Only those who actually control the money need to be online. With on-chain bitcoin, a sender needs only the recipient’s address.
Self-custodial Lightning is more challenging because both parties to a transaction need to be online simultaneously. The recipient needs to send an invoice to the sender, the sender needs to initiate the payment, and the recipient has to sign it. This arrangement restores users’ control over their own money, but it can also be a pain in the UX.

The Past: Trials and Errors

There were 11 recorded attempts to climb Everest before Norgay and Hillary finally succeeded. Breez’s first attempt to crack offline payments was called “Connect to Pay,” which prompted the sender to notify the recipient when a payment was about to go through so the recipient would open their Lightning app. The underlying UX idea was analogous to a phone call: just get both parties occupied with the same thing simultaneously. But the ability to receive payments without conscious effort is simply too ingrained. It’s the UX we all expect, and nothing less will do. (People don’t even like phone calls. They sing songs about it.)
Our next idea, which we called Lightning Rod, was more sophisticated. The idea was to use HODL invoices to let a routing node between the sender and the recipient intercept the payment until the receiver became available. Therefore, it was a lot like Zeus’s Zaplocker idea.
Although Lightning Rod works, we never put it into production because HODL invoices don’t scale for routing nodes. They tie up funds. When a routing node holds a transaction, it’s basically extending an interest-free loan to the recipient. Liquidity must flow. Solving the problem of async payments by freezing them en route just aggravates the liquidity problem.
We were on the right mountain, but taking the wrong lines up.

The Present: Existing Means to Support Offline Payments

The good news is that technologies have evolved to deal with offline payments. No existing approach is a perfect solution in that they all have trade offs, but each is useful in different ways.

LNURL-Withdraw

The first is LNURL-Withdraw. Recipients can scan a QR code or enter a URL that instructs their app to request funds from a sender. For example, a user who wants to withdraw funds from an exchange can “pull” their funds at their convenience instead of the exchange pushing while they are offline.
There are two major drawbacks with this approach. First, it requires the sender to have a node running on a server that’s perpetually online, so it’s inappropriate for non-custodial mobile or web clients. Second, the “pull” model only applies to very specific use cases when users know they have funds to redeem. For example, it would be hard to spontaneously tip someone.

The Breez SDK Approach: Leverage Mobile Notifications

Mobile notifications are another means to support offline payments. Triggering a mobile notification in iOS or Android can even give the client app enough time on the CPU to receive the payment. Using mobile notifications to process incoming payments doesn’t require active involvement from the recipient and provides a natural, non-intrusive solution to the simultaneity problem. That’s why we’ve included a new feature in the Breez SDK to facilitate offline payments using push notifications. It’s a major UX improvement for SDK users requiring just a little work from developers.
The Breez SDK approach works like this: first, the devs create a webhook that an LSP can call when a payment is en route. As soon as the payment hits the LSP as the last hop before the recipient, the LSP calls a Notification Delivery Service (NDS) via webhook, and the NDS sends a push notification to the user’s phone with instructions. It requires a little legwork on the developers’ part in the form of setting up an NDS, but the result is a much better UX because users don’t need to keep the app in the foreground to receive payments. It also enables mobile users to receive payments using a static address (e.g. Lightning address, LNURL-Pay or BOLT12).
Mobile notifications are an improvement, but not a cure-all. They only work on mobile devices, obviously, and this approach won’t work if the device is off or the user has disabled the notifications required. Moreover, Google or Apple could negate its effectiveness by changing how their operating systems handle notifications. That’s why we need a solution built into the Lightning protocol.

The Future: Building Async Payments into Lightning

The idea behind the next phase of offline payments is simple: make payments asynchronous. Since the simultaneity problem affects self-custodied mobile and web users most acutely, and practically all such users connect to Lightning through LSPs, why not leverage their always-online LSPs to synchronize the payment when the sender or receiver are offline?
LSPs can decompose the payment flow in time by intercepting HTLCs, which eliminates the simultaneity problem or, rather, shifts it to the level of LSPs, for whom it is no problem. It all starts with a message embedded in the invoice indicating that the recipient is offline but connected to an LSP. The sender sends the payment with a message to their own LSP to hold it with a long expiry time pending further instructions. The sender then messages the recipient’s LSP asking it to alert their own LSP (who is still holding the payment) when the recipient is back online. At this point, it’s basically up to the LSPs. When the recipient comes back online, their LSP signals the sender’s LSP to forward the payment.
This model doesn’t compromise the overall liquidity of the network because the only node where the funds can be frozen is the sender’s own LSP, which is what the user actually wants.
As simple as it sounds, this approach requires more tech to work optimally: static invoices, onion messages, blinded routes, trampoline payments and eventually PTLC. It’s complicated, but those who want to dig deeper can watch my Honeybadger 2023 session. While some Lightning implementations already support some of these features, it will take some time before the entire network adopts them, which is crucial for interoperability.

When Will the Future Arrive?

Of course the sun will rise tomorrow, but it’s already shining today. My point is that we already have different, functional ways of handling offline payments on Lightning without relinquishing custody, each suited to a different use case. LNURL-Withdraw already works for some commercial contexts, and the new Breez SDK feature enables offline payments for mobile devices.
That’s cool! We didn’t always have that, but now we do. We’re already living in yesterday’s future.
A protocol-based solution remains a work in progress. Many implementations like Eclair, LDK, lndk and Core Lightning (yes, I’m looking at you lnd) are making progress on the features required to make it happen. When implemented, async payments will represent a huge UX improvement. It’s a future worth pursuing.
When we get there, I’m sure there will be other challenges on the horizon demanding our attention and testing our patience, but let’s never forget how high we’ve climbed already.
Great post. I think everybody already realized that LN is not the dream that everyone would run a node and have free txs. We must split the different use cases to assess what LN solves and what it does not. LN is very merchant/business oriented, in this case I think it's a good solution, you can have a LN node for your whole chain, or thrust some service provider that does that for your business. LN is also very good to connect different L2 protocols, Liquid, Fedimints, Cashu, Ark(?) this is awesome for UX. Now for user-user instant payments, not so good, but most users will be fine using a custodial solution for that, there is the problem that in many regions you may not have custodial solutions available. WoS even pulled out of the US. This is the last mile for LN I think, that is where a fedimint can help, or wallets like Phoenix, Mutiny or Zeus. LN doesn't have to solve everything in a non custodial way imo.
reply
A topic for another post 🙂
reply
deleted by author
reply
static invoices, onion messages, blinded routes, trampoline payments and eventually PTLC
So like never.
I've moved on to federated lightning addresses that can allow the user to sweep the funds to their self custodial LN channel when they come back online.
reply
Nah. Most implementations already support most of these. PTLCs will take longer, but there are ways to mitigate proof of payments.
reply
When protocol features need network wide support, it turns into a forever waiting game. It does not matter if other implementations have this support when they're at most 5% of the nodes on the network. Until you can reliably route onion messages and have senders speak onion messages/async, it won't happen.
reply
435 sats \ 2 replies \ @roy OP 24 Jan
But that's not the case here. You can easily run lndk to get onion messages. We're still early, and you think you can influence the adoption, you're wrong.
reply
We've both given up on LND. Ofc I still applaud the efforts and a move towards something better, I'm just pessimistic and have grown tired of asking.
You can easily run lndk to get onion messages
I'll believe it when I see it more. Are you running it and do you know of any others running it in production currently?
reply
377 sats \ 0 replies \ @roy OP 24 Jan
Still in our staging, soon hopefully
reply
31 sats \ 1 reply \ @kr 24 Jan
thanks for sharing this @roy, and love the background on different approaches Breez tried in the past.
keep going!
reply
196 sats \ 0 replies \ @roy OP 24 Jan
Thank you sir 🙏❤️
reply
This is such a great writeup.
The number 1 comment I get from bitcoin skeptics is well what if there’s no internet, how about that! It’s hard to not roll my eyes at this initial comment given how much bitcoin is an incredible discovery for humanity.
reply
10 sats \ 1 reply \ @Krv 24 Jan
I see the claim about promises that were made associated with Lightning. I wonder who made these promises. It was not the initial developers, who were clear that lightning cannot scale to the masses and has significant problems. Others clearly made assumptions and then proposed that Lightning will fulfill those assumptions.
reply
Follow the money
reply
Interesting
reply
Nice write up!
reply
"It might feel as if the promised future is perpetually out of reach, but building Lightning is a lot like climbing a mountain. Climbers never really see the summit until they’re standing on top of it. They often can’t even see over the next ridge. Planning the ascent is important, but most of the time you’re simply concentrating on the next foothold. But the steps add up. Just like the view from the top is the reward for all that effort, a brighter monetary future will be our reward for building the network bit by bit. That’s how Lightning has progressed from an idea to a functioning bitcoin payment network, and it’s how we’ll reach our destination."
Beautiful but real analogy my friend. Thank you for your illuminating creation with this post.
reply
🙏❤️
reply
Hi @roy. Someone told me here about Breez. First it looked nice to me, then I tried to receive some Sats from here into my Breez wallet, just to test it. I wanted to send 3000 sats and the fee is 2926 sats... So, if I do this operation, I will spend of fee almost the entire amount... 🙈
I am trying to understand what is this LN technology good for...?! It looks like a big nonsense! I've even dreamed we'll have one day mass adoption of Bitcoin and Sats, but that day is to far away from me, at least... 🤔 🤕
However, happy developing and I hope one day fees will be normal. Success and all the best!
reply
Love your style of writing articles @roy, with many parabolas, metaphors and other allegories to non-bitcoin stuff
reply
Thank you for this post. Doesnt projects like Calle's ecash project help with the asynchromous experience at least as a user with a node online can send an ecash to another in a DM, and they can then redeem it later ? Say 2 users with blixt wallet, both with channels open to a lightning node with a mint. If blixt had the ability to redeem ecash for sats from the mint ( automatically even ) that could work pretty well to help users kindof experience seamless asynch payments.
Seems like , to take the idea further, a messenger app that had its own embedded node in it would be super powerful in this vein. A nostr client + say a blixt embedded node + ecash operability could be really cool.
Thanks again for the post 🤙very approachable for a low tech pleb
reply
Slightly off Topic
reply
I have often thought how can we make cash better. That bearer instrument that just is or is not. Could there be a round robin where it's validated as real and then the spend happens in real time by validation. A third layer?
I've also thought that maybe price discovery will change a lot of things. 21 sats in scarcity might settle a days wage if it later is 21,000 mSats for lodging, food, savings and entertainment.
Once deflation is factored into the 2.2 quintillion of mSats I think it's bearer instruments and settle when you don't trust it. Welcome back to the beginning.
Or is there a way that the number changes once it is settled and then it's a different spend?
reply