ZmnSCPxj [ARCHIVE] on Nostr: 📅 Original date posted:2022-08-26 📝 Original message: Good morning Rene, > Dear ...
📅 Original date posted:2022-08-26
📝 Original message:
Good morning Rene,
> Dear fellow Lightning Developers,
>
> I was recently on an event where the visitors have been gifted 10k sats on a custodial wallet. They could spend those sats via some web interface and an NFC card. During the event I was contacted by several plebs who were confused about one particular thing:
> It was impossible for them to withdraw the full amount from the service.
>
> Pasting an invoice for 10k sats would not work as the custodial service required a fee budget of 1%. However if people submitted an invoice for 9900 sats the remaining 100 sats were usually not fully required for the fees. Thus the users may have had a leftover of for example 67 sats. Now the problem repeated on the residual amount. While some services seem to have a drain feature for such a situation I find this frustrating and was wondering if we could help directly on a protocol level.
>
> Here is my proposal for a simple solution to this specific problem: `option_recipient_pays_routing_fees`
>
> This would be a new flag in invoices signaling that the recipient is willing to pay for the routing fees by releasing the preimage even if the full amount has not been arrived in htlcs at the recipient.
>
> So the workflow would be the following:
>
> 1. Alice creates an invoice for 10k sats setting the `option_recipient_pays_routing_fees` flag in the invoice and passes it either to custodial user Bob or to her own custodial account.
> 2. The payer parses the invoice and searches for a payment path or payment flow to Alice.
> 3. Because `option_recipient_pays_routing_fee` is set, the onion is not constructed in a way that the final HTLC will be for the amount of 10k sats but rather in a way that the first htlc will be for 10k sats and the following HTLCs will be of decreasing value so that routing nodes are compensated properly.
> 4. When the HTLC(s) arrive at Alice she will release the preimage if and only if not too many sats (e.g. 1% of the amount) are missing. Of course it would be good if the 1% was not hard coded in the protocol / software but configurable by Alice at the time of invoice creation.
>
> I think the main issue with this proposal is that instead of confusing users who wish to drain an account we may now have to educate users about two different invoice types. On the other hand I think this can probably easily be achieved via the current wide spread user interfaces. Of course it may be nice to have folks from the Bitcoin Design community to join this specific part of the discussion.
In theory, trampoline routes / whatever-the-cool-name-is-now should fix this problem as well.
I am referring to that scheme where the invoice contains an onion and a "trampoline" node that is the only node that can decrypt the first layer of the onion.
The sender then has to route to the trampoline node, and the trampoline node then receives the rest of the onion.
In this scheme, the receiver provides an encrypted route from some node to itself.
As the receiver provides the route in order to gain privacy from the sender, the onus is on the receiver to deduct the fees from its received funds.
i.e. the sender is only responsible for paying for fees up to the entry point of the trampoline.
Thus, such a drain requirement simply means that the custodial service has to give its node ID.
Then the receiver finds a route from the custodial service to itself, and encodes that in the trampoline onion, with a direct neighbor of the custodial service node as the trampoline.
The custodial service then does not care about any fees as the receiver decided the route; the receiver knows exactly how much to expect (since it calculated the route).
Of course, it is also possible as you propose, but any level-1-selfish custodial service will then always keep the remaining fee budget and always ensure that the receiver gets 99% of the value (or 100% - whatever_setting_they_chose), paying fees, and keeping the remaining 1% for itself.
The receiver in this case cannot audit the route anyway, and thus cannot determine how much the true fees are; whereas in the trampoline case the route is specifically selected by the receiver.
Regards,
ZmnSCPxj
Published at
2023-06-09 13:06:43Event JSON
{
"id": "e2fa58680846decedc485defa578410e4adad2ed633c4960e129b0ce00ceaffd",
"pubkey": "4505072744a9d3e490af9262bfe38e6ee5338a77177b565b6b37730b63a7b861",
"created_at": 1686316003,
"kind": 1,
"tags": [
[
"e",
"6a5589f16920b8050a7e35ab8671473050911a7e03b9f3eb8c97a8055ee89443",
"",
"root"
],
[
"e",
"7a98ad606fda266ac28a510398df80316f97f6b7b62e42a215c5c832069eb4ae",
"",
"reply"
],
[
"p",
"17ccd89be295c0ae65f1cd3740a9dad84ec8b6d7050712a7f04ae5284b2fab99"
]
],
"content": "📅 Original date posted:2022-08-26\n📝 Original message:\nGood morning Rene,\n\n\u003e Dear fellow Lightning Developers,\n\u003e \n\u003e I was recently on an event where the visitors have been gifted 10k sats on a custodial wallet. They could spend those sats via some web interface and an NFC card. During the event I was contacted by several plebs who were confused about one particular thing:\n\u003e It was impossible for them to withdraw the full amount from the service.\n\u003e \n\u003e Pasting an invoice for 10k sats would not work as the custodial service required a fee budget of 1%. However if people submitted an invoice for 9900 sats the remaining 100 sats were usually not fully required for the fees. Thus the users may have had a leftover of for example 67 sats. Now the problem repeated on the residual amount. While some services seem to have a drain feature for such a situation I find this frustrating and was wondering if we could help directly on a protocol level.\n\u003e \n\u003e Here is my proposal for a simple solution to this specific problem: `option_recipient_pays_routing_fees`\n\u003e \n\u003e This would be a new flag in invoices signaling that the recipient is willing to pay for the routing fees by releasing the preimage even if the full amount has not been arrived in htlcs at the recipient.\n\u003e \n\u003e So the workflow would be the following:\n\u003e \n\u003e 1. Alice creates an invoice for 10k sats setting the `option_recipient_pays_routing_fees` flag in the invoice and passes it either to custodial user Bob or to her own custodial account.\n\u003e 2. The payer parses the invoice and searches for a payment path or payment flow to Alice.\n\u003e 3. Because `option_recipient_pays_routing_fee` is set, the onion is not constructed in a way that the final HTLC will be for the amount of 10k sats but rather in a way that the first htlc will be for 10k sats and the following HTLCs will be of decreasing value so that routing nodes are compensated properly.\n\u003e 4. When the HTLC(s) arrive at Alice she will release the preimage if and only if not too many sats (e.g. 1% of the amount) are missing. Of course it would be good if the 1% was not hard coded in the protocol / software but configurable by Alice at the time of invoice creation.\n\u003e \n\u003e I think the main issue with this proposal is that instead of confusing users who wish to drain an account we may now have to educate users about two different invoice types. On the other hand I think this can probably easily be achieved via the current wide spread user interfaces. Of course it may be nice to have folks from the Bitcoin Design community to join this specific part of the discussion.\n\nIn theory, trampoline routes / whatever-the-cool-name-is-now should fix this problem as well.\nI am referring to that scheme where the invoice contains an onion and a \"trampoline\" node that is the only node that can decrypt the first layer of the onion.\nThe sender then has to route to the trampoline node, and the trampoline node then receives the rest of the onion.\n\nIn this scheme, the receiver provides an encrypted route from some node to itself.\nAs the receiver provides the route in order to gain privacy from the sender, the onus is on the receiver to deduct the fees from its received funds.\ni.e. the sender is only responsible for paying for fees up to the entry point of the trampoline.\n\nThus, such a drain requirement simply means that the custodial service has to give its node ID.\nThen the receiver finds a route from the custodial service to itself, and encodes that in the trampoline onion, with a direct neighbor of the custodial service node as the trampoline.\nThe custodial service then does not care about any fees as the receiver decided the route; the receiver knows exactly how much to expect (since it calculated the route).\n\n\nOf course, it is also possible as you propose, but any level-1-selfish custodial service will then always keep the remaining fee budget and always ensure that the receiver gets 99% of the value (or 100% - whatever_setting_they_chose), paying fees, and keeping the remaining 1% for itself.\nThe receiver in this case cannot audit the route anyway, and thus cannot determine how much the true fees are; whereas in the trampoline case the route is specifically selected by the receiver.\n\nRegards,\nZmnSCPxj",
"sig": "cce3260f1f027c877968318144766e3efef8c651125f8f7de2bc36ee07ffdb4bbff4957bef282454803ced3f12089d80d5983560da56e672c6dda177ab8d644b"
}