{"type":"rich","version":"1.0","author_name":"npub1zlxd3xlzjhq2ue03e5m5p2w6mp8v3dkhq5r39flsftjjsje04wvsdd2k4w","author_url":"https://nostr.ae/npub1zlxd3xlzjhq2ue03e5m5p2w6mp8v3dkhq5r39flsftjjsje04wvsdd2k4w","provider_name":"njump","provider_url":"https://nostr.ae","html":"📅 Original date posted:2022-08-25\n📝 Original message:\nDear fellow Lightning Developers,\n\nI was recently on an event where the visitors have been gifted 10k sats on\na custodial wallet. They could spend those sats via some web interface and\nan NFC card. During the event I was contacted by several plebs who were\nconfused about one particular thing:\n\nIt was impossible for them to withdraw the full amount from the service.\n\nPasting an invoice for 10k sats would not work as the custodial service\nrequired a fee budget of 1%. However if people submitted an invoice for\n9900 sats the remaining 100 sats were usually not fully required for the\nfees. Thus the users may have had a leftover of for example 67 sats. Now\nthe problem repeated on the residual amount. While some services seem to\nhave a drain feature for such a situation I find this frustrating and was\nwondering if we could help directly on a protocol level.\n\nHere is my proposal for a simple solution to this specific problem:\n`option_recipient_pays_routing_fees`\n\nThis would be a new flag in invoices signaling that the recipient is\nwilling to pay for the routing fees by releasing the preimage even if the\nfull amount has not been arrived in htlcs at the recipient.\n\nSo the workflow would be the following:\n\n1. Alice creates an invoice for 10k sats setting the\n`option_recipient_pays_routing_fees` flag in the invoice and passes it\neither to custodial user Bob or to her own custodial account.\n2. The payer parses the invoice and searches for a payment path or payment\nflow to Alice.\n3. Because `option_recipient_pays_routing_fee` is set, the onion is not\nconstructed in a way that the final HTLC will be for the amount of 10k sats\nbut rather in a way that the first htlc will be for 10k sats and the\nfollowing HTLCs will be of decreasing value so that routing nodes are\ncompensated properly.\n4. When the HTLC(s) arrive at Alice she will release the preimage if and\nonly if not too many sats (e.g. 1% of the amount) are missing. Of course it\nwould be good if the 1% was not hard coded in the protocol / software but\nconfigurable by Alice at the time of invoice creation.\n\nI think the main issue with this proposal is that instead of confusing\nusers who wish to drain an account we may now have to educate users about\ntwo different invoice types. On the other hand I think this can probably\neasily be achieved via the current wide spread user interfaces. Of course\nit may be nice to have folks from the Bitcoin Design community to join this\nspecific part of the discussion.\n\nWith kind regards Rene Pickhardt\n-- \nhttps://www.rene-pickhardt.de\n-------------- next part --------------\nAn HTML attachment was scrubbed...\nURL: \u003chttp://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20220825/400b3ecc/attachment.html\u003e"}
