<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <updated></updated>
  <generator>https://nostr.ae</generator>

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




  <entry>
    <id>https://nostr.ae/nevent1qqsg6rwh3pf98vjmtexlptehf6mg3tw7a9y6r7hpl30clxzkdrfqtkqzyz89ljrdlx5qurve3qsq7sm5ys7kuwz6zysx8mf5qel0knkl9kqzktqxt3a</id>
    
      <title type="html">📅 Original date posted:2021-10-13 📝 Original message: Hello ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsg6rwh3pf98vjmtexlptehf6mg3tw7a9y6r7hpl30clxzkdrfqtkqzyz89ljrdlx5qurve3qsq7sm5ys7kuwz6zysx8mf5qel0knkl9kqzktqxt3a" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqspuc23dspa95vyp3jqzrezf96upfar4endvqg4t8yeckhlczeha4s4lgyza&#39;&gt;nevent1q…gyza&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-10-13&lt;br/&gt;📝 Original message:&lt;br/&gt;Hello Matt, can you clarify what you mean with this particular paragraph?:&lt;br/&gt;&lt;br/&gt;But for some reason those pesky users keep wanting to use lightning for&lt;br/&gt;&amp;gt; tips, or at least accept&lt;br/&gt;&amp;gt; payment on their phones without keeping them unlocked with the lightning&lt;br/&gt;&amp;gt; app open on the foreground&lt;br/&gt;&amp;gt; 24/7.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;So the use case here is more narrow? You mean that the recipient is a&lt;br/&gt;mobile user that has his phone locked?&lt;br/&gt;Just so I understand better what the problem is.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On Wed, 13 Oct 2021 at 12:44, Matt Corallo &amp;lt;lf-lists at mattcorallo.com&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; I&amp;#39;m sure most of y&amp;#39;all are familiar with this problem by now - a lightning&lt;br/&gt;&amp;gt; user on a phone trying to&lt;br/&gt;&amp;gt; pay another lightning user on a phone requires some amount of coordination&lt;br/&gt;&amp;gt; to ensure the sender and&lt;br/&gt;&amp;gt; recipient are, roughly, online at the same time.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Invoices provide this somewhat today by requiring the recipient provide&lt;br/&gt;&amp;gt; some live-ish data to the&lt;br/&gt;&amp;gt; sender with their phone in their hand.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; But for some reason those pesky users keep wanting to use lightning for&lt;br/&gt;&amp;gt; tips, or at least accept&lt;br/&gt;&amp;gt; payment on their phones without keeping them unlocked with the lightning&lt;br/&gt;&amp;gt; app open on the foreground&lt;br/&gt;&amp;gt; 24/7.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; There&amp;#39;s a few things live today which make progress towards this goal, but&lt;br/&gt;&amp;gt; don&amp;#39;t quite get there&lt;br/&gt;&amp;gt; (and mostly aren&amp;#39;t trying to solve this problem, but are worth mentioning):&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   * just have the recipient use a custodial product/run a full lightning&lt;br/&gt;&amp;gt; node at home on an RPi.&lt;br/&gt;&amp;gt;     Obviously this has some pretty substantial drawbacks, I&amp;#39;m not sure I&lt;br/&gt;&amp;gt; even need to list them, but&lt;br/&gt;&amp;gt; the &amp;#34;just require the recipient use a custodial service&amp;#34; is what Twitter&lt;br/&gt;&amp;gt; ended up shipping with for&lt;br/&gt;&amp;gt; lightning tipping, and we should all probably feel ashamed that they felt&lt;br/&gt;&amp;gt; the need to do that.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   * Blockstream Greenlight.&lt;br/&gt;&amp;gt;     This change the online-requirements model - with the keys on your&lt;br/&gt;&amp;gt; phone/elsewhere you still have&lt;br/&gt;&amp;gt; to have your phone online with the same requirements as running a full&lt;br/&gt;&amp;gt; lightning node. It just means&lt;br/&gt;&amp;gt; fewer resources on that device.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   * use keysend/AMP/whatever.&lt;br/&gt;&amp;gt;     This is great for tips, but only half the story. Sender goes to send a&lt;br/&gt;&amp;gt; keysend payment, gets to&lt;br/&gt;&amp;gt; one hop before the recipient, and then a day later the recipient comes&lt;br/&gt;&amp;gt; online to find the payment&lt;br/&gt;&amp;gt; long-since timed out and failed backwards. Or you could use a long CLTV on&lt;br/&gt;&amp;gt; the payment to make sure&lt;br/&gt;&amp;gt; the recipient has time to claim it, which is basically a DoS on the&lt;br/&gt;&amp;gt; lightning network&amp;#39;s capacity,&lt;br/&gt;&amp;gt; one that may eventually be fixed, breaking your payments, and which is&lt;br/&gt;&amp;gt; just generally antisocial.&lt;br/&gt;&amp;gt; Still, my understanding is some folks do this today cause its the only&lt;br/&gt;&amp;gt; option for a mobile device.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   * lnurl&lt;br/&gt;&amp;gt;     ...is a great way to get an invoice, presumably from a trusted LSP for&lt;br/&gt;&amp;gt; the recipient, trusting&lt;br/&gt;&amp;gt; them to not give the same invoice twice, but doesn&amp;#39;t help the recipient&lt;br/&gt;&amp;gt; receive the payment, they&lt;br/&gt;&amp;gt; still need to be online, unless...&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   * have a fully-trusted LSP that accepts payments and forwards them later&lt;br/&gt;&amp;gt;     this is also fine, where its practical, I guess, but I&amp;#39;d hope we can&lt;br/&gt;&amp;gt; do better. Worse, as far as&lt;br/&gt;&amp;gt; I understand the places where this is practical are becoming fewer and&lt;br/&gt;&amp;gt; fewer as the regulatory&lt;br/&gt;&amp;gt; uncertainty clears and everyone realizes the regulatory overhead of this&lt;br/&gt;&amp;gt; is...well you might as well&lt;br/&gt;&amp;gt; start applying for that banking charter now.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   * have an untrusted LSP that sends you a notification to open the app&lt;br/&gt;&amp;gt; when a payment is received&lt;br/&gt;&amp;gt;     Several lightning apps do this today, and its somewhat of a stop-gap&lt;br/&gt;&amp;gt; but does help. On platforms&lt;br/&gt;&amp;gt; where the app gets some meager CPU time in response to a notification,&lt;br/&gt;&amp;gt; this can even fully solve the&lt;br/&gt;&amp;gt; problem by claiming the HTLC in response to the notification pushed&lt;br/&gt;&amp;gt; out-of-band. Sadly, the refrain&lt;br/&gt;&amp;gt; I&amp;#39;ve heard repeatedly is, these days, on both Android and especially iOS,&lt;br/&gt;&amp;gt; you can&amp;#39;t even rely on a&lt;br/&gt;&amp;gt; microsecond of CPU time in response to a notification. The OS fully&lt;br/&gt;&amp;gt; expects your app to run code&lt;br/&gt;&amp;gt; only when its on and in the foreground, unless you&amp;#39;re a VoIP app you&amp;#39;re&lt;br/&gt;&amp;gt; screwed. Relying on the user&lt;br/&gt;&amp;gt; to open the app immediately when they receive a notification is...fine, I&lt;br/&gt;&amp;gt; guess, absent a better&lt;br/&gt;&amp;gt; idea it seems like the best we&amp;#39;ve got today, but I&amp;#39;m not sure you&amp;#39;d find a&lt;br/&gt;&amp;gt; UX designer who would&lt;br/&gt;&amp;gt; *suggest* this :).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; But what would it take to do better? What follows is a simple straw-man,&lt;br/&gt;&amp;gt; but something that&amp;#39;s&lt;br/&gt;&amp;gt; borderline practical today and may at least generate a few ideas. It comes&lt;br/&gt;&amp;gt; in two variants&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If we accept the lnurl trust model of &amp;#34;a third-party I can give a list of&lt;br/&gt;&amp;gt; pre-signed invoices, which&lt;br/&gt;&amp;gt; I trust to never provide an invoice twice, but otherwise is untrusted&amp;#34;,&lt;br/&gt;&amp;gt; then we could do something&lt;br/&gt;&amp;gt; like this:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Step 1. Tipper gets an invoice from the lnurl endpoint they wish to pay,&lt;br/&gt;&amp;gt; which contains some&lt;br/&gt;&amp;gt; &amp;#34;recipient is behind an LSP and rarely online, act accordingly&amp;#34; flag.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Step 2. Tipper sender sends a HTLC with a long CLTV timeout to their own&lt;br/&gt;&amp;gt; LSP with instructions&lt;br/&gt;&amp;gt; saying &amp;#34;when you get an onion message telling you nonce B, forward this&lt;br/&gt;&amp;gt; HTLC, until then, just sit&lt;br/&gt;&amp;gt; on it&amp;#34;. The LSP accepts this HTLC but does not forward it and is generally&lt;br/&gt;&amp;gt; okay with the long CLTV&lt;br/&gt;&amp;gt; delta because it would otherwise just be the users&amp;#39; balance anyway - if&lt;br/&gt;&amp;gt; they want to encumber their&lt;br/&gt;&amp;gt; own funds forever, no harm done.&lt;br/&gt;&amp;gt;    Note that if tipper is online regularly they can skip this step and&lt;br/&gt;&amp;gt; move on.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Step 3. The Tipper sends an onion message to recipient&amp;#39;s LSP saying &amp;#34;hey,&lt;br/&gt;&amp;gt; when recipient is online&lt;br/&gt;&amp;gt; again, use the included reply path to send nonce B to my LSP&amp;#34;.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; - sender can now safely go offline -&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Step 4. When the Recipient comes online, their LSP sends the reply to the&lt;br/&gt;&amp;gt; Tipper&amp;#39;s LSP,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Step 5. causing the Tipper&amp;#39;s LSP to (finally) forward the original HTLC,&lt;br/&gt;&amp;gt; which the Recipient receives.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; You&amp;#39;ll note that this solution, unlike simply sending a high-CLTV HTLC,&lt;br/&gt;&amp;gt; does not encumber funds for&lt;br/&gt;&amp;gt; any extended period of time except for the original sender, who wants to&lt;br/&gt;&amp;gt; send the funds off&lt;br/&gt;&amp;gt; elsewhere anyway. Nor does it rely on any parties who can at any point run&lt;br/&gt;&amp;gt; away with the funds (or&lt;br/&gt;&amp;gt; reasonably be construed as custodians for the funds). Further, this&lt;br/&gt;&amp;gt; solution does not rely on the&lt;br/&gt;&amp;gt; sender deanonymizing themselves to the recipient (or even informing the&lt;br/&gt;&amp;gt; recipient who the senders&amp;#39;&lt;br/&gt;&amp;gt; LSP is).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Note that lnurl here could be replaced with BOLT 12 if BOLT 12 gets some&lt;br/&gt;&amp;gt; flag indicating the Tipper&lt;br/&gt;&amp;gt; should ask an LSP for the invoice.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; But, okay, so the lnurl model of a trusted party not reusing invoices so&lt;br/&gt;&amp;gt; that the Recipient&amp;#39;s LSP&lt;br/&gt;&amp;gt; cannot just steal all funds after the first claim kinda really sucks, how&lt;br/&gt;&amp;gt; do we do better?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The Obvious (tm) solution here is PTLCs - just have the sender always add&lt;br/&gt;&amp;gt; some random nonce * G to&lt;br/&gt;&amp;gt; the PTLC they&amp;#39;re paying and send the recipient a random nonce in the&lt;br/&gt;&amp;gt; onion. I&amp;#39;d generally suggest we&lt;br/&gt;&amp;gt; just go ahead and do this for every PTLC payment, cause why not? Now the&lt;br/&gt;&amp;gt; sender and the lnurl&lt;br/&gt;&amp;gt; endpoint have to collude to steal the funds, but, like, the sender could&lt;br/&gt;&amp;gt; always just give the lnurl&lt;br/&gt;&amp;gt; endpoint the money. I&amp;#39;d love suggestions for fixing this short of PTLCs,&lt;br/&gt;&amp;gt; but its not immediately&lt;br/&gt;&amp;gt; obvious to me that this is possible.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thanks to Steve for pushing on the &amp;#34;how does a let users get tips in&lt;br/&gt;&amp;gt; lightning&amp;#34; issue, various&lt;br/&gt;&amp;gt; people for giving him feedback and the relayed to me, AJ for the PTLC&lt;br/&gt;&amp;gt; proposal, and Rusty for&lt;br/&gt;&amp;gt; tireless drum-beating on onion messages and BOLT 12.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Matt&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/20211013/d180dac7/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20211013/d180dac7/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:04:14&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsrwhpprwu65fp22ye62z75mkhg0sky5lfxuj5yl4mksyzhu50y0dczyz89ljrdlx5qurve3qsq7sm5ys7kuwz6zysx8mf5qel0knkl9kqzk4d0f6e</id>
    
      <title type="html">📅 Original date posted:2021-02-11 📝 Original message: This ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsrwhpprwu65fp22ye62z75mkhg0sky5lfxuj5yl4mksyzhu50y0dczyz89ljrdlx5qurve3qsq7sm5ys7kuwz6zysx8mf5qel0knkl9kqzk4d0f6e" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs27a7mtcj9n7gny002g98ddwh3lwxr3z3dm39tefll2muxlmmk6tqf7rwqy&#39;&gt;nevent1q…rwqy&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-02-11&lt;br/&gt;📝 Original message:&lt;br/&gt;This looks cool but would hinder UX too much for certain scenarios: e.g. if&lt;br/&gt;the escrow in place is part of a bitcoin exchange, then you require the&lt;br/&gt;bitcoin buyer to have bitcoin already, which makes it harder to on-ramp new&lt;br/&gt;users (which could maybe only have fiat). Am I right?&lt;br/&gt;&lt;br/&gt;So are you saying that this is not doable without PTLCs (with simple HTLCs)&lt;br/&gt;unless it&amp;#39;s done like suggested?&lt;br/&gt;&lt;br/&gt;On Thu, 11 Feb 2021 at 14:01, ZmnSCPxj &amp;lt;ZmnSCPxj at protonmail.com&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Good morning Nadav and Andres,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thank you for bringing up this topic again.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Let me provide a new twist to this old idea.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This is the entire logic of the contract to the seller:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;    SELLER &amp;amp;&amp;amp; (BUYER || ESCROW)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Now, a big issue is that simple `&amp;amp;&amp;amp;` is trivial for PTLCs, it is the `||`&lt;br/&gt;&amp;gt; which is difficult and requires ECDH and proof that the ECDH was done&lt;br/&gt;&amp;gt; correctly.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; But we can observe the De Morgan Theorem:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;    A || B &amp;lt;=&amp;gt; !(!A &amp;amp;&amp;amp; !B)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; So how about we *invert* the logic?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; So what we do is, we make *two* payments of the same amount:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * Seller -&amp;gt; Buyer , claimable by BUYER &amp;amp;&amp;amp; ESCROW key.&lt;br/&gt;&amp;gt; * Buyer  -&amp;gt; Seller, claimable by SELLER key.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; So the ritual is this:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * Seller -&amp;gt; Buyer claimable by BUYER &amp;amp;&amp;amp; ESCROW.&lt;br/&gt;&amp;gt; * Buyer -&amp;gt; Seller claimable by SELLER.&lt;br/&gt;&amp;gt; * Seller hands over item.&lt;br/&gt;&amp;gt; * Buyer judges whether to accept, or complain to Escrow.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Now let us consider our cases:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * Buyer is satisfied with the product.&lt;br/&gt;&amp;gt;   * Buyer fails the Seller-&amp;gt;Buyer payment after seller claims the&lt;br/&gt;&amp;gt; Buyer-&amp;gt;Seller payment, so Seller is paid and has no more obligations.&lt;br/&gt;&amp;gt; * Buyer is dissastisfied and wants the Escrow to judge:&lt;br/&gt;&amp;gt;   * Escrow judges Buyer is right: Escrow reveals ESCROW key to Buyer, who&lt;br/&gt;&amp;gt; then clawbacks the payment to the seller.&lt;br/&gt;&amp;gt;   * Escrow judges Seller is right: Escrow deletes ESCROW privkey (&amp;#34;not&lt;br/&gt;&amp;gt; ESCROW&amp;#34;), and the Seller-&amp;gt;Buyer payment eventually times out, ending the&lt;br/&gt;&amp;gt; obligation of the Seller.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The &amp;#34;reverse&amp;#34; payment is effectively the inversion of logic by the De&lt;br/&gt;&amp;gt; Morgan theorem, and the &amp;#34;normal case&amp;#34; (buyer ultimately pays seller) has&lt;br/&gt;&amp;gt; the Escrow not revealing the privkey.&lt;br/&gt;&amp;gt; In addition, in the case where Buyer is satisfied (i.e. both Buyer and&lt;br/&gt;&amp;gt; Seller agree the trade is beneficial) the Escrow is never involved (the&lt;br/&gt;&amp;gt; Escrow might have a timeout for the temporary ESCROW keypair, which it will&lt;br/&gt;&amp;gt; eventually delete; since all payments on LN need a timeout anyway, this is&lt;br/&gt;&amp;gt; fine) and thus does not know about the trade, except that some trade was&lt;br/&gt;&amp;gt; requested (since it must provide a temporary ESCROW pubkey).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This even provides a simple BUYER &#43; ESCROW keypair that gives the seller a&lt;br/&gt;&amp;gt; proof-of-refund, and of course the simple SELLER gives the buyer a&lt;br/&gt;&amp;gt; proof-of-payment as well.&lt;br/&gt;&amp;gt; It only just requires twice as much Bitcoins getting locked.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thoughts?&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;-------------- 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/20210211/c6a316f0/attachment.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20210211/c6a316f0/attachment.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:01:59&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsqxe9futyllxexlx6dwf98v922p0usf7sva46yx3a0ed3y099js4czyz89ljrdlx5qurve3qsq7sm5ys7kuwz6zysx8mf5qel0knkl9kqzk8u60gu</id>
    
      <title type="html">📅 Original date posted:2020-11-27 📝 Original message: Hey, ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsqxe9futyllxexlx6dwf98v922p0usf7sva46yx3a0ed3y099js4czyz89ljrdlx5qurve3qsq7sm5ys7kuwz6zysx8mf5qel0knkl9kqzk8u60gu" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs2tl7rsr3ftv6nlju8mswxj3lam3wqxvasjtdxqd99a84trdfhu5gzcutzn&#39;&gt;nevent1q…utzn&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-11-27&lt;br/&gt;📝 Original message:&lt;br/&gt;Hey,&lt;br/&gt;&lt;br/&gt;On Fri, 27 Nov 2020 at 19:18, Bastien TEINTURIER &amp;lt;bastien at acinq.fr&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Good morning list,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This is an interesting approach to solve this problem, I really like the&lt;br/&gt;&amp;gt; idea.&lt;br/&gt;&amp;gt; It definitely deserves digging more into it: the fact that it doesn&amp;#39;t add&lt;br/&gt;&amp;gt; an additional&lt;br/&gt;&amp;gt; payment makes it largely superior to upfront payment schemes in terms of&lt;br/&gt;&amp;gt; UX.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If we restrict these stake certificates to LN funding txs, which have a&lt;br/&gt;&amp;gt; very specific format&lt;br/&gt;&amp;gt; (multisig 2-of-2) there are probably smart ways to achieve this.&lt;br/&gt;&amp;gt; If for example we&amp;#39;re able to do it easily with Schnorr-based funding txs,&lt;br/&gt;&amp;gt; it may be worth&lt;br/&gt;&amp;gt; waiting for that to happen.&lt;br/&gt;&amp;gt; I&amp;#39;m a bit afraid of having to use ZKPs for general statements, I&amp;#39;d prefer&lt;br/&gt;&amp;gt; something tailored&lt;br/&gt;&amp;gt; to that specific case (it would likely be more efficient and have less new&lt;br/&gt;&amp;gt; assumptions - even&lt;br/&gt;&amp;gt; though you&amp;#39;re right to point out that this is a non-critical system, so&lt;br/&gt;&amp;gt; we&amp;#39;re freer to experiment&lt;br/&gt;&amp;gt; with hot new stuff).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I completely agree with Z that it should be added to the requirements that&lt;br/&gt;&amp;gt; a node cannot&lt;br/&gt;&amp;gt; reuse a stake certificate from another node for himself.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Another constraint is that the proof has to be small, since we have to fit&lt;br/&gt;&amp;gt;&amp;gt; it all in a small onion...&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I&amp;#39;m not sure that&amp;#39;s necessary. If I understand correctly, you&amp;#39;re saying&lt;br/&gt;&amp;gt; that because in your&lt;br/&gt;&amp;gt; model, the sender (Alice) creates one stake certificate for each node in&lt;br/&gt;&amp;gt; the route (Bob, Carol)&lt;br/&gt;&amp;gt; and puts them in the onion.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; But instead it could be a point-to-point property: each node provides its&lt;br/&gt;&amp;gt; own stake certificate&lt;br/&gt;&amp;gt; to the next node (and only to that node). Alice provides a stake&lt;br/&gt;&amp;gt; certificate to Bob, then Bob&lt;br/&gt;&amp;gt; provides a stake certificate to Carol, and so on. If that&amp;#39;s the case, it&lt;br/&gt;&amp;gt; can be in a tlv field in the&lt;br/&gt;&amp;gt; `update_add_htlc` message and doesn&amp;#39;t need to be inside the onion. This&lt;br/&gt;&amp;gt; also makes it less&lt;br/&gt;&amp;gt; likely that Alice is exposing herself to remote nodes in the route (payer&lt;br/&gt;&amp;gt; privacy).&lt;br/&gt;&amp;gt;&lt;br/&gt;&lt;br/&gt;If the above paragraph is confirmed, then does this mean StakeCertificates&lt;br/&gt;with privacy are possible without ZK proofs?&lt;br/&gt;Or did I miss something?&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Of course, this depends on the implementation details we choose, but I&lt;br/&gt;&amp;gt; think it&amp;#39;s worth stressing&lt;br/&gt;&amp;gt; that these two models exist and are quite different.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thanks,&lt;br/&gt;&amp;gt; Bastien&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Le ven. 27 nov. 2020 à 07:46, ZmnSCPxj via Lightning-dev &amp;lt;&lt;br/&gt;&amp;gt; lightning-dev at lists.linuxfoundation.org&amp;gt; a écrit :&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Good morning Gleb,&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; Thank you for your interest :)&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; Quick question: if I am a routing node and receive a valid stake&lt;br/&gt;&amp;gt;&amp;gt; certificate, can I reuse this stake certificate on my own outgoing payments?&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; That probably should be avoided, otherwise a mediocre routing node gets&lt;br/&gt;&amp;gt;&amp;gt; a lot of jamming opportunities for no good.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; You are right, that’s a strong argument for proof “interactivity”:&lt;br/&gt;&amp;gt;&amp;gt; every Certificate should probably commit to *at least* public key of the&lt;br/&gt;&amp;gt;&amp;gt; routing node it is generated for.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Right, it would be better to have the certificate commit to a specific&lt;br/&gt;&amp;gt;&amp;gt; routing node rather than the payment hash/point as I proposed.&lt;br/&gt;&amp;gt;&amp;gt; Committing to a payment hash/point allows a random forwarding node to&lt;br/&gt;&amp;gt;&amp;gt; probe the rest of the network using the same certificate, lowering the&lt;br/&gt;&amp;gt;&amp;gt; score for that certificate on much of the network.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Another constraint is that the proof has to be small, since we have to&lt;br/&gt;&amp;gt;&amp;gt; fit it all in a small onion...&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Presumably we also want the score to eventually &amp;#34;settle to 0&amp;#34; over time.&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; Regards,&lt;br/&gt;&amp;gt;&amp;gt; ZmnSCPxj&lt;br/&gt;&amp;gt;&amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; – gleb&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; On Nov 27, 2020, 2:16 AM &#43;0200, ZmnSCPxj &amp;lt;ZmnSCPxj at protonmail.com&amp;gt;,&lt;br/&gt;&amp;gt;&amp;gt; wrote:&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; Good morning Gleb and Antoine,&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; This is certainly interesting!&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; Quick question: if I am a routing node and receive a valid stake&lt;br/&gt;&amp;gt;&amp;gt; certificate, can I reuse this stake certificate on my own outgoing payments?&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; It seems to me that the proof-of-stake-certificate should also&lt;br/&gt;&amp;gt;&amp;gt; somehow integrate a detail of the current payment (such as payment&lt;br/&gt;&amp;gt;&amp;gt; hash/point) so it cannot be reused by routing nodes for their own outgoing&lt;br/&gt;&amp;gt;&amp;gt; payments.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; For example, looking only at your naive privacy-broken proposal, the&lt;br/&gt;&amp;gt;&amp;gt; signature must use a `sign-to-contract` where the `R` in the signature is&lt;br/&gt;&amp;gt;&amp;gt; actually `R&amp;#39; &#43; h(R&amp;#39; | payment_hash)` with the `R&amp;#39;` also revealed.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; Regards,&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; ZmnSCPxj&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Hello list,&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; In this post, we explore a different approach to channel jamming&lt;br/&gt;&amp;gt;&amp;gt; mitigation.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; We won’t talk about the background here, for the problem&lt;br/&gt;&amp;gt;&amp;gt; description as well as some proposed solutions (mainly upfront payment&lt;br/&gt;&amp;gt;&amp;gt; schemes), see [1].&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; We’re suggesting using UTXO ownership proofs (a.k.a. Stake&lt;br/&gt;&amp;gt;&amp;gt; Certificates) to solve this problem. Previously, these proofs were only&lt;br/&gt;&amp;gt;&amp;gt; used in the Lightning Network at channel announcement time to prevent&lt;br/&gt;&amp;gt;&amp;gt; malicious actors from announcing channels they don’t control. One can think&lt;br/&gt;&amp;gt;&amp;gt; of it as a “fidelity bond” (as a scarce resource) as a requirement for&lt;br/&gt;&amp;gt;&amp;gt; sending HTLCs.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; We start by overviewing issues with other solutions, and then&lt;br/&gt;&amp;gt;&amp;gt; present a naive, privacy-broken Stake Certificates. Then we examine&lt;br/&gt;&amp;gt;&amp;gt; designing a privacy-preserving version, evaluating them. At the end, we&lt;br/&gt;&amp;gt;&amp;gt; talk about non-trivial design decisions and open questions.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; ## Issues with other proposals&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; We find unsatisfying that upfront payment schemes come at a cost of&lt;br/&gt;&amp;gt;&amp;gt; new fees (forward and/or backward), thus inflating payment cost for *any*&lt;br/&gt;&amp;gt;&amp;gt; payment.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; In the future, the upfront base fee might even make “micropayments”&lt;br/&gt;&amp;gt;&amp;gt; economically infeasible by exceeding the value they transfer. Thus, a good&lt;br/&gt;&amp;gt;&amp;gt; solution should not inflate payment cost while still requiring “burning” a&lt;br/&gt;&amp;gt;&amp;gt; scarce resource (so that the attack is not free).&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Another issue with upfront payments is a circular trust dependency.&lt;br/&gt;&amp;gt;&amp;gt; Ideally, we shouldn’t introduce anything less trust-minimized than the&lt;br/&gt;&amp;gt;&amp;gt; Lightning Network itself.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Upfront payment schemes are not like that, because they in one way&lt;br/&gt;&amp;gt;&amp;gt; or another rely on the honest behavior of route participants.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; We believe Stake Certificates we are going to introduce are&lt;br/&gt;&amp;gt;&amp;gt; satisfactory in both of these directions: they don’t inflate payment costs&lt;br/&gt;&amp;gt;&amp;gt; for honest users and don’t require trust. The main disadvantage of Stake&lt;br/&gt;&amp;gt;&amp;gt; Certificates seems to be the novel cryptography required.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; See more details in the “Evaluation” section.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; ## Channel Ownership Proofs as Routing Credit Balance&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Let’s say Alice wants to relay an HTLC to Carol through Bob. Per&lt;br/&gt;&amp;gt;&amp;gt; the Stake Certificates scheme, she has to commit to a particular channel&lt;br/&gt;&amp;gt;&amp;gt; UTXO by embedding an ownership proof in the onion packet while sending an&lt;br/&gt;&amp;gt;&amp;gt; HTLC to Bob.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Bob then unwraps the onion and verifies:&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; 1) the channel identifier is pointing unambiguously to an on-chain&lt;br/&gt;&amp;gt;&amp;gt; UTXO;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; 2) the ownership proof (e.g., a signature) is valid against the&lt;br/&gt;&amp;gt;&amp;gt; previously disclosed UTXO witness script.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; If all those checks succeed, Bob should see if Alice hasn’t&lt;br/&gt;&amp;gt;&amp;gt; exceeded her credit balance. In case she hasn’t, Bob has to “decrement&lt;br/&gt;&amp;gt;&amp;gt; Alice’s credit balance” and relay the HTLC to Carol.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Decrementing credit balance unconditionally of packet success or&lt;br/&gt;&amp;gt;&amp;gt; failure bounds liquidity abuse by malicious HTLC senders.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Since there is no credit assigned initially, “decrementing the&lt;br/&gt;&amp;gt;&amp;gt; credit balance” means just remembering that “Alice spent X out of Y of the&lt;br/&gt;&amp;gt;&amp;gt; credit she received for her Stake Certificates”.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Unfortunately, this naive protocol is a privacy nightmare, because&lt;br/&gt;&amp;gt;&amp;gt; routing nodes can now easily assign every HTLC they forward to the sender’s&lt;br/&gt;&amp;gt;&amp;gt; UTXO.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Let’s first define the terms here one more time, and then proceed&lt;br/&gt;&amp;gt;&amp;gt; to the non-naive, private Stake Certificates.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; - Stake Certificate. Either means a solution we’re proposing or the&lt;br/&gt;&amp;gt;&amp;gt; primitive it is based on, namely proof of UTXO ownership. As we will argue&lt;br/&gt;&amp;gt;&amp;gt; later, it actually makes sense to use proof of LN channel UTXO ownership&lt;br/&gt;&amp;gt;&amp;gt; specifically rather than any funds ownership.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; - Stake Certificate value. An amount of the corresponding UTXO or a&lt;br/&gt;&amp;gt;&amp;gt; ballpark this amount provably  belongs to.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; - Credit balance. When Alice provides a routing node Bob with a&lt;br/&gt;&amp;gt;&amp;gt; Stake Certificate, Bob should increase Alice’s routing credit balance.&lt;br/&gt;&amp;gt;&amp;gt; Alice is then limited in her payments by this balance, and this rule is&lt;br/&gt;&amp;gt;&amp;gt; enforced by routing nodes to prevent free channel jamming in the network.&lt;br/&gt;&amp;gt;&amp;gt; Note that ideally “Alice’s credit balance“ should be virtual and only known&lt;br/&gt;&amp;gt;&amp;gt; to Alice, while routing nodes should only observe per-UTXO credit balance.&lt;br/&gt;&amp;gt;&amp;gt; We currently assume that each routing node keeps track of per-UTXO credit&lt;br/&gt;&amp;gt;&amp;gt; balance separately, see “Design decisions” for more details.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; - Stake-to-credit function defines how much credit balance is given&lt;br/&gt;&amp;gt;&amp;gt; per a Stake Certificate of a given value. This function is a policy of a&lt;br/&gt;&amp;gt;&amp;gt; routing node, and it should be announced.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; - Credit-to-value-transferred function defines how much value a&lt;br/&gt;&amp;gt;&amp;gt; sender can transfer along a given channel considering how much credit they&lt;br/&gt;&amp;gt;&amp;gt; might claim. The function may also consider different factors (e.g., the&lt;br/&gt;&amp;gt;&amp;gt; available capacity of a channel being used) to provide extra robustness.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; ## Privacy-preserving Stake Certificates&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; The presented scheme could preserve privacy if it relied on&lt;br/&gt;&amp;gt;&amp;gt; zero-knowledge proofs of UTXO ownership by avoiding pointing to a&lt;br/&gt;&amp;gt;&amp;gt; particular UTXO.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; More specifically, the verifier should be able to check that:&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; a) The staked UTXO is an element of the current UTXO set&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; b) The prover knows the witness script committed by the UTXO&lt;br/&gt;&amp;gt;&amp;gt; witness program&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; c) The prover knows a valid witness for the witness script&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; d) The staked UTXO was not used to produce a different Stake&lt;br/&gt;&amp;gt;&amp;gt; Certificate which is currently in use as well.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; The verifier should also have a way to see a Stake Certificate&lt;br/&gt;&amp;gt;&amp;gt; value to properly account for the credit. This can be achieved by&lt;br/&gt;&amp;gt;&amp;gt; restricting the UTXO set being proved upon to only those UTXOs with a&lt;br/&gt;&amp;gt;&amp;gt; specific range of values: “I will prove that I own a UTXO among all UTXOs&lt;br/&gt;&amp;gt;&amp;gt; between 0.5 BTC and 1 BTC”.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Unfortunately, steps (b) and (c) require zero-knowledge protocols&lt;br/&gt;&amp;gt;&amp;gt; for general statements, which are more experimental primitives than most of&lt;br/&gt;&amp;gt;&amp;gt; the stuff we have in Bitcoin protocols,&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; although we assume it’s feasible to consider them for non-consensus&lt;br/&gt;&amp;gt;&amp;gt; stuff.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; ## Evaluation&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Stake Certificates, upfront payment schemes, and other potential&lt;br/&gt;&amp;gt;&amp;gt; solutions (given a particular configuration) may be compared along the&lt;br/&gt;&amp;gt;&amp;gt; following axis:&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; 1) Economic feasibility&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; 1a) What is the cost of overcoming the protection for an attacker?&lt;br/&gt;&amp;gt;&amp;gt; Likely a non-linear function: sats_spent =f(channels_to_jam, […])&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; 1b) How does this solution limit honest users?&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; 2) How sophisticated is this solution in terms of integration and&lt;br/&gt;&amp;gt;&amp;gt; making good UX?&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; 3) How complex is this solution in terms of protocol&lt;br/&gt;&amp;gt;&amp;gt; design/implementation?&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; When it comes to (1a), both Stake Certificates and upfront payments&lt;br/&gt;&amp;gt;&amp;gt; are probably equal, in a way that they’re just best-effort ideas to&lt;br/&gt;&amp;gt;&amp;gt; increase the attack cost. Unfortunately, we currently don’t know how to&lt;br/&gt;&amp;gt;&amp;gt; design something as economically powerful as PoW in Bitcoin [3].&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; This aspect can be properly evaluated by applying these ideas to&lt;br/&gt;&amp;gt;&amp;gt; different hypothetical kinds of LN in a simulation and observing the&lt;br/&gt;&amp;gt;&amp;gt; resulting trade-off between (1a) and (1b) considering different attack&lt;br/&gt;&amp;gt;&amp;gt; strategies.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; In the previous sections of this post, we have argued that Stake&lt;br/&gt;&amp;gt;&amp;gt; Certificates may provide a much better (1b) for the cost of (3) because it&lt;br/&gt;&amp;gt;&amp;gt; relies on zero-knowledge.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; When it comes to (2), the design of Stake Certificates may vary in&lt;br/&gt;&amp;gt;&amp;gt; terms of UX burden, from completely automatic to requiring custom actions&lt;br/&gt;&amp;gt;&amp;gt; with private keys from users.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Some of these trade-offs along with other interesting questions are&lt;br/&gt;&amp;gt;&amp;gt; discussed in the following section.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; ## Design decisions and questions&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; #### Should the credit spending be gossipped across the entire&lt;br/&gt;&amp;gt;&amp;gt; network, or should only the routing nodes involved in the payment know?&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Economically, these two approaches are likely to be equivalent, and&lt;br/&gt;&amp;gt;&amp;gt; it’s just a matter of stake-to-credit ratio.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; However, announcing credit spending to the network results in a&lt;br/&gt;&amp;gt;&amp;gt; privacy leak. It also imposes bandwidth and CPU overhead on the routing&lt;br/&gt;&amp;gt;&amp;gt; nodes.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; #### Which zero-knowledge system should be used for Stake&lt;br/&gt;&amp;gt;&amp;gt; Certificates?&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Choosing a ZK system boils down to picking the right trade-offs of&lt;br/&gt;&amp;gt;&amp;gt; proving and verifying time, and assumptions. As we mentioned previously, we&lt;br/&gt;&amp;gt;&amp;gt; would need proving general statements.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; At the same time, we need something cheap in both proving and&lt;br/&gt;&amp;gt;&amp;gt; verification, because Lightning is supposed to be fast.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; At the same time, the setup probably doesn’t matter, because proofs&lt;br/&gt;&amp;gt;&amp;gt; are supposed to be verified only by one participant, a routing node this&lt;br/&gt;&amp;gt;&amp;gt; proof is generated for.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Perhaps we can also pick any cryptographic assumptions we want&lt;br/&gt;&amp;gt;&amp;gt; since this stuff is not mission-critical and can be easily updated if&lt;br/&gt;&amp;gt;&amp;gt; someone breaks a cryptographic assumption and we observe an attack.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; #### Should we allow holding *any* Bitcoins (not just LN channels)&lt;br/&gt;&amp;gt;&amp;gt; for Stake Certificates?&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; This idea might make sense if we’re worried that some LN users&lt;br/&gt;&amp;gt;&amp;gt; might want to send more payments than they can afford per their credit.&lt;br/&gt;&amp;gt;&amp;gt; However, we believe that allowing any UTXO would give an attacker more&lt;br/&gt;&amp;gt;&amp;gt; opportunities to use their cold funds for this attack, or even have a&lt;br/&gt;&amp;gt;&amp;gt; secondary market where holders sell their proofs (they have nothing to&lt;br/&gt;&amp;gt;&amp;gt; loose).&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Instead, we should a) design the credit-to-stake-functions better;&lt;br/&gt;&amp;gt;&amp;gt; b) encourage users send payments across different routing nodes (since&lt;br/&gt;&amp;gt;&amp;gt; credits are not tracked globally) [4].&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; #### What’s the best credit-to-value-transferred function?&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; We reckon that this function should be not just linear to provide&lt;br/&gt;&amp;gt;&amp;gt; maximum security against malicious channel jammers. For example, we can&lt;br/&gt;&amp;gt;&amp;gt; charge more credit for the last 20% of the capacity of the *channel used&lt;br/&gt;&amp;gt;&amp;gt; for routing*. Alternatively, we could discourage making too many payments&lt;br/&gt;&amp;gt;&amp;gt; from the same UTXO within a short period of time by charging more credit in&lt;br/&gt;&amp;gt;&amp;gt; this case.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; #### What about the interactivity and lifetime of Stake&lt;br/&gt;&amp;gt;&amp;gt; Certificates?&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Interactive proofs mean that they are constructed on demand of a&lt;br/&gt;&amp;gt;&amp;gt; routing node, non-interactive means constructed by a payment sender ahead&lt;br/&gt;&amp;gt;&amp;gt; of time.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Both interactivity and lifetime have something to do with the ease&lt;br/&gt;&amp;gt;&amp;gt; of producing proof and accessing keys.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; We will omit the details of the trade-off we consider, but it&lt;br/&gt;&amp;gt;&amp;gt; remains an open question.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; #### If Stake Certificates are valid for N blocks after proof&lt;br/&gt;&amp;gt;&amp;gt; generation, does it mean that if the UTXO is spent during those N blocks,&lt;br/&gt;&amp;gt;&amp;gt; new proof can be generated from the same coins without invalidating the old&lt;br/&gt;&amp;gt;&amp;gt; proof?&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Yes, but an attacker would, first of all, have to pay an on-chain&lt;br/&gt;&amp;gt;&amp;gt; fee for this. If we’re still worried about this problem, there are&lt;br/&gt;&amp;gt;&amp;gt; workaround ideas.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; For example, we could have epochs of 100 blocks (every epoch starts&lt;br/&gt;&amp;gt;&amp;gt; at #XYZXYZ00 block). If at the start of an epoch, a channel wasn’t in the&lt;br/&gt;&amp;gt;&amp;gt; UTXO set, it provides very little credit.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Alternatively, we could expand the zero-knowledge part to proving&lt;br/&gt;&amp;gt;&amp;gt; that the coins were not yet spent.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; #### Should spending a UTXO reveal all Stake Certificates generated&lt;br/&gt;&amp;gt;&amp;gt; from it?&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; This would also solve the problem in the previous question, but it&lt;br/&gt;&amp;gt;&amp;gt; would mean a retrospective privacy leak again. To avoid a privacy leak, we&lt;br/&gt;&amp;gt;&amp;gt; should prevent this.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; #### What if malicious Sybil *routing* nodes failing payments&lt;br/&gt;&amp;gt;&amp;gt; causing other honest routing nodes to reduce the credit of an honest&lt;br/&gt;&amp;gt;&amp;gt; payment sender?&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Both Stake Certificates and upfront payment schemes suffer from&lt;br/&gt;&amp;gt;&amp;gt; malicious routing nodes failing the payments and “wasting” the sender’s&lt;br/&gt;&amp;gt;&amp;gt; credit or fees. This problem even applies out of the channel jamming&lt;br/&gt;&amp;gt;&amp;gt; context, when considering payment failure rate.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; This problem can be addressed by reducing the reputation of faulty&lt;br/&gt;&amp;gt;&amp;gt; links and routing nodes on the payment sender node. When payment routing&lt;br/&gt;&amp;gt;&amp;gt; becomes a for-profit activity, this would encourage routing nodes to&lt;br/&gt;&amp;gt;&amp;gt; sanitize their links.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; The mitigation can be even stronger by using “provable blaming”&lt;br/&gt;&amp;gt;&amp;gt; introduced in [2].&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; ## Conclusion&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; We propose Stake Certificates, a new solution to channel jamming.&lt;br/&gt;&amp;gt;&amp;gt; Perhaps, it might not be the best near-term solution due to the complexity,&lt;br/&gt;&amp;gt;&amp;gt; but the zero satoshi overhead for honest payments is an appealing argument&lt;br/&gt;&amp;gt;&amp;gt; to switch to it in the future.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; This proposal also illustrates how stake-based protocols can solve&lt;br/&gt;&amp;gt;&amp;gt; Sybil challenges in the Bitcoin ecosystem. Since this might be useful in&lt;br/&gt;&amp;gt;&amp;gt; other contexts (Sybil-resistance of many kinds, proof-of-ownership),&lt;br/&gt;&amp;gt;&amp;gt; discussing Stake Certificates is even more useful.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; The next step is a discussion of Stake Certificates. If the&lt;br/&gt;&amp;gt;&amp;gt; community finds it interesting, then we should discuss the design questions&lt;br/&gt;&amp;gt;&amp;gt; mentioned above, and choose a cryptosystem.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Cheers,&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Gleb Naumenko and Antoine Riard&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; ———&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; References and footnotes:&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; 1.&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://github.com/t-bast/lightning-docs/blob/master/spam-prevention.md&#34;&gt;https://github.com/t-bast/lightning-docs/blob/master/spam-prevention.md&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; 2.&lt;br/&gt;&amp;gt;&amp;gt; &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2015-August/000135.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2015-August/000135.html&lt;/a&gt;&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; 3. We don’t actually suggest PoW to solve these issues, because a)&lt;br/&gt;&amp;gt;&amp;gt; the trade-off between honest user cost and attacker cost is misaligned due&lt;br/&gt;&amp;gt;&amp;gt; to specialized hardware and b) smartphones would die too fast if they have&lt;br/&gt;&amp;gt;&amp;gt; to compute PoW; PoW is just an unreachable example of system robustness due&lt;br/&gt;&amp;gt;&amp;gt; to well-aligned game theory.&lt;br/&gt;&amp;gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; 4. Secondary markets are still possible even if we restrict&lt;br/&gt;&amp;gt;&amp;gt; acceptable proofs to only LN channels, but supply would be much smaller,&lt;br/&gt;&amp;gt;&amp;gt; and markets would work much worse for an attacker.&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; 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;&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/20201127/ca1ded55/attachment-0001.html&amp;gt&#34;&gt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20201127/ca1ded55/attachment-0001.html&amp;gt&lt;/a&gt;;
    </content>
    <updated>2023-06-09T15:01:34&#43;02:00</updated>
  </entry>

</feed>