<oembed><type>rich</type><version>1.0</version><author_name>npub1wtx5qvewc7pd6znlvwktq03mdld05mv3h5dkzfwd3dc30gdmsptsugtuyn</author_name><author_url>https://nostr.ae/npub1wtx5qvewc7pd6znlvwktq03mdld05mv3h5dkzfwd3dc30gdmsptsugtuyn</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2021-12-16&#xA;📝 Original message:&#xA;This is quite a common request, and we&#39;ve used a solution I like to call&#xA;the &#34;Poor man&#39;s rendez-vous&#34;. It basically routes a payment through all&#xA;the parties that are to be paid, with the last one accepting the payment&#xA;for all participants.&#xA;&#xA;The payment is atomic, once the circuit is set up no participant can&#xA;cheat the others and it&#39;s seamless from the payer&#39;s perspective.&#xA;&#xA;Let&#39;s say user `A` wants to pay `B` and `C` atomically. `B` gets 10ksat&#xA;and `C` gets 90ksat out of a total of 100ksat:&#xA;&#xA; 1) `C` creates an invoice with payment hash `H` for 90ksat and sends it&#xA;    to `B`&#xA; 2) `B` creates an invoice with payment hash `H` (same as the first&#xA;    invoice, but `B` doesn&#39;t know the preimage) for 100ksat (maybe plus&#xA;    a tiny bit for routing fees between `B` and `C`).&#xA; 3) `A` receives an invoice which appears to be from `B` for the&#xA;    expected total of 100ksat.&#xA; 4) `A` proceeds to pay the invoice to `B` like normal&#xA; 5) `B` receives the incoming payment, but doesn&#39;t have the preimage for&#xA;    `H`, so they must forward to `C` if they want to receive their&#xA;    share. `B` then proceeds to pay the 90ksat invoice from `C`, which&#xA;    reveals the preimage to them, and they can turn around and claim&#xA;    the incoming `100ksat` (covering both `B` and `C` share)&#xA;&#xA;It&#39;s a poor man&#39;s version because it requires creating two invoices and&#xA;`B` sees two payments (100ksat incoming, 90ksat outgoing), but the&#xA;overall outcome is the desired one: either both parties get paid or&#xA;noone gets paid. This can trivially be extended to any number of parties&#xA;(with reduced success probability), and will remain atomic. It also&#xA;doesn&#39;t require any changes on the sender side, and only minimal setup&#xA;between the payees. The crux here is that we somehow need to ensure `H`&#xA;is always the same along the entire chain of payments, but with a good&#xA;coordination protocol that should be feasible.&#xA;&#xA;Regards,&#xA;Christian&#xA;&#xA;Ronan McGovern &lt;Ronan at trelis.com&gt; writes:&#xA;&gt; Hi folks, I&#39;m Ronan - based in Dublin and building Trelis.com (simple&#xA;&gt; payment links to accept Lightning).&#xA;&gt;&#xA;&gt; I&#39;m wondering if there is a way to create an invoice that splits the&#xA;&gt; payment to two lightning addresses?&#xA;&gt;&#xA;&gt; If not, what would be required to develop this?&#xA;&gt; * A protocol change?&#xA;&gt; * Could it be built with the current protocol (I see an app on LN Bits to&#xA;&gt; split but it doesn&#39;t seem to work).&#xA;&gt;&#xA;&gt; Many thanks, Ronan&#xA;&gt;&#xA;&gt; Ronan McGovern&#xA;&gt; www.Trelis.com&#xA;&gt; _______________________________________________&#xA;&gt; Lightning-dev mailing list&#xA;&gt; Lightning-dev at lists.linuxfoundation.org&#xA;&gt; https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev</html></oembed>