<oembed><type>rich</type><version>1.0</version><author_name>npub1zlxd3xlzjhq2ue03e5m5p2w6mp8v3dkhq5r39flsftjjsje04wvsdd2k4w</author_name><author_url>https://nostr.ae/npub1zlxd3xlzjhq2ue03e5m5p2w6mp8v3dkhq5r39flsftjjsje04wvsdd2k4w</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2022-08-25&#xA;📝 Original message:&#xA;Dear fellow Lightning Developers,&#xA;&#xA;I was recently on an event where the visitors have been gifted 10k sats on&#xA;a custodial wallet. They could spend those sats via some web interface and&#xA;an NFC card. During the event I was contacted by several plebs who were&#xA;confused about one particular thing:&#xA;&#xA;It was impossible for them to withdraw the full amount from the service.&#xA;&#xA;Pasting an invoice for 10k sats would not work as the custodial service&#xA;required a fee budget of 1%. However if people submitted an invoice for&#xA;9900 sats the remaining 100 sats were usually not fully required for the&#xA;fees. Thus the users may have had a leftover of for example 67 sats. Now&#xA;the problem repeated on the residual amount. While some services seem to&#xA;have a drain feature for such a situation I find this frustrating and was&#xA;wondering if we could help directly on a protocol level.&#xA;&#xA;Here is my proposal for a simple solution to this specific problem:&#xA;`option_recipient_pays_routing_fees`&#xA;&#xA;This would be a new flag in invoices signaling that the recipient is&#xA;willing to pay for the routing fees by releasing the preimage even if the&#xA;full amount has not been arrived in htlcs at the recipient.&#xA;&#xA;So the workflow would be the following:&#xA;&#xA;1. Alice creates an invoice for 10k sats setting the&#xA;`option_recipient_pays_routing_fees` flag in the invoice and passes it&#xA;either to custodial user Bob or to her own custodial account.&#xA;2. The payer parses the invoice and searches for a payment path or payment&#xA;flow to Alice.&#xA;3. Because `option_recipient_pays_routing_fee` is set, the onion is not&#xA;constructed in a way that the final HTLC will be for the amount of 10k sats&#xA;but rather in a way that the first htlc will be for 10k sats and the&#xA;following HTLCs will be of decreasing value so that routing nodes are&#xA;compensated properly.&#xA;4. When the HTLC(s) arrive at Alice she will release the preimage if and&#xA;only if not too many sats (e.g. 1% of the amount) are missing. Of course it&#xA;would be good if the 1% was not hard coded in the protocol / software but&#xA;configurable by Alice at the time of invoice creation.&#xA;&#xA;I think the main issue with this proposal is that instead of confusing&#xA;users who wish to drain an account we may now have to educate users about&#xA;two different invoice types. On the other hand I think this can probably&#xA;easily be achieved via the current wide spread user interfaces. Of course&#xA;it may be nice to have folks from the Bitcoin Design community to join this&#xA;specific part of the discussion.&#xA;&#xA;With kind regards Rene Pickhardt&#xA;-- &#xA;https://www.rene-pickhardt.de&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20220825/400b3ecc/attachment.html&gt;</html></oembed>