<oembed><type>rich</type><version>1.0</version><title>Nadav Kohen [ARCHIVE] wrote</title><author_name>Nadav Kohen [ARCHIVE] (npub1ge…rtua0)</author_name><author_url>https://yabu.me/npub1geqdlge6ysz9qlq3w758422flnkgqklpu9veu80ehjprcd04ugyqkrtua0</author_url><provider_name>njump</provider_name><provider_url>https://yabu.me</provider_url><html>📅 Original date posted:2019-10-10&#xA;📝 Original message:&#xA;Hi list and ZmnSCPxj,&#xA;&#xA;Glad this has been helpful and I&#39;m not just stating obvious things :)&#xA;always hard to tell once the idea has been had.&#xA;&#xA;&gt;  I think, it is possible to make, a miniscript-like language for such&#xA;things.&#xA;&gt;  Indeed, the only material difference, between SCRIPT-based&#xA;`OP_CHECKSIG`s and Lightning, would be the requirement to reveal scalars&#xA;rather than prove your knowledge of them.&#xA;&#xA;Totally agree, and furthermore, another idea I had is that if we want to&#xA;adjust any of this to a scheme where you reveal proof of knowledge rather&#xA;than the scalars themselves, then rather than just a point, the parties can&#xA;agree on a point, a nonce point, and a message and then essentially use&#xA;pay-for-signature to have Schnorr signatures revealed rather than the&#xA;scalars themselves. This scheme even lets participants use partial&#xA;signatures that they can add (though there is potentially some nonce&#xA;nastiness involved). It certainly would add complexity but is an option&#xA;should it ever be useful. I think. Another thought is that maybe users can&#xA;have one key be static (like the node id?) and have the nonce be the&#xA;&#34;Payment Point&#34; in my scheme so that the signature is proof that this set&#xA;of node ids has collective access to the nonce point?&#xA;&#xA;I really like the Premium-free American Call Option mitigation you&#39;ve&#xA;described here! I totally agree that it is probably best to move to&#xA;computational security rather than rational security. I hadn&#39;t thought&#xA;about how well High AMP inter-operates with the AND/OR scheme to make&#xA;things like barrier escrows :) I wonder if there is some nice&#xA;generalization of this kind of setup so that being a Barrier Escrow as a&#xA;Service can be another way to make money by participating in the Lightning&#xA;ecosystem. Maybe this modified High AMP is all there is to it and all we&#xA;need is some standard communication interface for these Barrier Escrows?&#xA;&#xA;Best,&#xA;Nadav&#xA;&#xA;On Thu, Oct 10, 2019 at 10:15 AM ZmnSCPxj &lt;ZmnSCPxj at protonmail.com&gt; wrote:&#xA;&#xA;&gt; Good morning list, and Nadav,&#xA;&gt;&#xA;&gt;&#xA;&gt; &gt;     I would also like to point out the below assumption, which underlies&#xA;&gt; Bass Amplifier (&#34;multipath payments&#34;, &#34;base AMP&#34;) and its claim to&#xA;&gt; atomicity:&#xA;&gt; &gt;&#xA;&gt; &gt; -   If we agree that my secret `s` is worth `m` millisatoshi, then I (as&#xA;&gt; a perfectly rational economic agent) will not claim any payments&#xA;&gt; conditional on my revelation of `s` that sum up to less than `m`&#xA;&gt; millisatoshi: I will only claim all of them when I can get multiple&#xA;&gt; payments conditional on my revelation of `s` that sum up to `m`&#xA;&gt; millisatoshi or more.&#xA;&gt; &gt;     -   I now call this &#34;economically-rational atomicity&#34;, and describe&#xA;&gt; also them mildly here:&#xA;&gt; https://lists.linuxfoundation.org/pipermail/lightning-dev/2018-March/001109.html&#xA;&gt; &gt;&#xA;&gt; &gt;         The above is exactly the behavior we want E to perform: only if&#xA;&gt; it receives both requests to reveal its secret `e` behind `E`, will it&#xA;&gt; actually reveal the secret.&#xA;&gt; &gt;         In our case, we turn the requests to E into partial payments of&#xA;&gt; a single invoice (though of course, the payment from S to E would be in the&#xA;&gt; asset that S wants rather than in Bitcoin).&#xA;&gt; &gt;         E would not like to &#34;sell short&#34; its secret `e` for less than&#xA;&gt; the price of its service, thus if E is economically rational, it would only&#xA;&gt; claim payments (and reveal `e`) once all incoming payments sum up to the&#xA;&gt; price of its service.&#xA;&gt;&#xA;&gt; Right right, except an economically-rational actor will also accept a&#xA;&gt; *single* payment that exceeds the price `m` miilisatoshi.&#xA;&gt; Meaning anyone can then subvert the behavior of the barrier escrow E.&#xA;&gt; For example, as soon as the exchange X is able to get the incoming premium&#xA;&gt; payment conditional on release of the secret behind `X + E`, the exchange&#xA;&gt; can simply directly send the entire payment asked by the escrow E for the&#xA;&gt; secret behind `e` and claim the premium without actually performing the&#xA;&gt; swap and forwarding to `S`.&#xA;&gt;&#xA;&gt; Fortunately,&#xA;&gt; https://lists.linuxfoundation.org/pipermail/lightning-dev/2018-March/001109.html&#xA;&gt; also notes that it is possible to upgrade the High AMP with&#xA;&gt; economically-rational security to a High AMP with&#xA;&gt; computationally-intractable security.&#xA;&gt; The sketch given in that link is different, but we can use a conversion&#xA;&gt; that utilizes points and scalars in much the same way as Nadav suggests as&#xA;&gt; part of the framework.&#xA;&gt;&#xA;&gt; That is, we can create a High AMP with the following rules for the&#xA;&gt; receiver:&#xA;&gt;&#xA;&gt; * If the receiver knows a secret `e` behind a point `E`, payment is&#xA;&gt; demanded in exchange for the secret `e + z` behind a point `E + Z` instead.&#xA;&gt;   * The receiver is informed what `E` is being talked about, in some TLV&#xA;&gt; to the receiver, as well as the point `Z`.&#xA;&gt; * Every branch of the multipath also includes, in some TLV, a secret&#xA;&gt; `z[i]`.&#xA;&gt;   * `sum[i=1..n](z[i]) == z`, i.e. the sum of all the branch secrets is&#xA;&gt; the secret `z` behind the point `Z`.&#xA;&gt; * Thus, only once the receiver acquires all branches as incoming payments,&#xA;&gt; will it be able to reconstruct the secret `z` and thereby claim its payment&#xA;&gt; (and incidentally reveal `e + z`; if the ultimate payer then knows `z` it&#xA;&gt; is able to acquire `e` as proof-of-payment).&#xA;&gt;&#xA;&gt; So let us reconsider the protocol:&#xA;&gt;&#xA;&gt; * B, S, and X generate additional keypairs `b2, B2`, `s2, S2`, and `x2,&#xA;&gt; X2` respectively and give the public keys to buyer B.&#xA;&gt; * B generates `Z` from `B2 + S2 + X2`.&#xA;&gt; * B sends the premium payment to X, in exchange for revelation of the&#xA;&gt; secret behind `X + E + Z`.&#xA;&gt; * X sends the request to the barrier escrow E to reveal the secret behind&#xA;&gt; `E + Z`, also providing its share of the secret behind `Z`, `x2`.&#xA;&gt; * B sends the payment to be swapped to the other asset to X, in exchange&#xA;&gt; for revelation of the secret behind `S + E + Z`.&#xA;&gt; * X swaps the asset and forwards to S, in exchange for the revelation of&#xA;&gt; the secret behind `S + E + Z`.&#xA;&gt; * S sends the request to the barrier escrow E to reveal the secret behind&#xA;&gt; `E + Z`, also providing its share of the secret behind `Z`, `s2`.&#xA;&gt; * B sends the request to the barrier escrow E to reveal the secret behind&#xA;&gt; `E + Z`, also providing its share of the secret behind `Z`, `b2`.&#xA;&gt; * E reconstructs `z` from `b2 + s2 + x2`, then reveals `e + z` to claim&#xA;&gt; all the escrow service sub-payments.&#xA;&gt; * X learns `e + z` and is able to reveal `x + e + z` to claim the premium.&#xA;&gt; * S learns `e + z` and is able to reveal `s + e + z` to claim the premium.&#xA;&gt; * B learns `e + z`, `x + e + z`, and `s + e + z`, and is able to recover&#xA;&gt; proof-of-payment for the premium as `(x + e + z) - (e + z)`, and&#xA;&gt; proof-of-payment for the actual service or product as `(s + e + z) - (e +&#xA;&gt; z)`.&#xA;&gt;&#xA;&gt; Regards,&#xA;&gt; ZmnSCPxj&#xA;&gt;&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20191010/7b38f17c/attachment.html&gt;</html></oembed>