David A. Harding [ARCHIVE] on Nostr: š
Original date posted:2023-06-19 šļø Summary of this message: Thomas Voegtlin ...
š
Original date posted:2023-06-19
šļø Summary of this message: Thomas Voegtlin explains the semantics of bundled payments, which involves a BOLT-11 invoice containing two preimages and two amounts.
š Original message:
On 2023-06-12 22:10, Thomas Voegtlin wrote:
> The semantics of bundled payments is as follows:
> - 1. the BOLT-11 invoice contains two preimages and two amounts:
> prepayment and main payment.
> - 2. the receiver should wait until all the HTLCs of both payments
> have arrived, before they fulfill the HTLCs of the pre-payment. If the
> main payment does not arrive, they should fail the pre-payment with a
> MPP timeout.
> - 3. once the HTLCs of both payments have arrived, the receiver
> fulfills the HTLCs of the prepayment, and they broadcast their
> on-chain transaction. Note that the main payment can still fail if the
> sender never reveal the preimage of the main payment.
Hi Thomas,
Do you actually require a BOLT11 invoice to contain a payment hash for
the prepayment, or would it be acceptable for the prepayment to use a
keysend payment with the onion message payload for the receiver
indicating what payment hash to associate with the prepayment (e.g.,
Alice wants to receive 1 BTC to hash 0123...cdef with a prepayment of
10k sats, so the 10k sats is sent via keysend with metadata indicating
the receiver shouldn't claim it until they receive the 1 BTC HTLC to
0123...cdef).
If so, I think then you'd only need BOLT11 invoices to be extended with
an extra_fee_via_keysend field. That would be significantly smaller and
it also allows encoding the extra_fee_via_keysend field in an existing
BOLT11 field like (d) description or the relatively new (m) metadata
field, which may allow immediate implementation until an updated version
of BOLT11 (or an alternative using offers) becomes widely deployed.
Thanks,
-Dave
Published at
2023-06-20 11:15:34Event JSON
{
"id": "a52056be626bb725dae41688f341eccde4e9f5b98f1480eee4c096e248db653a",
"pubkey": "d3574a24208f4e3d0821bb4a69a0c3ae842043d444fa5c4a8c49c369918a6fb2",
"created_at": 1687259734,
"kind": 1,
"tags": [
[
"e",
"043a2b35dbcb1356289d59114e00fee40fb32cc69bf8e3d2ab2d8da4ebc027ca",
"",
"root"
],
[
"e",
"4d83b3376e5920c8a433f6b582a2b6e35e6171530eb3be1a69a6ef34293d045a",
"",
"reply"
],
[
"p",
"f26569a10f83f6935797b8b53a87974fdcc1de6abd31e3b1a3a19bdaed8031cb"
]
],
"content": "š
Original date posted:2023-06-19\nšļø Summary of this message: Thomas Voegtlin explains the semantics of bundled payments, which involves a BOLT-11 invoice containing two preimages and two amounts.\nš Original message:\nOn 2023-06-12 22:10, Thomas Voegtlin wrote:\n\u003e The semantics of bundled payments is as follows:\n\u003e - 1. the BOLT-11 invoice contains two preimages and two amounts:\n\u003e prepayment and main payment.\n\u003e - 2. the receiver should wait until all the HTLCs of both payments\n\u003e have arrived, before they fulfill the HTLCs of the pre-payment. If the\n\u003e main payment does not arrive, they should fail the pre-payment with a\n\u003e MPP timeout.\n\u003e - 3. once the HTLCs of both payments have arrived, the receiver\n\u003e fulfills the HTLCs of the prepayment, and they broadcast their\n\u003e on-chain transaction. Note that the main payment can still fail if the\n\u003e sender never reveal the preimage of the main payment.\n\nHi Thomas,\n\nDo you actually require a BOLT11 invoice to contain a payment hash for\nthe prepayment, or would it be acceptable for the prepayment to use a\nkeysend payment with the onion message payload for the receiver\nindicating what payment hash to associate with the prepayment (e.g.,\nAlice wants to receive 1 BTC to hash 0123...cdef with a prepayment of\n10k sats, so the 10k sats is sent via keysend with metadata indicating\nthe receiver shouldn't claim it until they receive the 1 BTC HTLC to\n0123...cdef).\n\nIf so, I think then you'd only need BOLT11 invoices to be extended with\nan extra_fee_via_keysend field. That would be significantly smaller and\nit also allows encoding the extra_fee_via_keysend field in an existing\nBOLT11 field like (d) description or the relatively new (m) metadata\nfield, which may allow immediate implementation until an updated version\nof BOLT11 (or an alternative using offers) becomes widely deployed.\n\nThanks,\n\n-Dave",
"sig": "e56b22f0e0e372612f3b24e09dde316d61ba86c67c7bde6e2666cdd400ab3fff81549bc0ddb740114712ebd0c7d7366977b7cc9af3a5f2707e8f333968ab390f"
}