lightning-dev
Proposal: Bundled payments
Posted on: June 14, 2023 08:09 UTC
The context discusses the possibility of distributing a submarine swap client separate from the lightning wallet, which would enable competition in the space.
Boltz, for example, serves javascript on their website and distributes a Progressive Web App for this purpose. However, it is unclear whether their app performs all the necessary checks correctly. Lightning Loop could benefit from this separation by distributing an app that does not require a local LND instance, thereby expanding its potential user base. The only missing ingredient is the bundling of fee prepayment and main payment in the same invoice.It is worth noting that there is an ongoing standardization effort for LSP protocols, and Boltz is actively working to add submarine swaps to it. In another part of the discussion, Thomas Voegtlin proposes an extension to BOLT-11, where an invoice can contain two bundled payments with distinct preimages and amounts. This proposal addresses the issue faced by services like Boltz, which require the prepayment of a mining fee but cannot show two invoices simultaneously to the user. By bundling the prepayment and main payment in the same invoice, service providers can protect themselves against DoS attacks and comply with non-custodial requirements. However, it is acknowledged that this change does not prevent service providers from stealing the prepayment, but that is already a risk in the current system.Voegtlin believes that implementing this change in BOLT-11, rather than using BOLT-12 or onion messages, would be more practical as it does not require the exchange of new messages. He argues that new messages should only be added when necessary and that non-interactive solutions should be favored.Overall, the proposed extension to BOLT-11 aims to level the playing field among lightning service providers and facilitate the development of fully non-custodial pay-to-open services while complying with regulatory requirements.