<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <updated>2023-06-09T14:20:31&#43;02:00</updated>
  <generator>https://nostr.ae</generator>

  <title>Nostr notes by Nadav Kohen [ARCHIVE]</title>
  <author>
    <name>Nadav Kohen [ARCHIVE]</name>
  </author>
  <link rel="self" type="application/atom+xml" href="https://nostr.ae/npub1geqdlge6ysz9qlq3w758422flnkgqklpu9veu80ehjprcd04ugyqkrtua0.rss" />
  <link href="https://nostr.ae/npub1geqdlge6ysz9qlq3w758422flnkgqklpu9veu80ehjprcd04ugyqkrtua0" />
  <id>https://nostr.ae/npub1geqdlge6ysz9qlq3w758422flnkgqklpu9veu80ehjprcd04ugyqkrtua0</id>
  <icon></icon>
  <logo></logo>




  <entry>
    <id>https://nostr.ae/nevent1qqsy3nn6peyvd7hkmstf06lnn9xuscsvuy5w5jk0f45rprj470346zgzypryphar8gjqg5ruz9m6s74ff87weqzmu8s4n8salx7gy0p47h3qsskzrru</id>
    
      <title type="html">📅 Original date posted:2021-02-08 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsy3nn6peyvd7hkmstf06lnn9xuscsvuy5w5jk0f45rprj470346zgzypryphar8gjqg5ruz9m6s74ff87weqzmu8s4n8salx7gy0p47h3qsskzrru" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsy2576tk777f0hj24ny4rp6s8quvdjp9ydy7gjzjpm7qq3ewapguq9zvw08&#39;&gt;nevent1q…vw08&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-02-08&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi Andrés,&lt;br/&gt;&lt;br/&gt;&amp;gt; Am I correct in understanding that this is a proposal to change the spec&lt;br/&gt;(maybe add a new BOLT) so that all lightning implementations can try to&lt;br/&gt;support this feature.&lt;br/&gt;&lt;br/&gt;Yes, the proposal relies on the use of PTLCs in place of HTLCs which is a&lt;br/&gt;popular change that will (hopefully) be brought about by Taproot. It is&lt;br/&gt;worth noting that this change is not specific to this protocol and that&lt;br/&gt;only the end nodes (buyer and seller) would need any special code in order&lt;br/&gt;to execute these contracts if the underlying Lightning Network was using&lt;br/&gt;PTLCs.&lt;br/&gt;&lt;br/&gt;&amp;gt; If the above is true, then I&amp;#39;m wondering: could a Lightning-based escrow&lt;br/&gt;system be implemented that doesn&amp;#39;t require to modify the existing&lt;br/&gt;implementations? Maybe if we simplify the requirements a bit? Like,&lt;br/&gt;removing the &amp;#34;Escrow only learns of dispute cases, never learns non-dispute&lt;br/&gt;case&amp;#34; aspect? That is, the third-party S always knows about an escrow&lt;br/&gt;between A and B taking place.&lt;br/&gt;&lt;br/&gt;At a high level, what is required here is that the payment goes through iff&lt;br/&gt;[Seller AND (Buyer OR Escrow)] agree to it. Lifting restrictions so that&lt;br/&gt;the Escrow is allowed to be more interactive can allow the Buyer and Escrow&lt;br/&gt;to do an interactive shared secret generation and this secret could then be&lt;br/&gt;used in a spontaneous payment to the Seller (meaning the payment hash is&lt;br/&gt;generated by the Buyer and not the Seller) and then the Seller would have&lt;br/&gt;to obtain a ZKP from the Escrow that the payment hash is the hash of a&lt;br/&gt;secret known to the Escrow. If all of this were done, then the Seller could&lt;br/&gt;execute given the shared secret from either the Buyer or the Escrow. Of&lt;br/&gt;note, another downside to this scheme beyond Escrow involvement is that&lt;br/&gt;there is no proof of payment/reciept over the Lightning Network for this&lt;br/&gt;payment because it is a spontaneous payment.&lt;br/&gt;&lt;br/&gt;Like ZmnSCPxj&amp;#39;s proposal, this would only require special code for the &amp;#34;end&lt;br/&gt;nodes&amp;#34; (Buyer and Seller) and the underlying HTLC-based lightning network&lt;br/&gt;would require no changes. Also note that this scheme relies on the&lt;br/&gt;existence of a Zero Knowledge Proof of Knowledge (ZKPoK) of a hash which is&lt;br/&gt;not a trivial piece of work but certainly do-able.&lt;br/&gt;&lt;br/&gt;Hi Pedro,&lt;br/&gt;&lt;br/&gt;I actually did have a question for you about Virtual Channels: The first&lt;br/&gt;time I read the paper it struck me that while on the surface things look&lt;br/&gt;pretty nice for the virtual channel participants, the intermediary has to&lt;br/&gt;lock up a lot of collateral (in total, the size of the channel) in order to&lt;br/&gt;enable this and subsequently this channel could stay open for a very long&lt;br/&gt;time. As such, to the intermediary this seems very similar to having to&lt;br/&gt;route a (potentially very large) hodl HTLC which means they will be&lt;br/&gt;charging a very large fee for both the setup and the duration of the&lt;br/&gt;channel. Because of this, I&amp;#39;m having trouble thinking of almost any use&lt;br/&gt;cases where this is preferable to just routing payments the normal way&lt;br/&gt;other than if the in-between node is not reliable and there are no other&lt;br/&gt;cheap routes (in which case it might be worth it to pay a premium). Did you&lt;br/&gt;or your colleagues have other use cases in mind? And have you done any fee&lt;br/&gt;analysis for this scheme?&lt;br/&gt;&lt;br/&gt;Best,&lt;br/&gt;Nadav&lt;br/&gt;&lt;br/&gt;On Mon, Feb 8, 2021 at 2:43 AM Pedro Moreno-Sanchez &amp;lt;&lt;br/&gt;pedrorechezmailinglists at gmail.com&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Hello,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; While reading this thread I realized that my colleagues and I have been&lt;br/&gt;&amp;gt; working on a construction called “Bitcoin-compatible Virtual Channels” [1]&lt;br/&gt;&amp;gt; that, at a first glance, highly resembles the use case and requirements&lt;br/&gt;&amp;gt; that you put forward in this thread. In a nutshell, a Virtual Channel is&lt;br/&gt;&amp;gt; built on top of two payment channels and use them to construct its own&lt;br/&gt;&amp;gt; “funding transaction”. Imagine that Buyer and Seller do not have a payment&lt;br/&gt;&amp;gt; channel between them, but they both have a payment channel with a  common&lt;br/&gt;&amp;gt; node (e.g., Escrow in your example). Alice and Bob can create a Virtual&lt;br/&gt;&amp;gt; Channel between them using fundings from both: channel Alice-Escrow and&lt;br/&gt;&amp;gt; channel Escrow-Bob. After created, the Virtual Channel offers the same&lt;br/&gt;&amp;gt; functionality as a direct payment channel between Alice and Bob (i.e.,&lt;br/&gt;&amp;gt; Escrow is no longer involved for payments). Our construction makes sure&lt;br/&gt;&amp;gt; that no party losses funds when the Virtual Channel needs to be closed&lt;br/&gt;&amp;gt; (either when Alice and Bob collaborate or any of the 3 parties cheat).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This construction is compatible with the current Bitcoin script (e.g.,&lt;br/&gt;&amp;gt; taproot is not required although perhaps useful when available) and with&lt;br/&gt;&amp;gt; the Lightning Network. In the paper, we describe our construction assuming&lt;br/&gt;&amp;gt; that a payment-channel follows the design in “Generalized&lt;br/&gt;&amp;gt; Bitcoin-Compatible Channels” [2], however the Virtual Channel construction&lt;br/&gt;&amp;gt; can seamlessly work using the current Lightning payment channels.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I would be glad to hear any feedback that you may have.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Cheers,&lt;br/&gt;&amp;gt; Pedro Moreno-Sanchez&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ==&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; [1] &lt;a href=&#34;https://eprint.iacr.org/2020/554&#34;&gt;https://eprint.iacr.org/2020/554&lt;/a&gt;&lt;br/&gt;&amp;gt; [2] &lt;a href=&#34;https://eprint.iacr.org/2020/476.pdf&#34;&gt;https://eprint.iacr.org/2020/476.pdf&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; On Feb 8, 2021, at 9:09 AM, Andrés G. Aragoneses &amp;lt;knocte at gmail.com&amp;gt;&lt;br/&gt;&amp;gt; wrote:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Hey ZmnSCPxj,&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Am I correct in understanding that this is a proposal to change the spec&lt;br/&gt;&amp;gt; (maybe add a new BOLT) so that all lightning implementations can try to&lt;br/&gt;&amp;gt; support this feature.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; If the above is true, then I&amp;#39;m wondering: could a Lightning-based escrow&lt;br/&gt;&amp;gt; system be implemented that doesn&amp;#39;t require to modify the existing&lt;br/&gt;&amp;gt; implementations? Maybe if we simplify the requirements a bit? Like,&lt;br/&gt;&amp;gt; removing the &amp;#34;Escrow only learns of dispute cases, never learns non-dispute&lt;br/&gt;&amp;gt; case&amp;#34; aspect? That is, the third-party S always knows about an escrow&lt;br/&gt;&amp;gt; between A and B taking place.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; I understand that the above requirement is a good to have, but if&lt;br/&gt;&amp;gt; removing it allows a simpler version of escrow be implemented, then at&lt;br/&gt;&amp;gt; least there could be an interim solution for non-custodial exchanges to&lt;br/&gt;&amp;gt; start adopting this (otherwise they have to resort to custodial-based&lt;br/&gt;&amp;gt; escrows, which is worse than lacking the escrow privacy brought by the&lt;br/&gt;&amp;gt; requirement above).&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Thanks&lt;br/&gt;&amp;gt; &amp;gt; _______________________________________________&lt;br/&gt;&amp;gt; &amp;gt; Lightning-dev mailing list&lt;br/&gt;&amp;gt; &amp;gt; Lightning-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt; &amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt; Lightning-dev mailing list&lt;br/&gt;&amp;gt; Lightning-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20210208/89782223/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20210208/89782223/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:01:58&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsrdstsc6lusnrznapxhucqd0sxk7dpsntha7uext9j48y229d95zgzypryphar8gjqg5ruz9m6s74ff87weqzmu8s4n8salx7gy0p47h3qssdxjy2</id>
    
      <title type="html">📅 Original date posted:2020-04-23 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsrdstsc6lusnrznapxhucqd0sxk7dpsntha7uext9j48y229d95zgzypryphar8gjqg5ruz9m6s74ff87weqzmu8s4n8salx7gy0p47h3qssdxjy2" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsruhrxcwa86rs4asrmd82pe2t4n3u09hfj7ggsekqdxktstl9x3wsy3twsk&#39;&gt;nevent1q…twsk&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-04-23&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi Laolu,&lt;br/&gt;&lt;br/&gt;Thanks for the response :)&lt;br/&gt;&lt;br/&gt;I agree that some more framing probably would have been good to have in my&lt;br/&gt;update.&lt;br/&gt;&lt;br/&gt;First, I want to clarify that my intention is not to implement a PTLC-based&lt;br/&gt;lightning network on top of ECDSA adaptor signatures, as I do believe that&lt;br/&gt;using Schnorr will be superior, but rather I wish to get some PoC sandbox&lt;br/&gt;with which to start implementing and testing out the long list of currently&lt;br/&gt;theoretical proposals surrounding PTLCs, most of which are implementation&lt;br/&gt;agnostic (to a degree anyway). I think it would be super beneficial to have&lt;br/&gt;more fleshed out with respect to what some challenges of a Payment Point LN&lt;br/&gt;are going to be than we understand now, before Schnorr is implemented and&lt;br/&gt;it is time to commit to some PTLC scheme for real.&lt;br/&gt;&lt;br/&gt;Second, I agree that I&amp;#39;ve probably understated somewhat the changes that&lt;br/&gt;will be needed in most implementations as I was mostly thinking about what&lt;br/&gt;would need to change in the BOLTs, which does actually seem relatively&lt;br/&gt;minimal (although as you mention, these minimal changes to the BOLTs do&lt;br/&gt;trigger large changes in many implementations). Also, good point on how&lt;br/&gt;BOLT 11 (invoicing) will have to be altered as well, must&amp;#39;ve slipped my&lt;br/&gt;mind.&lt;br/&gt;&lt;br/&gt;Best,&lt;br/&gt;Nadav&lt;br/&gt;&lt;br/&gt;On Wed, Apr 22, 2020 at 8:17 PM Olaoluwa Osuntokun &amp;lt;laolu32 at gmail.com&amp;gt;&lt;br/&gt;wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Hi Nadav,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thanks for the updates! Super cool to see this concept continue to evolve&lt;br/&gt;&amp;gt; and integrate new technologies as they pop up.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; I believe this would only require a few changes to existing nodes:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Rather than a &amp;#34;few changes&amp;#34;, this would to date be the largest&lt;br/&gt;&amp;gt; network-level&lt;br/&gt;&amp;gt; update undertaken to the Lightning Network thus far. In the past, we rolled&lt;br/&gt;&amp;gt; out the new onion blob format (which enables changes like this), but none&lt;br/&gt;&amp;gt; of&lt;br/&gt;&amp;gt; the intermediate nodes actually need to modify their behavior. New payment&lt;br/&gt;&amp;gt; types like MPP&#43;AMP only needed the _end points_ to update making this an&lt;br/&gt;&amp;gt; end-to-end update that has been rolled out so far in a de-synchronized&lt;br/&gt;&amp;gt; manner.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Re-phrasing deploying this requires changes to: the core channel state&lt;br/&gt;&amp;gt; machine (the protocol we use to make commitment updates), HTLC scripts,&lt;br/&gt;&amp;gt; on-chain HTLC handling and resolution, path finding algorithms (to only see&lt;br/&gt;&amp;gt; out the new PTLC-enabled nodes), invoice changes and onion blob processing.&lt;br/&gt;&amp;gt; I&amp;#39;d caution against underestimating how long all of this will take in&lt;br/&gt;&amp;gt; practice, and the degree of synchronization required to pull it all off&lt;br/&gt;&amp;gt; properly.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; For a few years now the question we&amp;#39;ve all been pondering is: do we wait&lt;br/&gt;&amp;gt; for&lt;br/&gt;&amp;gt; scnhorr to roll out multi-hop locks, or just use the latest ECDSA based&lt;br/&gt;&amp;gt; technique? As dual deployment is compatible (we can make the onion blobs&lt;br/&gt;&amp;gt; for&lt;br/&gt;&amp;gt; both types the same), a path has always existed to first roll out with the&lt;br/&gt;&amp;gt; latest ECDSA based technique then follow up later to roll out the schnorr&lt;br/&gt;&amp;gt; version as well. However there&amp;#39;s also a risk here as depending on how&lt;br/&gt;&amp;gt; quickly things can be rolled out, schnorr may become available&lt;br/&gt;&amp;gt; mid-development, which would possibly cause us to reconsider the ECDSA path&lt;br/&gt;&amp;gt; and have the network purely use scnhorr to make things nice and uniform.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Zooming out for a bit, the solution space of &amp;#34;how channels can look post&lt;br/&gt;&amp;gt; scriptless-scripts &#43; taproot&amp;#34; is rather large [1], and the addition of this&lt;br/&gt;&amp;gt; new technique allows for an even larger set of deployment possibilities.&lt;br/&gt;&amp;gt; This latest ECDSA variant is much simpler than the prior ones (which had a&lt;br/&gt;&amp;gt; few rounds of more involved ZKPs), but since it still uses OP_CMS, it can&amp;#39;t&lt;br/&gt;&amp;gt; be used to modify the funding output.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; [1]:&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-December/002375.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-December/002375.html&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; -- Laolu&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On Wed, Apr 22, 2020 at 8:13 AM Nadav Kohen &amp;lt;nadav at suredbits.com&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Hello all,&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; I&amp;#39;d like to give an update on the current state of thinking and coding&lt;br/&gt;&amp;gt;&amp;gt; surrounding replacing Hash-TimeLock Contracts (HTLCs) with Point-TimeLock&lt;br/&gt;&amp;gt;&amp;gt; Contracts (PTLCs) (aka Payment Hashes -&amp;gt; Payment Points) in hopes of&lt;br/&gt;&amp;gt;&amp;gt; sparking interest, discussion, development, etc.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; We Want Payment Points!&lt;br/&gt;&amp;gt;&amp;gt; -----------------------&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Using point-locks (in PTLCs) instead of hash-locks (in HTLCs) for&lt;br/&gt;&amp;gt;&amp;gt; lightning payments is an all around improvement. HTLCs require the use of&lt;br/&gt;&amp;gt;&amp;gt; the same hash across payment routes (barring fancy ZKPs which are inferior&lt;br/&gt;&amp;gt;&amp;gt; to PTLCs) while PTLCs allow for payment de-correlation along routes. For an&lt;br/&gt;&amp;gt;&amp;gt; introduction to the topic, see&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://suredbits.com/payment-points-part-1/&#34;&gt;https://suredbits.com/payment-points-part-1/&lt;/a&gt;.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; In addition to improving privacy in this way and protecting against&lt;br/&gt;&amp;gt;&amp;gt; wormhole attacks, PTLC-based lightning channels open the door to a large&lt;br/&gt;&amp;gt;&amp;gt; variety of interesting applications that cannot be accomplished with HTLCs:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Stuckless (retry-able) Payments with proof of payment (&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://suredbits.com/payment-points-part-2-stuckless-payments/&#34;&gt;https://suredbits.com/payment-points-part-2-stuckless-payments/&lt;/a&gt;)&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Escrow contracts over Lightning (&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://suredbits.com/payment-points-part-3-escrow-contracts/&#34;&gt;https://suredbits.com/payment-points-part-3-escrow-contracts/&lt;/a&gt;)&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; High/DLOG AMP (&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://docs.google.com/presentation/d/15l4h2_zEY4zXC6n1NqsImcjgA0fovl_lkgkKu1O3QT0/edit#slide=id.g64c15419e7_0_40&#34;&gt;https://docs.google.com/presentation/d/15l4h2_zEY4zXC6n1NqsImcjgA0fovl_lkgkKu1O3QT0/edit#slide=id.g64c15419e7_0_40&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt; )&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Stuckless &#43; AMP (an improvement on Boomerang) (&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-October/002239.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-October/002239.html&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt; )&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Pay-for-signature (&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://suredbits.com/payment-points-part-4-selling-signatures/&#34;&gt;https://suredbits.com/payment-points-part-4-selling-signatures/&lt;/a&gt;)&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Pay-for-commitment (&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-September/002166.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-September/002166.html&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt; )&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Monotonic access structures on payment completion (&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://suredbits.com/payment-points-monotone-access-structures/&#34;&gt;https://suredbits.com/payment-points-monotone-access-structures/&lt;/a&gt;)&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Ideal Barrier Escrow Implementation (&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://suredbits.com/payment-points-implementing-barrier-escrows/&#34;&gt;https://suredbits.com/payment-points-implementing-barrier-escrows/&lt;/a&gt;)&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; And allowing for Barrier Escrows, we can even have&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Atomic multi-payment setup (&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://suredbits.com/payment-points-and-barrier-escrows/&#34;&gt;https://suredbits.com/payment-points-and-barrier-escrows/&lt;/a&gt;)&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Lightning Discreet Log Contract (&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://suredbits.com/discreet-log-contracts-on-lightning-network/&#34;&gt;https://suredbits.com/discreet-log-contracts-on-lightning-network/&lt;/a&gt;)&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Atomic multi-payment update (&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://suredbits.com/updating-and-transferring-lightning-payments/&#34;&gt;https://suredbits.com/updating-and-transferring-lightning-payments/&lt;/a&gt;)&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Lightning Discreet Log Contract Novation/Transfer (&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://suredbits.com/transferring-lightning-dlcs/&#34;&gt;https://suredbits.com/transferring-lightning-dlcs/&lt;/a&gt;)&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; There are likely even more things that can be done with Payment Points so&lt;br/&gt;&amp;gt;&amp;gt; make sure to respond if I&amp;#39;ve missed any known ones.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; How Do We Get Payment Points?&lt;br/&gt;&amp;gt;&amp;gt; -----------------------------&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Eventually, once we have Taproot, we can use 2p-Schnorr adaptor&lt;br/&gt;&amp;gt;&amp;gt; signatures in Lightning channels. For a detailed thread by ZmnSCPxj, see&lt;br/&gt;&amp;gt;&amp;gt; here&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-December/002375.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-December/002375.html&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; In the meantime, Lloyd has written about a way to do 1p-ECDSA adaptor&lt;br/&gt;&amp;gt;&amp;gt; sigs (&lt;a href=&#34;https://github.com/LLFourn/one-time-VES&#34;&gt;https://github.com/LLFourn/one-time-VES&lt;/a&gt;) which can be paired with&lt;br/&gt;&amp;gt;&amp;gt; OP_CHECKMULTISIG to allows us to execute PTLCs on Bitcoin today!&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Nickler has implemented this in a branch of secp256k1 (&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://github.com/jonasnick/secp256k1/pull/14&#34;&gt;https://github.com/jonasnick/secp256k1/pull/14&lt;/a&gt;) and I have implemented&lt;br/&gt;&amp;gt;&amp;gt; it in Bouncy Castle in Bitcoin-S with some testing against this branch (&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://github.com/nkohen/bitcoin-s-core/tree/bouncy-adaptor&#34;&gt;https://github.com/nkohen/bitcoin-s-core/tree/bouncy-adaptor&lt;/a&gt;). Do note&lt;br/&gt;&amp;gt;&amp;gt; that as nickler states on his PR, &amp;#34;IT IS EXTREMELY DANGEROUS AND RECKLESS&lt;br/&gt;&amp;gt;&amp;gt; TO USE THIS MODULE IN PRODUCTION. DON&amp;#39;T!&amp;#34;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; A demo of an on-chain PTLC I executed using nickler&amp;#39;s implementation on&lt;br/&gt;&amp;gt;&amp;gt; the backend &#43; bitcoin-s can be seen here &lt;a href=&#34;https://youtu.be/w9o4v7Idjno&#34;&gt;https://youtu.be/w9o4v7Idjno&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; And waxwing did a lovely write-up about the crypto itself&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://joinmarket.me/blog/blog/schnorrless-scriptless-scripts/&#34;&gt;https://joinmarket.me/blog/blog/schnorrless-scriptless-scripts/&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; I would be very interested in having a fork of (at least) one lightning&lt;br/&gt;&amp;gt;&amp;gt; implementation (or Rust Lightning) to be a proof of concept ECDSA-PTLC node&lt;br/&gt;&amp;gt;&amp;gt; with which we can test and play with the plethora of PTLC-based proposals&lt;br/&gt;&amp;gt;&amp;gt; above.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; I believe this would only require a few changes to existing nodes:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; 1) update_add_ptlc will have a 32 byte x-coordinate (of a point) rather&lt;br/&gt;&amp;gt;&amp;gt; than a 32 byte hash. Additionally the onion&amp;#39;s hop_data will contain a 32&lt;br/&gt;&amp;gt;&amp;gt; byte scalar tweak for each hop. As per [link multi-hop locks]. The last&lt;br/&gt;&amp;gt;&amp;gt; hop_data will instead include a 32 byte scalar equal to the sum of all&lt;br/&gt;&amp;gt;&amp;gt; tweaks.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; 2) commitment_signed will have 162 byte adaptor ptlc_signatures rather&lt;br/&gt;&amp;gt;&amp;gt; than valid (71/72 byte) ECDSA signatures on PTLC-success transactions.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; 3) The in-flight outputs on the commitment transaction itself become a&lt;br/&gt;&amp;gt;&amp;gt; little simpler as we no longer need to explicitly check the payment&lt;br/&gt;&amp;gt;&amp;gt; pre-image against a hash. Instead, delete all instances of &amp;#34;OP_HASH160&lt;br/&gt;&amp;gt;&amp;gt; &amp;lt;RIPEMD160(payment_hash)&amp;gt; OP_EQUALVERIFY&amp;#34; in the scripts (leaving the rest&lt;br/&gt;&amp;gt;&amp;gt; the same) and require no pre-image in the witness, only a valid signature.&lt;br/&gt;&amp;gt;&amp;gt; The pre-image check is implicitly enforced by the &amp;lt;remoteptlc_sig&amp;gt; witness&lt;br/&gt;&amp;gt;&amp;gt; since only an adaptor signature was provided by remote so that the payment&lt;br/&gt;&amp;gt;&amp;gt; pre-image is required to create the valid signature (from which the&lt;br/&gt;&amp;gt;&amp;gt; pre-image can be then deduced by comparing adaptor and valid signatures).&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; If I&amp;#39;ve missed any other changes that need to happen, do respond with&lt;br/&gt;&amp;gt;&amp;gt; them!&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; I hope that as a community we can work towards having a PTLC-based&lt;br/&gt;&amp;gt;&amp;gt; Lightning Network that is safe and stable as soon as possible, and so I&lt;br/&gt;&amp;gt;&amp;gt; encourage further thinking, development and expirementation with PTLCs now&lt;br/&gt;&amp;gt;&amp;gt; so that when Taproot is finally at our disposal we can cleanly start moving&lt;br/&gt;&amp;gt;&amp;gt; towards a more ideal Lightning :)&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Best,&lt;br/&gt;&amp;gt;&amp;gt; Nadav&lt;br/&gt;&amp;gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt;&amp;gt; Lightning-dev mailing list&lt;br/&gt;&amp;gt;&amp;gt; Lightning-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200423/a75c29ad/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200423/a75c29ad/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:59:53&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsgucdn9p2nrz4l44ql6605ey4krxf0k8p4pzjru58vmckfk0hfklszypryphar8gjqg5ruz9m6s74ff87weqzmu8s4n8salx7gy0p47h3qsjdxj79</id>
    
      <title type="html">📅 Original date posted:2020-04-22 📝 Original message: Hello ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsgucdn9p2nrz4l44ql6605ey4krxf0k8p4pzjru58vmckfk0hfklszypryphar8gjqg5ruz9m6s74ff87weqzmu8s4n8salx7gy0p47h3qsjdxj79" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqstkq23gwgh5hntjaz7qszghqfsdy0pwur0nu7rpflzkqhvjz0jldg8xrt39&#39;&gt;nevent1q…rt39&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-04-22&lt;br/&gt;📝 Original message:&lt;br/&gt;Hello all,&lt;br/&gt;&lt;br/&gt;I&amp;#39;d like to give an update on the current state of thinking and coding&lt;br/&gt;surrounding replacing Hash-TimeLock Contracts (HTLCs) with Point-TimeLock&lt;br/&gt;Contracts (PTLCs) (aka Payment Hashes -&amp;gt; Payment Points) in hopes of&lt;br/&gt;sparking interest, discussion, development, etc.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;We Want Payment Points!&lt;br/&gt;-----------------------&lt;br/&gt;&lt;br/&gt;Using point-locks (in PTLCs) instead of hash-locks (in HTLCs) for lightning&lt;br/&gt;payments is an all around improvement. HTLCs require the use of the same&lt;br/&gt;hash across payment routes (barring fancy ZKPs which are inferior to PTLCs)&lt;br/&gt;while PTLCs allow for payment de-correlation along routes. For an&lt;br/&gt;introduction to the topic, see &lt;a href=&#34;https://suredbits.com/payment-points-part-1/&#34;&gt;https://suredbits.com/payment-points-part-1/&lt;/a&gt;.&lt;br/&gt;&lt;br/&gt;In addition to improving privacy in this way and protecting against&lt;br/&gt;wormhole attacks, PTLC-based lightning channels open the door to a large&lt;br/&gt;variety of interesting applications that cannot be accomplished with HTLCs:&lt;br/&gt;&lt;br/&gt;Stuckless (retry-able) Payments with proof of payment (&lt;br/&gt;&lt;a href=&#34;https://suredbits.com/payment-points-part-2-stuckless-payments/&#34;&gt;https://suredbits.com/payment-points-part-2-stuckless-payments/&lt;/a&gt;)&lt;br/&gt;&lt;br/&gt;Escrow contracts over Lightning (&lt;br/&gt;&lt;a href=&#34;https://suredbits.com/payment-points-part-3-escrow-contracts/&#34;&gt;https://suredbits.com/payment-points-part-3-escrow-contracts/&lt;/a&gt;)&lt;br/&gt;&lt;br/&gt;High/DLOG AMP (&lt;br/&gt;&lt;a href=&#34;https://docs.google.com/presentation/d/15l4h2_zEY4zXC6n1NqsImcjgA0fovl_lkgkKu1O3QT0/edit#slide=id.g64c15419e7_0_40&#34;&gt;https://docs.google.com/presentation/d/15l4h2_zEY4zXC6n1NqsImcjgA0fovl_lkgkKu1O3QT0/edit#slide=id.g64c15419e7_0_40&lt;/a&gt;&lt;br/&gt;)&lt;br/&gt;&lt;br/&gt;Stuckless &#43; AMP (an improvement on Boomerang) (&lt;br/&gt;&lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-October/002239.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-October/002239.html&lt;/a&gt;&lt;br/&gt;)&lt;br/&gt;&lt;br/&gt;Pay-for-signature (&lt;br/&gt;&lt;a href=&#34;https://suredbits.com/payment-points-part-4-selling-signatures/&#34;&gt;https://suredbits.com/payment-points-part-4-selling-signatures/&lt;/a&gt;)&lt;br/&gt;&lt;br/&gt;Pay-for-commitment (&lt;br/&gt;&lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-September/002166.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-September/002166.html&lt;/a&gt;&lt;br/&gt;)&lt;br/&gt;&lt;br/&gt;Monotonic access structures on payment completion (&lt;br/&gt;&lt;a href=&#34;https://suredbits.com/payment-points-monotone-access-structures/&#34;&gt;https://suredbits.com/payment-points-monotone-access-structures/&lt;/a&gt;)&lt;br/&gt;&lt;br/&gt;Ideal Barrier Escrow Implementation (&lt;br/&gt;&lt;a href=&#34;https://suredbits.com/payment-points-implementing-barrier-escrows/&#34;&gt;https://suredbits.com/payment-points-implementing-barrier-escrows/&lt;/a&gt;)&lt;br/&gt;&lt;br/&gt;And allowing for Barrier Escrows, we can even have&lt;br/&gt;&lt;br/&gt;Atomic multi-payment setup (&lt;br/&gt;&lt;a href=&#34;https://suredbits.com/payment-points-and-barrier-escrows/&#34;&gt;https://suredbits.com/payment-points-and-barrier-escrows/&lt;/a&gt;)&lt;br/&gt;&lt;br/&gt;Lightning Discreet Log Contract (&lt;br/&gt;&lt;a href=&#34;https://suredbits.com/discreet-log-contracts-on-lightning-network/&#34;&gt;https://suredbits.com/discreet-log-contracts-on-lightning-network/&lt;/a&gt;)&lt;br/&gt;&lt;br/&gt;Atomic multi-payment update (&lt;br/&gt;&lt;a href=&#34;https://suredbits.com/updating-and-transferring-lightning-payments/&#34;&gt;https://suredbits.com/updating-and-transferring-lightning-payments/&lt;/a&gt;)&lt;br/&gt;&lt;br/&gt;Lightning Discreet Log Contract Novation/Transfer (&lt;br/&gt;&lt;a href=&#34;https://suredbits.com/transferring-lightning-dlcs/&#34;&gt;https://suredbits.com/transferring-lightning-dlcs/&lt;/a&gt;)&lt;br/&gt;&lt;br/&gt;There are likely even more things that can be done with Payment Points so&lt;br/&gt;make sure to respond if I&amp;#39;ve missed any known ones.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;How Do We Get Payment Points?&lt;br/&gt;-----------------------------&lt;br/&gt;&lt;br/&gt;Eventually, once we have Taproot, we can use 2p-Schnorr adaptor signatures&lt;br/&gt;in Lightning channels. For a detailed thread by ZmnSCPxj, see here&lt;br/&gt;&lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-December/002375.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-December/002375.html&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;In the meantime, Lloyd has written about a way to do 1p-ECDSA adaptor sigs (&lt;br/&gt;&lt;a href=&#34;https://github.com/LLFourn/one-time-VES&#34;&gt;https://github.com/LLFourn/one-time-VES&lt;/a&gt;) which can be paired with&lt;br/&gt;OP_CHECKMULTISIG to allows us to execute PTLCs on Bitcoin today!&lt;br/&gt;&lt;br/&gt;Nickler has implemented this in a branch of secp256k1 (&lt;br/&gt;&lt;a href=&#34;https://github.com/jonasnick/secp256k1/pull/14&#34;&gt;https://github.com/jonasnick/secp256k1/pull/14&lt;/a&gt;) and I have implemented it&lt;br/&gt;in Bouncy Castle in Bitcoin-S with some testing against this branch (&lt;br/&gt;&lt;a href=&#34;https://github.com/nkohen/bitcoin-s-core/tree/bouncy-adaptor&#34;&gt;https://github.com/nkohen/bitcoin-s-core/tree/bouncy-adaptor&lt;/a&gt;). Do note that&lt;br/&gt;as nickler states on his PR, &amp;#34;IT IS EXTREMELY DANGEROUS AND RECKLESS TO USE&lt;br/&gt;THIS MODULE IN PRODUCTION. DON&amp;#39;T!&amp;#34;&lt;br/&gt;&lt;br/&gt;A demo of an on-chain PTLC I executed using nickler&amp;#39;s implementation on the&lt;br/&gt;backend &#43; bitcoin-s can be seen here &lt;a href=&#34;https://youtu.be/w9o4v7Idjno&#34;&gt;https://youtu.be/w9o4v7Idjno&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;And waxwing did a lovely write-up about the crypto itself&lt;br/&gt;&lt;a href=&#34;https://joinmarket.me/blog/blog/schnorrless-scriptless-scripts/&#34;&gt;https://joinmarket.me/blog/blog/schnorrless-scriptless-scripts/&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;I would be very interested in having a fork of (at least) one lightning&lt;br/&gt;implementation (or Rust Lightning) to be a proof of concept ECDSA-PTLC node&lt;br/&gt;with which we can test and play with the plethora of PTLC-based proposals&lt;br/&gt;above.&lt;br/&gt;&lt;br/&gt;I believe this would only require a few changes to existing nodes:&lt;br/&gt;&lt;br/&gt;1) update_add_ptlc will have a 32 byte x-coordinate (of a point) rather&lt;br/&gt;than a 32 byte hash. Additionally the onion&amp;#39;s hop_data will contain a 32&lt;br/&gt;byte scalar tweak for each hop. As per [link multi-hop locks]. The last&lt;br/&gt;hop_data will instead include a 32 byte scalar equal to the sum of all&lt;br/&gt;tweaks.&lt;br/&gt;&lt;br/&gt;2) commitment_signed will have 162 byte adaptor ptlc_signatures rather than&lt;br/&gt;valid (71/72 byte) ECDSA signatures on PTLC-success transactions.&lt;br/&gt;&lt;br/&gt;3) The in-flight outputs on the commitment transaction itself become a&lt;br/&gt;little simpler as we no longer need to explicitly check the payment&lt;br/&gt;pre-image against a hash. Instead, delete all instances of &amp;#34;OP_HASH160&lt;br/&gt;&amp;lt;RIPEMD160(payment_hash)&amp;gt; OP_EQUALVERIFY&amp;#34; in the scripts (leaving the rest&lt;br/&gt;the same) and require no pre-image in the witness, only a valid signature.&lt;br/&gt;The pre-image check is implicitly enforced by the &amp;lt;remoteptlc_sig&amp;gt; witness&lt;br/&gt;since only an adaptor signature was provided by remote so that the payment&lt;br/&gt;pre-image is required to create the valid signature (from which the&lt;br/&gt;pre-image can be then deduced by comparing adaptor and valid signatures).&lt;br/&gt;&lt;br/&gt;If I&amp;#39;ve missed any other changes that need to happen, do respond with them!&lt;br/&gt;&lt;br/&gt;I hope that as a community we can work towards having a PTLC-based&lt;br/&gt;Lightning Network that is safe and stable as soon as possible, and so I&lt;br/&gt;encourage further thinking, development and expirementation with PTLCs now&lt;br/&gt;so that when Taproot is finally at our disposal we can cleanly start moving&lt;br/&gt;towards a more ideal Lightning :)&lt;br/&gt;&lt;br/&gt;Best,&lt;br/&gt;Nadav&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200422/a0197f12/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200422/a0197f12/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:59:52&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsgs8y7phupmu0ntlpj0gcm6kgpj0n3an40w7end3v7lz2jrk4c74qzypryphar8gjqg5ruz9m6s74ff87weqzmu8s4n8salx7gy0p47h3qstqr7pe</id>
    
      <title type="html">📅 Original date posted:2020-04-02 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsgs8y7phupmu0ntlpj0gcm6kgpj0n3an40w7end3v7lz2jrk4c74qzypryphar8gjqg5ruz9m6s74ff87weqzmu8s4n8salx7gy0p47h3qstqr7pe" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqswkh3v3fz7scv02agfr230u6wxp3jpjm0wqya0hv9nzmu4n2p27jgcyll4m&#39;&gt;nevent1q…ll4m&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-04-02&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning ZmnSCPxj,&lt;br/&gt;&lt;br/&gt;&amp;gt; The consideration is that much of the cost of a channel is with the setup&lt;br/&gt;and teardown --- E could always just reopen the CE channel again later.&lt;br/&gt;&amp;gt; Thus, the cost that E bears in setting up EE and tearing down EE would be&lt;br/&gt;still similar to the cost of losing CE and reestablishing it again.&lt;br/&gt;&amp;gt; Further, any amount it places in the EE channel would be an amount it&lt;br/&gt;could have been using as liquidity on Lightning, but which it cannot use&lt;br/&gt;for forwarding (because it is a channel to nowhere).&lt;br/&gt;&amp;gt; Ultimately, proof-of-closure is an economic mechanism, not an&lt;br/&gt;information-theoretic one.&lt;br/&gt;&lt;br/&gt;Okay, I see what you mean now but I&amp;#39;m still a bit worried due to the&lt;br/&gt;following: although it is true that the same nominal penalty is incurred,&lt;br/&gt;the real economic value for the attacker in channel E-E&amp;#39; is significantly&lt;br/&gt;less than that in A-E, which can be used for routing. As such, a rich&lt;br/&gt;attacker who wishes to crowd out their competition might occasionally open&lt;br/&gt;channels with themselves equal to the value needed to lock up a&lt;br/&gt;competitor&amp;#39;s channels, then do such a payment to themselves (with a high&lt;br/&gt;&amp;#34;hard&amp;#34; locktime) and close their temporary channel, but still hold their&lt;br/&gt;competitor&amp;#39;s funds hostage, and still have enough liquidity in the channels&lt;br/&gt;they didn&amp;#39;t have to close in order to facilitate all routing that was done&lt;br/&gt;by their competitor. Furthermore this route (for self-payment) could attack&lt;br/&gt;multiple competitors at the same time (likely leaving some funds to all but&lt;br/&gt;the least liquid competitor).&lt;br/&gt;&lt;br/&gt;I could be missing something, but it seems to me like the proposal to close&lt;br/&gt;channels after a soft timeout unless non-cooperation can be proven upstream&lt;br/&gt;adds a cost to the attacker of two on-chain transactions, which they can&lt;br/&gt;immediately revoke (as they know both pieces to the revocation priv key),&lt;br/&gt;but still allows very long lock-ups of other&amp;#39;s funds (with a 10x multiplier&lt;br/&gt;if they choose a long route). I do think that this is certainly an&lt;br/&gt;improvement on what we have now but I&amp;#39;m not sure it properly punishes the&lt;br/&gt;attacker in its current form.&lt;br/&gt;&lt;br/&gt;&amp;gt; Since this is a proof-of-***closure***, this is indeed an actual closing&lt;br/&gt;of the channel.&lt;br/&gt;&lt;br/&gt;Ah I see, I was misunderstanding a couple things, but I get it now, makes&lt;br/&gt;sense :)&lt;br/&gt;&lt;br/&gt;Best,&lt;br/&gt;Nadav&lt;br/&gt;&lt;br/&gt;On Wed, Apr 1, 2020 at 7:43 PM ZmnSCPxj &amp;lt;ZmnSCPxj at protonmail.com&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Good morning Nadav,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Love the idea! I have a couple questions though:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; I&amp;#39;m not convinced that &amp;#34;Purely Falsified Proof-Of-Closure&amp;#34; aren&amp;#39;t&lt;br/&gt;&amp;gt; effective. Consider a similar network to the one you described where we&lt;br/&gt;&amp;gt; have channels A - B - C and A - E - C but where we add a &amp;#34;fake&amp;#34; channel E -&lt;br/&gt;&amp;gt; E&amp;#39;. Now if the attacker sets up a payment from E to E&amp;#39; using the route E -&lt;br/&gt;&amp;gt; C - B - A - E - E&amp;#39;, then the attacker can successfully lock up all of B&amp;#39;s&lt;br/&gt;&amp;gt; channels (as is desirable to get rid of competition) and also generate a&lt;br/&gt;&amp;gt; false proof of closure for the E - E&amp;#39; channel. Even if this false proof&lt;br/&gt;&amp;gt; (which is a commitment tx) ends up being published on chain, E has lost no&lt;br/&gt;&amp;gt; ability to route and has successfully made B unable to route between A and&lt;br/&gt;&amp;gt; C. If my understanding of the proposal is correct, and it may not be, then&lt;br/&gt;&amp;gt; the punishment for grieving payments is the threat of closing channels that&lt;br/&gt;&amp;gt; would benefit from the grieving attack. But adding a new channel on the end&lt;br/&gt;&amp;gt; to be closed seems to invalidate this punishment?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The consideration is that much of the cost of a channel is with the setup&lt;br/&gt;&amp;gt; and teardown --- E could always just reopen the CE channel again later.&lt;br/&gt;&amp;gt; Thus, the cost that E bears in setting up EE and tearing down EE would be&lt;br/&gt;&amp;gt; still similar to the cost of losing CE and reestablishing it again.&lt;br/&gt;&amp;gt; Further, any amount it places in the EE channel would be an amount it&lt;br/&gt;&amp;gt; could have been using as liquidity on Lightning, but which it cannot use&lt;br/&gt;&amp;gt; for forwarding (because it is a channel to nowhere).&lt;br/&gt;&amp;gt; Ultimately, proof-of-closure is an economic mechanism, not an&lt;br/&gt;&amp;gt; information-theoretic one.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; So the mere existence of EE, to be later sacrificed, is enough punishment&lt;br/&gt;&amp;gt; on E.&lt;br/&gt;&amp;gt; I think.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; A second question I have is if you think that it would be advisable to&lt;br/&gt;&amp;gt; use up-front payments (pay for attempt, not just success) on payments with&lt;br/&gt;&amp;gt; abnormally high soft timeouts? If all this works, this combination seems to&lt;br/&gt;&amp;gt; be a way to enable hodl invoices under the proof of closure proposal.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Possibly, though this increases the complexity of the proposal even more.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;I just thought of a potentially more serious problem, at least for&lt;br/&gt;&amp;gt; Poon-Dryja channels, isn&amp;#39;t it true that giving a proof of closure is&lt;br/&gt;&amp;gt; equivalent to actually closing the channel since once other parties have&lt;br/&gt;&amp;gt; copies of the fully signed commitment transaction, it cannot be safely&lt;br/&gt;&amp;gt; revoked since other parties now have the ability to publish an old state? I&lt;br/&gt;&amp;gt; might be missing something but this seems like a big problem.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Since this is a proof-of-***closure***, this is indeed an actual closing&lt;br/&gt;&amp;gt; of the channel.&lt;br/&gt;&amp;gt; It would not be proof-of-closure if the channel was not being closed, but&lt;br/&gt;&amp;gt; proof-of-something-else.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; What is desired is simply that C can plausibly say &amp;#34;I punished somebody&lt;br/&gt;&amp;gt; else by closing on them, please do not punish me for punishing them&amp;#34;.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Regards,&lt;br/&gt;&amp;gt; ZmnSCPxj&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200402/b6b6749a/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200402/b6b6749a/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:59:23&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs2fzhzqugsuvnku5w2w47tz6ec0tsqjl8d6m07j267z78z0grz20szypryphar8gjqg5ruz9m6s74ff87weqzmu8s4n8salx7gy0p47h3qs8gwxgs</id>
    
      <title type="html">📅 Original date posted:2020-04-01 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs2fzhzqugsuvnku5w2w47tz6ec0tsqjl8d6m07j267z78z0grz20szypryphar8gjqg5ruz9m6s74ff87weqzmu8s4n8salx7gy0p47h3qs8gwxgs" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqstv6wvypjrxxmnr6wx4vup8lcn4m62ruv7e3xh7q2u5arrfrtagks5wzgku&#39;&gt;nevent1q…zgku&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-04-01&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi ZmnSCPxj and list,&lt;br/&gt;&lt;br/&gt;Love the idea! I have a couple questions though:&lt;br/&gt;&lt;br/&gt;I&amp;#39;m not convinced that &amp;#34;Purely Falsified Proof-Of-Closure&amp;#34; aren&amp;#39;t&lt;br/&gt;effective. Consider a similar network to the one you described where we&lt;br/&gt;have channels A - B - C and A - E - C but where we add a &amp;#34;fake&amp;#34; channel E -&lt;br/&gt;E&amp;#39;. Now if the attacker sets up a payment from E to E&amp;#39; using the route E -&lt;br/&gt;C - B - A - E - E&amp;#39;, then the attacker can successfully lock up all of B&amp;#39;s&lt;br/&gt;channels (as is desirable to get rid of competition) and also generate a&lt;br/&gt;false proof of closure for the E - E&amp;#39; channel. Even if this false proof&lt;br/&gt;(which is a commitment tx) ends up being published on chain, E has lost no&lt;br/&gt;ability to route and has successfully made B unable to route between A and&lt;br/&gt;C. If my understanding of the proposal is correct, and it may not be, then&lt;br/&gt;the punishment for grieving payments is the threat of closing channels that&lt;br/&gt;would benefit from the grieving attack. But adding a new channel on the end&lt;br/&gt;to be closed seems to invalidate this punishment?&lt;br/&gt;&lt;br/&gt;A second question I have is if you think that it would be advisable to use&lt;br/&gt;up-front payments (pay for attempt, not just success) on payments with&lt;br/&gt;abnormally high soft timeouts? If all this works, this combination seems to&lt;br/&gt;be a way to enable hodl invoices under the proof of closure proposal.&lt;br/&gt;&lt;br/&gt;Best,&lt;br/&gt;Nadav&lt;br/&gt;&lt;br/&gt;On Wed, Apr 1, 2020 at 1:19 AM ZmnSCPxj via Lightning-dev &amp;lt;&lt;br/&gt;lightning-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Introduction&lt;br/&gt;&amp;gt; ============&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Given the fact that contracts on offchain protocols need to be enforceable&lt;br/&gt;&amp;gt; onchain as well, timelocks involved in multi-hop payments are measured in&lt;br/&gt;&amp;gt; blocks.&lt;br/&gt;&amp;gt; This is because the blockchain can only (third-party-verifiably) enforce&lt;br/&gt;&amp;gt; timeouts in units of entire blocks.&lt;br/&gt;&amp;gt; This leads to very long timeouts for payment delivery, thus multi-hop&lt;br/&gt;&amp;gt; offchain payment attempts can be, deliberately or accidentally, be in a&lt;br/&gt;&amp;gt; &amp;#34;pending&amp;#34; state up to the very large timeouts involved.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Deliberately setting up a multi-hop payment such that it will be in a&lt;br/&gt;&amp;gt; &amp;#34;pending&amp;#34; state for long periods of time is colloquially known as a&lt;br/&gt;&amp;gt; &amp;#34;griefing attack&amp;#34;.&lt;br/&gt;&amp;gt; In this article, we assess various proposed solutions to mitigate the&lt;br/&gt;&amp;gt; effects of griefing attacks, and propose a particular solution,&lt;br/&gt;&amp;gt; proof-of-closure, as well, that requires significant changes to the update&lt;br/&gt;&amp;gt; state machine.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Digression: Why Grief?&lt;br/&gt;&amp;gt; ======================&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Before embarking on our investigation for solutions to the griefing&lt;br/&gt;&amp;gt; problem, we should first wonder if griefing is, in fact, a problem.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This brings up the question of: why would anybody grief at all?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Humans, like cats and other less-sapient pieces of walking meat, often&lt;br/&gt;&amp;gt; find enjoyment in causing the suffering of others for no immediate direct&lt;br/&gt;&amp;gt; gain to themselves, as a public demonstration of dominance over those they&lt;br/&gt;&amp;gt; make suffer (aka &amp;#34;shits and giggles&amp;#34;, which, if executed correctly, can&lt;br/&gt;&amp;gt; lead to eventual direct gains to themselves or their progeny or relatives&lt;br/&gt;&amp;gt; or allies, but such details are often outside the ken of the very beings&lt;br/&gt;&amp;gt; who execute such survival strategies: brains are pieces of meat that have&lt;br/&gt;&amp;gt; been hacked to act as action-reaction engines, but are not sophisticated&lt;br/&gt;&amp;gt; enough to execute as pure rationality engines at all times).&lt;br/&gt;&amp;gt; Fortunately, in the Bitcoin world, only purely rational beings of pure&lt;br/&gt;&amp;gt; selfishness can exist in the long run, thus we can neglect such motivations&lt;br/&gt;&amp;gt; as mere noise.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; First, let us investigate *how* griefing attacks can be performed.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * An intermediate node in a multi-hop attempt can delay forwarding or&lt;br/&gt;&amp;gt; failing an incoming HTLC.&lt;br/&gt;&amp;gt; * A final node in a payment attempt can delay claiming an incoming HTLC.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Let us consider a purely rational intermediate node of pure selfishness:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * If it forwards as soon as possible, it can earn fees, and also speed up&lt;br/&gt;&amp;gt; the release of the HTLC-locked funds so that they can reuse those funds as&lt;br/&gt;&amp;gt; liquidity for further payment attempts.&lt;br/&gt;&amp;gt; * Thus, delaying an HTLC is not selfishly-rational for an intermediate&lt;br/&gt;&amp;gt; node.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thus, for an intermediate node, it seems there is no selfishly-rational&lt;br/&gt;&amp;gt; motivation to execute a griefing attack on an arbitrary payment attempt.&lt;br/&gt;&amp;gt; We can then conclude that an intermediate that delays a payment would do&lt;br/&gt;&amp;gt; so, not of its own rational self-interest, but as an accident, such as an&lt;br/&gt;&amp;gt; unforeseen connectivity or power failure.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; However, things are different when we consider a non-arbitrary payment.&lt;br/&gt;&amp;gt; Suppose a node were to make a payment attempt to itself, and deliberately&lt;br/&gt;&amp;gt; delay claiming this self-payment.&lt;br/&gt;&amp;gt; This lets any single node, *who happens to own large liquidity*, to lock&lt;br/&gt;&amp;gt; up the liquidity of other nodes.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The motivation to lock up the liquidity of other nodes is to *eliminate&lt;br/&gt;&amp;gt; competition*.&lt;br/&gt;&amp;gt; Suppose we have a network as below:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;     A -- B -- C&lt;br/&gt;&amp;gt;       \     /&lt;br/&gt;&amp;gt;        \   /&lt;br/&gt;&amp;gt;         \ /&lt;br/&gt;&amp;gt;          E&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; When A and C want to transact with one another, they may choose to route&lt;br/&gt;&amp;gt; via either B or E.&lt;br/&gt;&amp;gt; B and E are therefore competitors in the business of forwarding payments.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; But suppose E has much larger channels AE and CE than the channels of AB&lt;br/&gt;&amp;gt; and CB.&lt;br/&gt;&amp;gt; For example, suppose E has 100mBTC perfectly-balanced channels while B has&lt;br/&gt;&amp;gt; only 10mBTC perfectly-balanced channels, as all things should be in&lt;br/&gt;&amp;gt; simplified models of reality.&lt;br/&gt;&amp;gt; E can then &amp;#34;take out the competition&amp;#34; by making a 5mBTC self-payment along&lt;br/&gt;&amp;gt; E-&amp;gt;A-&amp;gt;B-&amp;gt;C-&amp;gt;E and a 5mBTC self-payment along E-&amp;gt;C-&amp;gt;B-&amp;gt;A-&amp;gt;E, then refusing&lt;br/&gt;&amp;gt; to claim the payment, tying up all the liquidity of the channels of B.&lt;br/&gt;&amp;gt; By doing so, it can ensure that A and C will always fail to pay via B,&lt;br/&gt;&amp;gt; even if they wish to transact in amounts less than 5mBTC.&lt;br/&gt;&amp;gt; E thereby eliminates B as a competitor.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This demonstrates that griefing attacks will be motivated, such that such&lt;br/&gt;&amp;gt; attacks will be performed by payers and payees *against intermediate nodes*.&lt;br/&gt;&amp;gt; Intermediate nodes have no motivation to attack payers and payees (those&lt;br/&gt;&amp;gt; are their potential customers in the business of forwarding payments, and&lt;br/&gt;&amp;gt; attacking potential customers is bad business: such attacking intermediate&lt;br/&gt;&amp;gt; nodes will be removed economically in the long run).&lt;br/&gt;&amp;gt; However, payers and payees can become motivated to attack intermediate&lt;br/&gt;&amp;gt; nodes, if the &amp;#34;payer&amp;#34; and &amp;#34;payee&amp;#34; are actually competitor intermediate&lt;br/&gt;&amp;gt; nodes.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; (We can observe that this is always a possibility even outside of&lt;br/&gt;&amp;gt; Lightning: a service or product provider has no incentive to attack its&lt;br/&gt;&amp;gt; customers (&amp;#34;the customer is always right&amp;#34;), but have an incentive to&lt;br/&gt;&amp;gt; *pretend* to be a customer of a competitor and attack them.)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; We will keep this fact in mind: active griefing attacks are attacks *on*&lt;br/&gt;&amp;gt; intermediate nodes, not *by* intermediate nodes, because there is no&lt;br/&gt;&amp;gt; economic incentive for intermediate nodes to attack their customers.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Previous Proposed Solutions&lt;br/&gt;&amp;gt; ===========================&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Time-Spent Reporting&lt;br/&gt;&amp;gt; --------------------&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; At each channel along the route, the time spent by a node to handle its&lt;br/&gt;&amp;gt; forwarding is recorded, and reported upstream in the route.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Unfortunately, this solution protects payers from intermediate nodes and&lt;br/&gt;&amp;gt; payees: it does not protect intermediate nodes from colluding payers and&lt;br/&gt;&amp;gt; payees.&lt;br/&gt;&amp;gt; Even if an intermediate node knows that a particular node is consistently&lt;br/&gt;&amp;gt; slow via a previous time-spent report, it will not be able, with our&lt;br/&gt;&amp;gt; current onion routing, determine if an onion packet it just received will&lt;br/&gt;&amp;gt; or will not go through the known-slow node.&lt;br/&gt;&amp;gt; Thus, an intermediate node would not be able to defend against distant&lt;br/&gt;&amp;gt; payees that, with a colluding payer, will not claim a particular payment.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; As we have established, an active griefing atttack will never be&lt;br/&gt;&amp;gt; deliberately performed by a selfishly-rational intermediate node.&lt;br/&gt;&amp;gt; Thus, this solution protects against the wrong thing: it protects payers&lt;br/&gt;&amp;gt; against slow/unreliable intermediate nodes, it does not protect&lt;br/&gt;&amp;gt; intermediate nodes against malicious payer/payee collusions.&lt;br/&gt;&amp;gt; It protects only against intermediate nodes that inadvertently go offline&lt;br/&gt;&amp;gt; during forwarding, but such nodes will inevitably lose out on the&lt;br/&gt;&amp;gt; forwarding market anyway, and will disappear in the long run.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Up-Front Payment&lt;br/&gt;&amp;gt; ----------------&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Payers pay for an attempt, not just the successful completion of an&lt;br/&gt;&amp;gt; attempt.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; A variation on this is that the payer (or payee) continuously pays as long&lt;br/&gt;&amp;gt; as the payment is pending.&lt;br/&gt;&amp;gt; Further variations include paying by other means, such as just locking&lt;br/&gt;&amp;gt; funds or paying with proof-of-work.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; While it certainly erects economic barriers against payer/payee collusions&lt;br/&gt;&amp;gt; attacking intermediate nodes, it *also* erects economic barriers against&lt;br/&gt;&amp;gt; normal, non-malicious payments.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; We can consider that economic barriers against non-malicious, low-value,&lt;br/&gt;&amp;gt; high-frequency payments (&amp;#34;micropayments&amp;#34;) may be enough that such payments&lt;br/&gt;&amp;gt; become infeasible if we impose up-front payment for mere attempts.&lt;br/&gt;&amp;gt; Thus, while this solution is certainly something we can consider, we must&lt;br/&gt;&amp;gt; be reluctant to use it due to its up-front, strict-evaluation behavior.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Proof-Of-Closure&lt;br/&gt;&amp;gt; ================&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Observing the above, we want the properties for a &amp;#34;good&amp;#34; solution to&lt;br/&gt;&amp;gt; griefing attacks to be:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * It should protect intermediate nodes against payer/payee collusions.&lt;br/&gt;&amp;gt; * It should only come into play upon detection of an attack.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; We now present proof-of-closure, which (we hope) has the above properties.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; We can consider instead a softer timeout, distinct from the HTLC&lt;br/&gt;&amp;gt; block-based timeout.&lt;br/&gt;&amp;gt; This softer timeout is measurable in fractions of a second, e.g. units of&lt;br/&gt;&amp;gt; 0.1 seconds.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Each node on the network advertises, in addition to a block-based&lt;br/&gt;&amp;gt; `cltv_delta`, a `timeout_delta` in units of 0.1 seconds.&lt;br/&gt;&amp;gt; Further, each invoice contains, in addition to a block-based `final_cltv`,&lt;br/&gt;&amp;gt; a `final_timeout` in units of 0.1 seconds.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thus, there are two timeouts:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * The current &amp;#34;hard&amp;#34; block-based timeout that is enforceable onchain.&lt;br/&gt;&amp;gt; * A new &amp;#34;soft&amp;#34; sidereal-time-based timeout that is not onchain enforceable.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The soft timeout, as mentioned, is not enforceable onchain.&lt;br/&gt;&amp;gt; Instead, enforcement of the soft timeout *is* the act of putting the&lt;br/&gt;&amp;gt; channel state onchain.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Now, for the current &amp;#34;hard&amp;#34; block-based timeout, we already have a&lt;br/&gt;&amp;gt; reaction.&lt;br/&gt;&amp;gt; If the HTLC &amp;#34;hard&amp;#34; timeout is approaching:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * Drop the channel onchain and enforce the hard timeout onchain to reclaim&lt;br/&gt;&amp;gt; the funds in the HTLCs.&lt;br/&gt;&amp;gt; * Wait for the onchain action to be deeply resolved (either timelock or&lt;br/&gt;&amp;gt; hashlock branch is confirmed deeply) and report the result (success or&lt;br/&gt;&amp;gt; fail) upstream.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; What happens if the &amp;#34;soft&amp;#34; timeout is violated?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * Drop the channel onchain.&lt;br/&gt;&amp;gt; * Report the channel closure upstream.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The &amp;#34;hard&amp;#34; timeout is cancelled in any of these two conditions:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * A success is reported via `update_fulfill_htlc`, OR,&lt;br/&gt;&amp;gt; * A failure is reported via `update_fail_htlc` AND the HTLC is irrevocably&lt;br/&gt;&amp;gt; removed from the latest commitments/state(s) of the channel.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The &amp;#34;soft&amp;#34; timeout is cancelled in any of these three conditions, the&lt;br/&gt;&amp;gt; first two of which are the same as above:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * A success is reported via `update_fulfill_htlc`, OR,&lt;br/&gt;&amp;gt; * A failure is reported via `update_fail_htlc` AND the HTLC is irrevocably&lt;br/&gt;&amp;gt; removed from the latest commitments/state(s) of the channel, OR&lt;br/&gt;&amp;gt; * A channel closure is reported.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Let us fill this in more detail.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Suppose we have a payment route A-&amp;gt;B-&amp;gt;C-&amp;gt;E.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Both the &amp;#34;hard&amp;#34; block timeouts and the &amp;#34;soft&amp;#34; second timeouts decrement&lt;br/&gt;&amp;gt; monotonically at each hop.&lt;br/&gt;&amp;gt; Thus, the payee E has the shortest &amp;#34;hard&amp;#34; and &amp;#34;soft&amp;#34; timeouts (as normal).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * Suppose E then delays claiming the payment and violates the &amp;#34;soft&amp;#34;&lt;br/&gt;&amp;gt; timeout.&lt;br/&gt;&amp;gt; * C then drops the CE channel onchain.&lt;br/&gt;&amp;gt; * C reports, before its own timeout (slightly larger than the timeout&lt;br/&gt;&amp;gt; imposed on E), the closing of the channel CE, to B.&lt;br/&gt;&amp;gt; * B validates this report, and if valid, propagates the report to A.&lt;br/&gt;&amp;gt; * A validates this report, and if valid, accepts that the payment will be&lt;br/&gt;&amp;gt; &amp;#34;stuck&amp;#34; for up to the hard timeout it imposed on B.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; C has to report back to B in order to prevent B from closing the BC&lt;br/&gt;&amp;gt; channel, and B has to report back to A in order to prevent A from closing&lt;br/&gt;&amp;gt; the AB channel.&lt;br/&gt;&amp;gt; The decrementing seconds-unit timeouts are needed for each hop, for the&lt;br/&gt;&amp;gt; same reason that decrementing block-unit timeouts are needed.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Since E is motivated to attack intermediate nodes because it wants to&lt;br/&gt;&amp;gt; redirect payment forwards through itself rather than its competitotrs,&lt;br/&gt;&amp;gt; having one of its channels closed (which prevents it from being used for&lt;br/&gt;&amp;gt; forwarding) is directly opposed to its end goal of getting more money,&lt;br/&gt;&amp;gt; thus, we can believe the action of closing a channel involved in a griefing&lt;br/&gt;&amp;gt; attack is sufficient disincentive.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The major drawback is that enforcement of the soft timeout *is* a channel&lt;br/&gt;&amp;gt; closure, which is generally a negative for the network.&lt;br/&gt;&amp;gt; This is not a remote attack vector, since a node can only trigger this&lt;br/&gt;&amp;gt; closure if it is able to stall the fulfillment or failure of an HTLC on a&lt;br/&gt;&amp;gt; channel, which generally means the node triggering this closure can only do&lt;br/&gt;&amp;gt; so for its own channels (or it is able to, via a separate mechanism,&lt;br/&gt;&amp;gt; remotely crash a different node).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Proving Channel Closes&lt;br/&gt;&amp;gt; ----------------------&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; What C *really* needs to prove is that:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * It is *willing* to close a channel due to a violation of the soft&lt;br/&gt;&amp;gt; timeout.&lt;br/&gt;&amp;gt; * The channel it is willing to close was, in fact, involved in the same&lt;br/&gt;&amp;gt; payment attempt.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; With the above, B can believe that C was innocent of wrongdoing, because:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * C would only be wiling to close a channel in case of a protocol&lt;br/&gt;&amp;gt; violation, in this case, a violation of the soft timeout.&lt;br/&gt;&amp;gt; * The channel it closed was closed because of this payment attempt, and&lt;br/&gt;&amp;gt; not because of another payment attempt, or some other unrelated channel&lt;br/&gt;&amp;gt; being unilaterally closed.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; First, what C needs to prove is *NOT*, in fact, actual channel closure: it&lt;br/&gt;&amp;gt; needs to prove a *willingness* to close a channel.&lt;br/&gt;&amp;gt; Thus, it does not require the channel to actually be *closed* yet, i.e. it&lt;br/&gt;&amp;gt; does not have to wait for onchain activity that the channel closure is in a&lt;br/&gt;&amp;gt; mempool and is confirmed deeply onchain etc etc.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thus, to prove a *willingness to close* rather than an actual close, C can&lt;br/&gt;&amp;gt; provide the unilateral close of the channel CE.&lt;br/&gt;&amp;gt; The act of unilaterally closing a channel is the publication of the&lt;br/&gt;&amp;gt; transaction(s) making up the unilateral close.&lt;br/&gt;&amp;gt; Thus, if C is *willing* to close the channel, it is willing to publish the&lt;br/&gt;&amp;gt; transaction(s) involved, and thus, providing the unilateral close to B and&lt;br/&gt;&amp;gt; further upstream, shows a willingness to close the channel.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; B then validates the provided proof-of-closure by checking that the&lt;br/&gt;&amp;gt; unilateral close transaction is either onchain, in the mempool, or that it&lt;br/&gt;&amp;gt; spends a TXO that is not currently spent by another transaction.&lt;br/&gt;&amp;gt; In the case the unilateral close transaction is not confirmed and in the&lt;br/&gt;&amp;gt; mempool, B can speed up its propagation on the Bitcoin layer by putting it&lt;br/&gt;&amp;gt; in its own mempool as well --- after all, C is willing to close the channel&lt;br/&gt;&amp;gt; to exonerate itself and punish the actual culprit, and B putting the&lt;br/&gt;&amp;gt; unilateral close in its own mempool can only help C in what it is willing&lt;br/&gt;&amp;gt; to do.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Secondly, C needs to prove that the channel it is willing to close&lt;br/&gt;&amp;gt; involves the payment attempt, and is not some other channel closure that it&lt;br/&gt;&amp;gt; is attempting to use to fulfill its own soft timeout.&lt;br/&gt;&amp;gt; Since the unilateral close transaction *is* the proof-of-closure, B (and&lt;br/&gt;&amp;gt; A) can inspect the transaction outputs and see (with some additional data&lt;br/&gt;&amp;gt; from C) that one of the outputs is to an HTLC that matches the payment hash.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thus, B (and A) can believe that the proof-of-closure proves that whoever&lt;br/&gt;&amp;gt; is presenting it is free of wrongdoing, as whoever is actually causing the&lt;br/&gt;&amp;gt; delay has been punished (by someone being willing to close a channel with&lt;br/&gt;&amp;gt; the culprit), and that the proof-of-closure commits to this particular&lt;br/&gt;&amp;gt; payment attempt and no other (because it commits to a particular payment&lt;br/&gt;&amp;gt; hash).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Further, if CE is closed by E dropping it onchain rather than C, C will&lt;br/&gt;&amp;gt; still be able to fulfill its own soft timeout by taking the closing&lt;br/&gt;&amp;gt; transaction from E, which should still contain the HTLC.&lt;br/&gt;&amp;gt; Indeed, neither A nor B will particularly care (nor need to know) who&lt;br/&gt;&amp;gt; dropped the channel onchain, or (for A) that the channel participants are C&lt;br/&gt;&amp;gt; and E.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Update State Shenanigans&lt;br/&gt;&amp;gt; ------------------------&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Bitcoin update mechanisms are complicated things, and it may be possible&lt;br/&gt;&amp;gt; for an attacking payee E to fool around with the update state machine to&lt;br/&gt;&amp;gt; make it difficult for C to report a willingness to close CE.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In particular, I quote here the relevant passages from `lightning-rfc`,&lt;br/&gt;&amp;gt; `02-peer-protocol.md`, which is an implementation of the Poon-Dryja update&lt;br/&gt;&amp;gt; mechanism:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Thus each update traverses through the following states:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; 1. pending on the receiver&lt;br/&gt;&amp;gt; &amp;gt; 2. in the receiver&amp;#39;s latest commitment transaction&lt;br/&gt;&amp;gt; &amp;gt; 3. ... and the receiver&amp;#39;s previous commitment transaction has been&lt;br/&gt;&amp;gt; revoked,&lt;br/&gt;&amp;gt; &amp;gt;    and the update is pending on the sender&lt;br/&gt;&amp;gt; &amp;gt; 4. ... and in the sender&amp;#39;s latest commitment transaction&lt;br/&gt;&amp;gt; &amp;gt; 5. ... and the sender&amp;#39;s previous commitment transaction has been revoked&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The payee E is the &amp;#34;receiver&amp;#34; in this context.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In this case, once the update has reached step 2, then E has a commitment&lt;br/&gt;&amp;gt; transaction that it can put onchain, that contains an HTLC it can claim.&lt;br/&gt;&amp;gt; From this step onward, C cannot send a failure (i.e. it cannot send back&lt;br/&gt;&amp;gt; an `update_fail_htlc`) back to B, because E could drop its latest&lt;br/&gt;&amp;gt; commitment onchain and claim the HTLC onchain.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; However, until step 4, C does not have a unilateral close containing the&lt;br/&gt;&amp;gt; HTLC, and thus cannot provide a proof-of-closure that contains an HTLC that&lt;br/&gt;&amp;gt; refers to the payment.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thus, between steps 2 to 4, C cannot safely respond to its own soft&lt;br/&gt;&amp;gt; timeout.&lt;br/&gt;&amp;gt; C cannot respond with a failure, as E could then drop its latest&lt;br/&gt;&amp;gt; commitment transaction onchain and claim the payment from C, and extract&lt;br/&gt;&amp;gt; money from C that way.&lt;br/&gt;&amp;gt; C also cannot respond with a proof-of-closure, as it does not have a&lt;br/&gt;&amp;gt; transaction that it can use to provide this proof.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The best that C can do would be to impose an even shorter timeout between&lt;br/&gt;&amp;gt; steps 2 and 4 above, and to drop its current commitment transaction (which&lt;br/&gt;&amp;gt; does not contain the HTLC yet and thus does not constitute a valid&lt;br/&gt;&amp;gt; proof-of-closure) onchain.&lt;br/&gt;&amp;gt; In between the time it drops the commitment transaction and its own&lt;br/&gt;&amp;gt; incoming soft timeout, there is a chance, however small, that this&lt;br/&gt;&amp;gt; transaction will be confirmed, and the channel will (with high probability)&lt;br/&gt;&amp;gt; settle in a state where the HTLC is not instantiated, thus C can safely&lt;br/&gt;&amp;gt; fail its incoming HTLC (not show a proof-of-closure, since that is not&lt;br/&gt;&amp;gt; possible for C to do) without risk of loss, just prior to its own soft&lt;br/&gt;&amp;gt; timeout.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Of course, C is still at risk here: E could collude with miners via a&lt;br/&gt;&amp;gt; side-channel fee offer to confirm its commitment transaction with the HTLC&lt;br/&gt;&amp;gt; present, and ensure that C is liable for the HTLC value.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; With Decker-Russell-Osuntokun, we can remove this risk by requiring a&lt;br/&gt;&amp;gt; ritual as follows:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 1.  C requests exclusive access to update their single shared state.&lt;br/&gt;&amp;gt;   * This can be done via a variety of sub-protocols, including a fair coin&lt;br/&gt;&amp;gt; toss in case of near-simultaneous requests for exclusive locks on both&lt;br/&gt;&amp;gt; sides.&lt;br/&gt;&amp;gt; 2.  C provides the details of the new HTLC to E.&lt;br/&gt;&amp;gt; 3.  C and E generate the new state transaction and exchange signatures for&lt;br/&gt;&amp;gt; it.&lt;br/&gt;&amp;gt; 4.  C and E generate (without signing) the new update transaction.&lt;br/&gt;&amp;gt; 5.  E provides the signature (or share of signature, if MuSig) for the new&lt;br/&gt;&amp;gt; update transaction to C.&lt;br/&gt;&amp;gt; 6.  C provides the signature for the new update transaction to E, which&lt;br/&gt;&amp;gt; releases the exclusive lock on the shared state atomically with the&lt;br/&gt;&amp;gt; finalization of the new update transaction.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Prior to step 5, C can simply fail the incoming HTLC from B in case its&lt;br/&gt;&amp;gt; own soft timeout is near.&lt;br/&gt;&amp;gt; Even if E performs step 5 after C has already failed the incoming HTLC&lt;br/&gt;&amp;gt; from B, C can simply not perform step 6 and drop the channel onchain with&lt;br/&gt;&amp;gt; the previous update and state transactions.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; With Poon-Dryja, we will have to rearrange the order in which we perform&lt;br/&gt;&amp;gt; things, effectively adding an extra communications turnaround between the&lt;br/&gt;&amp;gt; participants.&lt;br/&gt;&amp;gt; Specifically, the order would have to be revised to:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; 1. pending on the sender&lt;br/&gt;&amp;gt; &amp;gt; 2. in the sender&amp;#39;s latest commitment transaction&lt;br/&gt;&amp;gt; &amp;gt; 3. ... and the sender&amp;#39;s previous commitment transaction has been revoked,&lt;br/&gt;&amp;gt; &amp;gt;    and the update is pending on the receiver&lt;br/&gt;&amp;gt; &amp;gt; 4. ... and in the receiver&amp;#39;s latest commitment transaction&lt;br/&gt;&amp;gt; &amp;gt; 5. ... and the receiver&amp;#39;s previous commitment transaction has been&lt;br/&gt;&amp;gt; revoked&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This allows the sender (C in our context) to provide a proof-of-closure&lt;br/&gt;&amp;gt; after step 2, and before step 2, C can safely return a failure with&lt;br/&gt;&amp;gt; `update_fail_htlc` (and refuse to proceed beyond step 2, thus ensuring it&lt;br/&gt;&amp;gt; can still use the previous commitment that still has no HTLC).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Of course, this change will require redesigning the update state machine,&lt;br/&gt;&amp;gt; increasing the number of communication turnarounds, and creating a subtle&lt;br/&gt;&amp;gt; incompatbility when transitioning a payment from a hop that knows only the&lt;br/&gt;&amp;gt; old update state machine to a hop that knows the new update state machine.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Purely Falsified Proof-Of-Closure&lt;br/&gt;&amp;gt; ---------------------------------&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Of course, the attacking node E might want to create a false&lt;br/&gt;&amp;gt; proof-of-closure.&lt;br/&gt;&amp;gt; E can do this by simulating a Lightning channel: lock an amount of funds&lt;br/&gt;&amp;gt; in a 2-of-2 (where E controls both keys), then spend it in a set of&lt;br/&gt;&amp;gt; transactions mimicking the unilateral close.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; We observe, however, that the overhead of simulating a Lightning channel&lt;br/&gt;&amp;gt; is the same as the overhead of actually creating and closing a Lightning&lt;br/&gt;&amp;gt; channel.&lt;br/&gt;&amp;gt; Since the punishment of proof-of-closure is to force attackers to have&lt;br/&gt;&amp;gt; their channels closed, we can consider that this simulation of a channel&lt;br/&gt;&amp;gt; open and close is sufficient as well.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Future-Proofing&lt;br/&gt;&amp;gt; ---------------&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This sketch of proof-of-closure can be used for any update mechanism:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * With Poon-Dryja, C can use its own commitment transaction as the&lt;br/&gt;&amp;gt; proof-of-closure.&lt;br/&gt;&amp;gt; * With Decker-Wattenhofer, C can give all the offchain transactions up to&lt;br/&gt;&amp;gt; the last stage in the multi-stage decrementing-`nSequence` mechanism.&lt;br/&gt;&amp;gt; * With Deckker-Russell-Osuntokun, C can give the latest update and state&lt;br/&gt;&amp;gt; trnsaction.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Basically, we expect that for now, and in the future, any update mechanism&lt;br/&gt;&amp;gt; worth consideration will have a concept of &amp;#34;unilateral close&amp;#34; where a&lt;br/&gt;&amp;gt; channel can be dropped onchain, using data that only one of the channel&lt;br/&gt;&amp;gt; participants holds.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Such a unilateral close will be a sequence of one or more valid&lt;br/&gt;&amp;gt; transactions, terminating in a transaction containing an HTLC-like contract&lt;br/&gt;&amp;gt; in one of its outputs.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thus, to validate the unilateral close, it is only required to validate&lt;br/&gt;&amp;gt; all the transactions contained in the proof-of-closure, and see that the&lt;br/&gt;&amp;gt; last transaction has an HTLC output.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The limitations are thus:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * The acceptable forms of HTLC would need to be agreed-upon by the entire&lt;br/&gt;&amp;gt; network.&lt;br/&gt;&amp;gt; * Implementations would need to be able to assess, in a&lt;br/&gt;&amp;gt; Bitcoin-consensus-compatible way, whether a transaction is valid or not.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Payment Decorrelation and Payment Points&lt;br/&gt;&amp;gt; ----------------------------------------&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Of course, having a single payment hash for the entire payment attempt is&lt;br/&gt;&amp;gt; a privacy loss, which we intend to fix in the near future by using payment&lt;br/&gt;&amp;gt; points, and adding a blinding scalar at each hop, aka. payment&lt;br/&gt;&amp;gt; decorrelation.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thus, in the future, there will not be any HTLC, but instead a PTLC.&lt;br/&gt;&amp;gt; Further, the payment point at each hop will be changed at each hop, in&lt;br/&gt;&amp;gt; order to prevent decorrelation.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thus, C needs to provide proofs:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * That an apparent singlesig on the unilateral close output is in fact a&lt;br/&gt;&amp;gt; PTLC.&lt;br/&gt;&amp;gt;   C needs to provide:&lt;br/&gt;&amp;gt;   * A target point P.&lt;br/&gt;&amp;gt;   * A partial signature that would spend that singlesig for a particular&lt;br/&gt;&amp;gt; sighash.&lt;br/&gt;&amp;gt;   * An adaptor signature which, with knowledge of the completed signature,&lt;br/&gt;&amp;gt; adaptor signature, and sighash message, would have revealed the scalar&lt;br/&gt;&amp;gt; behind P.&lt;br/&gt;&amp;gt; * That the PTLC belongs to the same payment attempt as what B offered to C.&lt;br/&gt;&amp;gt;   C needs to provide:&lt;br/&gt;&amp;gt;   * The C-only blinding factor that is the difference between the payment&lt;br/&gt;&amp;gt; point of the B-to-C PTLC and the C-to-E PTLC on the unilateral close.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Then, when B needs to propagate the proof-of-closure back to A, B simply&lt;br/&gt;&amp;gt; adds its own blinding factor to the reported blinding factor, in order to&lt;br/&gt;&amp;gt; convince A that this is the same payment attempt.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; As we have brought up privacy, we observe that, when this mechanism&lt;br/&gt;&amp;gt; triggers, there is a mild privacy loss, in that intermediate nodes now know&lt;br/&gt;&amp;gt; some channel closure that is related to this payment, and can thus&lt;br/&gt;&amp;gt; determine the exact path that the payment attempt went through, at least&lt;br/&gt;&amp;gt; until the channel being closed.&lt;br/&gt;&amp;gt; However, proof-of-closure is only propagated in case of violation of the&lt;br/&gt;&amp;gt; soft timeout, so for normal non-malicious payments, proof-of-closure does&lt;br/&gt;&amp;gt; not cause any privacy loss.&lt;br/&gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt; Lightning-dev mailing list&lt;br/&gt;&amp;gt; Lightning-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200401/082a44f1/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200401/082a44f1/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:59:21&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsqffechytal9ma5573j0w3gdx056k4hx6zkcnjjh05rktrnrms83qzypryphar8gjqg5ruz9m6s74ff87weqzmu8s4n8salx7gy0p47h3qspvc00m</id>
    
      <title type="html">📅 Original date posted:2020-04-01 📝 Original message: I ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsqffechytal9ma5573j0w3gdx056k4hx6zkcnjjh05rktrnrms83qzypryphar8gjqg5ruz9m6s74ff87weqzmu8s4n8salx7gy0p47h3qspvc00m" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs2fzhzqugsuvnku5w2w47tz6ec0tsqjl8d6m07j267z78z0grz20se3thst&#39;&gt;nevent1q…thst&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-04-01&lt;br/&gt;📝 Original message:&lt;br/&gt;I just thought of a potentially more serious problem, at least for&lt;br/&gt;Poon-Dryja channels, isn&amp;#39;t it true that giving a proof of closure is&lt;br/&gt;equivalent to actually closing the channel since once other parties have&lt;br/&gt;copies of the fully signed commitment transaction, it cannot be safely&lt;br/&gt;revoked since other parties now have the ability to publish an old state? I&lt;br/&gt;might be missing something but this seems like a big problem.&lt;br/&gt;&lt;br/&gt;Best,&lt;br/&gt;Nadav&lt;br/&gt;&lt;br/&gt;On Wed, Apr 1, 2020 at 1:07 PM Nadav Kohen &amp;lt;nadav at suredbits.com&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Hi ZmnSCPxj and list,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Love the idea! I have a couple questions though:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I&amp;#39;m not convinced that &amp;#34;Purely Falsified Proof-Of-Closure&amp;#34; aren&amp;#39;t&lt;br/&gt;&amp;gt; effective. Consider a similar network to the one you described where we&lt;br/&gt;&amp;gt; have channels A - B - C and A - E - C but where we add a &amp;#34;fake&amp;#34; channel E -&lt;br/&gt;&amp;gt; E&amp;#39;. Now if the attacker sets up a payment from E to E&amp;#39; using the route E -&lt;br/&gt;&amp;gt; C - B - A - E - E&amp;#39;, then the attacker can successfully lock up all of B&amp;#39;s&lt;br/&gt;&amp;gt; channels (as is desirable to get rid of competition) and also generate a&lt;br/&gt;&amp;gt; false proof of closure for the E - E&amp;#39; channel. Even if this false proof&lt;br/&gt;&amp;gt; (which is a commitment tx) ends up being published on chain, E has lost no&lt;br/&gt;&amp;gt; ability to route and has successfully made B unable to route between A and&lt;br/&gt;&amp;gt; C. If my understanding of the proposal is correct, and it may not be, then&lt;br/&gt;&amp;gt; the punishment for grieving payments is the threat of closing channels that&lt;br/&gt;&amp;gt; would benefit from the grieving attack. But adding a new channel on the end&lt;br/&gt;&amp;gt; to be closed seems to invalidate this punishment?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; A second question I have is if you think that it would be advisable to use&lt;br/&gt;&amp;gt; up-front payments (pay for attempt, not just success) on payments with&lt;br/&gt;&amp;gt; abnormally high soft timeouts? If all this works, this combination seems to&lt;br/&gt;&amp;gt; be a way to enable hodl invoices under the proof of closure proposal.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Best,&lt;br/&gt;&amp;gt; Nadav&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On Wed, Apr 1, 2020 at 1:19 AM ZmnSCPxj via Lightning-dev &amp;lt;&lt;br/&gt;&amp;gt; lightning-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Introduction&lt;br/&gt;&amp;gt;&amp;gt; ============&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Given the fact that contracts on offchain protocols need to be&lt;br/&gt;&amp;gt;&amp;gt; enforceable onchain as well, timelocks involved in multi-hop payments are&lt;br/&gt;&amp;gt;&amp;gt; measured in blocks.&lt;br/&gt;&amp;gt;&amp;gt; This is because the blockchain can only (third-party-verifiably) enforce&lt;br/&gt;&amp;gt;&amp;gt; timeouts in units of entire blocks.&lt;br/&gt;&amp;gt;&amp;gt; This leads to very long timeouts for payment delivery, thus multi-hop&lt;br/&gt;&amp;gt;&amp;gt; offchain payment attempts can be, deliberately or accidentally, be in a&lt;br/&gt;&amp;gt;&amp;gt; &amp;#34;pending&amp;#34; state up to the very large timeouts involved.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Deliberately setting up a multi-hop payment such that it will be in a&lt;br/&gt;&amp;gt;&amp;gt; &amp;#34;pending&amp;#34; state for long periods of time is colloquially known as a&lt;br/&gt;&amp;gt;&amp;gt; &amp;#34;griefing attack&amp;#34;.&lt;br/&gt;&amp;gt;&amp;gt; In this article, we assess various proposed solutions to mitigate the&lt;br/&gt;&amp;gt;&amp;gt; effects of griefing attacks, and propose a particular solution,&lt;br/&gt;&amp;gt;&amp;gt; proof-of-closure, as well, that requires significant changes to the update&lt;br/&gt;&amp;gt;&amp;gt; state machine.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Digression: Why Grief?&lt;br/&gt;&amp;gt;&amp;gt; ======================&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Before embarking on our investigation for solutions to the griefing&lt;br/&gt;&amp;gt;&amp;gt; problem, we should first wonder if griefing is, in fact, a problem.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; This brings up the question of: why would anybody grief at all?&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Humans, like cats and other less-sapient pieces of walking meat, often&lt;br/&gt;&amp;gt;&amp;gt; find enjoyment in causing the suffering of others for no immediate direct&lt;br/&gt;&amp;gt;&amp;gt; gain to themselves, as a public demonstration of dominance over those they&lt;br/&gt;&amp;gt;&amp;gt; make suffer (aka &amp;#34;shits and giggles&amp;#34;, which, if executed correctly, can&lt;br/&gt;&amp;gt;&amp;gt; lead to eventual direct gains to themselves or their progeny or relatives&lt;br/&gt;&amp;gt;&amp;gt; or allies, but such details are often outside the ken of the very beings&lt;br/&gt;&amp;gt;&amp;gt; who execute such survival strategies: brains are pieces of meat that have&lt;br/&gt;&amp;gt;&amp;gt; been hacked to act as action-reaction engines, but are not sophisticated&lt;br/&gt;&amp;gt;&amp;gt; enough to execute as pure rationality engines at all times).&lt;br/&gt;&amp;gt;&amp;gt; Fortunately, in the Bitcoin world, only purely rational beings of pure&lt;br/&gt;&amp;gt;&amp;gt; selfishness can exist in the long run, thus we can neglect such motivations&lt;br/&gt;&amp;gt;&amp;gt; as mere noise.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; First, let us investigate *how* griefing attacks can be performed.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; * An intermediate node in a multi-hop attempt can delay forwarding or&lt;br/&gt;&amp;gt;&amp;gt; failing an incoming HTLC.&lt;br/&gt;&amp;gt;&amp;gt; * A final node in a payment attempt can delay claiming an incoming HTLC.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Let us consider a purely rational intermediate node of pure selfishness:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; * If it forwards as soon as possible, it can earn fees, and also speed up&lt;br/&gt;&amp;gt;&amp;gt; the release of the HTLC-locked funds so that they can reuse those funds as&lt;br/&gt;&amp;gt;&amp;gt; liquidity for further payment attempts.&lt;br/&gt;&amp;gt;&amp;gt; * Thus, delaying an HTLC is not selfishly-rational for an intermediate&lt;br/&gt;&amp;gt;&amp;gt; node.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Thus, for an intermediate node, it seems there is no selfishly-rational&lt;br/&gt;&amp;gt;&amp;gt; motivation to execute a griefing attack on an arbitrary payment attempt.&lt;br/&gt;&amp;gt;&amp;gt; We can then conclude that an intermediate that delays a payment would do&lt;br/&gt;&amp;gt;&amp;gt; so, not of its own rational self-interest, but as an accident, such as an&lt;br/&gt;&amp;gt;&amp;gt; unforeseen connectivity or power failure.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; However, things are different when we consider a non-arbitrary payment.&lt;br/&gt;&amp;gt;&amp;gt; Suppose a node were to make a payment attempt to itself, and deliberately&lt;br/&gt;&amp;gt;&amp;gt; delay claiming this self-payment.&lt;br/&gt;&amp;gt;&amp;gt; This lets any single node, *who happens to own large liquidity*, to lock&lt;br/&gt;&amp;gt;&amp;gt; up the liquidity of other nodes.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; The motivation to lock up the liquidity of other nodes is to *eliminate&lt;br/&gt;&amp;gt;&amp;gt; competition*.&lt;br/&gt;&amp;gt;&amp;gt; Suppose we have a network as below:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt;     A -- B -- C&lt;br/&gt;&amp;gt;&amp;gt;       \     /&lt;br/&gt;&amp;gt;&amp;gt;        \   /&lt;br/&gt;&amp;gt;&amp;gt;         \ /&lt;br/&gt;&amp;gt;&amp;gt;          E&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; When A and C want to transact with one another, they may choose to route&lt;br/&gt;&amp;gt;&amp;gt; via either B or E.&lt;br/&gt;&amp;gt;&amp;gt; B and E are therefore competitors in the business of forwarding payments.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; But suppose E has much larger channels AE and CE than the channels of AB&lt;br/&gt;&amp;gt;&amp;gt; and CB.&lt;br/&gt;&amp;gt;&amp;gt; For example, suppose E has 100mBTC perfectly-balanced channels while B&lt;br/&gt;&amp;gt;&amp;gt; has only 10mBTC perfectly-balanced channels, as all things should be in&lt;br/&gt;&amp;gt;&amp;gt; simplified models of reality.&lt;br/&gt;&amp;gt;&amp;gt; E can then &amp;#34;take out the competition&amp;#34; by making a 5mBTC self-payment&lt;br/&gt;&amp;gt;&amp;gt; along E-&amp;gt;A-&amp;gt;B-&amp;gt;C-&amp;gt;E and a 5mBTC self-payment along E-&amp;gt;C-&amp;gt;B-&amp;gt;A-&amp;gt;E, then&lt;br/&gt;&amp;gt;&amp;gt; refusing to claim the payment, tying up all the liquidity of the channels&lt;br/&gt;&amp;gt;&amp;gt; of B.&lt;br/&gt;&amp;gt;&amp;gt; By doing so, it can ensure that A and C will always fail to pay via B,&lt;br/&gt;&amp;gt;&amp;gt; even if they wish to transact in amounts less than 5mBTC.&lt;br/&gt;&amp;gt;&amp;gt; E thereby eliminates B as a competitor.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; This demonstrates that griefing attacks will be motivated, such that such&lt;br/&gt;&amp;gt;&amp;gt; attacks will be performed by payers and payees *against intermediate nodes*.&lt;br/&gt;&amp;gt;&amp;gt; Intermediate nodes have no motivation to attack payers and payees (those&lt;br/&gt;&amp;gt;&amp;gt; are their potential customers in the business of forwarding payments, and&lt;br/&gt;&amp;gt;&amp;gt; attacking potential customers is bad business: such attacking intermediate&lt;br/&gt;&amp;gt;&amp;gt; nodes will be removed economically in the long run).&lt;br/&gt;&amp;gt;&amp;gt; However, payers and payees can become motivated to attack intermediate&lt;br/&gt;&amp;gt;&amp;gt; nodes, if the &amp;#34;payer&amp;#34; and &amp;#34;payee&amp;#34; are actually competitor intermediate&lt;br/&gt;&amp;gt;&amp;gt; nodes.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; (We can observe that this is always a possibility even outside of&lt;br/&gt;&amp;gt;&amp;gt; Lightning: a service or product provider has no incentive to attack its&lt;br/&gt;&amp;gt;&amp;gt; customers (&amp;#34;the customer is always right&amp;#34;), but have an incentive to&lt;br/&gt;&amp;gt;&amp;gt; *pretend* to be a customer of a competitor and attack them.)&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; We will keep this fact in mind: active griefing attacks are attacks *on*&lt;br/&gt;&amp;gt;&amp;gt; intermediate nodes, not *by* intermediate nodes, because there is no&lt;br/&gt;&amp;gt;&amp;gt; economic incentive for intermediate nodes to attack their customers.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Previous Proposed Solutions&lt;br/&gt;&amp;gt;&amp;gt; ===========================&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Time-Spent Reporting&lt;br/&gt;&amp;gt;&amp;gt; --------------------&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; At each channel along the route, the time spent by a node to handle its&lt;br/&gt;&amp;gt;&amp;gt; forwarding is recorded, and reported upstream in the route.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Unfortunately, this solution protects payers from intermediate nodes and&lt;br/&gt;&amp;gt;&amp;gt; payees: it does not protect intermediate nodes from colluding payers and&lt;br/&gt;&amp;gt;&amp;gt; payees.&lt;br/&gt;&amp;gt;&amp;gt; Even if an intermediate node knows that a particular node is consistently&lt;br/&gt;&amp;gt;&amp;gt; slow via a previous time-spent report, it will not be able, with our&lt;br/&gt;&amp;gt;&amp;gt; current onion routing, determine if an onion packet it just received will&lt;br/&gt;&amp;gt;&amp;gt; or will not go through the known-slow node.&lt;br/&gt;&amp;gt;&amp;gt; Thus, an intermediate node would not be able to defend against distant&lt;br/&gt;&amp;gt;&amp;gt; payees that, with a colluding payer, will not claim a particular payment.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; As we have established, an active griefing atttack will never be&lt;br/&gt;&amp;gt;&amp;gt; deliberately performed by a selfishly-rational intermediate node.&lt;br/&gt;&amp;gt;&amp;gt; Thus, this solution protects against the wrong thing: it protects payers&lt;br/&gt;&amp;gt;&amp;gt; against slow/unreliable intermediate nodes, it does not protect&lt;br/&gt;&amp;gt;&amp;gt; intermediate nodes against malicious payer/payee collusions.&lt;br/&gt;&amp;gt;&amp;gt; It protects only against intermediate nodes that inadvertently go offline&lt;br/&gt;&amp;gt;&amp;gt; during forwarding, but such nodes will inevitably lose out on the&lt;br/&gt;&amp;gt;&amp;gt; forwarding market anyway, and will disappear in the long run.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Up-Front Payment&lt;br/&gt;&amp;gt;&amp;gt; ----------------&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Payers pay for an attempt, not just the successful completion of an&lt;br/&gt;&amp;gt;&amp;gt; attempt.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; A variation on this is that the payer (or payee) continuously pays as&lt;br/&gt;&amp;gt;&amp;gt; long as the payment is pending.&lt;br/&gt;&amp;gt;&amp;gt; Further variations include paying by other means, such as just locking&lt;br/&gt;&amp;gt;&amp;gt; funds or paying with proof-of-work.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; While it certainly erects economic barriers against payer/payee&lt;br/&gt;&amp;gt;&amp;gt; collusions attacking intermediate nodes, it *also* erects economic barriers&lt;br/&gt;&amp;gt;&amp;gt; against normal, non-malicious payments.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; We can consider that economic barriers against non-malicious, low-value,&lt;br/&gt;&amp;gt;&amp;gt; high-frequency payments (&amp;#34;micropayments&amp;#34;) may be enough that such payments&lt;br/&gt;&amp;gt;&amp;gt; become infeasible if we impose up-front payment for mere attempts.&lt;br/&gt;&amp;gt;&amp;gt; Thus, while this solution is certainly something we can consider, we must&lt;br/&gt;&amp;gt;&amp;gt; be reluctant to use it due to its up-front, strict-evaluation behavior.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Proof-Of-Closure&lt;br/&gt;&amp;gt;&amp;gt; ================&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Observing the above, we want the properties for a &amp;#34;good&amp;#34; solution to&lt;br/&gt;&amp;gt;&amp;gt; griefing attacks to be:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; * It should protect intermediate nodes against payer/payee collusions.&lt;br/&gt;&amp;gt;&amp;gt; * It should only come into play upon detection of an attack.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; We now present proof-of-closure, which (we hope) has the above properties.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; We can consider instead a softer timeout, distinct from the HTLC&lt;br/&gt;&amp;gt;&amp;gt; block-based timeout.&lt;br/&gt;&amp;gt;&amp;gt; This softer timeout is measurable in fractions of a second, e.g. units of&lt;br/&gt;&amp;gt;&amp;gt; 0.1 seconds.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Each node on the network advertises, in addition to a block-based&lt;br/&gt;&amp;gt;&amp;gt; `cltv_delta`, a `timeout_delta` in units of 0.1 seconds.&lt;br/&gt;&amp;gt;&amp;gt; Further, each invoice contains, in addition to a block-based&lt;br/&gt;&amp;gt;&amp;gt; `final_cltv`, a `final_timeout` in units of 0.1 seconds.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Thus, there are two timeouts:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; * The current &amp;#34;hard&amp;#34; block-based timeout that is enforceable onchain.&lt;br/&gt;&amp;gt;&amp;gt; * A new &amp;#34;soft&amp;#34; sidereal-time-based timeout that is not onchain&lt;br/&gt;&amp;gt;&amp;gt; enforceable.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; The soft timeout, as mentioned, is not enforceable onchain.&lt;br/&gt;&amp;gt;&amp;gt; Instead, enforcement of the soft timeout *is* the act of putting the&lt;br/&gt;&amp;gt;&amp;gt; channel state onchain.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Now, for the current &amp;#34;hard&amp;#34; block-based timeout, we already have a&lt;br/&gt;&amp;gt;&amp;gt; reaction.&lt;br/&gt;&amp;gt;&amp;gt; If the HTLC &amp;#34;hard&amp;#34; timeout is approaching:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; * Drop the channel onchain and enforce the hard timeout onchain to&lt;br/&gt;&amp;gt;&amp;gt; reclaim the funds in the HTLCs.&lt;br/&gt;&amp;gt;&amp;gt; * Wait for the onchain action to be deeply resolved (either timelock or&lt;br/&gt;&amp;gt;&amp;gt; hashlock branch is confirmed deeply) and report the result (success or&lt;br/&gt;&amp;gt;&amp;gt; fail) upstream.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; What happens if the &amp;#34;soft&amp;#34; timeout is violated?&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; * Drop the channel onchain.&lt;br/&gt;&amp;gt;&amp;gt; * Report the channel closure upstream.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; The &amp;#34;hard&amp;#34; timeout is cancelled in any of these two conditions:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; * A success is reported via `update_fulfill_htlc`, OR,&lt;br/&gt;&amp;gt;&amp;gt; * A failure is reported via `update_fail_htlc` AND the HTLC is&lt;br/&gt;&amp;gt;&amp;gt; irrevocably removed from the latest commitments/state(s) of the channel.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; The &amp;#34;soft&amp;#34; timeout is cancelled in any of these three conditions, the&lt;br/&gt;&amp;gt;&amp;gt; first two of which are the same as above:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; * A success is reported via `update_fulfill_htlc`, OR,&lt;br/&gt;&amp;gt;&amp;gt; * A failure is reported via `update_fail_htlc` AND the HTLC is&lt;br/&gt;&amp;gt;&amp;gt; irrevocably removed from the latest commitments/state(s) of the channel, OR&lt;br/&gt;&amp;gt;&amp;gt; * A channel closure is reported.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Let us fill this in more detail.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Suppose we have a payment route A-&amp;gt;B-&amp;gt;C-&amp;gt;E.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Both the &amp;#34;hard&amp;#34; block timeouts and the &amp;#34;soft&amp;#34; second timeouts decrement&lt;br/&gt;&amp;gt;&amp;gt; monotonically at each hop.&lt;br/&gt;&amp;gt;&amp;gt; Thus, the payee E has the shortest &amp;#34;hard&amp;#34; and &amp;#34;soft&amp;#34; timeouts (as normal).&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; * Suppose E then delays claiming the payment and violates the &amp;#34;soft&amp;#34;&lt;br/&gt;&amp;gt;&amp;gt; timeout.&lt;br/&gt;&amp;gt;&amp;gt; * C then drops the CE channel onchain.&lt;br/&gt;&amp;gt;&amp;gt; * C reports, before its own timeout (slightly larger than the timeout&lt;br/&gt;&amp;gt;&amp;gt; imposed on E), the closing of the channel CE, to B.&lt;br/&gt;&amp;gt;&amp;gt; * B validates this report, and if valid, propagates the report to A.&lt;br/&gt;&amp;gt;&amp;gt; * A validates this report, and if valid, accepts that the payment will be&lt;br/&gt;&amp;gt;&amp;gt; &amp;#34;stuck&amp;#34; for up to the hard timeout it imposed on B.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; C has to report back to B in order to prevent B from closing the BC&lt;br/&gt;&amp;gt;&amp;gt; channel, and B has to report back to A in order to prevent A from closing&lt;br/&gt;&amp;gt;&amp;gt; the AB channel.&lt;br/&gt;&amp;gt;&amp;gt; The decrementing seconds-unit timeouts are needed for each hop, for the&lt;br/&gt;&amp;gt;&amp;gt; same reason that decrementing block-unit timeouts are needed.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Since E is motivated to attack intermediate nodes because it wants to&lt;br/&gt;&amp;gt;&amp;gt; redirect payment forwards through itself rather than its competitotrs,&lt;br/&gt;&amp;gt;&amp;gt; having one of its channels closed (which prevents it from being used for&lt;br/&gt;&amp;gt;&amp;gt; forwarding) is directly opposed to its end goal of getting more money,&lt;br/&gt;&amp;gt;&amp;gt; thus, we can believe the action of closing a channel involved in a griefing&lt;br/&gt;&amp;gt;&amp;gt; attack is sufficient disincentive.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; The major drawback is that enforcement of the soft timeout *is* a channel&lt;br/&gt;&amp;gt;&amp;gt; closure, which is generally a negative for the network.&lt;br/&gt;&amp;gt;&amp;gt; This is not a remote attack vector, since a node can only trigger this&lt;br/&gt;&amp;gt;&amp;gt; closure if it is able to stall the fulfillment or failure of an HTLC on a&lt;br/&gt;&amp;gt;&amp;gt; channel, which generally means the node triggering this closure can only do&lt;br/&gt;&amp;gt;&amp;gt; so for its own channels (or it is able to, via a separate mechanism,&lt;br/&gt;&amp;gt;&amp;gt; remotely crash a different node).&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Proving Channel Closes&lt;br/&gt;&amp;gt;&amp;gt; ----------------------&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; What C *really* needs to prove is that:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; * It is *willing* to close a channel due to a violation of the soft&lt;br/&gt;&amp;gt;&amp;gt; timeout.&lt;br/&gt;&amp;gt;&amp;gt; * The channel it is willing to close was, in fact, involved in the same&lt;br/&gt;&amp;gt;&amp;gt; payment attempt.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; With the above, B can believe that C was innocent of wrongdoing, because:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; * C would only be wiling to close a channel in case of a protocol&lt;br/&gt;&amp;gt;&amp;gt; violation, in this case, a violation of the soft timeout.&lt;br/&gt;&amp;gt;&amp;gt; * The channel it closed was closed because of this payment attempt, and&lt;br/&gt;&amp;gt;&amp;gt; not because of another payment attempt, or some other unrelated channel&lt;br/&gt;&amp;gt;&amp;gt; being unilaterally closed.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; First, what C needs to prove is *NOT*, in fact, actual channel closure:&lt;br/&gt;&amp;gt;&amp;gt; it needs to prove a *willingness* to close a channel.&lt;br/&gt;&amp;gt;&amp;gt; Thus, it does not require the channel to actually be *closed* yet, i.e.&lt;br/&gt;&amp;gt;&amp;gt; it does not have to wait for onchain activity that the channel closure is&lt;br/&gt;&amp;gt;&amp;gt; in a mempool and is confirmed deeply onchain etc etc.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Thus, to prove a *willingness to close* rather than an actual close, C&lt;br/&gt;&amp;gt;&amp;gt; can provide the unilateral close of the channel CE.&lt;br/&gt;&amp;gt;&amp;gt; The act of unilaterally closing a channel is the publication of the&lt;br/&gt;&amp;gt;&amp;gt; transaction(s) making up the unilateral close.&lt;br/&gt;&amp;gt;&amp;gt; Thus, if C is *willing* to close the channel, it is willing to publish&lt;br/&gt;&amp;gt;&amp;gt; the transaction(s) involved, and thus, providing the unilateral close to B&lt;br/&gt;&amp;gt;&amp;gt; and further upstream, shows a willingness to close the channel.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; B then validates the provided proof-of-closure by checking that the&lt;br/&gt;&amp;gt;&amp;gt; unilateral close transaction is either onchain, in the mempool, or that it&lt;br/&gt;&amp;gt;&amp;gt; spends a TXO that is not currently spent by another transaction.&lt;br/&gt;&amp;gt;&amp;gt; In the case the unilateral close transaction is not confirmed and in the&lt;br/&gt;&amp;gt;&amp;gt; mempool, B can speed up its propagation on the Bitcoin layer by putting it&lt;br/&gt;&amp;gt;&amp;gt; in its own mempool as well --- after all, C is willing to close the channel&lt;br/&gt;&amp;gt;&amp;gt; to exonerate itself and punish the actual culprit, and B putting the&lt;br/&gt;&amp;gt;&amp;gt; unilateral close in its own mempool can only help C in what it is willing&lt;br/&gt;&amp;gt;&amp;gt; to do.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Secondly, C needs to prove that the channel it is willing to close&lt;br/&gt;&amp;gt;&amp;gt; involves the payment attempt, and is not some other channel closure that it&lt;br/&gt;&amp;gt;&amp;gt; is attempting to use to fulfill its own soft timeout.&lt;br/&gt;&amp;gt;&amp;gt; Since the unilateral close transaction *is* the proof-of-closure, B (and&lt;br/&gt;&amp;gt;&amp;gt; A) can inspect the transaction outputs and see (with some additional data&lt;br/&gt;&amp;gt;&amp;gt; from C) that one of the outputs is to an HTLC that matches the payment hash.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Thus, B (and A) can believe that the proof-of-closure proves that whoever&lt;br/&gt;&amp;gt;&amp;gt; is presenting it is free of wrongdoing, as whoever is actually causing the&lt;br/&gt;&amp;gt;&amp;gt; delay has been punished (by someone being willing to close a channel with&lt;br/&gt;&amp;gt;&amp;gt; the culprit), and that the proof-of-closure commits to this particular&lt;br/&gt;&amp;gt;&amp;gt; payment attempt and no other (because it commits to a particular payment&lt;br/&gt;&amp;gt;&amp;gt; hash).&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Further, if CE is closed by E dropping it onchain rather than C, C will&lt;br/&gt;&amp;gt;&amp;gt; still be able to fulfill its own soft timeout by taking the closing&lt;br/&gt;&amp;gt;&amp;gt; transaction from E, which should still contain the HTLC.&lt;br/&gt;&amp;gt;&amp;gt; Indeed, neither A nor B will particularly care (nor need to know) who&lt;br/&gt;&amp;gt;&amp;gt; dropped the channel onchain, or (for A) that the channel participants are C&lt;br/&gt;&amp;gt;&amp;gt; and E.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Update State Shenanigans&lt;br/&gt;&amp;gt;&amp;gt; ------------------------&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Bitcoin update mechanisms are complicated things, and it may be possible&lt;br/&gt;&amp;gt;&amp;gt; for an attacking payee E to fool around with the update state machine to&lt;br/&gt;&amp;gt;&amp;gt; make it difficult for C to report a willingness to close CE.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; In particular, I quote here the relevant passages from `lightning-rfc`,&lt;br/&gt;&amp;gt;&amp;gt; `02-peer-protocol.md`, which is an implementation of the Poon-Dryja update&lt;br/&gt;&amp;gt;&amp;gt; mechanism:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; Thus each update traverses through the following states:&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; 1. pending on the receiver&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; 2. in the receiver&amp;#39;s latest commitment transaction&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; 3. ... and the receiver&amp;#39;s previous commitment transaction has been&lt;br/&gt;&amp;gt;&amp;gt; revoked,&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;    and the update is pending on the sender&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; 4. ... and in the sender&amp;#39;s latest commitment transaction&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; 5. ... and the sender&amp;#39;s previous commitment transaction has been revoked&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; The payee E is the &amp;#34;receiver&amp;#34; in this context.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; In this case, once the update has reached step 2, then E has a commitment&lt;br/&gt;&amp;gt;&amp;gt; transaction that it can put onchain, that contains an HTLC it can claim.&lt;br/&gt;&amp;gt;&amp;gt; From this step onward, C cannot send a failure (i.e. it cannot send back&lt;br/&gt;&amp;gt;&amp;gt; an `update_fail_htlc`) back to B, because E could drop its latest&lt;br/&gt;&amp;gt;&amp;gt; commitment onchain and claim the HTLC onchain.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; However, until step 4, C does not have a unilateral close containing the&lt;br/&gt;&amp;gt;&amp;gt; HTLC, and thus cannot provide a proof-of-closure that contains an HTLC that&lt;br/&gt;&amp;gt;&amp;gt; refers to the payment.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Thus, between steps 2 to 4, C cannot safely respond to its own soft&lt;br/&gt;&amp;gt;&amp;gt; timeout.&lt;br/&gt;&amp;gt;&amp;gt; C cannot respond with a failure, as E could then drop its latest&lt;br/&gt;&amp;gt;&amp;gt; commitment transaction onchain and claim the payment from C, and extract&lt;br/&gt;&amp;gt;&amp;gt; money from C that way.&lt;br/&gt;&amp;gt;&amp;gt; C also cannot respond with a proof-of-closure, as it does not have a&lt;br/&gt;&amp;gt;&amp;gt; transaction that it can use to provide this proof.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; The best that C can do would be to impose an even shorter timeout between&lt;br/&gt;&amp;gt;&amp;gt; steps 2 and 4 above, and to drop its current commitment transaction (which&lt;br/&gt;&amp;gt;&amp;gt; does not contain the HTLC yet and thus does not constitute a valid&lt;br/&gt;&amp;gt;&amp;gt; proof-of-closure) onchain.&lt;br/&gt;&amp;gt;&amp;gt; In between the time it drops the commitment transaction and its own&lt;br/&gt;&amp;gt;&amp;gt; incoming soft timeout, there is a chance, however small, that this&lt;br/&gt;&amp;gt;&amp;gt; transaction will be confirmed, and the channel will (with high probability)&lt;br/&gt;&amp;gt;&amp;gt; settle in a state where the HTLC is not instantiated, thus C can safely&lt;br/&gt;&amp;gt;&amp;gt; fail its incoming HTLC (not show a proof-of-closure, since that is not&lt;br/&gt;&amp;gt;&amp;gt; possible for C to do) without risk of loss, just prior to its own soft&lt;br/&gt;&amp;gt;&amp;gt; timeout.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Of course, C is still at risk here: E could collude with miners via a&lt;br/&gt;&amp;gt;&amp;gt; side-channel fee offer to confirm its commitment transaction with the HTLC&lt;br/&gt;&amp;gt;&amp;gt; present, and ensure that C is liable for the HTLC value.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; With Decker-Russell-Osuntokun, we can remove this risk by requiring a&lt;br/&gt;&amp;gt;&amp;gt; ritual as follows:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; 1.  C requests exclusive access to update their single shared state.&lt;br/&gt;&amp;gt;&amp;gt;   * This can be done via a variety of sub-protocols, including a fair&lt;br/&gt;&amp;gt;&amp;gt; coin toss in case of near-simultaneous requests for exclusive locks on both&lt;br/&gt;&amp;gt;&amp;gt; sides.&lt;br/&gt;&amp;gt;&amp;gt; 2.  C provides the details of the new HTLC to E.&lt;br/&gt;&amp;gt;&amp;gt; 3.  C and E generate the new state transaction and exchange signatures&lt;br/&gt;&amp;gt;&amp;gt; for it.&lt;br/&gt;&amp;gt;&amp;gt; 4.  C and E generate (without signing) the new update transaction.&lt;br/&gt;&amp;gt;&amp;gt; 5.  E provides the signature (or share of signature, if MuSig) for the&lt;br/&gt;&amp;gt;&amp;gt; new update transaction to C.&lt;br/&gt;&amp;gt;&amp;gt; 6.  C provides the signature for the new update transaction to E, which&lt;br/&gt;&amp;gt;&amp;gt; releases the exclusive lock on the shared state atomically with the&lt;br/&gt;&amp;gt;&amp;gt; finalization of the new update transaction.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Prior to step 5, C can simply fail the incoming HTLC from B in case its&lt;br/&gt;&amp;gt;&amp;gt; own soft timeout is near.&lt;br/&gt;&amp;gt;&amp;gt; Even if E performs step 5 after C has already failed the incoming HTLC&lt;br/&gt;&amp;gt;&amp;gt; from B, C can simply not perform step 6 and drop the channel onchain with&lt;br/&gt;&amp;gt;&amp;gt; the previous update and state transactions.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; With Poon-Dryja, we will have to rearrange the order in which we perform&lt;br/&gt;&amp;gt;&amp;gt; things, effectively adding an extra communications turnaround between the&lt;br/&gt;&amp;gt;&amp;gt; participants.&lt;br/&gt;&amp;gt;&amp;gt; Specifically, the order would have to be revised to:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; 1. pending on the sender&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; 2. in the sender&amp;#39;s latest commitment transaction&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; 3. ... and the sender&amp;#39;s previous commitment transaction has been&lt;br/&gt;&amp;gt;&amp;gt; revoked,&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;    and the update is pending on the receiver&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; 4. ... and in the receiver&amp;#39;s latest commitment transaction&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; 5. ... and the receiver&amp;#39;s previous commitment transaction has been&lt;br/&gt;&amp;gt;&amp;gt; revoked&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; This allows the sender (C in our context) to provide a proof-of-closure&lt;br/&gt;&amp;gt;&amp;gt; after step 2, and before step 2, C can safely return a failure with&lt;br/&gt;&amp;gt;&amp;gt; `update_fail_htlc` (and refuse to proceed beyond step 2, thus ensuring it&lt;br/&gt;&amp;gt;&amp;gt; can still use the previous commitment that still has no HTLC).&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Of course, this change will require redesigning the update state machine,&lt;br/&gt;&amp;gt;&amp;gt; increasing the number of communication turnarounds, and creating a subtle&lt;br/&gt;&amp;gt;&amp;gt; incompatbility when transitioning a payment from a hop that knows only the&lt;br/&gt;&amp;gt;&amp;gt; old update state machine to a hop that knows the new update state machine.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Purely Falsified Proof-Of-Closure&lt;br/&gt;&amp;gt;&amp;gt; ---------------------------------&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Of course, the attacking node E might want to create a false&lt;br/&gt;&amp;gt;&amp;gt; proof-of-closure.&lt;br/&gt;&amp;gt;&amp;gt; E can do this by simulating a Lightning channel: lock an amount of funds&lt;br/&gt;&amp;gt;&amp;gt; in a 2-of-2 (where E controls both keys), then spend it in a set of&lt;br/&gt;&amp;gt;&amp;gt; transactions mimicking the unilateral close.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; We observe, however, that the overhead of simulating a Lightning channel&lt;br/&gt;&amp;gt;&amp;gt; is the same as the overhead of actually creating and closing a Lightning&lt;br/&gt;&amp;gt;&amp;gt; channel.&lt;br/&gt;&amp;gt;&amp;gt; Since the punishment of proof-of-closure is to force attackers to have&lt;br/&gt;&amp;gt;&amp;gt; their channels closed, we can consider that this simulation of a channel&lt;br/&gt;&amp;gt;&amp;gt; open and close is sufficient as well.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Future-Proofing&lt;br/&gt;&amp;gt;&amp;gt; ---------------&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; This sketch of proof-of-closure can be used for any update mechanism:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; * With Poon-Dryja, C can use its own commitment transaction as the&lt;br/&gt;&amp;gt;&amp;gt; proof-of-closure.&lt;br/&gt;&amp;gt;&amp;gt; * With Decker-Wattenhofer, C can give all the offchain transactions up to&lt;br/&gt;&amp;gt;&amp;gt; the last stage in the multi-stage decrementing-`nSequence` mechanism.&lt;br/&gt;&amp;gt;&amp;gt; * With Deckker-Russell-Osuntokun, C can give the latest update and state&lt;br/&gt;&amp;gt;&amp;gt; trnsaction.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Basically, we expect that for now, and in the future, any update&lt;br/&gt;&amp;gt;&amp;gt; mechanism worth consideration will have a concept of &amp;#34;unilateral close&amp;#34;&lt;br/&gt;&amp;gt;&amp;gt; where a channel can be dropped onchain, using data that only one of the&lt;br/&gt;&amp;gt;&amp;gt; channel participants holds.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Such a unilateral close will be a sequence of one or more valid&lt;br/&gt;&amp;gt;&amp;gt; transactions, terminating in a transaction containing an HTLC-like contract&lt;br/&gt;&amp;gt;&amp;gt; in one of its outputs.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Thus, to validate the unilateral close, it is only required to validate&lt;br/&gt;&amp;gt;&amp;gt; all the transactions contained in the proof-of-closure, and see that the&lt;br/&gt;&amp;gt;&amp;gt; last transaction has an HTLC output.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; The limitations are thus:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; * The acceptable forms of HTLC would need to be agreed-upon by the entire&lt;br/&gt;&amp;gt;&amp;gt; network.&lt;br/&gt;&amp;gt;&amp;gt; * Implementations would need to be able to assess, in a&lt;br/&gt;&amp;gt;&amp;gt; Bitcoin-consensus-compatible way, whether a transaction is valid or not.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Payment Decorrelation and Payment Points&lt;br/&gt;&amp;gt;&amp;gt; ----------------------------------------&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Of course, having a single payment hash for the entire payment attempt is&lt;br/&gt;&amp;gt;&amp;gt; a privacy loss, which we intend to fix in the near future by using payment&lt;br/&gt;&amp;gt;&amp;gt; points, and adding a blinding scalar at each hop, aka. payment&lt;br/&gt;&amp;gt;&amp;gt; decorrelation.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Thus, in the future, there will not be any HTLC, but instead a PTLC.&lt;br/&gt;&amp;gt;&amp;gt; Further, the payment point at each hop will be changed at each hop, in&lt;br/&gt;&amp;gt;&amp;gt; order to prevent decorrelation.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Thus, C needs to provide proofs:&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; * That an apparent singlesig on the unilateral close output is in fact a&lt;br/&gt;&amp;gt;&amp;gt; PTLC.&lt;br/&gt;&amp;gt;&amp;gt;   C needs to provide:&lt;br/&gt;&amp;gt;&amp;gt;   * A target point P.&lt;br/&gt;&amp;gt;&amp;gt;   * A partial signature that would spend that singlesig for a particular&lt;br/&gt;&amp;gt;&amp;gt; sighash.&lt;br/&gt;&amp;gt;&amp;gt;   * An adaptor signature which, with knowledge of the completed&lt;br/&gt;&amp;gt;&amp;gt; signature, adaptor signature, and sighash message, would have revealed the&lt;br/&gt;&amp;gt;&amp;gt; scalar behind P.&lt;br/&gt;&amp;gt;&amp;gt; * That the PTLC belongs to the same payment attempt as what B offered to&lt;br/&gt;&amp;gt;&amp;gt; C.&lt;br/&gt;&amp;gt;&amp;gt;   C needs to provide:&lt;br/&gt;&amp;gt;&amp;gt;   * The C-only blinding factor that is the difference between the payment&lt;br/&gt;&amp;gt;&amp;gt; point of the B-to-C PTLC and the C-to-E PTLC on the unilateral close.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Then, when B needs to propagate the proof-of-closure back to A, B simply&lt;br/&gt;&amp;gt;&amp;gt; adds its own blinding factor to the reported blinding factor, in order to&lt;br/&gt;&amp;gt;&amp;gt; convince A that this is the same payment attempt.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; As we have brought up privacy, we observe that, when this mechanism&lt;br/&gt;&amp;gt;&amp;gt; triggers, there is a mild privacy loss, in that intermediate nodes now know&lt;br/&gt;&amp;gt;&amp;gt; some channel closure that is related to this payment, and can thus&lt;br/&gt;&amp;gt;&amp;gt; determine the exact path that the payment attempt went through, at least&lt;br/&gt;&amp;gt;&amp;gt; until the channel being closed.&lt;br/&gt;&amp;gt;&amp;gt; However, proof-of-closure is only propagated in case of violation of the&lt;br/&gt;&amp;gt;&amp;gt; soft timeout, so for normal non-malicious payments, proof-of-closure does&lt;br/&gt;&amp;gt;&amp;gt; not cause any privacy loss.&lt;br/&gt;&amp;gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt;&amp;gt; Lightning-dev mailing list&lt;br/&gt;&amp;gt;&amp;gt; Lightning-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200401/068762fe/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20200401/068762fe/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:59:21&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs03sz80zwsgdxdtfvhntv4ye60j83y88m0d364dt8saxa83xg9ssszypryphar8gjqg5ruz9m6s74ff87weqzmu8s4n8salx7gy0p47h3qsf6afff</id>
    
      <title type="html">📅 Original date posted:2019-10-09 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs03sz80zwsgdxdtfvhntv4ye60j83y88m0d364dt8saxa83xg9ssszypryphar8gjqg5ruz9m6s74ff87weqzmu8s4n8salx7gy0p47h3qsf6afff" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsf6nrsee6kew7ujx9yqs96y64zc9juec0wwv2rnnfgspn3y7ugm8qrgjdwm&#39;&gt;nevent1q…jdwm&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-10-09&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi list,&lt;br/&gt;&lt;br/&gt;I&amp;#39;m back again with another idea about Payment Points and fun things to do&lt;br/&gt;with them! Hopefully this time I&amp;#39;m not entirely just hashing out old ideas&lt;br/&gt;in public like an out-of-the-loop person :)&lt;br/&gt;&lt;br/&gt;*TLDR: Adding and ECDH-ing points gives us AND and OR functionality which&lt;br/&gt;we can compose to make cool lightning contracts like Multisig, Escrow, and&lt;br/&gt;DLCs*&lt;br/&gt;&lt;br/&gt;So when looking at the following (likely incomplete) list of things you can&lt;br/&gt;do with payment points:&lt;br/&gt;&lt;br/&gt;1) Payment De-correlation&lt;br/&gt;2) &amp;#34;Stuckless&amp;#34; Payments&lt;br/&gt;3) High AMP&lt;br/&gt;4) Selling Signatures&lt;br/&gt;5) Selling Pedersen De-commitment&lt;br/&gt;6) Escrow Contracts&lt;br/&gt;&lt;br/&gt;I started of trying to classify what kind of thing these new features are&lt;br/&gt;in hopes of coming across new ones. The first three I clumped into a group&lt;br/&gt;I called &amp;#34;Payment point addition allows us to do cool things while&lt;br/&gt;maintaining the Proof of Payment (PoP) property&amp;#34;. The next two (4 and 5) I&lt;br/&gt;called &amp;#34;Commitment applications where point is public&amp;#34;. But ZmnSCPxj&amp;#39;s&lt;br/&gt;proposal for lightning escrow contracts (&lt;br/&gt;&lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-June/002028.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-June/002028.html&lt;/a&gt;)&lt;br/&gt;struck me as something different that might somehow be made more general.&lt;br/&gt;&lt;br/&gt;Essentially the idea is to use the point S &#43; ECDH(B, E) where S is the&lt;br/&gt;seller&amp;#39;s point, B is the buyer&amp;#39;s point and E is the escrow&amp;#39;s point. This&lt;br/&gt;means that the scalar can be discovered by the seller in collaboration with&lt;br/&gt;the buyer or the escrow, that is, S AND (B OR E). I propose that under&lt;br/&gt;certain circumstances (such as the parties involved being able to&lt;br/&gt;interact), this can be generalized to have payments conditioned on&lt;br/&gt;arbitrary AND/OR circuits.&lt;br/&gt;&lt;br/&gt; I believe that AND is very straightforward as you simply take two&lt;br/&gt;conditions A and B and add them together to get a point that requires both&lt;br/&gt;of their scalars are discoverable (except maybe under certain bad&lt;br/&gt;circumstances that can be avoided where like B = C - A, this must be&lt;br/&gt;guarded against).&lt;br/&gt;&lt;br/&gt;OR is harder but I think that it can be achieved in the two party case by&lt;br/&gt;ECDH and in the n-party case by multi-party key exchanges (which I know&lt;br/&gt;pretty much nothing about other than that they exist). Given some key&lt;br/&gt;exchange protocol (preferably non-interactive), KE, KE(A_1, ..., A_n)&lt;br/&gt;should result in a number known only to those who know any scalar a_1, ...,&lt;br/&gt;a_n and no one else. Assuming this exists and we can manage to trustlessly&lt;br/&gt;(in some possibly stretched sense of the word) compute shared keys&lt;br/&gt;(including such things as KE(A&#43;B, C)), then KE(A, B) acts as A OR B in our&lt;br/&gt;payment condition contract.&lt;br/&gt;&lt;br/&gt;To restate the escrow contract idea in this setting, the payment is&lt;br/&gt;conditioned on S &#43; KE(B, E). Important to note is that not all parties must&lt;br/&gt;know about the details of the payment itself: the Escrow in this example&lt;br/&gt;knows nothing about this payment (other than that some payment exists)&lt;br/&gt;unless there is a dispute.&lt;br/&gt;&lt;br/&gt;Lastly, note that contracts following this scheme look indistinguishable to&lt;br/&gt;normal payments on the network, and are fully compatible with High AMPs&lt;br/&gt;since we can simply take the payment point specified by our contract and&lt;br/&gt;add that point to each partial payment point.&lt;br/&gt;&lt;br/&gt;Well this is all nice in theory, but is there anything that will actually&lt;br/&gt;come out of this thinking? I&amp;#39;ll detail the two things I&amp;#39;ve thought of so&lt;br/&gt;far for which I&amp;#39;d love critique! I&amp;#39;d also love to hear if anyone else&lt;br/&gt;things of any cool application using this line of thought (or really&lt;br/&gt;anything cool with payment points :P).&lt;br/&gt;&lt;br/&gt;Idea 1: &amp;#34;MultiSignature&amp;#34; Lightning Contracts&lt;br/&gt;I mean &amp;#34;MultiSignature&amp;#34; here only in the sense that m-of-n parties must&lt;br/&gt;agree to the payment in order for it to happen, no actual signatures are&lt;br/&gt;used. A &amp;#34;MultiSignature&amp;#34; contract is simply a bunch of ANDs and ORs! For&lt;br/&gt;example a 2-of-3 multisig between parties A, B, and C can be represented as&lt;br/&gt;(A AND B) OR (B AND C) OR (C AND A). As such, if some seller has a point S&lt;br/&gt;and three parties have points A, B, and C where a certain payment must go&lt;br/&gt;through if any two of them think it should, then the payment point used for&lt;br/&gt;the payment should be S &#43; KE(A &#43; B, B &#43; C, C &#43; A). We add S to this point&lt;br/&gt;so that the scalar, s, can act as proof of payment. And that&amp;#39;s it! I&lt;br/&gt;haven&amp;#39;t thought long enough to come up with any situation where this might&lt;br/&gt;be useful but hoping someone who reads this will!&lt;br/&gt;&lt;br/&gt;Idea 2: DLCs Routed over Lightning&lt;br/&gt;Say that some DLC oracle will either broadcast s_A or s_B whose public&lt;br/&gt;points are S_A and S_B (which can be computed from public information as&lt;br/&gt;per the DLC scheme). Then say that Alice and Bob enter into a contract&lt;br/&gt;under which Alice wins some amount if s_A is broadcasted and Bob if s_B is&lt;br/&gt;broadcasted. Say Alice has a point A and Bob has a point B. They each send&lt;br/&gt;the other a payment with the amount that party must receive if they win&lt;br/&gt;with the payment point A &#43; S_A for Bob&amp;#39;s payment to Alice and B &#43; S_B for&lt;br/&gt;Alice&amp;#39;s payment to Bob. And this is it! If s_A is broadcasted then Alice&lt;br/&gt;gets paid (and Bob gets proof of payment a, which is the scalar to A),&lt;br/&gt;otherwise s_B is broadcasted and Bob gets paid (with Alice receiving b as&lt;br/&gt;PoP). An interesting note is that under this scheme neither party is forced&lt;br/&gt;to pay extra on-chain fees in the case of a counter-party who doesn&amp;#39;t&lt;br/&gt;cooperate whilst in the wrong.&lt;br/&gt;One wrinkle with this scheme is that setup isn&amp;#39;t trustless. Although it is&lt;br/&gt;generally true that one party must sign the funding transaction for a DLC&lt;br/&gt;before the other party for on-chain DLCs, at least there is the mitigation&lt;br/&gt;that when your counter-party goes silent, you can move your input funds&lt;br/&gt;invalidating the funding transaction you signed (at a cost because fees).&lt;br/&gt;So what can we do here to ensure that both payments are setup at the same&lt;br/&gt;time in the case that Alice and Bob don&amp;#39;t trust each other?&lt;br/&gt;Say that although they don&amp;#39;t trust each other, they&amp;#39;re both willing to&lt;br/&gt;trust some escrow entity who generates some point E for their payment.&lt;br/&gt;Alice&amp;#39;s payment point to Bob becomes B &#43; S_B &#43; E and Bob&amp;#39;s to Alice becomes&lt;br/&gt;A &#43; S_A &#43; E. The escrow now waits to hear from Alice and Bob that they have&lt;br/&gt;incoming payments setup and only once both of them attest to this (using&lt;br/&gt;signatures, for example) does the escrow release the scalar to E to them&lt;br/&gt;both. The escrow can also have a timeout at which it will never reveal the&lt;br/&gt;scalar to E: forcing both parties to commit to the contract well before the&lt;br/&gt;DLC event. In this way, trust has been moved from counter-party to&lt;br/&gt;trustworthy (hopefully) escrow in such a way that the Escrow learns nothing&lt;br/&gt;about the contract itself (other than that there is one of some kind).&lt;br/&gt;I believe that this scheme can be extended to more events through the use&lt;br/&gt;of multiple payments being setup (usually in both directions) but this&lt;br/&gt;seems complicated and I&amp;#39;ve rambled for long enough. One last note is that&lt;br/&gt;DLC oracles can be composed in the usual way under this scheme (by&lt;br/&gt;addition) and potentially even threshold multi-oracles can be supported in&lt;br/&gt;this way, although this would require the oracles to attest to some shared&lt;br/&gt;key&amp;#39;s points with other oracles which isn&amp;#39;t necessarily optimal.&lt;br/&gt;&lt;br/&gt;Best,&lt;br/&gt;Nadav&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20191009/630cee2b/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20191009/630cee2b/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:56:33&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqstzwrxuw004t7s3wn5xzytuxyf5ztf50wrwvs24y6spfhsv954h2szypryphar8gjqg5ruz9m6s74ff87weqzmu8s4n8salx7gy0p47h3qsjauzgs</id>
    
      <title type="html">📅 Original date posted:2019-07-17 📝 Original message: Hi ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqstzwrxuw004t7s3wn5xzytuxyf5ztf50wrwvs24y6spfhsv954h2szypryphar8gjqg5ruz9m6s74ff87weqzmu8s4n8salx7gy0p47h3qsjauzgs" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs9ehd0sthlee7une9xhgnu57mml0ym9e398cjctydjxdh8udtgp0crs0zuu&#39;&gt;nevent1q…0zuu&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-07-17&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi All,&lt;br/&gt;&lt;br/&gt;I recently posted a proposal here for a scheme through which a trusted data&lt;br/&gt;provider can utilize the Lightning Network to privately sell data where&lt;br/&gt;data is received atomically with purchase.&lt;br/&gt;&lt;br/&gt;I&amp;#39;ve more recently been thinking about situations where a party, that is&lt;br/&gt;*not* trusted, is attempting to sell its signature to a known message. One&lt;br/&gt;example of a situation where this would be useful is if someone is trying&lt;br/&gt;to offer a DLC-like Option contract where they are essentially&lt;br/&gt;collateralizing themselves in a funding transaction and then selling their&lt;br/&gt;signatures to Contract Execution Transactions (CETs). In this example, we&lt;br/&gt;must ensure that the buyer of the signatures pays if and only if they&lt;br/&gt;receive valid signatures for the CETs which are known.&lt;br/&gt;&lt;br/&gt;I believe that this is achievable in a relatively straightforward way if we&lt;br/&gt;were to use ZmnSCPxj&amp;#39;s proposed payment points with scalars (as opposed to&lt;br/&gt;payment hashes with pre-images). The (Schnorr) signature seller could give&lt;br/&gt;the buyer their one-time public key, `R = k*G`, through which the buyer&lt;br/&gt;could compute the payment point whose scalar is the seller&amp;#39;s signature:&lt;br/&gt;`sig*G = R &#43; h(m, R)*A` where `A` is the seller&amp;#39;s public key. Using this&lt;br/&gt;value as the payment point, the buyer could be assured that they pay if and&lt;br/&gt;only if they receive `sig` from the seller, where `sig` is the desired&lt;br/&gt;valid signature of `m`!&lt;br/&gt;&lt;br/&gt;Best,&lt;br/&gt;Nadav&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20190717/95c848fb/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20190717/95c848fb/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T14:55:37&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsp0f0t5rgmuanq3lmtjn2y54lz26uj0c35mayjpgutw8k4dg3lh7qzypryphar8gjqg5ruz9m6s74ff87weqzmu8s4n8salx7gy0p47h3qspedt6s</id>
    
      <title type="html">📅 Original date posted:2020-08-12 📝 Original message:Hello ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsp0f0t5rgmuanq3lmtjn2y54lz26uj0c35mayjpgutw8k4dg3lh7qzypryphar8gjqg5ruz9m6s74ff87weqzmu8s4n8salx7gy0p47h3qspedt6s" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs28h8cswt06h8scde2gdk3l8hxvvsh78ad84ny9nqfqfm00l70r7sc33m5v&#39;&gt;nevent1q…3m5v&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-08-12&lt;br/&gt;📝 Original message:Hello Pieter and all,&lt;br/&gt;&lt;br/&gt;I am one of the maintainers of Bitcoin-S[1] and I maintain our secp256k1&lt;br/&gt;bindings (via JNI) as well as our (inefficient) bouncy castle fallback&lt;br/&gt;implementations of all secp256k1 functionality we depend on including&lt;br/&gt;Schnorr signatures. In light of this new information that there is no real&lt;br/&gt;downside to using evenness as the nonce tie-breaker, I am personally very&lt;br/&gt;in favor of this change as it strictly simplifies things as well as making&lt;br/&gt;types consistent between nonces and persistent signing keys (I can get rid&lt;br/&gt;of our SchnorrNonce type :). An additional minor benefit not already&lt;br/&gt;mentioned is that in places in our codebase where deserialized data is just&lt;br/&gt;being passed around and not used, we currently require a computation to go&lt;br/&gt;from a (x-only) SchnorrNonce to an ECPublicKey whereas going from a&lt;br/&gt;SchnorrPublicKey simply requires pre-pending a 0x02 byte.&lt;br/&gt;&lt;br/&gt;I am likely not aware of the entire impact that changing the BIP at this&lt;br/&gt;stage would have but from my view (of having to update bindings and test&lt;br/&gt;vectors and my fallback implementation, as well as wanting to get a stable&lt;br/&gt;branch on secp256k1-zkp containing both ECDSA adaptor signatures and&lt;br/&gt;Schnorr signatures for use in Discreet Log Contracts), I think this change&lt;br/&gt;is totally worth it and it will only become harder to make this&lt;br/&gt;simplification in the future. The schnorrsig branch has not yet been merged&lt;br/&gt;into secp256k1 (and is nearing this stage I think) and so long as making&lt;br/&gt;this change doesn&amp;#39;t set us back more than a month (which seems unlikely) I&lt;br/&gt;am personally in favor of making this change. Glad to hear other&amp;#39;s thoughts&lt;br/&gt;on this of course but I figured I&amp;#39;d voice my support :)&lt;br/&gt;&lt;br/&gt;Best,&lt;br/&gt;Nadav&lt;br/&gt;&lt;br/&gt;[1] &lt;a href=&#34;https://github.com/bitcoin-s/bitcoin-s/&#34;&gt;https://github.com/bitcoin-s/bitcoin-s/&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On Wed, Aug 12, 2020 at 2:04 PM Pieter Wuille via bitcoin-dev &amp;lt;&lt;br/&gt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Hello all,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The current BIP340 draft[1] uses two different tiebreakers for conveying&lt;br/&gt;&amp;gt; the Y coordinate of points: for the R point inside signatures squaredness&lt;br/&gt;&amp;gt; is used, while for public keys evenness is used. Originally both used&lt;br/&gt;&amp;gt; squaredness, but it was changed[2] for public keys after observing this&lt;br/&gt;&amp;gt; results in additional complexity for compatibility with existing systems.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The reason for choosing squaredness as tiebreaker was performance: in&lt;br/&gt;&amp;gt; non-batch signature validation, the recomputed R point must be verified to&lt;br/&gt;&amp;gt; have the correct sign, to guarantee consistency with batch validation.&lt;br/&gt;&amp;gt; Whether the Y coordinate is square can be computed directly in Jacobian&lt;br/&gt;&amp;gt; coordinates, while determining evenness requires a conversion to affine&lt;br/&gt;&amp;gt; coordinates first.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This argument of course relies on the assumption that determining whether&lt;br/&gt;&amp;gt; the Y coordinate is square can be done more efficiently than a conversion&lt;br/&gt;&amp;gt; to affine coordinates. It appears now that this assumption is incorrect,&lt;br/&gt;&amp;gt; and the justification for picking the squaredness tiebreaking doesn&amp;#39;t&lt;br/&gt;&amp;gt; really exist. As it comes with other trade-offs (it slows down signing, and&lt;br/&gt;&amp;gt; is a less conventional choice), it would seem that we should reconsider the&lt;br/&gt;&amp;gt; option of having the R point use the evenness tiebreaker (like public keys).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; It is late in the process, but I feel I owe this explanation so that at&lt;br/&gt;&amp;gt; least the possibility of changing can be discussed with all information. On&lt;br/&gt;&amp;gt; the upside, this was discovered in the context of looking into a cool&lt;br/&gt;&amp;gt; improvement to libsecp256k1[5], which makes things faster in general, but&lt;br/&gt;&amp;gt; specifically benefits the evenness variant.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; # 1. What happened?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Computing squaredness is done through the Jacobi symbol (same inventor,&lt;br/&gt;&amp;gt; but unrelated to Jacobian coordinates). Computing evenness requires&lt;br/&gt;&amp;gt; converting points to affine coordinates first, and that needs a modular&lt;br/&gt;&amp;gt; inverse. The assumption that Jacobi symbols are faster to compute than&lt;br/&gt;&amp;gt; inverses was based on:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * A (possibly) mistaken belief about the theory: fast algorithms for both&lt;br/&gt;&amp;gt; Jacobi symbols and inverses are internally based on variants of the same&lt;br/&gt;&amp;gt; extended GCD algorithm[3]. Since an inverse needs to extract a full big&lt;br/&gt;&amp;gt; integer out of the transition steps made in the extgcd algorithm, while the&lt;br/&gt;&amp;gt; Jacobi symbol just extracts a single bit, it had seemed that any advances&lt;br/&gt;&amp;gt; applicable to one would be applicable to the other, but inverses would&lt;br/&gt;&amp;gt; always need additional work on top. It appears however that a class of&lt;br/&gt;&amp;gt; extgcd algorithms exists (LSB based ones) that cannot be used for Jacobi&lt;br/&gt;&amp;gt; calculations without losing efficiency. Recent developments[4] and a&lt;br/&gt;&amp;gt; proposed implementation in libsecp256k1[5] by Peter Dettman show that using&lt;br/&gt;&amp;gt; this, inverses in some cases can in fact be faster than Jacobi symbols.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * A broken benchmark. This belief was incorrectly confirmed by a broken&lt;br/&gt;&amp;gt; benchmark[6] in libsecp256k1 for the libgmp-based Jacobi symbol calculation&lt;br/&gt;&amp;gt; and modular inverse. The benchmark was repeatedly testing the same constant&lt;br/&gt;&amp;gt; input, which apparently was around 2.5x faster than the average speed. It&lt;br/&gt;&amp;gt; is a variable-time algorithm, so a good variation of inputs matters. This&lt;br/&gt;&amp;gt; mistake had me (and probably others) convinced for years that Jacobi&lt;br/&gt;&amp;gt; symbols were amazingly fast, while in reality they were always very close&lt;br/&gt;&amp;gt; in performance to inverses.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; # 2. What is the actual impact of picking evenness instead?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; It is hard to make very generic statements here, as BIP340 will hopefully&lt;br/&gt;&amp;gt; be used for a long time, and hardware advancements and algorithmic&lt;br/&gt;&amp;gt; improvements may change the balance. That said, performance on current&lt;br/&gt;&amp;gt; hardware with optimized algorithms is the best approximation we have.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The numbers below give the expected performance change from squareness to&lt;br/&gt;&amp;gt; evenness, for single BIP340 validation, and for signing. Positive numbers&lt;br/&gt;&amp;gt; mean evenness is faster. Batch validation is not impacted at all.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In the short term, for block validation in Bitcoin Core, the numbers for&lt;br/&gt;&amp;gt; master-nogmp are probably the most relevant (as Bitcoin Core uses&lt;br/&gt;&amp;gt; libsecp256k1 without libgmp, to reduce consensus-critical dependencies).&lt;br/&gt;&amp;gt; If/when [5] gets merged, safegcd-nogmp will be what matters. On a longer&lt;br/&gt;&amp;gt; time scale, the gmp numbers may be more relevant, as the Jacobi&lt;br/&gt;&amp;gt; implementation there is certainly closer to the state of the art.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * i7-7820HQ: (verify) (sign)&lt;br/&gt;&amp;gt;   - master-nogmp: -0.3% &#43;16.1%&lt;br/&gt;&amp;gt;   - safegcd-nogmp: &#43;6.7% &#43;17.1%&lt;br/&gt;&amp;gt;   - master-gmp: &#43;0.6% &#43;7.7%&lt;br/&gt;&amp;gt;   - safegcd-gmp: &#43;1.6% &#43;8.6%&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * Cortex-A53: (verify) (sign)&lt;br/&gt;&amp;gt;   - master-nogmp: -0.3% &#43;15.7%&lt;br/&gt;&amp;gt;   - safegcd-nogmp: &#43;7.5% &#43;16.9%&lt;br/&gt;&amp;gt;   - master-gmp: &#43;0.3% &#43;4.1%&lt;br/&gt;&amp;gt;   - safegcd-gmp: 0.0% &#43;3.5%&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * EPYC 7742: (verify) (sign)&lt;br/&gt;&amp;gt;   - master-nogmp: -0.3% &#43;16.8%&lt;br/&gt;&amp;gt;   - safegcd-nogmp: &#43;8.6% &#43;18.4%&lt;br/&gt;&amp;gt;   - master-gmp: 0.0% &#43;7.4%&lt;br/&gt;&amp;gt;   - safegcd-gmp: &#43;2.3% &#43;7.8%&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In well optimized cryptographic code speedups as large as a couple percent&lt;br/&gt;&amp;gt; are difficult to come by, so we would usually consider changes of this&lt;br/&gt;&amp;gt; magnitude relevant. Note however that while the percentages for signing&lt;br/&gt;&amp;gt; speed are larger, they are not what is unexpected here. The choice for the&lt;br/&gt;&amp;gt; square tiebreaker was intended to improve verification speed at the cost of&lt;br/&gt;&amp;gt; signing speed. As it turns out that it doesn&amp;#39;t actually benefit&lt;br/&gt;&amp;gt; verification speed, this is a bad trade-off.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; # 3. How big a change is it&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * In the BIP:&lt;br/&gt;&amp;gt;   - Changing both invocations of `has_square_y` to `has_even_y`.&lt;br/&gt;&amp;gt;   - Changing the `lift_x_square_y` invocation to `lift_x_even_y`.&lt;br/&gt;&amp;gt;   - Applying the same change to the test vector generation code, and the&lt;br/&gt;&amp;gt; resulting test vectors.&lt;br/&gt;&amp;gt; * In the libsecp256k1:&lt;br/&gt;&amp;gt;   - An 8-line patch to the proposed BIP340 implementation[7]: see [8]&lt;br/&gt;&amp;gt; * In Bitcoin Core:&lt;br/&gt;&amp;gt;   - Similarly small changes to the Python test reimplementation[9]&lt;br/&gt;&amp;gt; * Duplicating these changes in other draft implementations that may&lt;br/&gt;&amp;gt; already exist.&lt;br/&gt;&amp;gt; * Review for all the above.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; # 4. Conclusion&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; We discovered that the justification for using squaredness tiebreakers in&lt;br/&gt;&amp;gt; BIP340 is based on a misunderstanding, and recent developments show that it&lt;br/&gt;&amp;gt; may in fact be a somewhat worse choice than the alternative. It is a&lt;br/&gt;&amp;gt; relatively simple change to address this, but that has be weighed against&lt;br/&gt;&amp;gt; the impact of changing the standard at this stage.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thoughts?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; # 5. References&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   [1]&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki#design&#34;&gt;https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki#design&lt;/a&gt;&lt;br/&gt;&amp;gt;   [2]&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2020-February/017639.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2020-February/017639.html&lt;/a&gt;&lt;br/&gt;&amp;gt;   [3] &lt;a href=&#34;https://en.wikipedia.org/wiki/Extended_Euclidean_algorithm&#34;&gt;https://en.wikipedia.org/wiki/Extended_Euclidean_algorithm&lt;/a&gt;&lt;br/&gt;&amp;gt;   [4] &lt;a href=&#34;https://gcd.cr.yp.to/safegcd-20190413.pdf&#34;&gt;https://gcd.cr.yp.to/safegcd-20190413.pdf&lt;/a&gt;&lt;br/&gt;&amp;gt;   [5] &lt;a href=&#34;https://github.com/bitcoin-core/secp256k1/pull/767&#34;&gt;https://github.com/bitcoin-core/secp256k1/pull/767&lt;/a&gt;&lt;br/&gt;&amp;gt;   [6] &lt;a href=&#34;https://github.com/bitcoin-core/secp256k1/pull/797&#34;&gt;https://github.com/bitcoin-core/secp256k1/pull/797&lt;/a&gt;&lt;br/&gt;&amp;gt;   [7] &lt;a href=&#34;https://github.com/bitcoin-core/secp256k1/pull/558&#34;&gt;https://github.com/bitcoin-core/secp256k1/pull/558&lt;/a&gt;&lt;br/&gt;&amp;gt;   [8]&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://github.com/sipa/secp256k1/commit/822311ca230a48d2c373f3e48b91b2a59e1371d6&#34;&gt;https://github.com/sipa/secp256k1/commit/822311ca230a48d2c373f3e48b91b2a59e1371d6&lt;/a&gt;&lt;br/&gt;&amp;gt;   [9] &lt;a href=&#34;https://github.com/bitcoin/bitcoin/pull/17977&#34;&gt;https://github.com/bitcoin/bitcoin/pull/17977&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Cheers,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; --&lt;br/&gt;&amp;gt; Pieter&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt; bitcoin-dev mailing list&lt;br/&gt;&amp;gt; bitcoin-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20200812/e77abbbc/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20200812/e77abbbc/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:26:20&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsp7eh3l8p66txg9cuy26udzt42kcx3suw4v9hds7szy0yt7rx2zhczypryphar8gjqg5ruz9m6s74ff87weqzmu8s4n8salx7gy0p47h3qsrukg9q</id>
    
      <title type="html">📅 Original date posted:2020-08-20 📝 Original message:Hey ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsp7eh3l8p66txg9cuy26udzt42kcx3suw4v9hds7szy0yt7rx2zhczypryphar8gjqg5ruz9m6s74ff87weqzmu8s4n8salx7gy0p47h3qsrukg9q" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs0lufpjlyc6w72hgxgp2e5vna4jurrxgy45e80udd4e6x5da4zufgrhg7lz&#39;&gt;nevent1q…g7lz&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-08-20&lt;br/&gt;📝 Original message:Hey Chris and all,&lt;br/&gt;&lt;br/&gt;Looking good :) I have one major concern though&lt;br/&gt;&lt;br/&gt;&amp;gt;    q = EC privkey generated by maker&lt;br/&gt;&amp;gt;    Q = q.G = EC pubkey published by maker&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;    p = nonce generated by taker&lt;br/&gt;&amp;gt;    P = p.G = nonce point calculated by taker&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;    R = Q &#43; P = pubkey used in bitcoin transaction&lt;br/&gt;&amp;gt;      = (q &#43; p).G&lt;br/&gt;&lt;br/&gt;If I&amp;#39;m understanding this correctly (which I&amp;#39;m not sure I ame), it seems&lt;br/&gt;like the plan is to put R on-chain as the key to an output? As stated this&lt;br/&gt;is completely insecure as Q is known in advance so the taker can always&lt;br/&gt;choose a nonce p but then claim that their nonce point is p.G - Q so that&lt;br/&gt;the key that goes on-chain is (p.G - Q &#43; Q) = p.G allowing them to steal&lt;br/&gt;the funds. If the plan is not to use full-fledged 2-ECDSA (which I think is&lt;br/&gt;actually necessary as I still don&amp;#39;t understand how the HTLC signatures are&lt;br/&gt;generated) you have to, at the very least, force the taker to provide a&lt;br/&gt;Zero Knowledge Proof of Knowledge (ZKPoK) of the discrete log to the point&lt;br/&gt;they advertise as their nonce point to avoid this. Alternatively, I think&lt;br/&gt;you can use the following key as is done in MuSig:&lt;br/&gt;&lt;br/&gt;R = H(Q || P || Q)*Q &#43; H(Q || P || P)*P&lt;br/&gt;&lt;br/&gt;But I still don&amp;#39;t see how signatures can be generated for HTLCs from this&lt;br/&gt;key.&lt;br/&gt;&lt;br/&gt;Of course all of this complexity more or less goes away once we have&lt;br/&gt;Schnorr signatures and can use MuSig with adaptor signatures.&lt;br/&gt;&lt;br/&gt;Best,&lt;br/&gt;Nadav&lt;br/&gt;&lt;br/&gt;On Thu, Aug 20, 2020 at 6:17 AM ZmnSCPxj via bitcoin-dev &amp;lt;&lt;br/&gt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Good morning Chris,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Great to see this!&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Mostly minor comments.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; == Direct connections to Alice ===&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Only Alice, the taker, knows the entire route, Bob and Charlie just know&lt;br/&gt;&amp;gt; &amp;gt; their previous and next transactions. Bob and Charlie do not have direct&lt;br/&gt;&amp;gt; &amp;gt; connections with each other, only with Alice.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Diagram of Tor connections:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Bob Charlie&lt;br/&gt;&amp;gt; &amp;gt; | /&lt;br/&gt;&amp;gt; &amp;gt; | /&lt;br/&gt;&amp;gt; &amp;gt; | /&lt;br/&gt;&amp;gt; &amp;gt; Alice&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; When Bob and Charlie communicate, they are actually sending and&lt;br/&gt;&amp;gt; &amp;gt; receiving messages via Alice who relays them to Charlie or Bob. This&lt;br/&gt;&amp;gt; &amp;gt; helps hide whether the previous or next counterparty in a CoinSwap route&lt;br/&gt;&amp;gt; &amp;gt; is a maker or taker.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; This doesn&amp;#39;t have security issues even in the final steps where private&lt;br/&gt;&amp;gt; &amp;gt; keys are handed over, because those private keys are always for 2-of-2&lt;br/&gt;&amp;gt; &amp;gt; multisig and so on their own are never enough to steal money.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This has a massive advantage over CoinJoin.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In CoinJoin, since all participants sign a single transaction, every&lt;br/&gt;&amp;gt; participant knows the total number of participants.&lt;br/&gt;&amp;gt; Thus, in CoinJoin, it is fairly useless to have just one taker and one&lt;br/&gt;&amp;gt; maker, the maker knows exactly which output belongs to the taker.&lt;br/&gt;&amp;gt; Even if all communications were done via the single paying taker, the&lt;br/&gt;&amp;gt; maker(s) are shown the final transaction and thus can easily know how many&lt;br/&gt;&amp;gt; participants there are (by counting the number of equal-valued outputs).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; With CoinSwap, in principle no maker has to know how many other makers are&lt;br/&gt;&amp;gt; in the swap.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thus it would still be useful to make a single-maker CoinSwap, as that&lt;br/&gt;&amp;gt; would be difficult, for the maker, to diferentiate from a multi-maker&lt;br/&gt;&amp;gt; CoinSwap.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; There are still a few potential leaks though:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * If paying through a CoinSwap, the cheapest option for the taker would be&lt;br/&gt;&amp;gt; to send out a single large UTXO (single-output txes) to the first maker,&lt;br/&gt;&amp;gt; and then demand the final payment and any change as two separate swaps from&lt;br/&gt;&amp;gt; the final maker.&lt;br/&gt;&amp;gt;   * Intermediate makers are likely to not have exact amounts, thus is&lt;br/&gt;&amp;gt; unlikely to create a single-output tx when forwarding.&lt;br/&gt;&amp;gt;   * Thus, the first maker could identify the taker.&lt;br/&gt;&amp;gt; * The makers can try timing the communications lag with the taker.&lt;br/&gt;&amp;gt;   The general assumption would be that more makers == more delay in taker&lt;br/&gt;&amp;gt; responses.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; === Miner fees ===&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Makers have no incentive to pay any miner fees. They only do&lt;br/&gt;&amp;gt; &amp;gt; transactions which earn them an income and are willing to wait a very&lt;br/&gt;&amp;gt; &amp;gt; long time for that to happen. By contrast takers want to create&lt;br/&gt;&amp;gt; &amp;gt; transactions far more urgently. In JoinMarket we coded a protocol where&lt;br/&gt;&amp;gt; &amp;gt; the maker could contribute to miner fees, but the market price offered&lt;br/&gt;&amp;gt; &amp;gt; of that trended towards zero. So the reality is that takers will pay all&lt;br/&gt;&amp;gt; &amp;gt; the miner fees. Also because makers don&amp;#39;t know the taker&amp;#39;s time&lt;br/&gt;&amp;gt; &amp;gt; preference they don&amp;#39;t know how much they should pay in miner fees.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; The taker will have to set limits on how large the maker&amp;#39;s transactions&lt;br/&gt;&amp;gt; &amp;gt; are, otherwise makers could abuse this by having the taker consolidate&lt;br/&gt;&amp;gt; &amp;gt; maker&amp;#39;s UTXOs for free.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Why not have the taker pay for the *first* maker-spent UTXO and have&lt;br/&gt;&amp;gt; additional maker-spent UTXOs paid for by the maker?&lt;br/&gt;&amp;gt; i.e. the taker indicates &amp;#34;swap me 1 BTC in 3 bags of 0.3, 0.3, and 0.4&lt;br/&gt;&amp;gt; BTC&amp;#34;, and pays for one UTXO spent for each &amp;#34;bag&amp;#34; (thus pays for 3 UTXOs).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Disagreements on feerate can be resolved by having the taker set the&lt;br/&gt;&amp;gt; feerate, i.e. &amp;#34;the customer is always right&amp;#34;.&lt;br/&gt;&amp;gt; Thus if the maker *has to* spend two UTXOs to make up the 0.4 BTC bag, it&lt;br/&gt;&amp;gt; pays for the mining fees for that extra UTXO.&lt;br/&gt;&amp;gt; The maker can always reject the swap attempt if it *has to* spend multiple&lt;br/&gt;&amp;gt; UTXOs and would lose money doing so if the taker demands a too-high feerate.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; == Contract transaction definitions ==&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Contract transactions are those which may spend from the 2-of-2 multisig&lt;br/&gt;&amp;gt; &amp;gt; outputs, they transfer the coins into a contract where the coins can be&lt;br/&gt;&amp;gt; &amp;gt; spent either by waiting for a timeout or providing a hash preimage&lt;br/&gt;&amp;gt; &amp;gt; value. Ideally contract transactions will never be broadcast but their&lt;br/&gt;&amp;gt; &amp;gt; existence keeps all parties honest.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; M~ is miner fees, which we treat as a random variable, and ultimately&lt;br/&gt;&amp;gt; &amp;gt; set by whichever pre-signed RBF tx get mined. When we talk about the&lt;br/&gt;&amp;gt; &amp;gt; contract tx, we actually mean perhaps 20-30 transactions which only&lt;br/&gt;&amp;gt; &amp;gt; differ by the miner fee and have RBF enabled, so they can be broadcasted&lt;br/&gt;&amp;gt; &amp;gt; in sequence to get the contract transaction mined regardless of the&lt;br/&gt;&amp;gt; &amp;gt; demand for block space.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The highest-fee version could have, in addition, CPFP-anchor outputs, like&lt;br/&gt;&amp;gt; those being proposed in Lightning, so even if onchain fees rise above the&lt;br/&gt;&amp;gt; largest fee reservation, it is possible to add even more fees.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Or not.&lt;br/&gt;&amp;gt; Hmm.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Another thought: later you describe that miner fees are paid by Alice by&lt;br/&gt;&amp;gt; forwarding those fees as well, how does that work when there are multiple&lt;br/&gt;&amp;gt; versions of the contract transaction?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; (Alice&#43;timelock_A OR Bob&#43;hash) = Is an output which can be spent&lt;br/&gt;&amp;gt; &amp;gt; either with Alice&amp;#39;s private key&lt;br/&gt;&amp;gt; &amp;gt; after waiting for a relative&lt;br/&gt;&amp;gt; &amp;gt; timelock_A, or by Bob&amp;#39;s private key by&lt;br/&gt;&amp;gt; &amp;gt; revealing a hash preimage value&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The rationale for relative timelocks is that it makes private key turnover&lt;br/&gt;&amp;gt; slightly more useable by ensuring that, after private key turnover, it is&lt;br/&gt;&amp;gt; possible to wait indefinitely to spend the UTXO it received.&lt;br/&gt;&amp;gt; This is in contrast with absolute timelocks, where after private key&lt;br/&gt;&amp;gt; turnover, it is required to spend received UTXO before the absolute timeout.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The dangers are:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * Until it receives the private key, if either of the incoming or outgoing&lt;br/&gt;&amp;gt; contract transactions are confirmed, every swap participant (taker or&lt;br/&gt;&amp;gt; maker) should also broadcast the other contract transaction, and resolve by&lt;br/&gt;&amp;gt; onchain transactions (with loss of privacy).&lt;br/&gt;&amp;gt; * After receiving the private key, if the incoming contract transaction is&lt;br/&gt;&amp;gt; confirmed, it should spend the resulting contract output.&lt;br/&gt;&amp;gt; * It is possible to steal from a participant if that participant goes&lt;br/&gt;&amp;gt; offline longer than the timeout.&lt;br/&gt;&amp;gt;   This may imply that there may have to be some minimum timeout that&lt;br/&gt;&amp;gt; makers indicate in their advertisements.&lt;br/&gt;&amp;gt;   * The taker can detect if the first maker is offline, then if it is&lt;br/&gt;&amp;gt; offline, try a contract transaction broadcast, if it confirms, the taker&lt;br/&gt;&amp;gt; can wait for the timeout; if it times out, the taker can clawback the&lt;br/&gt;&amp;gt; transaction.&lt;br/&gt;&amp;gt;     * This appears to be riskless for the taker.&lt;br/&gt;&amp;gt;     * Against a similar attack, Lightning requires channel reserves, which&lt;br/&gt;&amp;gt; means the first hop never gains control of the entire value, which is a&lt;br/&gt;&amp;gt; basic requirement for private key turnover.&lt;br/&gt;&amp;gt;   * On the other hand, the taker has the largest timeout before it can&lt;br/&gt;&amp;gt; clawback the funds, so it would wait for a long time, and at any time in&lt;br/&gt;&amp;gt; between the first maker can come online and spend using the hashlock branch.&lt;br/&gt;&amp;gt;     * But the taker can just try on the hope it works; it has nothing to&lt;br/&gt;&amp;gt; lose.&lt;br/&gt;&amp;gt;   * This attack seems to be possible only for the taker to mount.&lt;br/&gt;&amp;gt;     Other makers on the route cannot know who the other makers are,&lt;br/&gt;&amp;gt; without cooperation of the taker, who is the only one who knows all the&lt;br/&gt;&amp;gt; makers.&lt;br/&gt;&amp;gt;     * On the other hand, the last maker in the route has an outgoing HTLC&lt;br/&gt;&amp;gt; with the smallest timelock, so it is the least-risk and therefore a maker&lt;br/&gt;&amp;gt; who notices its outgoing HTLC has a low timeout might want to just do this&lt;br/&gt;&amp;gt; anyway even if it is unsure if the taker is offline.&lt;br/&gt;&amp;gt;   * Participants might want to spend from the UTXO to a new address after&lt;br/&gt;&amp;gt; private key turnover anyway.&lt;br/&gt;&amp;gt;     Makers could spend using a low-fee RBF-enabled tx, and when another&lt;br/&gt;&amp;gt; request comes in for another swap, try to build a new funding tx with a&lt;br/&gt;&amp;gt; higher-fee bump.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; A possible attack by a malicious Alice is that she chooses M1 to be very&lt;br/&gt;&amp;gt; &amp;gt; low (e.g. 1 sat/vbyte) and sets M2 and M3 to be very high (e.g. 1000&lt;br/&gt;&amp;gt; &amp;gt; sat/vb) and then intentionally aborts, forcing the makers to lose much&lt;br/&gt;&amp;gt; &amp;gt; more money in miner fees than the attacker. The attack can be used to&lt;br/&gt;&amp;gt; &amp;gt; waste away Bob&amp;#39;s and Charlie&amp;#39;s coins on miner fees at little cost to the&lt;br/&gt;&amp;gt; &amp;gt; malicious taker Alice. So to defend against this attack Bob and Charlie&lt;br/&gt;&amp;gt; &amp;gt; must refuse to sign a contract transaction if the corresponding funding&lt;br/&gt;&amp;gt; &amp;gt; transaction pays miner fees greater than Alice&amp;#39;s funding transaction.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Sorry, I do not follow the logic for this...?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; The timelocks are staggered so that if Alice uses the preimage to take&lt;br/&gt;&amp;gt; &amp;gt; coins then the right people will also learn the preimage and have enough&lt;br/&gt;&amp;gt; &amp;gt; time to be able to get their coins back too. Alice starts with knowledge&lt;br/&gt;&amp;gt; &amp;gt; of the hash preimage so she must have a longest timelock.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; More precisely:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * The HTLC outgoing from Alice has the longest timelock.&lt;br/&gt;&amp;gt; * The HTLC incoming into Alice has the shortest timelock.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; For the makers, they only need to ensure that the incoming timelock is&lt;br/&gt;&amp;gt; much larger than the outgoing timelock.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; == EC tweak to reduce one round trip ==&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; When two parties are agreeing on a 2-of-2 multisig address, they need to&lt;br/&gt;&amp;gt; &amp;gt; agree on their public keys. We can avoid one round trip by using the EC&lt;br/&gt;&amp;gt; &amp;gt; tweak trick.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; When Alice, the taker, downloads the entire offer book for the liquidity&lt;br/&gt;&amp;gt; &amp;gt; market, the offers will also contain a EC public key. Alice can tweak&lt;br/&gt;&amp;gt; &amp;gt; this to generate a brand new public key for which the maker knows the&lt;br/&gt;&amp;gt; &amp;gt; private key. This public key will be one of the keys in the 2-of-2&lt;br/&gt;&amp;gt; &amp;gt; multisig. This feature removes one round trip from the protocol.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; q = EC privkey generated by maker&lt;br/&gt;&amp;gt; &amp;gt; Q = q.G = EC pubkey published by maker&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; p = nonce generated by taker&lt;br/&gt;&amp;gt; &amp;gt; P = p.G = nonce point calculated by taker&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; R = Q &#43; P = pubkey used in bitcoin transaction&lt;br/&gt;&amp;gt; &amp;gt; = (q &#43; p).G&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Whoa whoa whoa whoa.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; All this time I was thinking you were going to use 2p-ECDSA for all&lt;br/&gt;&amp;gt; 2-of-2s.&lt;br/&gt;&amp;gt; In which case, the private key generated by the taker would be sufficient&lt;br/&gt;&amp;gt; tweak to blind this.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In 2p-ECDSA, for two participants M = m * G; T = t * G, the total key is m&lt;br/&gt;&amp;gt; * t * G = m * T = t * M.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Are you going to use `2 &amp;lt;T&amp;gt; &amp;lt;Q&#43;P&amp;gt; 2 OP_CHECKMULTISIG` instead of 2p-ECDSA?&lt;br/&gt;&amp;gt; Note that you cannot usefully hide among Lightning mutual closes, because&lt;br/&gt;&amp;gt; of the reserve; Lightning mutual closes are very very likely to be spent in&lt;br/&gt;&amp;gt; a 1-input (that spends from a 2-of-2 P2WSH), 2-output (that pays to two&lt;br/&gt;&amp;gt; P2WPKHs) tx.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; == Protocol ==&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; ---8&amp;lt;------&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The protocol looks correct to me.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; LOL.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Give me a little more time to check it in detail hahaha.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;     ==== Retaliation as DOS-resistance ====&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;     In some situations (e.g. step 8.) if one maker in the coinswap route&lt;br/&gt;&amp;gt; is&lt;br/&gt;&amp;gt; &amp;gt;     the victim of a DOS they will retaliate by DOSing the previous maker&lt;br/&gt;&amp;gt; in&lt;br/&gt;&amp;gt; &amp;gt;     the route. This may seem unnecessary and unfair (after all why waste&lt;br/&gt;&amp;gt; &amp;gt;     even more time and block space) but is actually the best way to&lt;br/&gt;&amp;gt; resist&lt;br/&gt;&amp;gt; &amp;gt;     DOS because it produces a concrete cost every time a DOS happens.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I agree.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;     == Analysis of deviations ==&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;     This section discusses what happens if one party deviates from the&lt;br/&gt;&amp;gt; &amp;gt;     protocol by doing something else, for example broadcasting a htlc&lt;br/&gt;&amp;gt; &amp;gt;     contract tx when they shouldnt have.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;     The party name refers to what that party does, followed by other&lt;br/&gt;&amp;gt; party&amp;#39;s&lt;br/&gt;&amp;gt; &amp;gt;     reactions to it.&lt;br/&gt;&amp;gt; &amp;gt;     e.g. Party1: does a thing, Party2/Party3: does a thing in reaction&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;     If multiple deviations are possible in a step then they are numbered&lt;br/&gt;&amp;gt; &amp;gt;     e.g. A1 A2 A2 etc&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;     0-2. Alice/Bob/Charlie: nothing else is possible except following the&lt;br/&gt;&amp;gt; &amp;gt;     protocol or aborting&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; 8.  Alice: broadcasts one or more of the A htlc txes. Bob/Charlie/Dennis:&lt;br/&gt;&amp;gt; &amp;gt;     do nothing, they havent lost any time or money.&lt;br/&gt;&amp;gt; &amp;gt;     4-6. Bob/Charlie: nothing else is possible except following the&lt;br/&gt;&amp;gt; protocol&lt;br/&gt;&amp;gt; &amp;gt;     or aborting.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; 9.  Bob: broadcasts one or more of the B htlc txes, Alice: broadcasts all&lt;br/&gt;&amp;gt; &amp;gt;     her own A htlc txes and waits for the timeout to get her money back.&lt;br/&gt;&amp;gt; &amp;gt;     Charlie: do nothing&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; 10.  Charlie: nothing else is possible except following the protocol or&lt;br/&gt;&amp;gt; &amp;gt;     aborting.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; 11.  Alice: broadcasts one or more of the A htlc txes. Bob: broadcasts&lt;br/&gt;&amp;gt; all&lt;br/&gt;&amp;gt; &amp;gt;     his own A htlc txes and waits for the timeout.&lt;br/&gt;&amp;gt; &amp;gt;     A. same as 8.&lt;br/&gt;&amp;gt; &amp;gt;     B. Charlie: broadcasts one or more of the C htlc txes, Alice/Bob:&lt;br/&gt;&amp;gt; &amp;gt;     broadcasts all their own htlc txes and waits for the timeout to get&lt;br/&gt;&amp;gt; &amp;gt;     their money back.&lt;br/&gt;&amp;gt; &amp;gt;     C-E1. Alice: broadcasts all of C htlc txes and uses her knowledge of&lt;br/&gt;&amp;gt; the&lt;br/&gt;&amp;gt; &amp;gt;     preimage hash to take the money immediately. Charlie: broadcasts&lt;br/&gt;&amp;gt; &amp;gt;     all of B htlc txes and reading the hash value from the blockchain,&lt;br/&gt;&amp;gt; &amp;gt;     uses it to take the money from B htlc immediately. Bob: broadcasts&lt;br/&gt;&amp;gt; &amp;gt;     all of A htlc txes, and reading hash from the blockchain, uses it&lt;br/&gt;&amp;gt; &amp;gt;     to take the money from A htlc immediately.&lt;br/&gt;&amp;gt; &amp;gt;     C-E2. Alice: broadcast her own A htlc txes, and after a timeout take&lt;br/&gt;&amp;gt; the&lt;br/&gt;&amp;gt; &amp;gt;     money. Bob: broadcast his own B htlc txes and after the timeout&lt;br/&gt;&amp;gt; &amp;gt;     take their money. Charlie: broadcast his own C htlc txes and after&lt;br/&gt;&amp;gt; &amp;gt;     the timeout take their money.&lt;br/&gt;&amp;gt; &amp;gt;     F1. Bob: broadcast one or more of A htcl txes and use the hash&lt;br/&gt;&amp;gt; preimage&lt;br/&gt;&amp;gt; &amp;gt;     to get the money immediately. He already knows both privkeys of the&lt;br/&gt;&amp;gt; &amp;gt;     multisig so this is pointless and just damages privacy and wastes&lt;br/&gt;&amp;gt; &amp;gt;     miner fees. Alice: blacklist Bob&amp;#39;s fidelity bond.&lt;br/&gt;&amp;gt; &amp;gt;     F2. Bob: broadcast one or more of the C htlc txes. Charlie: use&lt;br/&gt;&amp;gt; preimage&lt;br/&gt;&amp;gt; &amp;gt;     to get his money immediately. Bob&amp;#39;s actions were pointless. Alice:&lt;br/&gt;&amp;gt; &amp;gt;     cant tell whether Bob or Charlie actually broadcasted, so blacklist&lt;br/&gt;&amp;gt; &amp;gt;     both fidelity bonds.&lt;br/&gt;&amp;gt; &amp;gt;     G1. Charlie: broadcast one or more of B htcl txes and use the hash&lt;br/&gt;&amp;gt; &amp;gt;     preimage to get the money immediately. He already knows both&lt;br/&gt;&amp;gt; &amp;gt;     privkeys of the multisig so this is pointless and just damages&lt;br/&gt;&amp;gt; &amp;gt;     privacy and wastes miner fees. Alice: cant tell whether Bob or&lt;br/&gt;&amp;gt; &amp;gt;     Charlie actually broadcasted, so blacklist both fidelity bonds.&lt;br/&gt;&amp;gt; &amp;gt;     G2. Charlie: broadcast one or more of the A htlc txes. Alice:&lt;br/&gt;&amp;gt; broadcast&lt;br/&gt;&amp;gt; &amp;gt;     the remaining A htlc txes and use preimage to get her money&lt;br/&gt;&amp;gt; &amp;gt;     immediately. Charlies&amp;#39;s actions were pointless. Alice: blacklist&lt;br/&gt;&amp;gt; &amp;gt;     Charlie&amp;#39;s fidelity bond.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;     The multisig outputs of the funding transactions can stay unspent&lt;br/&gt;&amp;gt; &amp;gt;     indefinitely. However the parties must always be watching the network&lt;br/&gt;&amp;gt; &amp;gt;     and ready to respond with their own sweep using a preimage. This is&lt;br/&gt;&amp;gt; &amp;gt;     because the other party still possesses a fully-signed contract tx.&lt;br/&gt;&amp;gt; The&lt;br/&gt;&amp;gt; &amp;gt;     parties respond in the same way as in steps C-E1, F2 and G2. Alice&amp;#39;s&lt;br/&gt;&amp;gt; &amp;gt;     reaction of blacklisting both fidelity bonds might not be the right&lt;br/&gt;&amp;gt; way,&lt;br/&gt;&amp;gt; &amp;gt;     because one maker could use it to get another one blacklisted (as&lt;br/&gt;&amp;gt; well&lt;br/&gt;&amp;gt; &amp;gt;     as themselves).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Looks OK, though note that a participant might try to do so (as pointed&lt;br/&gt;&amp;gt; out above) in the hope that the next participant is offline.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thank you very much for your writeup!&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Regards,&lt;br/&gt;&amp;gt; ZmnSCPxj&lt;br/&gt;&amp;gt; _______________________________________________&lt;br/&gt;&amp;gt; bitcoin-dev mailing list&lt;br/&gt;&amp;gt; bitcoin-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&#34;&gt;https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;-------------- next part --------------&lt;br/&gt;An HTML attachment was scrubbed...&lt;br/&gt;URL: &amp;lt;&lt;a href=&#34;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20200820/d782e2d1/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20200820/d782e2d1/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-07T20:26:13&#43;02:00</updated>
  </entry>

</feed>