<oembed><type>rich</type><version>1.0</version><author_name>npub1zw7cc8z78v6s3grujfvcv3ckpvg6kr0w7nz9yzvwyglyg0qu5sjsqhkhpx</author_name><author_url>https://nostr.ae/npub1zw7cc8z78v6s3grujfvcv3ckpvg6kr0w7nz9yzvwyglyg0qu5sjsqhkhpx</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2018-11-01&#xA;📝 Original message:&#xA;Hi all,&#xA;&#xA;        There&#39;s been some discussion of what the lightning payment flow&#xA;might look like in the future, and I thought I&#39;d try to look forwards so&#xA;we can avoid painting ourselves into a corner now.  I haven&#39;t spent time&#xA;on concrete design and implementation to be sure this is correct,&#xA;however.&#xA;&#xA;Current Status&#xA;--------------&#xA;Currently, one invoice can be paid 0 or 1 times.  There is no safe&#xA;invoice reuse.  The payer can prove the node offered the invoice (it is&#xA;signed), and that someone paid the invoice, but not that they&#xA;specifically did: the lightning nodes along the path and the merchant&#xA;themselves also have the preimage.  This implies that the invoice itself&#xA;should have enough information to make that link, eg. with a description&#xA;of &#34;1 T-shirt to Rusty in Australia&#34;, otherwise the payer can say &#34;here,&#xA;I paid for 1 T-shirt&#34; and the merchant says &#34;no, that invoice was for a&#xA;T-shirt we shipped to Austria&#34;.&#xA;&#xA;Desired Status&#xA;--------------&#xA;Ideally, you could create one invoice which could be paid arbitrary many&#xA;times, by different individuals.  eg. &#34;My donation invoice is on my web&#xA;page&#34;, or &#34;I&#39;ve printed out the invoice for a widget and stuck it to the&#xA;widget&#34;, or &#34;Pay this invoice once a month please&#34;.&#xA;&#xA;Also, you should be able to prove you&#39;ve paid, in a way I can&#39;t just&#xA;copy the proof and claim I paid, too, even if I&#39;m the merchant, and that&#xA;you agreed to my terms, eg. &#34;I&#39;m paying for 500 widgets to be shipped to&#xA;Rusty in Australia&#34;.&#xA;&#xA;Required Magic&#xA;--------------&#xA;It seems that scriptless scripts will allow this: an HTLC signature&#xA;would commit to the invoice/&#34;payment_hash&#34; as well as &#34;something I sent&#xA;to you in the payment onion&#34;.  That &#34;something&#34; has to be well-defined&#xA;in the protocol, of course, since the merchant will have to parse it and&#xA;understand the conditions it presents before accepting the payment.  I&#xA;have an idea that we could merkelize the information to allow you to&#xA;partially reveal it if you wanted to.&#xA;&#xA;This also enables full AMP (I think), where you receive the payment&#xA;proof despite using AMP.  I call this &#34;High AMP&#34; vs the current proposal&#xA;(&#34;Low AMP&#34;) which trusts the merchant to deliver.&#xA;&#xA;This is a subtle change in semantics: currently the lightning layer only&#xA;provides assistance metadata (eg. routing), and the entire protocol can&#xA;be played out onchain.  This is no longer true: the onchain data is not&#xA;sufficient for you to accept a payment.  However, this was practically&#xA;untrue anyway.&#xA;&#xA;Lesser Magic&#xA;------------&#xA;It&#39;s possible to do spontaneous donations *without* proof of payment&#xA;today (I simply give you the preimage in the onion).  Low-AMP relies on a&#xA;similar trick.&#xA;&#xA;It&#39;s even possible to do recurring payments, if each preimage you get is&#xA;the payment_hash for the next payment.&#xA;&#xA;None of this is supported in the 1.0 protocol, but I&#39;m sure we&#39;ll have&#xA;vigorous debate over how much of this gets into 1.1 at the Summit next&#xA;week.&#xA;&#xA;Cheers,&#xA;Rusty.</html></oembed>