Would you like a Lightning channel with that?
A common UX problem when starting out with Lightning is that at first the user doesn’t have any channels at all, or at least not the one with a sufficient path to the merchant the user wants to shop from.
Opening a Lightning channel just to make a single payment can be prohibitively time consuming at that point since it typically requires 3 to 6 on-chain confirmations while the customer may want their Steam voucher to be delivered right away. The user may of course opt for just a regular Bitcoin payment but in that case the channel opening will be postponed and will require yet another on-chain transaction.
A key intuition to solve this issue are the following two facts:
- A Lightning payment request allows for embedding of a fallback Bitcoin address which may be used by a customer in cases when fulfilling a request off-chain is not possible.
- A Bitcoin transaction typically has a change output which gets sent back into customer’s wallet but can be repurposed for, say, opening a payment channel.
So our solution works as follows: when a user who has no payment channels scans a Lightning invoice she will be offered to fulfil it using a legacy Bitcoin payment to the fallback address, and at the same time to open a new payment channel using a change output, all within one single on-chain transaction.
This approach has a number of advantages and takes us one step closer to the goal of having a single QR code for all Bitcoin payments, which seamlessly handles both on- and off-chain cases and Just Works™:
- Scanning a Lightning QR code will in most cases enable a customer to fulfill it, even if she doesn’t yet have an open payment channel.
- Customer gets a Lightning channel opened at no extra cost.
- Overall privacy is slightly improved as what would have been a change output now becomes a Lightning channel. Change outputs are frequently used to link addresses together through so-called “blockchain analysis”.
- Merchants may process a 0-confirmed Bitcoin transaction immediately or however they usually handle Bitcoin transactions.
Transaction has been sent. Click here to see the example transaction on chain.
We will evaluate this feature in the wild and welcome cooperation from other wallets and merchants. There are even more technically elegant ways of doing this that would require upgrades to the Lightning protocol, and we hope that after evaluating this for some time we can settle on a standard in terms of both protocol and UX.