lightning-dev

Proposal: Bundled payments

Proposal: Bundled payments

Original Postby Steve Lee

Posted on: June 20, 2023 17:16 UTC

In a recent Lightning-dev mailing list thread, Thomas Voegtlin proposed an extension to BOLT-11, the Lightning Network protocol.

The proposed extension would enable invoices to contain two bundled payments with distinct preimages and amounts. This feature aims to facilitate services that require the prepayment of a mining fee, such as submarine swaps and JIT (Just-In-Time) channels. Thomas believes that adding this feature to BOLT-11 would not require significant changes and could be implemented relatively quickly. He suggests that it would be more practical to include this new feature in BOLT-12, which is currently being developed and supported by various implementations.Bastien TEINTURIER responded to Thomas's proposal, emphasizing the importance of considering the impact on senders and the need for backward compatibility. Bastien suggests that extending BOLT-12 makes more sense since it requires new sender code anyway. He outlines three strategies for providing JIT liquidity, two of which are already deployed on the network and do not require the sender to be aware of JIT liquidity. However, Thomas's proposal introduces a third strategy that requires the sender to pre-pay the fee before opening a channel.Matt Corallo expresses skepticism about introducing new changes to BOLT-11, noting the difficulty of getting broad support for even small changes. He questions the need for this feature when splice-out already exists and suggests that any "standard" way of doing swaps should be built on OMs (Opaque Messages) for increased privacy.Thomas responds to Matt's concerns, emphasizing the minimalistic nature of the proposed change and its potential benefits for service providers. He believes that Lightning Labs and ACINQ have incentives to support this proposal, as it would enable them to offer new services and comply with upcoming regulations. Thomas also mentions the possibility of implementing this feature in LDK and confirms Electrum's support for it.Thomas explains that bundled payments in the same BOLT-11 invoice would require the receiver to wait for both payments' HTLCs (Hash Time-Locked Contracts) to arrive before fulfilling the prepayment. Once both payments are received, the receiver can fulfill the prepayment's HTLCs and broadcast their on-chain transaction.Thomas acknowledges that this proposal does not prevent service providers from stealing the prepayment but argues that the risk already exists. He believes that implementing this feature would level the playing field among Lightning service providers, making it more accessible to a wider range of users and allowing for non-custodian services.In summary, Thomas Voegtlin proposed an extension to BOLT-11 that would enable invoices to contain two bundled payments with distinct preimages and amounts. This feature aims to facilitate services requiring prepayment of mining fees, such as submarine swaps and JIT channels. The proposal has generated discussions about backward compatibility, implementation strategies, and the potential benefits for service providers.The discussion took place on the Lightning-dev mailing list hosted by the Linux Foundation. ThomasV received initial feedback suggesting the use of BOLT-12 or OM, but he remained firm in his belief that simplicity should be prioritized. Contact information for Electrum Technologies GmbH, where Thomas Voegtlin serves as the Geschäftsführer (Managing Director), was provided in the email signature.