<?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/npub1g5zswf6y48f7fy90jf3tlcuwdmjn8znhzaa4vkmtxaeskca8hpss23ms3l.rss" />
  <link href="https://nostr.ae/npub1g5zswf6y48f7fy90jf3tlcuwdmjn8znhzaa4vkmtxaeskca8hpss23ms3l" />
  <id>https://nostr.ae/npub1g5zswf6y48f7fy90jf3tlcuwdmjn8znhzaa4vkmtxaeskca8hpss23ms3l</id>
  <icon></icon>
  <logo></logo>




  <entry>
    <id>https://nostr.ae/nevent1qqs9psycvjlvvp65lxwtjmdllt6t3y9at0yph8wgremynlxvd9yt6aczypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzlg799j</id>
    
      <title type="html">📅 Original date posted:2023-10-17 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs9psycvjlvvp65lxwtjmdllt6t3y9at0yph8wgremynlxvd9yt6aczypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzlg799j" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs80uje07jsqltycwwuwpsdk65nd3k3p5l8gxxavxx4essv6yprydcq0yttp&#39;&gt;nevent1q…yttp&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-10-17&lt;br/&gt;🗒️ Summary of this message: Batched splicing can be risky if certain conditions are met, such as having no funds in a channel and using an old state. It is important for batched splicing mechanisms to have a backout option to prevent disruptions.&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning Bastien,&lt;br/&gt;&lt;br/&gt;I have not gotten around to posting it yet, but I have a write-up in my computer with the title:&lt;br/&gt;&lt;br/&gt;&amp;gt; Batched Splicing Considered Risky&lt;br/&gt;&lt;br/&gt;The core of the risk is that if:&lt;br/&gt;&lt;br/&gt;* I have no funds right now in a channel (e.g. the LSP allowed me to have 0 reserve, or this is a newly-singlefunded channel from the LSP to me).&lt;br/&gt;* I have an old state (e.g. for a newly-singlefunded channel, it could have been `update_fee`d, so that the initial transaction is old state).&lt;br/&gt;&lt;br/&gt;Then if I participate in a batched splice, I can disrupt the batched splice by broadcasting the old state and somehow convincing miners to confirm it before the batched splice.&lt;br/&gt;&lt;br/&gt;Thus, it is important for *any* batched splicing mechanism to have a backout, where if the batched splice transaction can no longer be confirmed due to some participant disrupting it by posting an old commitment transaction, either a subset of the splice is re-created or the channels revert back to pre-splice state (with knowledge that the post-splice state can no longer be confirmed).&lt;br/&gt;&lt;br/&gt;I know that current splicing tech is to run both the pre-splice and post-splice state simultaneously until the splicing transaction is confirmed.&lt;br/&gt;However we need to *also* check if the splicing transaction *cannot* be confirmed --- by checking if the other inputs to the splice transaction were already consumed by transactions that have deeply confirmed, and in that case, to drop the post-splice state and revert to the pre-splice state.&lt;br/&gt;I do not know if existing splice implementations actually perform such a check.&lt;br/&gt;Unless all splice implementations do this, then any kind of batched splicing is risky.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-10-18T15:02:10&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsq7mwlfy4d92ucamqlf568wqd59x0gmhd4dlypen9vqns7zpnf4sgzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzrfcedh</id>
    
      <title type="html">📅 Original date posted:2023-10-17 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsq7mwlfy4d92ucamqlf568wqd59x0gmhd4dlypen9vqns7zpnf4sgzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzrfcedh" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqspcqmx7r3qn6e0r9cuxv3yal3sgwkdcwed5tv5mup5uqwteekxqngrd8fmu&#39;&gt;nevent1q…8fmu&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-10-17&lt;br/&gt;🗒️ Summary of this message: The summary of the text is that there is a vulnerability in the Lightning Network where a node can cheat and claim funds from an HTLC transaction.&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning Antoine et al.,&lt;br/&gt;&lt;br/&gt;Let me try to rephrase the core of the attack.&lt;br/&gt;&lt;br/&gt;There exists these nodes on the LN (letters `A`, `B`, and `C` are nodes, `==` are channels):&lt;br/&gt;&lt;br/&gt;    A ===== B ===== C&lt;br/&gt;&lt;br/&gt;`A` routes `A-&amp;gt;B-&amp;gt;C`.&lt;br/&gt;&lt;br/&gt;The timelocks, for example, could be:&lt;br/&gt;&lt;br/&gt;   A-&amp;gt;B timeelock = 144&lt;br/&gt;   B-&amp;gt;C timelock = 100&lt;br/&gt;&lt;br/&gt;The above satisfies the LN BOLT requirements, as long as `B` has a `cltv_expiry_delta` of 44 or lower.&lt;br/&gt;&lt;br/&gt;After `B` forwards the HTLC `B-&amp;gt;C`, C suddenly goes offline, and all the signed transactions --- commitment transaction and HTLC-timeout transactions --- are &amp;#34;stuck&amp;#34; at the feerate at the time.&lt;br/&gt;&lt;br/&gt;At block height 100, `B` notices the `B-&amp;gt;C` HTLC timelock is expired without `C` having claimed it, so `B` forces the `B====C` channel onchain.&lt;br/&gt;However, onchain feerates have risen and the commitment transaction and HTLC-timeout transaction do not confirm.&lt;br/&gt;&lt;br/&gt;In the mean time, `A` is still online with `B` and updates the onchain fees of the `A====B` channel pre-signed transactions (commitment tx and HTLC-timeout tx) to the latest.&lt;br/&gt;&lt;br/&gt;At block height 144, `B` is still not able to claim the `A-&amp;gt;B` HTLC, so `A` drops the `A====B` channel onchain.&lt;br/&gt;As the fees are up-to-date, this confirms immediately and `A` is able to recover the HTLC funds.&lt;br/&gt;However, the feerates of the `B====C` pre-signed transactions remain at the old, uncompetitive feerates.&lt;br/&gt;&lt;br/&gt;At this point, `C` broadcasts an HTLC-success transaction with high feerates that CPFPs the commitment tx.&lt;br/&gt;However, it replaces the HTLC-timeout transaction, which is at the old, low feerate.&lt;br/&gt;`C` is thus able to get the value of the HTLC, but `B` is now no longer able to use the knowledge of the preimage, as its own incoming HTLC was already confirmed as claimed by `A`.&lt;br/&gt;&lt;br/&gt;Is the above restatement accurate?&lt;br/&gt;&lt;br/&gt;----&lt;br/&gt;&lt;br/&gt;Let me also explain to non-Lightning experts why HTLC-timeout is presigned in this case and why `B` cannot feebump it.&lt;br/&gt;&lt;br/&gt;In the Poon-Dryja mechanism, the HTLCs are &amp;#34;infected&amp;#34; by the Poon-Dryja penalty case, and are not plain HTLCs.&lt;br/&gt;&lt;br/&gt;A plain HTLC offerred by `B` to `C` would look like this:&lt;br/&gt;&lt;br/&gt;    (B &amp;amp;&amp;amp; OP_CLTV) || (C &amp;amp;&amp;amp; OP_HASH160)&lt;br/&gt;&lt;br/&gt;However, on the commitment transaction held by `B`, it would be infected by the penalty case in this way:&lt;br/&gt;&lt;br/&gt;    (B &amp;amp;&amp;amp; C &amp;amp;&amp;amp; OP_CLTV) || (C &amp;amp;&amp;amp; OP_HASH160) || (C &amp;amp;&amp;amp; revocation)&lt;br/&gt;&lt;br/&gt;There are two changes:&lt;br/&gt;&lt;br/&gt;* The addition of a revocation branch `C &amp;amp;&amp;amp; revocation`.&lt;br/&gt;* The branch claimable by `B` in the &amp;#34;plain&amp;#34; HTLC (`B &amp;amp;&amp;amp; OP_CLTV`) also includes `C`.&lt;br/&gt;&lt;br/&gt;These are necessary in case `B` tries to cheat and this HTLC is on an old, revoked transaction.&lt;br/&gt;If the revoked transaction is *really* old, the `OP_CLTV` would already impose a timelock far in the past.&lt;br/&gt;This means that a plain `B &amp;amp;&amp;amp; OP_CLTV` branch can be claimed by `B` if it retained this very old revoked transaction.&lt;br/&gt;&lt;br/&gt;To prevent that, `C` is added to the `B &amp;amp;&amp;amp; OP_CLTV` branch.&lt;br/&gt;We also introduce an HTLC-timeout transaction, which spends the `B &amp;amp;&amp;amp; C &amp;amp;&amp;amp; OP_CLTV` branch, and outputs to:&lt;br/&gt;&lt;br/&gt;    (B &amp;amp;&amp;amp; OP_CSV) || (C &amp;amp;&amp;amp; revocation)&lt;br/&gt;&lt;br/&gt;Thus, even if `B` held onto a very old revoked commitment transaction and attempts to spend the timelock branch (because the `OP_CLTV` is for an old blockheight), it still has to contend with a new output with a *relative* timelock.&lt;br/&gt;&lt;br/&gt;Unfortunately, this means that the HTLC-timeout transaction is pre-signed, and has a specific feerate.&lt;br/&gt;In order to change the feerate, both `B` and `C` have to agree to re-sign the HTLC-timeout transaction at the higher feerate.&lt;br/&gt;&lt;br/&gt;However, the HTLC-success transaction in this case spends the plain `(C &amp;amp;&amp;amp; OP_HASH160)` branch, which only involves `C`.&lt;br/&gt;This allows `C` to feebump the HTLC-success transaction arbitrarily even if `B` does not cooperate.&lt;br/&gt;&lt;br/&gt;While anchor outputs can be added to the HTLC-timeout transaction as well, `C` has a greater advantage here due to being able to RBF the HTLC-timeout out of the way (1 transaction), while `B` has to get both HTLC-timeout and a CPFP-RBF of the anchor output of the HTLC-timeout transaction (2 transactions).&lt;br/&gt;`C` thus requires a smaller fee to achieve a particular feerate due to having to push a smaller number of bytes compared to `B`.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-10-18T15:02:08&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqszzzceesvxphkxfxgvfyaylyezv33yy0whgsxf4un3l8faljxturqzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzzwnvuz</id>
    
      <title type="html">📅 Original date posted:2023-08-28 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqszzzceesvxphkxfxgvfyaylyezv33yy0whgsxf4un3l8faljxturqzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzzwnvuz" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsydz77wsvfekr2s8ra2gq9c9d7a3hml9hzg6nrzznmhcz49c5vmlg49dfyl&#39;&gt;nevent1q…dfyl&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-08-28&lt;br/&gt;🗒️ Summary of this message: The sender is asking about the consequences of modifying the Sentinel Chain software to be dishonest for 999 sidechain blocks and the validation process for the 1000th block.&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning Ryan,&lt;br/&gt;&lt;br/&gt;If I modify your Sentinel Chain open-source software so that it is honest for 999 sidechain blocks, then lies and says that the 1000th block is invalid even though it actually is, what happens?&lt;br/&gt;&lt;br/&gt;Do mainchain nodes need to download the previous 999 sidechain blocks, run the sidechain rules on them, and then validate the 1000th sidechain block itself?&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-09-07T13:52:31&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsp6xdwva8jqt6f6gutt8k9zypt4da2tu9ljzw87ts20a2aa4q6hcgzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzvgpxmf</id>
    
      <title type="html">📅 Original date posted:2023-07-27 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsp6xdwva8jqt6f6gutt8k9zypt4da2tu9ljzw87ts20a2aa4q6hcgzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzvgpxmf" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs8356ywgpezz62a7hdde6fdjst45myekje5akx4d9rl66v4h2sz9geyj7yh&#39;&gt;nevent1q…j7yh&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-07-27&lt;br/&gt;🗒️ Summary of this message: A scheme for creating a `keysend` protocol that allows for multipath payments is proposed, where the receiver can claim the payment once all parts have arrived.&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning list,&lt;br/&gt;&lt;br/&gt;I would like to share a simple scheme for creating a `keysend` protocol that allows for multipath payments.&lt;br/&gt;&lt;br/&gt;In `keysend`, the preimage is embedded as TLV 5482373484 with length 32.&lt;br/&gt;&lt;br/&gt;In the multipath case, we want the receiver to only be able to claim the payment once all parts have arrived at the receiver.&lt;br/&gt;&lt;br/&gt;For example, suppose we want to split the `keysend` into 2 parts.&lt;br/&gt;Let us select a true preimage `p` at random.&lt;br/&gt;Then, we generate the payment hash `h = SHA256(p)`.&lt;br/&gt;&lt;br/&gt;Then, we generate a new 256-bit scalar, `a`.&lt;br/&gt;For one part, we send `a` for TLV 5482373484, and for the second part, we send `a ^ p`, where `^` is XOR.&lt;br/&gt;All parts use the same payment hash `h`.&lt;br/&gt;&lt;br/&gt;The receiver, on receiving either part, will find that the supposed preimage does not match the actual HTLC payment hashes.&lt;br/&gt;Instead of failing, it holds the payment, using the usual basic multipath payment rules.&lt;br/&gt;&lt;br/&gt;When the receiver receives another part, it will XOR together the supposed preimages.&lt;br/&gt;In the above case, it would get `a` and `a ^ p`, which when XORed together result in `a ^ a ^ p` or `p`, which is now the correct preimage, and the receiver can now claim the entire complete funds.&lt;br/&gt;&lt;br/&gt;The same technique would work with any number of parts --- if we split into `n` parts, we generate `n - 1` additional random scalars and use it for the first `n - 1` parts, then XOR all of them with the scalar-to-be-split for the `n`th part.&lt;br/&gt;This scheme also works for dynamic splitting, i.e. if you are splitting a part that was already split off from a part that was already split off from a part etc.&lt;br/&gt;&lt;br/&gt;A sender can detect if the receiver does not support multipath `keysend` if a part reaches the receiver and it errors with `incorrect_or_unknown_payment_details`.&lt;br/&gt;If the receiver is aware of multipath `keysend`, it would hold onto the incoming HTLCs until MPP timeout, and instead error with `mpp_timeout`.&lt;br/&gt;Thus, support for this on the receiver side does not need to be specially announced via a new feature bit --- an MPP-capable sender can simply try to split, and if it gets an `incorrect_or_unknown_payment_details`, knows that the receiver does not support multipath `keysend`.&lt;br/&gt;The same feature bit 55 can be reused.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-07-31T00:54:54&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsy842sqhyn46xxyez47tlkwv9ym8lxsnsaarl78ymv5acwvd8mslczypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzhlxlqx</id>
    
      <title type="html">📅 Original date posted:2023-07-24 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsy842sqhyn46xxyez47tlkwv9ym8lxsnsaarl78ymv5acwvd8mslczypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzhlxlqx" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsvrupcajy06dkrgefk4zhsx7uddxe7rk9ccmjxckpmnw90n2hmq9qemavcy&#39;&gt;nevent1q…avcy&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-07-24&lt;br/&gt;🗒️ Summary of this message: MuSig2 requires multiple `R` points, preventing certain attacks. The recipient questions if the scheme&amp;#39;s single `R` per party is vulnerable.&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning Tom,&lt;br/&gt;&lt;br/&gt;Would this allow party 2 to itself be composed of N &amp;gt;= 2 parties?&lt;br/&gt;&lt;br/&gt;MuSig2 (as opposed to MuSig1) requires that signatories provide multiple `R` points, not just one each, which are finally aggregated by first combining them using the MuSig() public key compose function.&lt;br/&gt;This prevents party 2 from creating an `R` that may allow it to perform certain attacks whose name escapes me right now but which I used to know.&lt;br/&gt;(it is the reason why MuSig1 requires 3 round trips, and why MuSig2 requires at least 2 `R` nonces per signatory)&lt;br/&gt;&lt;br/&gt;Your scheme has only one `R` per party, would it not be vulnerably to that attack?&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Sent with Proton Mail secure email.&lt;br/&gt;&lt;br/&gt;------- Original Message -------&lt;br/&gt;On Monday, July 24th, 2023 at 7:46 AM, Tom Trevethan via bitcoin-dev &amp;lt;bitcoin-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; We are implementing a version of 2-of-2 Schnorr Musig2 for statechains where the server (party 1 in the 2-of-2) will be fully &amp;#39;blinded&amp;#39; - in that it can hold a private key that is required to generate an aggregate signature on an aggregate public key, but that it does not learn either: 1) The aggregate public key 2) The aggregate signature and 3) The message (m) being signed.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; In the model of blinded statechains, the security rests on the statechain server being trusted to report the NUMBER of partial signatures it has generated for a particular key (as opposed to being trusted to enforce rules on WHAT it has signed in the unblinded case) and the full set of signatures generated being verified client side &lt;a href=&#34;https://github.com/commerceblock/mercury/blob/master/doc/merc_blind.md#blinding-considerations&#34;&gt;https://github.com/commerceblock/mercury/blob/master/doc/merc_blind.md#blinding-considerations&lt;/a&gt;&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Given the 2-of-2 musig2 protocol operates as follows (in the following description, private keys (field elements) are denoted using lower case letters, and elliptic curve points as uppercase letters. G is the generator point and point multiplication denoted as X = xG and point addition as A = G &#43; G):&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Party 1 generates private key x1 and public key X1 = x1G. Party 2 generates private key x2 and public key X2 = x2G. The set of pubkeys is L = {X1,X2}. The key aggregation coefficient is KeyAggCoef(L,X) = H(L,X). The shared (aggregate) public key X = a1X1 &#43; a2X2 where a1 = KeyAggCoef(L,X1) and a2 = KeyAggCoef(L,X2).&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; To sign a message m, party 1 generates nonce r1 and R1 = r1G. Party 2 generates nonce r2 and R2 = r2G. These are aggregated into R = R1 &#43; R2.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Party 1 then computes &amp;#39;challenge&amp;#39; c = H(X||R||m) and s1 = c.a1.x1 &#43; r1&lt;br/&gt;&amp;gt; Party 2 then computes &amp;#39;challenge&amp;#39; c = H(X||R||m) and s2 = c.a2.x2 &#43; r2&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; The final signature is then (R,s1&#43;s2).&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; In the case of blinding this for party 1:&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; To prevent party 1 from learning of either the full public key or final signature seems straightforward, if party 1 doesn&amp;#39;t not need to independently compute and verify c = H(X||R||m) (as they are blinded from the message in any case).&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; 1) Key aggregation is performed only by party 2. Party 1 just sends X1 to party 2.&lt;br/&gt;&amp;gt; 2) Nonce aggregation is performed only by party 2. Party 1 just sends R1 to party 2.&lt;br/&gt;&amp;gt; 3) Party 2 computes c = H(X||R||m) and sends it to party 1 in order to compute s1 = c.a1.x1 &#43; r1&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Party 1 never learns the final value of (R,s1&#43;s2) or m.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Any comments on this or potential issues would be appreciated.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Tom
    </content>
    <updated>2023-07-24T13:36:00&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsttn6r45nheswjmszfjh2gptg7llka23fjg0gvf7uym0cp0z3kqrqzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzfj48ew</id>
    
      <title type="html">📅 Original date posted:2023-05-09 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsttn6r45nheswjmszfjh2gptg7llka23fjg0gvf7uym0cp0z3kqrqzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzfj48ew" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsdyt0zkeh84wsqnr2v4jgudx5gtdjyg4et0u7xgq3496zqhjg8mxqyurc3d&#39;&gt;nevent1q…rc3d&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-05-09&lt;br/&gt;🗒️ Summary of this message: A proposal to address liquidity griefing attacks in dual funded transactions by not locking UTXOs and using 0-conf channels for single contributors.&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning Matt, and t-bast,&lt;br/&gt;&lt;br/&gt;Your proposal basically means &amp;#34;do not dual-fund 0-conf&amp;#34;.&lt;br/&gt;You might as well use the much simpler openv1 flow in that case, just because it is simpler.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Sent with Proton Mail secure email.&lt;br/&gt;&lt;br/&gt;------- Original Message -------&lt;br/&gt;On Tuesday, May 9th, 2023 at 5:38 PM, Matt Morehouse &amp;lt;mattmorehouse at gmail.com&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; Hi Bastien,&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; In general, 0-conf is only safe when WE are the only contributor to&lt;br/&gt;&amp;gt; the channel, otherwise the peer could double spend us.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; The problem you seem to be describing is that we might double-spend&lt;br/&gt;&amp;gt; ourselves if we don&amp;#39;t lock our 0-conf UTXOs at some point. I propose&lt;br/&gt;&amp;gt; that we DO lock our UTXOs after tx_completes have been exchanged IF we&lt;br/&gt;&amp;gt; are the only contributor. We don&amp;#39;t have to worry about liquidity&lt;br/&gt;&amp;gt; griefing in this case, since the peer has no tx_signatures to withhold&lt;br/&gt;&amp;gt; from us. Of course, the opportunistic upgrade of a regular channel to&lt;br/&gt;&amp;gt; 0-conf won&amp;#39;t work -- we need a way to differentiate 0-conf channels&lt;br/&gt;&amp;gt; prior to UTXO selection, so that we don&amp;#39;t reuse soft-locked UTXOs.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; All together, what I propose is:&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; 1) If the channel type has option_zeroconf, select UTXOs that are not&lt;br/&gt;&amp;gt; soft locked.&lt;br/&gt;&amp;gt; 2) If the peer adds any inputs to the funding transaction, abort&lt;br/&gt;&amp;gt; (0-conf is unsafe for us in this case).&lt;br/&gt;&amp;gt; 3) After tx_complete exchange, TryLock() our UTXO inputs and abort if&lt;br/&gt;&amp;gt; already locked.&lt;br/&gt;&amp;gt; 4) Broadcast funding transaction and begin using the 0-conf channel.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; I think this at least enables the common use case for 0-conf: LSPs can&lt;br/&gt;&amp;gt; use their own funds to open 0-conf channels for clients.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; - Matt&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; On Sat, May 6, 2023 at 3:16 AM Bastien TEINTURIER bastien at acinq.fr wrote:&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; &amp;gt; Good morning list,&lt;br/&gt;&amp;gt; &amp;gt; &lt;br/&gt;&amp;gt; &amp;gt; One of the challenges created by the introduction of dual funded&lt;br/&gt;&amp;gt; &amp;gt; transactions [1] in lightning is how to protect against liquidity&lt;br/&gt;&amp;gt; &amp;gt; griefing attacks from malicious peers [2].&lt;br/&gt;&amp;gt; &amp;gt; &lt;br/&gt;&amp;gt; &amp;gt; Let&amp;#39;s start by reviewing this liquidity griefing issue. The dual funding&lt;br/&gt;&amp;gt; &amp;gt; protocol starts by exchanging data about the utxos each peer adds to the&lt;br/&gt;&amp;gt; &amp;gt; shared transaction, then exchange signatures and broadcast the resulting&lt;br/&gt;&amp;gt; &amp;gt; transaction. If peers lock their utxos as soon as they&amp;#39;ve decided to add&lt;br/&gt;&amp;gt; &amp;gt; them to the shared transaction, the remote node may go silent. If that&lt;br/&gt;&amp;gt; &amp;gt; happens, the honest node has some liquidity that is locked and unusable.&lt;br/&gt;&amp;gt; &amp;gt; &lt;br/&gt;&amp;gt; &amp;gt; This cannot easily be fixed by simply unlocking utxos after detecting&lt;br/&gt;&amp;gt; &amp;gt; that the remote node is fishy, because the remote node would still have&lt;br/&gt;&amp;gt; &amp;gt; succeeded at locking your liquidity for a (small) duration, and could&lt;br/&gt;&amp;gt; &amp;gt; start other instances of that attack with different node_ids.&lt;br/&gt;&amp;gt; &amp;gt; &lt;br/&gt;&amp;gt; &amp;gt; An elegant solution to this issue is to never lock utxos used in dual&lt;br/&gt;&amp;gt; &amp;gt; funded transactions. If a remote node goes silent in the middle of an&lt;br/&gt;&amp;gt; &amp;gt; instance of the protocol, your utxos will automatically be re-used in&lt;br/&gt;&amp;gt; &amp;gt; another instance of the protocol. The only drawback with that approach&lt;br/&gt;&amp;gt; &amp;gt; is that when you have multiple concurrent instances of dual funding with&lt;br/&gt;&amp;gt; &amp;gt; honest peers, some of them may fail because they are double-spent by one&lt;br/&gt;&amp;gt; &amp;gt; of the concurrent instances. This is acceptable, since the protocol&lt;br/&gt;&amp;gt; &amp;gt; should complete fairly quickly when peers are honest, and at worst, it&lt;br/&gt;&amp;gt; &amp;gt; can simply be restarted when failure is detected.&lt;br/&gt;&amp;gt; &amp;gt; &lt;br/&gt;&amp;gt; &amp;gt; But that solution falls short when using 0-conf, because accidentally&lt;br/&gt;&amp;gt; &amp;gt; double-spending a 0-conf channel (because of concurrent instances) can&lt;br/&gt;&amp;gt; &amp;gt; result in loss of funds for one of the peers (if payments were made on&lt;br/&gt;&amp;gt; &amp;gt; that channel before detecting the double-spend). It seems like using&lt;br/&gt;&amp;gt; &amp;gt; 0-conf forces us to lock utxos to avoid this issue, which means that&lt;br/&gt;&amp;gt; &amp;gt; nodes offering 0-conf services expose themselves to liquidity griefing.&lt;br/&gt;&amp;gt; &amp;gt; &lt;br/&gt;&amp;gt; &amp;gt; Another related issue is that nodes that want to offer 0-conf channels&lt;br/&gt;&amp;gt; &amp;gt; must ensure that the utxos they use for 0-conf are isolated from the&lt;br/&gt;&amp;gt; &amp;gt; utxos they use for non 0-conf, otherwise it is not possible to properly&lt;br/&gt;&amp;gt; &amp;gt; lock utxos, because of the following race scenario:&lt;br/&gt;&amp;gt; &amp;gt; &lt;br/&gt;&amp;gt; &amp;gt; - utxoA is selected for a non 0-conf funding attempt and not locked&lt;br/&gt;&amp;gt; &amp;gt; (to protect against liquidity griefing)&lt;br/&gt;&amp;gt; &amp;gt; - utxoA is also selected for a 0-conf funding attempt (because it is&lt;br/&gt;&amp;gt; &amp;gt; found unlocked in the wallet) and then locked&lt;br/&gt;&amp;gt; &amp;gt; - the funding transaction for the 0-conf channel is successfully&lt;br/&gt;&amp;gt; &amp;gt; published first and that channel is instantly used for payments&lt;br/&gt;&amp;gt; &amp;gt; - the funding transaction for the non 0-conf channel is then published&lt;br/&gt;&amp;gt; &amp;gt; and confirms, accidentally double-spending the 0-conf channel&lt;br/&gt;&amp;gt; &amp;gt; &lt;br/&gt;&amp;gt; &amp;gt; This can be fixed by using a &amp;#34;soft lock&amp;#34; when selecting utxos for a non&lt;br/&gt;&amp;gt; &amp;gt; 0-conf funding attempt. 0-conf funding attempts must ignore soft locked&lt;br/&gt;&amp;gt; &amp;gt; utxos while non 0-conf funding attempts can (should) reuse soft locked&lt;br/&gt;&amp;gt; &amp;gt; utxos.&lt;br/&gt;&amp;gt; &amp;gt; &lt;br/&gt;&amp;gt; &amp;gt; In eclair, we are currently doing &amp;#34;opportunistic&amp;#34; 0-conf:&lt;br/&gt;&amp;gt; &amp;gt; &lt;br/&gt;&amp;gt; &amp;gt; - if we receive `channel_ready` immediately (which means that our peer&lt;br/&gt;&amp;gt; &amp;gt; trusts us to use 0-conf)&lt;br/&gt;&amp;gt; &amp;gt; - and we&amp;#39;re the only contributor to the funding transaction (our peer&lt;br/&gt;&amp;gt; &amp;gt; doesn&amp;#39;t have any input that they could use to double-spend)&lt;br/&gt;&amp;gt; &amp;gt; - and the transaction hasn&amp;#39;t been RBF-ed yet&lt;br/&gt;&amp;gt; &amp;gt; &lt;br/&gt;&amp;gt; &amp;gt; Then we immediately send `channel_ready` as well and start using that&lt;br/&gt;&amp;gt; &amp;gt; channel (because we know we won&amp;#39;t double spend ourselves). This is nice&lt;br/&gt;&amp;gt; &amp;gt; because it lets us use 0-conf in a way where only one side of the&lt;br/&gt;&amp;gt; &amp;gt; channel needs to trust the other side (instead of both sides trusting&lt;br/&gt;&amp;gt; &amp;gt; each other).&lt;br/&gt;&amp;gt; &amp;gt; &lt;br/&gt;&amp;gt; &amp;gt; Unfortunately, we cannot do that anymore when mixing 0-conf and non&lt;br/&gt;&amp;gt; &amp;gt; 0-conf funding attempts, because the utxos may be soft locked,&lt;br/&gt;&amp;gt; &amp;gt; preventing us from &amp;#34;upgrading&amp;#34; to 0-conf.&lt;br/&gt;&amp;gt; &amp;gt; &lt;br/&gt;&amp;gt; &amp;gt; You have successfully reached the end of this quite technical post,&lt;br/&gt;&amp;gt; &amp;gt; congrats! My goal with this post is to gather ideas on how we could&lt;br/&gt;&amp;gt; &amp;gt; improve that situation and offer good enough protections against&lt;br/&gt;&amp;gt; &amp;gt; liquidity griefing for nodes offering 0-conf services. Please share&lt;br/&gt;&amp;gt; &amp;gt; your ideas! And yes, I know, 0-conf is a massive implementation pain&lt;br/&gt;&amp;gt; &amp;gt; point that we would all like to remove from our codebases, but hey,&lt;br/&gt;&amp;gt; &amp;gt; users like it ¯\(ツ)/¯&lt;br/&gt;&amp;gt; &amp;gt; &lt;br/&gt;&amp;gt; &amp;gt; Cheers,&lt;br/&gt;&amp;gt; &amp;gt; Bastien&lt;br/&gt;&amp;gt; &amp;gt; &lt;br/&gt;&amp;gt; &amp;gt; [1] &lt;a href=&#34;https://github.com/lightning/bolts/pull/851&#34;&gt;https://github.com/lightning/bolts/pull/851&lt;/a&gt;&lt;br/&gt;&amp;gt; &amp;gt; [2] &lt;a href=&#34;https://github.com/lightning/bolts/pull/851#discussion_r997537630&#34;&gt;https://github.com/lightning/bolts/pull/851#discussion_r997537630&lt;/a&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; &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;
    </content>
    <updated>2023-06-09T15:13:16&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsxykl2jh48mg4wyftq54emv7n485lztm080zwj65cgy7akj5hdq9szypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzhlrm29</id>
    
      <title type="html">📅 Original date posted:2023-05-07 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsxykl2jh48mg4wyftq54emv7n485lztm080zwj65cgy7akj5hdq9szypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzhlrm29" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs95ljn9hzfa7kewz2ysle0z05suw6muzu54s7w2dh6dcv5tp7kzfqkfy3dh&#39;&gt;nevent1q…y3dh&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-05-07&lt;br/&gt;🗒️ Summary of this message: Dual-funded 0-conf can be made safe if the initiator uses swap-in-potentiam addresses, allowing for immediate transfer to a 0-conf Lightning channel.&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning t-bast, and list,&lt;br/&gt;&lt;br/&gt;Dual-funded 0-conf can be made safe in the following case:&lt;br/&gt;&lt;br/&gt;* If the initiator uses swap-in-potentiam addresses (with initiator as Alice, acceptor as Bob).&lt;br/&gt;&lt;br/&gt;If the initiator stalls, then the acceptor can retaliate by refusing to sign the swap-in-potentiam UTXOs forever after that, thus also locking their funds until the swap-in-potentiam times out, thus preventing this liquidity griefing from being cost-free.&lt;br/&gt;&lt;br/&gt;The expected use-case is that a user expects onchain operations to be slow and take multiple confirmations to receive.&lt;br/&gt;Once there is deep confirmation that a swap-in-potentiam address has been funded, then it can be transferred immediately to a 0-conf Lightning channel.&lt;br/&gt;&lt;br/&gt;The initiator still needs to trust that the acceptor does not double-spend out from under the initiator, but see LSPS3 Promise To Unconditionally Fund 0-conf.&lt;br/&gt;Also, it looks like you are allowing for the initiator to trust the acceptor in that case, as I believe you are taking the point of view of the acceptor of the dual-funding flow.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:13:15&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqst73czz4klf42g55kdmvefa2z2a339wzxwpuc98wn36yt50kndg7czypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxz689agq</id>
    
      <title type="html">📅 Original date posted:2023-04-04 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqst73czz4klf42g55kdmvefa2z2a339wzxwpuc98wn36yt50kndg7czypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxz689agq" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs06ukfa452d2uzu4h5njlvyatzql07u7lanneyyrv9lyszrz2urucvu0mgr&#39;&gt;nevent1q…0mgr&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-04-04&lt;br/&gt;🗒️ Summary of this message: Swap-in-potentiam addresses provide implicit protection against 0-conf double-spend risk for all operations that move from onchain to Lightning, including channel opens and onchain-to-offchain swaps.&lt;br/&gt;📝 Original message:&lt;br/&gt;Hi ariard and t-bast,&lt;br/&gt;&lt;br/&gt;I would like to point out that spends from swap-in-potentiam addresses are safely 0-conf if Bob is the other signatory in the swap-in-potentiam address.&lt;br/&gt;&lt;br/&gt;On the other hand swap-in-potentiam is arguably cheating, since sending to a swap-in-potentiam address is actually a channel open of a Spilman-like channel with `OP_CSV` instead of `OP_CLTV`.&lt;br/&gt;&lt;br/&gt;This implicit protection against 0-conf double-spend risk that swap-in-potentiam provides, exists for all operations that move from onchain to Lightning, including: channel opens, onchain-to-offchain swap, splice-in.&lt;br/&gt;&lt;br/&gt;I should also note that the UTXOs with swap-in-potentiam addressed do need to be confirmed.&lt;br/&gt;&lt;br/&gt;--&lt;br/&gt;&lt;br/&gt;For cases where the one doing splice-in is an LSP and the other side is a client of that LSP, also consider this proposal: &lt;a href=&#34;https://github.com/BitcoinAndLightningLayerSpecs/lsp/pull/24&#34;&gt;https://github.com/BitcoinAndLightningLayerSpecs/lsp/pull/24&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;While it is designed for 0-conf channel funding, the actual protocol is generic enough that it can be used where there is double-spend risk from an LSP, that the client wants to protect against.&lt;br/&gt;This can applied to splice-in and channel factory construction, as the protocol is simply a promise &amp;#34;I the LSP will do my best to get the transaction with this TXID confirmed before some future blockheight, so you the client can rest assured that even if it is unconfirmed now (0-conf) you can always rely on it being confirmed later.&amp;#34;&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:13:01&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsqq2exvw8c95pmgdy4aveuyuttplnhznwxmcalpvh2q2zs5fxtzxgzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxztkf03m</id>
    
      <title type="html">📅 Original date posted:2023-04-04 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsqq2exvw8c95pmgdy4aveuyuttplnhznwxmcalpvh2q2zs5fxtzxgzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxztkf03m" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqst73czz4klf42g55kdmvefa2z2a339wzxwpuc98wn36yt50kndg7cnadx8y&#39;&gt;nevent1q…dx8y&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-04-04&lt;br/&gt;🗒️ Summary of this message: A proposal has been made to protect against double-spend risk from an LSP during splice-in and channel factory construction, but it may be risky for the LSP.&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning again ariard and t-bast,&lt;br/&gt;&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; For cases where the one doing splice-in is an LSP and the other side is a client of that LSP, also consider this proposal: &lt;a href=&#34;https://github.com/BitcoinAndLightningLayerSpecs/lsp/pull/24&#34;&gt;https://github.com/BitcoinAndLightningLayerSpecs/lsp/pull/24&lt;/a&gt;&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; While it is designed for 0-conf channel funding, the actual protocol is generic enough that it can be used where there is double-spend risk from an LSP, that the client wants to protect against.&lt;br/&gt;&amp;gt; This can applied to splice-in and channel factory construction, as the protocol is simply a promise &amp;#34;I the LSP will do my best to get the transaction with this TXID confirmed before some future blockheight, so you the client can rest assured that even if it is unconfirmed now (0-conf) you can always rely on it being confirmed later.&amp;#34;&lt;br/&gt;&lt;br/&gt;Actually, given that the LSP is held liable if the TXID never confirms, and the splice TXID has as input the previous funding txo, this is actually risky for the LSP.&lt;br/&gt;&lt;br/&gt;Even if the client has given revocation keys for all states dependent on the previous funding txo, the client can still post, and have confirmed, a revoked state.&lt;br/&gt;This prevents the LSP from ever getting the splice TXID confirmed.&lt;br/&gt;The client loses all its funds in the channel, but in exchange the LSP is held liable for not getting the splice TXID confirmed and the LSP reputation is destroyed.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:13:01&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsyyujfw25anc7usu0xrg68wy87uuw87zud2u2lktjs3p5a69pt94szypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzrxzv7l</id>
    
      <title type="html">📅 Original date posted:2023-02-23 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsyyujfw25anc7usu0xrg68wy87uuw87zud2u2lktjs3p5a69pt94szypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzrxzv7l" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsx0gerxk03uganha8vcrzjl6vg0cj726ggw46fcg2ndy2lw7rhamc57ka2g&#39;&gt;nevent1q…ka2g&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-02-23&lt;br/&gt;🗒️ Summary of this message: A proposal suggests that Lightning Network channels should be between three nodes instead of two, offering advantages such as better balance and liquidity, and easier routing. However, having more than two participants in an offchain updateable cryptocurrency system can pose security risks.&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning 10k1,&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; Currently, LN primarily uses 2 of 2 multisig channel, though I have heard people talk about opening channels in more complex transactions than 2 of 2 multisigs.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Thinking through all the topology and number theory aspects of it, I think that if channels were mostly between 3 nodes instead of 2, there could be some big advantages:&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; - Channels can advertise which node has the lowest balance, helping with balance of channels, and overall liquidity. There would need to be vague enough thresholds to define when to even bother mentioning this, I imagine something like under 10% remaining on one versus the other two would be sufficiently anonymous.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; - A node with 3 channels attached to it can be considered as completely connected, and can basically route to 10 different next hops for only 3 opening transaction fees.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; - The time cost is basically doubled - two nodes for a channel means request and two messages between the peers to propagate their PSBT channel state, 3 nodes to a channel means 1 request and 6 messages to settle a new payment, which each node in the trio can more or less dispatch two messages at the same time, so, 3 message cycles, or average around 600ms from anywhere to anywhere on the internet.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; - The channel&amp;#39;s lowest balance could be one-bit boolean value publicly broadcast, meaning that peers selecting hops for a payment route can easily avoid adding to a channel stuck on one side. Pathfinding is a real hassle in the current design of LN. It is hard to navigate in the dark, but if you can sense the distance to the nearest object you can orient easily.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; The magic of tesselation gave us lightning fast 3d raster based 3d modeling, and is based on the infinite tesselation of triangles. Oh, there is 4 points possible, but it really just complicates things. I&amp;#39;m pretty sure that the new Unreal 5 &amp;#34;nanite&amp;#34; engine only works with uniform 3 point surfaces, at least, it definitely looks like that based on the 4 color map versions that show the polygons. And anyhow, a &amp;#34;rectangle&amp;#34; is just two adjacent triangles, why bother with this extra, extraneous nonsense of calling two polygons with a common axis &amp;#34;squares&amp;#34;.&lt;br/&gt;&lt;br/&gt;The problem with N &amp;gt; 2 participants in an offchain updateable cryptocurrency system is that if any participant is offline, then the entire system cannot update and the online participants can only back out using an expensive onchain procedure, or wait until the missing participant is online again.&lt;br/&gt;&lt;br/&gt;(Use of k-of-n here would allow any quorum of `k` to steal the funds of the `n - k` remaining participants, so security-wise you should really go for n-of-n multisignatures)&lt;br/&gt;&lt;br/&gt;If any arbitrary participant has a probability `P` of being offline at any particular moment, then the probability of the entire system being not updateable is `1 - (1 - P)^N`.&lt;br/&gt;Crucially, because of real-world considerations, the probability `P` cannot be 0 (though this can be made arbitrarily near 0, but then the cost of doing so would have to be paid by *somebody*).&lt;br/&gt;&lt;br/&gt;Further, if the offchain updateable cryptocurrency system has N participants, if one participant is offline, then N - 1 participants have their funds forcibly locked.&lt;br/&gt;Thus we should multiply the probability of an individual system (N-participant &amp;#34;channel&amp;#34;) being non-operational with the number of participants who suffer having their funds locked.&lt;br/&gt;&lt;br/&gt;With 2-participant channels, the probability of any single channel being non-operational is at its lowest and the number of affected counterparties is also at its lowest.&lt;br/&gt;&lt;br/&gt;This is why Channel Factories are even a thing.&lt;br/&gt;&lt;br/&gt;--&lt;br/&gt;&lt;br/&gt;Basically:&lt;br/&gt;&lt;br/&gt;* A channel is just a sub-class of offchain-updateable cryptocurrency systems.&lt;br/&gt;* An offchain-updateable cryptocurrency system must be hosted by another cryptocurrency system, such as a blockchain.&lt;br/&gt;* An offchain-updateable cryptocurrency system does *not* require activity on its hosting system in order to update its state.&lt;br/&gt;* An offchain-updateable cryptocurrency system can be hosted inside another offchain-updateable cryptocurrency system.&lt;br/&gt;  * The outer offchain-updateable cryptocurrency system is hosted directly by a blockchain (a blockchain only requires a physics system with entropy in order to be instantiated).&lt;br/&gt;  * The inner offchain-updateable cryptocurrency system is hosted on the outer one.&lt;br/&gt;    The outer hosting system can host multiple inner systems.&lt;br/&gt;  * The outer offchain-updateable cryptocurrency system is N-of-N where N &amp;gt; 2.&lt;br/&gt;  * Each inner system is 2-of-2.&lt;br/&gt;* The outer offchain-updateable cryptocurrency system is the &amp;#34;channel factory&amp;#34;.&lt;br/&gt;* Each inner offchain-updateable cryptocurrency system is a &amp;#34;channel&amp;#34;.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;This provides a good balance of availability and efficiency.&lt;br/&gt;&lt;br/&gt;* When a participant is offline, the outer system is non-operational, but each inner system deos not care.&lt;br/&gt;  Each inner system can update without activity on its hosting system, that is the point of offchain protocols.&lt;br/&gt;  So each 2-of-2 channel can update even if the hosting N-of-N channel factory cannot be updated.&lt;br/&gt;* The blockchain only hosts a single N-of-N UTXO for multiple channels.&lt;br/&gt;&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; The only other issue that is on my mind lately relating to LN is 0 conf channels. I hadn&amp;#39;t thought of &amp;#34;channels&amp;#34; as being 2 dimensional, since they represent a midpoint between two other points. But a midpoint is an abstract term, not just a word used for 1D lines but also 2D and nD shapes.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; It seems to me like there could be a negotiation protocol to pre-arrange a not yet mined opening tx for a 3 way lightning channel, that could effectively lock in every party such that it can&amp;#39;t wriggle out of the commitment. This just wouldn&amp;#39;t be possible with a 2 way. It then wouldn&amp;#39;t matter a bit how big the fee was since the parties are already in consensus and have the ability to back out at any moment.&lt;br/&gt;&lt;br/&gt;You first need to get the 3 committed, and that is the rub here: it requires onchain activity to commit funds to any N parties, whether N=2 or N=3.&lt;br/&gt;And that onchain activity will always be subject to reversal / double-spending unless confirmed deeply enough that we believe reorganizing the chain would be unlikely.&lt;br/&gt;&lt;br/&gt;Basically: what are the inputs to the transaction that backs your 3-participant channel?&lt;br/&gt;If any input can be signed by just one participant, then that participant can sign a different transaction spending that input in another way, then bribe a miner to include it in a mined block.&lt;br/&gt;&lt;br/&gt;Thus, this fixes nothing: in order to get funds committed to the 3 participants, you need *some* confirmed transaction to commit those funds in the first place, and everyone still has to wait for that transaction to confirm, thus you cannot sidestep the confirmation-or-trust requirement.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:12:44&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsgkmty37rspachw0cvmxe3nfyuve6l69c0c9wwluwhqm2qsm8y20gzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxz3qw4ll</id>
    
      <title type="html">📅 Original date posted:2023-02-14 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsgkmty37rspachw0cvmxe3nfyuve6l69c0c9wwluwhqm2qsm8y20gzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxz3qw4ll" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsrdnk4pvpjtafafg7npr4uuajya8a6tyq2qsp0gvxtpcd7xzmqttqrtwef0&#39;&gt;nevent1q…wef0&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-02-14&lt;br/&gt;🗒️ Summary of this message: The Lightning Network&amp;#39;s reputation system relies on first-hand and inferred experience, but repeat interactions are rare. Wallet vendors can provide live network views, but this is ultimately hearsay. Altruistic nodes could provide scoring data, but LSPs can be bought out.&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning all,&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; First of all let&amp;#39;s see what types of reputation system exist (and yes,&lt;br/&gt;&amp;gt; &amp;gt; this is my very informal categorization):&lt;br/&gt;&amp;gt; &amp;gt; &lt;br/&gt;&amp;gt; &amp;gt; - First hand experience&lt;br/&gt;&amp;gt; &amp;gt; - Inferred experience&lt;br/&gt;&amp;gt; &amp;gt; - Hearsay&lt;br/&gt;&amp;gt; &amp;gt; &lt;br/&gt;&amp;gt; &amp;gt; The first two are likely the setup we all are comfortable with: we ourselves&lt;br/&gt;&amp;gt; &amp;gt; experienced something, and make some decisions based on that&lt;br/&gt;&amp;gt; &amp;gt; experience. This is probably what we&amp;#39;re all doing at the moment: we&lt;br/&gt;&amp;gt; &amp;gt; attempt a payment, it fails, we back off for a bit from that channel&lt;br/&gt;&amp;gt; &amp;gt; being used again. This requires either being able to witness the issue&lt;br/&gt;&amp;gt; &amp;gt; directly (local peer) or infer from unforgeable error messages (the&lt;br/&gt;&amp;gt; &amp;gt; failing node returns an error, and it can&amp;#39;t point the finger at someone&lt;br/&gt;&amp;gt; &amp;gt; else). Notice that this also includes some transitive constructions,&lt;br/&gt;&amp;gt; &amp;gt; such as the backpressure mechanism we were discussing for ariard&amp;#39;s&lt;br/&gt;&amp;gt; &amp;gt; credentials proposal.&lt;br/&gt;&amp;gt; &amp;gt; &lt;br/&gt;&amp;gt; &amp;gt; Ideally we&amp;#39;d only rely on the first two to make decisions, but here&amp;#39;s&lt;br/&gt;&amp;gt; &amp;gt; exactly the issue we ran into with Bittorrent: repeat interactions are&lt;br/&gt;&amp;gt; &amp;gt; too rare. In addition, our local knowledge gets out of date the longer&lt;br/&gt;&amp;gt; &amp;gt; we wait, and a previously failing channel may now be good again, and&lt;br/&gt;&amp;gt; &amp;gt; vice-versa. For us to have sufficient knowledge to make good decisions&lt;br/&gt;&amp;gt; &amp;gt; we need to repeatedly interact with the same nodes in the network, and&lt;br/&gt;&amp;gt; &amp;gt; since end-users will be very unlikely to do that, we might end up in a&lt;br/&gt;&amp;gt; &amp;gt; situation were we instinctively fall back to the hearsay method, either&lt;br/&gt;&amp;gt; &amp;gt; by sharing our local reputation with peers and then somehow combine that&lt;br/&gt;&amp;gt; &amp;gt; with our own view. To the best of my knowledge such a system has never&lt;br/&gt;&amp;gt; &amp;gt; been built successfully, and all attempts have ended in a system that&lt;br/&gt;&amp;gt; &amp;gt; was either way too simple or is gameable by rational players.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; In lightning we have a trivial solution to this - your wallet vendor/LSP is already extracting a fee&lt;br/&gt;&amp;gt; from you for every HTLC routed through it, it has you captive and can set the fee (largely)&lt;br/&gt;&amp;gt; arbitrarily (up to you paying on-chain fees to switch LSPs). They can happily tell you their view of&lt;br/&gt;&amp;gt; the network ~live and you should generally accept it. Its by no means perfect, and there&amp;#39;s plenty of&lt;br/&gt;&amp;gt; games they could play on, eg, your privacy, but its pretty damned good.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; If we care a ton about the risks here, we could have a few altruistic nodes that release similar&lt;br/&gt;&amp;gt; info and users can median-filter the data in one way or another to reduce risk.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; I just do not buy that this is a difficult problem for the &amp;#34;end user&amp;#34; part of the network. For&lt;br/&gt;&amp;gt; larger nodes its (obviously, and trivially) not a problem either, which leaves the &amp;#34;middle nodes&amp;#34;&lt;br/&gt;&amp;gt; stranded without good data but without an LSP they want to use for data. I believe that isn&amp;#39;t a&lt;br/&gt;&amp;gt; large enough cohort to change the whole network around for, and them asking a few altruistic (let&amp;#39;s&lt;br/&gt;&amp;gt; say, developer?) nodes for scoring data seems more than sufficient.&lt;br/&gt;&lt;br/&gt;But this is all ultimately hearsay.&lt;br/&gt;&lt;br/&gt;LSPs can be bought out, and developers can go rogue.&lt;br/&gt;Neither should be trusted if at all possible.&lt;br/&gt;&lt;br/&gt;Which is why I think forwardable peerswaps fixes this: it *creates* paths that allow payment routing, without requiring pervasive monitoring (which is horrible because eventually the network will be large enough that you will never encounter the same node twice if you&amp;#39;re a plebeian, and if you&amp;#39;re an aristocrat, you have every incentive to lie to the plebeians to solidify your power) of the network.&lt;br/&gt;&lt;br/&gt;Ultimately the network gets healthier if flows are bidirectional, swaps are essential to bootstrapping from the starting state where there are distinct &amp;#34;customers&amp;#34; and &amp;#34;merchants&amp;#34;, but current one-hop-only peerswaps are too local for the blockchain cost, and multi-hop source-routed swaps have the same issue as standard payments.&lt;br/&gt;The advantage of forwardable peerswaps is that it is specifically not source routed --- intermediate nodes make decisions of where to forward, and they are thus incentivized to benefit the network because they benefit themselves.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;I think it should be a principle of protocol design to embrace a capitalistic mindset, by which I mean: ensuring the rules make &amp;#34;beneficial for me&amp;#34; the same as &amp;#34;beneficial to everyone&amp;#34;.&lt;br/&gt;Certainly I can take a common knife from my kitchen and stick the pointy end into my neighbor, then take all their belongings, which would be very beneficial to me, but would not be beneficial to everyone, which is why laws against manslaughter and theft exist.&lt;br/&gt;Ultimately, protocol design is the laying down of laws, and the proper function of this lawmaking position is to ensure that &amp;#34;beneficial for me&amp;#34; will be something that is &amp;#34;beneficial to everyone&amp;#34;.&lt;br/&gt;Indeed, the entire point of having a punitive Poon-Dryja is to ensure that &amp;#34;beneficial for me&amp;#34; does not include theft of the channel funds by using old state, and is exemplary of this principle.&lt;br/&gt;&amp;#34;Greed is Good&amp;#34; might not be true, but perhaps: &amp;#34;We should strive to MAKE Greed Good&amp;#34;.&lt;br/&gt;&lt;br/&gt;Forwardable peerswaps are beneficial to every participant, and thus beneficial to the network, and thus should be part of the law of Lightning Network protocol.&lt;br/&gt;It *creates* high availability of channels and routing, without self-assertions or hearsay; it only requires local reputation (a forwarding node will forward a peerswap only if it knows it can benefit from whichever hop it is forwarding to: the locality avoids the issue where a node may never interact with another node again, since the node has a channel with them and is expected to repeatedly interact with them in the close future, and thus has very good local information).&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:12:40&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsr8flad7wxa6s6quehlvq3cux4zgm0cwpkhmz64v9npa4h0xy4vkszypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxz52fqf6</id>
    
      <title type="html">📅 Original date posted:2023-01-04 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsr8flad7wxa6s6quehlvq3cux4zgm0cwpkhmz64v9npa4h0xy4vkszypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxz52fqf6" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqszv8kac5hcu890w4mc2hydvj3mwfghckec3lj633qx5g3lrq0hkzg7sv76t&#39;&gt;nevent1q…v76t&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-01-04&lt;br/&gt;🗒️ Summary of this message: The proposed submarine swap/peerswap is not different from a normal on-chain to off-chain swap. The address generated by the `loop in --external` command may not be safe for reuse.&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning Laolu,&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; Hi Z,&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; &amp;gt; * Submarine swap/peerswap: Requires confirmation before the swap service&lt;br/&gt;&amp;gt; &amp;gt; will send out the HTLC on Lightning.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; I might be missing something, but I don&amp;#39;t see how this is different from a&lt;br/&gt;&amp;gt; normal on-chain to off-chain swap (calling this Loop In for short in the&lt;br/&gt;&amp;gt; remainder of the email).&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Given some static swap server params (server key, user key, preimage), a&lt;br/&gt;&amp;gt; user can derive a tapscript tree and use that to make addresses that any 3rd&lt;br/&gt;&amp;gt; party can send to. Services like Loop return a few addrs (including P2TR!)&lt;br/&gt;&amp;gt; the client can use depending on their wallet sophistication [1] (in this&lt;br/&gt;&amp;gt; case the command is: `loop in --amt=X --external\, external means a 3rd&lt;br/&gt;&amp;gt; party will send to the addr). After a 3rd party sends to the script, the&lt;br/&gt;&amp;gt; swap can be completed at anytime as soon as the client is online (assuming&lt;br/&gt;&amp;gt; swap server is always there).&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; In the scenario above, the newly created outputs to our swap addr need to be&lt;br/&gt;&amp;gt; confirmed before the swap server will initiate the swap. As you mention,&lt;br/&gt;&amp;gt; this could even be zero conf assuming all sides take w/e precautions they&amp;#39;re&lt;br/&gt;&amp;gt; comfortable with. If the swap server goes away for w/e reason, a long&lt;br/&gt;&amp;gt; timeout in the swap can let the user sweep the funds via some other&lt;br/&gt;&amp;gt; means eventually. This doesn&amp;#39;t need to be a direct swap either, and it can&lt;br/&gt;&amp;gt; flow multi-hop like any other swap.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; In your scheme you say that:&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; &amp;gt; If so, then the &amp;#34;timer for confirmation&amp;#34; starts as soon as the wallet&lt;br/&gt;&amp;gt; &amp;gt; receives on the blockchain, not as soon as the wallet decides to move&lt;br/&gt;&amp;gt; &amp;gt; funds from blockchain to Lightning.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Which seems to be the exact same as the flow I described above. For our&lt;br/&gt;&amp;gt; newer musig2-enabled swaps, the top level keyspend can be spent by both&lt;br/&gt;&amp;gt; parties, so you also emulate the ability for Alice to move the funds on&lt;br/&gt;&amp;gt; chain anywhere else w/ the server&amp;#39;s cooperation.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Using regular swaps also simplified the &amp;#34;Bob Security&amp;#34; section a lot, as Bob&lt;br/&gt;&amp;gt; sends out an HTLC w/ the corresponding swap hash (he watches the chain for&lt;br/&gt;&amp;gt; the scripts, then initiates the swap once they&amp;#39;re seen).&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; [1]: &lt;a href=&#34;https://lightning.engineering/api-docs/api/loop/swap-client/loop-in&#34;&gt;https://lightning.engineering/api-docs/api/loop/swap-client/loop-in&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Quick question: is the address given by the `loop in --external` command safe for reuse?&lt;br/&gt;&lt;br/&gt;In many common onchain-only wallets **available today**, you can do something like get a receive address and add it to your forum sig or on a static webpage or forum post or whatever, and then anyone can send to it, possibly multiple times with different amounts coming from different people.&lt;br/&gt;&lt;br/&gt;The fact that `loop in` requires a specific `--amt=X` flag suggests to me that the address generated is not safe for address reuse (in particular, once *one* swap has completed, I am almost sure that any future funds to the same address can be stolen by the swap server without handing it over to the purported owner of the funds).&lt;br/&gt;&lt;br/&gt;Swap-in-potentiam is safe for address reuse, because each UTXO for the same address backs a new, separate swap (if Alice wanted it).&lt;br/&gt;The advantage is that:&lt;br/&gt;&lt;br/&gt;* You get stable addresses that are safe for reuse (which is already possible today on non-Lightning wallets, so people already do this today).&lt;br/&gt;* Those stable addresses can still be spent from quickly on the Lightning Network as soon as they are reasonably confirmed.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:12:27&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqszz96uh8qq5knnvxhhswwndualyugfrl9m9pu22zj9kmadwjschdszypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzc8r0d5</id>
    
      <title type="html">📅 Original date posted:2023-01-03 🗒️ Summary of this ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqszz96uh8qq5knnvxhhswwndualyugfrl9m9pu22zj9kmadwjschdszypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzc8r0d5" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsrh6g5u4lnpjcu5yv53mngsr9exnvlpaq3n0wflr0v3vay8a5z2wqegp240&#39;&gt;nevent1q…p240&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-01-03&lt;br/&gt;🗒️ Summary of this message: A new protocol called swap-in-potentiam allows for immediate transfer of onchain funds to Lightning Network, reducing the time required for confirmation.&lt;br/&gt;📝 Original message:&lt;br/&gt;Subject: Swap-in-Potentiam: Moving Onchain Funds &amp;#34;Instantly&amp;#34; To Lightning&lt;br/&gt;&lt;br/&gt;by Jesse Posner, ZmnSCPxj&lt;br/&gt;&lt;br/&gt;Introduction&lt;br/&gt;============&lt;br/&gt;&lt;br/&gt;Moving funds from an onchain-only address to Lightning Network is slow,&lt;br/&gt;especially if you desire trust-minimization (which removes solutions&lt;br/&gt;relying on 0-conf).&lt;br/&gt;&lt;br/&gt;Basically, to reduce trust requirements in all onchain transactions,&lt;br/&gt;onchain receivers *MUST* ensure confirmation of the onchain transaction&lt;br/&gt;that creates their UTXO.&lt;br/&gt;In practice, the minimum should be at least 3 blocks, since reorgs of&lt;br/&gt;up to 2 blocks are common occurences, but even 1 confirmation can&lt;br/&gt;take an inordinately long time in the real world due to the random&lt;br/&gt;nature of mining.&lt;br/&gt;&lt;br/&gt;This is particularly acute for mobile phone use-cases.&lt;br/&gt;As mobile phones run on a battery, mobile phone OSs often greatly&lt;br/&gt;restrict CPU and other resource consumption when an app is not&lt;br/&gt;currently open by the user.&lt;br/&gt;&lt;br/&gt;Now consider this user story, for a wallet app that supports both&lt;br/&gt;Bitcoin blockchain and Lightning Network operations:&lt;br/&gt;&lt;br/&gt;* The user wants to be paid over the Bitcoin blockchain.&lt;br/&gt;* The user gets an address from their wallet and provides it to&lt;br/&gt;  some other party to receive their payment.&lt;br/&gt;* The user closes their wallet app, which causes the mobile phone&lt;br/&gt;  OS to kill all its threads.&lt;br/&gt;* The other party sends their payment over blockchain while the&lt;br/&gt;  user is asleep.&lt;br/&gt;* The blockchain transaction confirms and time passes.&lt;br/&gt;* The user wakes up and checks their favorite blockchain explorer,&lt;br/&gt;  and sees they received funds on their wallet address.&lt;br/&gt;* The user opens their wallet app and decides they need a coffee,&lt;br/&gt;  so they buy coffee over Lightning.&lt;br/&gt;&lt;br/&gt;For current solutions to move funds from the blockchain layer to&lt;br/&gt;Lightning, however, the above user story would need to complete&lt;br/&gt;over a long time, possibly measurable in dozens of minutes or&lt;br/&gt;even hours in the worst case, due to the need for confirmation:&lt;br/&gt;&lt;br/&gt;* Channel open: Requires confirmation, many nodes require 6 or&lt;br/&gt;  more confirmations.&lt;br/&gt;* Submarine swap/peerswap: Requires confirmation before the swap&lt;br/&gt;  service will send out the HTLC on Lightning.&lt;br/&gt;* Splice-in: Channel remains operational, but until the splice&lt;br/&gt;  transaction confirms, the channel operates in &amp;#34;dual mode&amp;#34;&lt;br/&gt;  where both pre-splice and post-splice state is valid, and&lt;br/&gt;  that means only the lower amount of the pre-splice and&lt;br/&gt;  post-splice can be used in the mean time.&lt;br/&gt;  For splice-in, the pre-splice amount will be lower, thus&lt;br/&gt;  the amount being spliced in will not be credited until&lt;br/&gt;  the splice transaction is confirmed.&lt;br/&gt;&lt;br/&gt;In this writeup, we present a novel protocol, swap-in-potentiam,&lt;br/&gt;that can be used for immediate transfer from the blockchain&lt;br/&gt;layer to the Lightning layer, in the above user story.&lt;br/&gt;&lt;br/&gt;Advantages And Limitations&lt;br/&gt;--------------------------&lt;br/&gt;&lt;br/&gt;To whet your appetite, here are the advantages:&lt;br/&gt;&lt;br/&gt;* Immediate transfer of already-confirmed-received onchain&lt;br/&gt;  funds to Lightning.&lt;br/&gt;* Onchain funds can also be transferred to another onchain&lt;br/&gt;  address (subject to normal onchain confirmation rules).&lt;br/&gt;  * This can be &amp;#34;immediate&amp;#34; if sending to a receiver that&lt;br/&gt;    accepts the risk of 0-conf onchain transactions.&lt;br/&gt;* Minimized trust requirement.&lt;br/&gt;&lt;br/&gt;The disadvantages, to help convince you that yes, this is&lt;br/&gt;technology and not magic beans (and to not oversell this&lt;br/&gt;tech, Bitcoin media reporting often tend to oversell&lt;br/&gt;new technologies because the disadvantages are often&lt;br/&gt;hidden away behind technical minutae):&lt;br/&gt;&lt;br/&gt;* Requires a cooperating LSP.&lt;br/&gt;  If LSP is down or refuses to cooperate, onchain funds&lt;br/&gt;  are locked for some time.&lt;br/&gt;  This has a timeout (so if the LSP never comes online&lt;br/&gt;  again, you just wait out the timeout) and the timeout&lt;br/&gt;  starts from when the receiving UTXO is confirmed in a&lt;br/&gt;  blocks, so it will not cause loss of funds, only loss&lt;br/&gt;  of opportunity (i.e. &amp;#34;involuntary HODLing&amp;#34;).&lt;br/&gt;* If you have multiple LSPs, when you generate an address&lt;br/&gt;  you *have to* select one of them at that point, you&lt;br/&gt;  *cannot* commit to multiple LSPs and select one of them&lt;br/&gt;  later when your phone wakes up again.&lt;br/&gt;  This exacerbates the above disadvantage, since you have&lt;br/&gt;  to select one of your LSPs and hope that when your&lt;br/&gt;  phone wakes up the LSP you selected is also up and&lt;br/&gt;  cooperative.&lt;br/&gt;* The onchain-received funds have to be confirmed first,&lt;br/&gt;  otherwise we still need to wait for confirmation of the&lt;br/&gt;  onchain-received funds.&lt;br/&gt;  This is generally true for many blockchain-only wallets&lt;br/&gt;  anyway and is thus not a worsening, but is also not an&lt;br/&gt;  improvement.&lt;br/&gt;* If the timeout is too near, actions must be performed&lt;br/&gt;  onchain that require confirmation.&lt;br/&gt;&lt;br/&gt;Swap-in-Potentiam&lt;br/&gt;=================&lt;br/&gt;&lt;br/&gt;All onchain fund movements, as noted, require confirmation.&lt;br/&gt;These include onchain fund movements to the Lightning network.&lt;br/&gt;&lt;br/&gt;If the onchain address that the wallet provides was controlled&lt;br/&gt;solely by that wallet, then any action that requires cooperation&lt;br/&gt;with a Lightning Network participant --- channel open, swap, or&lt;br/&gt;splice --- would require an onchain transaction that commits to&lt;br/&gt;that specific Lightning Network participant.&lt;br/&gt;Only when the new onchain transaction is confirmed, can that&lt;br/&gt;Lightning participant rely on the transaction output without&lt;br/&gt;having to trust the initiator.&lt;br/&gt;&lt;br/&gt;&amp;gt;From there, we can consider: what if the wallet provides an&lt;br/&gt;address that *already* commits to that specific Lightning Network&lt;br/&gt;participant?&lt;br/&gt;&lt;br/&gt;If so, then the &amp;#34;timer for confirmation&amp;#34; starts as soon as&lt;br/&gt;the wallet receives on the blockchain, not as soon as the wallet&lt;br/&gt;decides to move funds from blockchain to Lightning.&lt;br/&gt;&lt;br/&gt;This is a significant difference for a mobile wallet: the mobile&lt;br/&gt;environment does not support the mobile wallet being online for&lt;br/&gt;long.&lt;br/&gt;Thus, the mobile wallet may not have any CPU to make the decision&lt;br/&gt;to move funds from blockchain to Lightning, until the actual user&lt;br/&gt;explicitly opens the mobile wallet app.&lt;br/&gt;&lt;br/&gt;It has already been generally accepted that due to the limitations&lt;br/&gt;of the mobile phone environment, a mobile phone wallet with&lt;br/&gt;Lightning support would need some LSP anyway.&lt;br/&gt;Thus, a mobile wallet that can receive on the blockchain layer&lt;br/&gt;and then send on the Lightning layer can commit to a specific,&lt;br/&gt;different, Lightning participant: the LSP it has channels with.&lt;br/&gt;&lt;br/&gt;Thus, the mobile wallet can provide an address that commits to&lt;br/&gt;one particular Lightning Network participant: its LSP.&lt;br/&gt;&lt;br/&gt;The mobile wallet can then initiate a single-hop swap with the&lt;br/&gt;LSP when the mobile wallet app is in the foreground and has CPU&lt;br/&gt;to think with.&lt;br/&gt;If it received funds into the address that have already been&lt;br/&gt;confirmed, then it can do this single-hop swap immediately with&lt;br/&gt;its LSP.&lt;br/&gt;The LSP can immediately resolve this swap, crediting funds to&lt;br/&gt;channel, while atomically ensuring it has sole claim to the&lt;br/&gt;onchain UTXO.&lt;br/&gt;&lt;br/&gt;The Contract&lt;br/&gt;------------&lt;br/&gt;&lt;br/&gt;The contract has two participants: Alice the funds owner, and&lt;br/&gt;Bob its potential swap partner.&lt;br/&gt;&lt;br/&gt;Once *any* funds have been confirmed received into an address&lt;br/&gt;committing to this contract, Alice owns the funds and can&lt;br/&gt;dispose of them as it likes (with cooperation from Bob).&lt;br/&gt;The source of the funds need not be Alice, it could be a third&lt;br/&gt;party that has an obligation to pay Alice onchain.&lt;br/&gt;&lt;br/&gt;The contract has only 2 branches:&lt;br/&gt;&lt;br/&gt;* Onchain/channel branch: Alice and Bob.&lt;br/&gt;* Timelock branch: Alice plus a relative timelock (`OP_CSV`)&lt;br/&gt;  measurable in weeks.&lt;br/&gt;&lt;br/&gt;Astute readers will realize that the above is really a variant&lt;br/&gt;of [CLTV-style unidirectional time-limited channels][1],&lt;br/&gt;themselves a variant of Spilman-style channels:&lt;br/&gt;&lt;br/&gt;* Uses an explicit opcode to simplify channel setup (no need&lt;br/&gt;  to pre-sign a timeout transaction between Alice and Bob,&lt;br/&gt;  can just send funds directly to the address).&lt;br/&gt;* Uses a relative locktime instead of an absolute one to&lt;br/&gt;  allow funding of the channel address (= receive onchain&lt;br/&gt;  funds ready to spend over Lightning) at any time.&lt;br/&gt;&lt;br/&gt;The use-cases this enables are:&lt;br/&gt;&lt;br/&gt;* If Alice wants to pay to another onchain address, and Bob&lt;br/&gt;  is also online and cooperative, Alice can ask Bob to help&lt;br/&gt;  sign the Onchain/channel branch to move the funds in any&lt;br/&gt;  arbitrary onchain manner.&lt;br/&gt;* If Alice wants to pay to a Lightning invoice / keysend, and&lt;br/&gt;  has insufficient Lightning outgoing capacity (but has&lt;br/&gt;  sufficient *total* capacity), it can swap with Bob, by&lt;br/&gt;  offerring a transaction that spends via the Onchain/channel&lt;br/&gt;  branch and instantiates a fresh onchain HTLC that Bob can&lt;br/&gt;  then forward over Lightning.&lt;br/&gt;  As soon as Alice offers its signature of that transaction,&lt;br/&gt;  Bob can immediately offer an in-Lightning HTLC to Alice on&lt;br/&gt;  their channel, and then Alice can immediately resolve it&lt;br/&gt;  (thus immediately getting its funds into Lightning).&lt;br/&gt;* If Bob is offline or uncooperative, Alice can unilterally&lt;br/&gt;  recover its funds after the timeout in the Timelock&lt;br/&gt;  branch.&lt;br/&gt;&lt;br/&gt;Trust is required only to the extent that Alice trusts Bob to&lt;br/&gt;be cooperative so that Alice can dispose of its funds immediately.&lt;br/&gt;In case Bob turns out to be non-trustworthy, Alice can recover&lt;br/&gt;its funds via the timelock branch after the timeout period.&lt;br/&gt;There is no scope for Bob to steal funds (indeed, it is easier&lt;br/&gt;for Bob to steal Lightning funds than to steal swap-in-potentiam&lt;br/&gt;funds).&lt;br/&gt;&lt;br/&gt;The intent here is that the mobile wallet is Alice, while the&lt;br/&gt;LSP is Bob.&lt;br/&gt;&lt;br/&gt;### Bob Security&lt;br/&gt;&lt;br/&gt;Bob *MUST* ensure that, for each UTXO, it is either asked to&lt;br/&gt;sign an arbitrary onchain transaction (i.e the first use-case&lt;br/&gt;above) *OR* it gets offered an onchain HTLC from that UTXO.&lt;br/&gt;Once Alice has asked Bob to cooperate in either case for a&lt;br/&gt;particular UTXO, Bob *MUST* ensure that it does not sign the other&lt;br/&gt;case (and Bob *MUST* refuse to cooperate in the other case once&lt;br/&gt;one case has been requested).&lt;br/&gt;&lt;br/&gt;In addition, Bob *MUST* ensure that, if it is used in the&lt;br/&gt;&amp;#34;channel&amp;#34; case (i.e. the second use-case above), the timeout of&lt;br/&gt;the Timelock branch is far enough in the future that it is likely&lt;br/&gt;that spends using the Onchain/channel branch have confirmed by&lt;br/&gt;then.&lt;br/&gt;&lt;br/&gt;With both invariants enforced by Bob, Bob can ensure that, if&lt;br/&gt;Alice requests a swap using the Onchain/channel branch, only Bob&lt;br/&gt;can spend the UTXO (at least before the timeout), and thus can&lt;br/&gt;safely offer a Lightning HTLC to Alice immediately without any&lt;br/&gt;additional waiting for onchain confirmations.&lt;br/&gt;&lt;br/&gt;As Bob needs to know the UTXO in the first use-case above, this&lt;br/&gt;requirement prevents the use of blind signing techniques when&lt;br/&gt;implementing the first use-case.&lt;br/&gt;Basically, when being asked to sign, Bob must generate the entire&lt;br/&gt;`SIGHASH` from data that Alice provides, so that Bob is able to&lt;br/&gt;keep track of UTXOs it is signing for.&lt;br/&gt;&lt;br/&gt;### Remote Swap&lt;br/&gt;&lt;br/&gt;While Bob is generally considered &amp;#34;the&amp;#34; LSP of the mobile wallet&lt;br/&gt;Alice, nothing in the Lightning protocol actually requires that&lt;br/&gt;Bob be a direct peer of Alice.&lt;br/&gt;The only real requirement is that Bob is able to send funds to&lt;br/&gt;Alice over Lightning in exchange for possession of the equivalent&lt;br/&gt;onchain funds.&lt;br/&gt;&lt;br/&gt;Against this, we should note that the mobile wallet is already&lt;br/&gt;dependent on one or more LSPs anyway, so it may as well just use&lt;br/&gt;its direct peer LSPs instead of a remote node.&lt;br/&gt;&lt;br/&gt;### Address Derivation&lt;br/&gt;&lt;br/&gt;Swap-in-potentiam addresses can be derived from a root public or&lt;br/&gt;private key.&lt;br/&gt;&lt;br/&gt;We only need one keypair each from Alice and Bob.&lt;br/&gt;Alice can use standard derivation paths for its keypair.&lt;br/&gt;&lt;br/&gt;As Bob is intended to be an LSP, we can just use its Lightning&lt;br/&gt;node ID as the public key.&lt;br/&gt;Bob needs to be in possession of the corresponding private key&lt;br/&gt;anyway in order to set up BOLT 8 encrypted transports.&lt;br/&gt;&lt;br/&gt;As LSPs are part of the public network, Alice can simply try to&lt;br/&gt;scan for all published nodes that advertise support for&lt;br/&gt;swap-in-potentiam.&lt;br/&gt;Alternately if the wallet has a short list of fixed LSPs it&lt;br/&gt;will use, it can simply refer to that list.&lt;br/&gt;&lt;br/&gt;Thus:&lt;br/&gt;&lt;br/&gt;* Alice uses a derived keypair.&lt;br/&gt;* Bob uses a fixed keypair (its Lightning node ID).&lt;br/&gt;&lt;br/&gt;The above is sufficient to derive swap-in-potentiam addresses&lt;br/&gt;from an `xprv` or `xpub` root key.&lt;br/&gt;&lt;br/&gt;Swap-in-potentiam For LSPs&lt;br/&gt;==========================&lt;br/&gt;&lt;br/&gt;While the original design of swap-in-potentiam has the mobile&lt;br/&gt;wallet in the &amp;#34;Alice&amp;#34; role and its LSP in the &amp;#34;Bob&amp;#34; role, it&lt;br/&gt;turns out that LSPs can provide special service to improve&lt;br/&gt;receiving mobile wallets.&lt;br/&gt;&lt;br/&gt;Suppose that the LSP keeps track of statistics, and thus has&lt;br/&gt;an idea of which of its mobile wallet clients are likely to&lt;br/&gt;be net receivers.&lt;br/&gt;&lt;br/&gt;Net receivers will often have low inbound capacity (since the&lt;br/&gt;inbound capacity has been used up during previous LN receives).&lt;br/&gt;&lt;br/&gt;During times of low onchain fees, an LSP can check which of its&lt;br/&gt;offline mobile wallet clients have low inbound capacity, and are&lt;br/&gt;likely to come online in the future to receive.&lt;br/&gt;In those cases, the LSP can commit funds to a swap-in-potentiam&lt;br/&gt;with the mobile client, with the LSP as &amp;#34;Alice&amp;#34; and the mobile&lt;br/&gt;client as &amp;#34;Bob&amp;#34;.&lt;br/&gt;This at least lets the LSP set up half of a swap during a time of&lt;br/&gt;low fees.&lt;br/&gt;&lt;br/&gt;If the transfer to swap-in-potentiam addresses is confirmed by&lt;br/&gt;the time the mobile wallet client comes online, the LSP can&lt;br/&gt;immediately initiate a swap, giving inbound capacity towards the&lt;br/&gt;mobile client.&lt;br/&gt;This swap can be immediately resolved, and allows the mobile&lt;br/&gt;wallet client to immediately receive funds over Lightning.&lt;br/&gt;&lt;br/&gt;In particular, if &amp;#34;offline receive&amp;#34; as designed by TheBlueMatt&lt;br/&gt;is implemented, then the LSP already has indication of a pending&lt;br/&gt;payment towards an offline mobile wallet client.&lt;br/&gt;The LSP can check if the offline mobile wallet client has&lt;br/&gt;insufficient incoming capacity to receive the funds, and if so,&lt;br/&gt;arrange to fund a swap-in-potentiam with that client.&lt;br/&gt;Then, when the mobile wallet client comes online, the LSP can&lt;br/&gt;initiate the swap with them, and once the swap completes (and&lt;br/&gt;thus the mobile wallet client has sufficient incoming capacity)&lt;br/&gt;the LSP can contact the sender LSP to complete the payment.&lt;br/&gt;&lt;br/&gt;In particular, this use-case allows for *immediate* receives as&lt;br/&gt;soon as the mobile wallet client gets foregrounded and has CPU&lt;br/&gt;time, **without** requiring 0-conf trusted transactions and&lt;br/&gt;thus without requiring any kind of semi-custodial trust, even&lt;br/&gt;if the mobile wallet client had insufficient incoming capacity.&lt;br/&gt;A channel still has to be set up beforehand (without 0-conf, if&lt;br/&gt;trusting funds to the LSP is undesirable).&lt;br/&gt;&lt;br/&gt;Implementation Sketch&lt;br/&gt;=====================&lt;br/&gt;&lt;br/&gt;The intent is to use Taproot with Schnorr signatures, but&lt;br/&gt;**without** using the keyspend path (at least initially).&lt;br/&gt;&lt;br/&gt;The plan currently is to use a `MuSig(A, B)` as the internal&lt;br/&gt;pubkey, but with the branches still explicitly laid out as&lt;br/&gt;tapleaves.&lt;br/&gt;That is, there are two tapleaf SCRIPTs corresponding to the&lt;br/&gt;two branches described above:&lt;br/&gt;&lt;br/&gt;* `&amp;lt;A&amp;gt; OP_CHECKSIGVERIFY &amp;lt;B&amp;gt; OP_CHECKSIG`&lt;br/&gt;* `&amp;lt;timelock&amp;gt; OP_CHECKSEQUENCEVERIFY OP_DROP &amp;lt;A&amp;gt; OP_CHECKSIG`&lt;br/&gt;&lt;br/&gt;Using an explicit 2-of-2 branch rather than a MuSig allows&lt;br/&gt;for a simple protocol at least for initial deployment:&lt;br/&gt;we can have Alice send the signature using `A` in a single&lt;br/&gt;half-round without having to engage in a 2-round MuSig2 signing&lt;br/&gt;ritual.&lt;br/&gt;&lt;br/&gt;We intend to use Taproot since the mobile wallet client&lt;br/&gt;may need to use a 2-of-3 or 2-of-2 signing scheme, similar&lt;br/&gt;to Blockstream Green.&lt;br/&gt;This allows either Alice or Bob in the contract to secretly&lt;br/&gt;be a FROST 2-of-3 or MuSig 2-of-2 (or any FROST k-of-n or&lt;br/&gt;MuSig n-of-n).&lt;br/&gt;This is also another reason for avoiding a 2-of-2 MuSig&lt;br/&gt;keyspend path between Alice and Bob, as there is (to our&lt;br/&gt;knowledge) no publicly-reviewed security proof that&lt;br/&gt;FROST-in-MuSig and MuSig-in-MuSig are safe (or the&lt;br/&gt;corresponding variants using MuSig2 for the signing&lt;br/&gt;ritual).&lt;br/&gt;&lt;br/&gt;Later, when we are more confident of the use of MuSig2 and&lt;br/&gt;FROST inside a MuSig2, and with using MuSig2 with possibly&lt;br/&gt;untrusted outsiders (who might exploit any mis-implementation&lt;br/&gt;of the MuSig2 signing protocol if we are not careful with&lt;br/&gt;designing it), we can seamlessly upgrade the protocol&lt;br/&gt;to use the keyspend path later, to save witness bytes.&lt;br/&gt;&lt;br/&gt;For the Onchain use-case (i.e. Alice wants to spend the UTXO&lt;br/&gt;to an onchain address), the protocol betweeen Alice and Bob&lt;br/&gt;would be:&lt;br/&gt;&lt;br/&gt;* `request_arbitrary_signature` Alice-&amp;gt;Bob: Requests Bob&lt;br/&gt;  to sign a PSBT spending a swap-in-potentiam address&lt;br/&gt;  using the Onchain branch.&lt;br/&gt;* `response_arbitrary_signature` Bob-&amp;gt;Alice: Response to&lt;br/&gt;  the above, returning the requested signature.&lt;br/&gt;* `reject_arbitrary_signature` Bob-&amp;gt;Alice: Sent in&lt;br/&gt;  response to `request_arbitary_signature` if Bob refuses&lt;br/&gt;  to cooperate (e.g. the UTXO being spent has already&lt;br/&gt;  been accepted by Bob in a Channel use-case below).&lt;br/&gt;&lt;br/&gt;For the Channel use-case (i.e. Alice wants to spend the UTXO&lt;br/&gt;to a Lightning receiver), we operate the swap-in-potentiam&lt;br/&gt;UTXO(s) as a Spilman-like channel over two states:&lt;br/&gt;&lt;br/&gt;* HTLC-offering: Offering an amount `N` HTLC from Alice to&lt;br/&gt;  Bob, with any remaining amount to a change address to&lt;br/&gt;  Alice.&lt;br/&gt;* Resolved: Giving the amount `N` outright to Bob, with any&lt;br/&gt;  remaining amount to a change address to Alice.&lt;br/&gt;&lt;br/&gt;The intention is that the channel is initially put into&lt;br/&gt;the HTLC-offerring state.&lt;br/&gt;Then Bob offers a corresponding in-Lightning HTLC to Alice&lt;br/&gt;over their channel.&lt;br/&gt;When Alice resolves the in-Lightning HTLC, it can then&lt;br/&gt;send a new signature for the Resolved state.&lt;br/&gt;Once the channel is in a Resolved state, Bob *SHOULD* sign&lt;br/&gt;the last state and broadcast it on the blockchain, thereby&lt;br/&gt;closing the Spilman-like channel.&lt;br/&gt;&lt;br/&gt;The protocol messages for the Channel use-case are:&lt;br/&gt;&lt;br/&gt;* `request_swap_in` Alice-&amp;gt;Bob: Tell Bob the UTXOs with&lt;br/&gt;  the same swap-in-potentiam address to spend, how&lt;br/&gt;  much to put into the Alice-&amp;gt;Bob channel direction,&lt;br/&gt;  what channel to move into, and (optionally) a change&lt;br/&gt;  address for Alice.&lt;br/&gt;* `reject_swap_in` Bob-&amp;gt;Alice: Sent in response to&lt;br/&gt;  `request_swap_in` if Bob refuses to cooperate (e.g.&lt;br/&gt;  one of the UTXOs on offer was already signed with&lt;br/&gt;  `response_arbitrary_signature`, or Bob cannot legally&lt;br/&gt;  accept control of funds from one or more of the UTXOs&lt;br/&gt;  offerred).&lt;br/&gt;* `accept_swap_in` Bob-&amp;gt;Alice: Sent in response to&lt;br/&gt;  `request_swap_in`, containing the Bob-side address to&lt;br/&gt;  send funds to later once the state is Resolved.&lt;br/&gt;* `swap_in_signed` Alice-&amp;gt;Bob: Response to&lt;br/&gt;  `accept_swap_in`, containing the Alice-side signature&lt;br/&gt;  for the HTLC-offering state transaction.&lt;br/&gt;  Once Bob receives this, Bob can safely construct a&lt;br/&gt;  new on-Lightning HTLC using BOLT1&lt;br/&gt;  `update_offer_htlc`.&lt;br/&gt;* `swap_in_resolved` Alice-&amp;gt;Bob: Sent after Alice has&lt;br/&gt;  acquired the funds via `update_fulfill_htlc` of the&lt;br/&gt;  corresponding on-Lightning HTLC, containing the&lt;br/&gt;  Alice-side signature for the Resolved state&lt;br/&gt;  transaction.&lt;br/&gt;  The Resolved state transaction spends to the Bob-side&lt;br/&gt;  address given in `accept_swap_in`, and any change to&lt;br/&gt;  the Alice-side change address in `request_swap_in`.&lt;br/&gt;&lt;br/&gt;The plan is to reserve only one odd BOLT1 message ID,&lt;br/&gt;and to embed the actual swap-in-potentiam message ID&lt;br/&gt;as the first 2 bytes of the BOLT1 message, to reduce&lt;br/&gt;pollution of the limited BOLT1 message ID space and to&lt;br/&gt;allow more flexibility for swap-in-potentiam to expand&lt;br/&gt;to new messages inside its own message ID space.&lt;br/&gt;&lt;br/&gt;For a richer future protocol, we will want to consider&lt;br/&gt;how a swap-in can be combined with a splice-in.&lt;br/&gt;This is useful if the current total capacity of the&lt;br/&gt;channel is lower than the available onchain funds.&lt;br/&gt;The swap-in can be credited immediately (and is limited&lt;br/&gt;to the current total capacity) while additional funds&lt;br/&gt;can be added to the channel via splice-in (which is&lt;br/&gt;credited only once the splice-in is confirmed).&lt;br/&gt;&lt;br/&gt;As-is, a similar result can be obtained using openv1,&lt;br/&gt;wherein a swap-in is combined with a channel open,&lt;br/&gt;with the swap-in immediately credited while the channel&lt;br/&gt;open is awaiting confirmation:&lt;br/&gt;&lt;br/&gt;* Alice and Bob currently have one or more existing&lt;br/&gt;  channels, and Alice has a UTXO in a swap-in-potentiam&lt;br/&gt;  address whose value exceeds the incoming capacity of&lt;br/&gt;  the existing channel(s).&lt;br/&gt;* Alice-&amp;gt;Bob `open_channel`.&lt;br/&gt;* Bob-&amp;gt;Alice `accept_channel`.&lt;br/&gt;* Alice-&amp;gt;Bob `request_swap_in` with the &amp;#34;change address&amp;#34;&lt;br/&gt;  being the funding address of the channel.&lt;br/&gt;* Bob-&amp;gt;Alice `accept_swap_in` provides the TXID of the&lt;br/&gt;  funding transaction (Alice now knows the &amp;#34;change&lt;br/&gt;  address&amp;#34; and the Bob final Resolved address, letting it&lt;br/&gt;  know the final Resolved state transaction TXID).&lt;br/&gt;* Alice-&amp;gt;Bob `funding_created` with the TXID.&lt;br/&gt;* Bob-&amp;gt;Alice `funding_signed`.&lt;br/&gt;* Alice-&amp;gt;Bob `swap_in_signed` to provide the signature&lt;br/&gt;  spending the swap-in-potentiam address to Bob.&lt;br/&gt;* Bob then constructs an HTLC over the existing channel,&lt;br/&gt;  which Alice claims, revealing the preimage.&lt;br/&gt;* Alice-&amp;gt;Bob `swap_in_resolved`.&lt;br/&gt;* Bob then broadcasts the Resolved state transaction,&lt;br/&gt;  which is also the funding transaction of the new channel.&lt;br/&gt;* Both Alice and Bob await confirmation of the transaction&lt;br/&gt;  in order to use the new channel.&lt;br/&gt;  Alice can still use the existing channel, which has been&lt;br/&gt;  topped-up with fresh outgoing capacity by the swap-in.&lt;br/&gt;&lt;br/&gt;(The above is not safe, as Bob can complete the protocol&lt;br/&gt;by using the HTLC-offerring state transaction; this can&lt;br/&gt;be fixed by having Alice open *2* channels with the same&lt;br/&gt;amount, one with the HTLC-offering state transaction as&lt;br/&gt;the funding tx, the other with the Resolved state&lt;br/&gt;transaction as the funding tx, and later `error`ing the&lt;br/&gt;channel corresponding to the transaction that is not&lt;br/&gt;confirmed; this is left as an exercise to the reader,&lt;br/&gt;though note that it requires two different change addresses&lt;br/&gt;for Alice for both HTLC-offerring and Resolved states,&lt;br/&gt;which can be arranged for the protocol)&lt;br/&gt;&lt;br/&gt;--&lt;br/&gt;&lt;br/&gt;[1]: &lt;a href=&#34;https://en.bitcoin.it/wiki/Payment_channels#CLTV-style_payment_channels&#34;&gt;https://en.bitcoin.it/wiki/Payment_channels#CLTV-style_payment_channels&lt;/a&gt;
    </content>
    <updated>2023-06-09T15:12:24&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsfwzl9lqmdr0cqfpr9hrga23q3ns693gamwwmlvhzy0cfxpceshqczypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzm0jxcw</id>
    
      <title type="html">📅 Original date posted:2023-05-10 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsfwzl9lqmdr0cqfpr9hrga23q3ns693gamwwmlvhzy0cfxpceshqczypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzm0jxcw" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsvfnyj57xtk2q65c7fypu25w2avl3m4ppzz3qpg0ngn9c0ldmdm5cz8d3nj&#39;&gt;nevent1q…d3nj&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-05-10&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning mailing list, et al.,&lt;br/&gt;&lt;br/&gt;Let me explain the various possible mitigations and their drawbacks.&lt;br/&gt;&lt;br/&gt;Many of these are either &amp;#34;LSP trusts client&amp;#34; or &amp;#34;client trusts LSP&amp;#34;, in the sense that it is possible for the second mover (client in &amp;#34;LSP trusts client&amp;#34;; LSP in &amp;#34;client trusts LSP&amp;#34;) to impose costs on, or outright steal from, the first mover.&lt;br/&gt;&lt;br/&gt;If you want a trust-minimized solution, you need some kind of third party that both LSP and client agree will actually enforce that the second mover does not cheat or otherwise impose costs on the first mover.&lt;br/&gt;This &amp;#34;third party&amp;#34; SHOULD really be the blockchain, meaning you should really be using at least 1-conf and probably 3-conf to avoid reorgs, but *shrug*.&lt;br/&gt;(You *could* use Liquid as a third party --- but Liquid is custodial, it just has a federation as a custodian instead of a single entity, you have to trust that the federation does not collude to steal all your funds, or that Blockstream has not installed Something Else (TM) in the HSMs they sold to the federation members.)&lt;br/&gt;&lt;br/&gt;Without a trusted third party (with the blockchain, being a decentralized open-source project with strong incentives against censorship, being your standard for trustworthiness), your choices are:&lt;br/&gt;&lt;br/&gt;* LSP issues a promise --- a signature committing to a funding output on a funding transaction --- that it will definitely make a 0-conf funding transaction get confirmed before some future target blockheight.&lt;br/&gt;  &lt;a href=&#34;https://github.com/BitcoinAndLightningLayerSpecs/lsp/pull/24&#34;&gt;https://github.com/BitcoinAndLightningLayerSpecs/lsp/pull/24&lt;/a&gt;&lt;br/&gt;  If the funding transaction is not confirmed by then, or the output is not the correct `scriptPubKey` and amount, the client reports it publicly and starts a boycott of the LSP.&lt;br/&gt;  * The client refuses to send `channel_ready` (and therefore the HTLC cannot reach the client) until after the LSP issues this promise.&lt;br/&gt;    &amp;#34;LSP trusts client&amp;#34;.&lt;br/&gt;  * How often have boycotts actually worked anyway?&lt;br/&gt;* Client waits for the funding transaction to appear on its local mempool before sending `channel_ready`.&lt;br/&gt;  * &amp;#34;LSP trusts client&amp;#34;, somewhat, but far weaker than the above; you can argue this is actually &amp;#34;client trusts LSP&amp;#34; and I would agree with you.&lt;br/&gt;  * The LSP can still double-spend the funding transaction with coordination with a miner, as I noted in my critique of benthecarman proposal.&lt;br/&gt;    Mere broadcast is not an assurance of confirmation, we have been saying that about 0-conf for a long time.&lt;br/&gt;  * Not all clients naturally have access to a mempool --- BIP157/158 clients do not necessarily maintain their own mempool, though an Electrum SPV client can query the mempool of the Electrum server.&lt;br/&gt;* benthecarman proposal, as noted in previous post.&lt;br/&gt;  * &amp;#34;client trusts LSP&amp;#34;.&lt;br/&gt;* LSP waits for the client to hand over the preimage before broadcasting the funding tx.&lt;br/&gt;  * &amp;#34;client trusts LSP&amp;#34;.&lt;br/&gt;  * LSP can skip actual funding tx broadcast once the client has handed over the preimage.&lt;br/&gt;  * Can be implemented in multiple ways that are all equivalent:&lt;br/&gt;    * Outright give the preimage in some bespoke API call.&lt;br/&gt;    * LSP sends the `open_channel` blah blah dance until `channel_ready` exchange, does `update_add_htlc` and irrevocably committed dance, then waits until `update_fulfill_htlc` before broadcasting the funding tx.&lt;br/&gt;  * A client can implement the &amp;#34;client waits for funding tx in its own mempool before preimage&amp;#34; while the LSP implements this &amp;#34;LSP waits for preimage before funding tx broadcast&amp;#34;, and both of them will stall waiting for each other LOL ^.^ wahahahahaha deadlock is fun.&lt;br/&gt;    This is why LSPS has to pick one or the other, otherwise we will get incompatibilities between LSPs and clients.&lt;br/&gt;&lt;br/&gt;LSPS (Open LSP Specifications group) participants have indicated a desire to prefer &amp;#34;LSP trusts client&amp;#34;, because the LSP is a big target for various kinds of out-of-LSPS attacks.&lt;br/&gt;For example, a hacker could potentially modify the behavior of an LSP so that the LSP attacks the client, if the &amp;#34;client trusts LSP&amp;#34; model is used.&lt;br/&gt;Worse, somebody can ***accuse*** the LSP of actually attacking *some* client, and it can be hard for the LSP to provide substantial evidence that it is NOT attacking the client.&lt;br/&gt;(This is why the &amp;#34;promise&amp;#34; scheme I listed first above is valuable --- it is definite proof that the LSP is not attacking the client, if the client is unable to provide the promise as a proof-of-misbehaviour, then the client is just bullshitting and its claim of being cheated can be ignored, assuming of course that people actually believe in the strong cryptographic provisions of the signature scheme (which I might add is the same signature scheme used to secure Bitcoin itself, so... but humans are stupid, which is why AI should replace humans with something better).&lt;br/&gt;By the way have I mentioned I am human today?)&lt;br/&gt;&lt;br/&gt;However, the only truly &amp;#34;LSP trusts client&amp;#34; scheme that I have figured out is that first scheme where the LSP issues a cryptographically third-party-verifiable promise to get the funding tx confirmed by some later blockheight.&lt;br/&gt;This scheme has been controversial even among LSPS participants, however.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:08:54&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsvfnyj57xtk2q65c7fypu25w2avl3m4ppzz3qpg0ngn9c0ldmdm5czypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzsnjgu6</id>
    
      <title type="html">📅 Original date posted:2023-05-09 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsvfnyj57xtk2q65c7fypu25w2avl3m4ppzz3qpg0ngn9c0ldmdm5czypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzsnjgu6" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsdjdsy2k25fvfqsvx30tne5qvw08598zt2f04wf2q070q6l9eku0s6nlcma&#39;&gt;nevent1q…lcma&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-05-09&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning benthecarman and SomberNight,&lt;br/&gt;&lt;br/&gt;As noted by SomberNight, PTLCs does not quite fix this, as the client can still wait out the inbound PTLC of the LSP and force the LSP to perform an onchain action to ensure it does not give a channel for free.&lt;br/&gt;&lt;br/&gt;Another wrinkle here is that the LSP can attempt to coordinate with a miner (via e.g. full-RBF) to double-spend the funding transaction after the client has broadcasted the signed funding transaction on the mempool (i.e. lets the LSP learn the scalar that unlocks the inbound HTLC).&lt;br/&gt;Assuming the LSP uses one large UTXO to fund a smaller channel, the funding transaction has one input, two outputs.&lt;br/&gt;The clawback transaction (spending the same UTXO but returning it back to the LSP control) that the LSP coordinates with a miner would be one input, one output, thus having a size advantage.&lt;br/&gt;As the funding transaction pays some fixed fee --- whose value presumably is paid for in the JIT channel open via the inbound PTLC that arrives at the LSP --- the clawback transaction can pay the exact same fixed fee, but being smaller by one output, has a better feerate and thus a miner would prefer it.&lt;br/&gt;&lt;br/&gt;Either client or the LSP has to move first.&lt;br/&gt;The only way they can assure that the other will actually do what they promised is if there is some arbiter who can ensure that the second mover actually performs their move.&lt;br/&gt;The default arbiter is the blockchain layer itself, but 0-conf just wants to avoid the blockchain layer for being too slow.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj&lt;br/&gt;&lt;br/&gt;Sent with Proton Mail secure email.&lt;br/&gt;&lt;br/&gt;------- Original Message -------&lt;br/&gt;On Tuesday, May 9th, 2023 at 9:10 PM, SomberNight via Lightning-dev &amp;lt;lightning-dev at lists.linuxfoundation.org&amp;gt; wrote:&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; Hi benthecarman,&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; &amp;gt; the LSP can give the funding transaction signed using adaptor sigs to the client and the client can then decrypt the signatures and broadcast the transaction. Then the LSP can find the transaction in the mempool and extract the secret they need to claim the payment&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; What if, after the client has the funding transaction locally, it waits for the PTLC held by the LSP to time out, i.e. days, and then (the client) broadcasts the funding transaction? The LSP could then no longer claim the PTLC, and it would have paid for the channel-open.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; To prevent this, the LSP would have to actively double-spend the channel funding tx given to the client when the PTLC is close to expiring, and only after getting the conflict mined can the PTLC be failed. This double-spending would cost mining fees of course (arguably the ~same amount as not doing anything and just letting the channel open). Although perhaps the LSP has enough users and high enough traffic that the conflicting tx itself can be something useful, e.g. another channel-open to another user.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; ghost43 / SomberNight&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; ------- Original Message -------&lt;br/&gt;&amp;gt; On Tuesday, May 9th, 2023 at 19:07, Ben Carman benthecarman at live.com wrote:&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; &amp;gt; Hi everyone,&lt;br/&gt;&amp;gt; &amp;gt; &lt;br/&gt;&amp;gt; &amp;gt; I was chatting with Tony Giorgio the other day and he made me aware of a potential griefing attack that is possible today on LSPs that provide Just-In-Time channels.&lt;br/&gt;&amp;gt; &amp;gt; &lt;br/&gt;&amp;gt; &amp;gt; The attack is very simple, when the LSP receives the payment and then opens a 0-conf channel to the client, the client could not claim the payment thus resulting in the LSP not getting paid and the client getting a free inbound lightning channel. The LSP could double spend the transaction but they still would lose the miner fees and as we are seeing today, that can be very expensive.&lt;br/&gt;&amp;gt; &amp;gt; &lt;br/&gt;&amp;gt; &amp;gt; I am not sure if this has been proposed before but we can fix this with PTLCs!&lt;br/&gt;&amp;gt; &amp;gt; &lt;br/&gt;&amp;gt; &amp;gt; Instead of having the LSP just broadcasting the funding transaction to the mempool, they can sign the funding transaction using adaptor signatures locked to the same secret as the invoice. Then when the client wants to claim the funds they can get the funding txid from the LSP, and then do the PTLC dance with the LSP based on using that funding transaction. If it all goes as planned the LSP can give the funding transaction signed using adaptor sigs to the client and the client can then decrypt the signatures and broadcast the transaction. Then the LSP can find the transaction in the mempool and extract the secret they need to claim the payment, thus making claiming the payment and opening the channel atomic so the client can&amp;#39;t grief the LSP.&lt;br/&gt;&amp;gt; &amp;gt; &lt;br/&gt;&amp;gt; &amp;gt; Not sure if this has been talked about before, if not I think we can throw it in the ever-growing pile of &amp;#34;PTLCs fixes this&amp;#34;.&lt;br/&gt;&amp;gt; &amp;gt; &lt;br/&gt;&amp;gt; &amp;gt; Best,&lt;br/&gt;&amp;gt; &amp;gt; benthecarman&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;
    </content>
    <updated>2023-06-09T15:08:53&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs2qzsw27w9pd9hv6x0wz6wdrf6qmma4lxhej4mphks5cuvqjkz47qzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzg2y3sj</id>
    
      <title type="html">📅 Original date posted:2023-05-07 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs2qzsw27w9pd9hv6x0wz6wdrf6qmma4lxhej4mphks5cuvqjkz47qzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzg2y3sj" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsfyqp52l9pxzxl35x0dqfjk3ett50x9576rwm50fcnkk49mvqaj8s8pnmrf&#39;&gt;nevent1q…nmrf&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-05-07&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning list,&lt;br/&gt;&lt;br/&gt;I would like to point out that one of the main issues with LSPs is that most of them are designed to lock in their customers to their platform.&lt;br/&gt;&lt;br/&gt;Hopefully, with a common open specification like this, it becomes significantly more feasible for Lightning end-user clients to be able to switch across different LSPs.&lt;br/&gt;&lt;br/&gt;In particular, I have always pointed out that unpublished channels leak information about your sends and receives to the published node end of the channel.&lt;br/&gt;Thus, if you are locked to a particular single LSP, your data belongs to them.&lt;br/&gt;&lt;br/&gt;You might trust your LSP today to not leak your data.&lt;br/&gt;&lt;br/&gt;But you might not want to trust your LSP tomorrow.&lt;br/&gt;&lt;br/&gt;LSPs can be bought out, their operators can change their minds, their servers can be hacked and your data stolen, many things can be done to take your data.&lt;br/&gt;And if one end is published while the other end is completely unpublished, an unpublished channel will always leak the sends and receives of the unpublished end, and not even PTLCs can hide that information.&lt;br/&gt;&lt;br/&gt;If you, as a client, are capable of using multiple LSPs simultaneously (which would be greatly assisted if multiple LSPs implemented this common specification) then you are able to spread out your information across multiple LSPs.&lt;br/&gt;That way, only part of your data is at risk of being leaked if one LSP goes rogue and sells your data.&lt;br/&gt;Wallet clients might also want to use different node IDs for each LSP (if you have your privkey always online --- which is likely since Lightning really wants online signing --- you can use an HMAC of the LSP node ID with your privkey to generate your per-LSP node ID) to further improve their privacy across LSPs.&lt;br/&gt;&lt;br/&gt;Thus, I strongly suggest that wallet implementors in particular look at the LSPS specifications and start planning to implement the client-side interfaces.&lt;br/&gt;&lt;br/&gt;The best Lightning Network, if we must have any unpublished channels at all (in my opinion, unpublished channels delenda est), is one where every published node is an LSP.&lt;br/&gt;&lt;br/&gt;--&lt;br/&gt;&lt;br/&gt;I observe that there have been many new innovations in Lightning, such as &amp;#34;Lightning addresses&amp;#34;, which are not even vaguely alluded to in lightning-dev.&lt;br/&gt;&lt;br/&gt;Thus, I would like to point out this post once again: &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2023-April/003915.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2023-April/003915.html&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;I would like to continue this post with a short discussion of the so-called &amp;#34;LSPS0&amp;#34;, which underlies the LSPS1 and LSPS2 we are asking review for.&lt;br/&gt;&lt;br/&gt;LSPS0 describes how a client makes requests to an LSP.&lt;br/&gt;In brief, it uses a single BOLT8 message ID, 37913, for all LSPS client and LSP intercommnications.&lt;br/&gt;&lt;br/&gt;The rationale for this is:&lt;br/&gt;&lt;br/&gt;* Every client needs to somehow talk the BOLT8 protocol to an LSP just to do normal channel opens, HTLC sends, HTLC receives, etc.; using the BOLT8 protocol means you do not have to add more dependencies just to be LSPS-compliant.&lt;br/&gt;* Using a single BOLT8 message ID, 37913, makes it more likely that new protocols will not conflict with LSPS.&lt;br/&gt;  The message ID space is a common public good, and it is best to reduce its use as much as possible.&lt;br/&gt;  All LSPS specification, no matter how many there will be in the future (and I have a fair number lined up after LSPS2....), will only use exactly this single BOLT8 message ID.&lt;br/&gt;&lt;br/&gt;Further, inside the LSPS0 37913 message is a JSON object.&lt;br/&gt;This use of JSON inside a BOLT8 message has been described as &amp;#34;disgusting&amp;#34; by at least one engineer, and has been controversial even among LSPS participants.&lt;br/&gt;&lt;br/&gt;The rationale for this requires a bit of philosophical information theory.&lt;br/&gt;&lt;br/&gt;In principle, a binary encoding is &amp;#34;just&amp;#34; a compressed encoding of some human-readable format.&lt;br/&gt;For example, if we assign some offset within the message as `minimum_depth`, we could consider that the offset is actually a magic number, and that magic number is really inside a compression dictionary, with that magic number expanding to the human-readable text `minimum_depth`.&lt;br/&gt;&lt;br/&gt;Now compressed encodings like this are fairly fine for computers to process, but humans trying to actually implement LSPS specifications would benefit more from the human-readable text.&lt;br/&gt;&lt;br/&gt;Thus, I argued that it is better to use a JSON encoding, as any binary encoding would just be equivalent to expanding to an equivalent JSON encoding where the offset of a particular binary-formatted field is really just a compression dictionary entry, mapping out to the text `&amp;#34;minimum_depth&amp;#34;: `, and that the &amp;#34;real&amp;#34; uncompressed text would be a JSON encoding.&lt;br/&gt;&lt;br/&gt;This remains true even if you consider TLVs, as the type number is, again, just a magic number that is mapped, in a static compression dictionary (usually written down in some BOLT spec), to some human-readable label.&lt;br/&gt;&lt;br/&gt;Now compression is useful if you are doing something like designing a payment onion format.&lt;br/&gt;You want to fit a single onion with multiple hops into as few lower-level MTUs as you can, ideally fitting an entire multi-hop onion into a single 1500-byte MTU.&lt;br/&gt;This is why the onion format has been very stringent and tight; an onion is only 1366 bytes so that with various messaging overheads it can fit into a single 1500-byte MTU.&lt;br/&gt;It pays to have a binary format for the payment onion you are using to inform new HTLCs to your peers, as (1) you want payment to be fast and (2) onions need to be forwarded across multiple nodes (and thus need lots of data, each hop needs some bytes for it).&lt;br/&gt;&lt;br/&gt;However, for most LSPS requests and responses between a single hop --- between the client and the LSP --- even in uncompressed JSON, are less than 1000 byte.&lt;br/&gt;Adding compression --- i.e., forcing a binary format --- does not really improve the latency, as a 100-byte MTU takes as much time round-tripping as a 1000-byte MTU.&lt;br/&gt;And at least you can easily put the raw JSON from LSPS0 messages in your logs and then if something weird happens, you can copy-paste the JSON into a pretty-printer and get some nicely-formatted JSON you can analyze in detail; if you had to do that with binary formats, you would need to decide how to print it out yourself, and probably need to make your own pretty-printer for the data.&lt;br/&gt;&lt;br/&gt;This is why LSPS0 was designed the way it was: a JSON text inside a BOLT8 message, with all LSPS API calls sharing the same single BOLT8 message (keyed by a particular key in the JSON text).&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:08:44&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsgqcylfr56tsqq5sts8dsv3ygma3evpsnjdz67n8tm9kych222q8qzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzy0c0n4</id>
    
      <title type="html">📅 Original date posted:2023-02-23 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsgqcylfr56tsqq5sts8dsv3ygma3evpsnjdz67n8tm9kych222q8qzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzy0c0n4" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsd54gmjealhfcc2ux527amszwupw69xrcqh9l2ghsgn22734p4aqs33q6m0&#39;&gt;nevent1q…q6m0&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-02-23&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning 10k1,&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; Currently, LN primarily uses 2 of 2 multisig channel, though I have heard people talk about opening channels in more complex transactions than 2 of 2 multisigs.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Thinking through all the topology and number theory aspects of it, I think that if channels were mostly between 3 nodes instead of 2, there could be some big advantages:&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; - Channels can advertise which node has the lowest balance, helping with balance of channels, and overall liquidity. There would need to be vague enough thresholds to define when to even bother mentioning this, I imagine something like under 10% remaining on one versus the other two would be sufficiently anonymous.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; - A node with 3 channels attached to it can be considered as completely connected, and can basically route to 10 different next hops for only 3 opening transaction fees.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; - The time cost is basically doubled - two nodes for a channel means request and two messages between the peers to propagate their PSBT channel state, 3 nodes to a channel means 1 request and 6 messages to settle a new payment, which each node in the trio can more or less dispatch two messages at the same time, so, 3 message cycles, or average around 600ms from anywhere to anywhere on the internet.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; - The channel&amp;#39;s lowest balance could be one-bit boolean value publicly broadcast, meaning that peers selecting hops for a payment route can easily avoid adding to a channel stuck on one side. Pathfinding is a real hassle in the current design of LN. It is hard to navigate in the dark, but if you can sense the distance to the nearest object you can orient easily.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; The magic of tesselation gave us lightning fast 3d raster based 3d modeling, and is based on the infinite tesselation of triangles. Oh, there is 4 points possible, but it really just complicates things. I&amp;#39;m pretty sure that the new Unreal 5 &amp;#34;nanite&amp;#34; engine only works with uniform 3 point surfaces, at least, it definitely looks like that based on the 4 color map versions that show the polygons. And anyhow, a &amp;#34;rectangle&amp;#34; is just two adjacent triangles, why bother with this extra, extraneous nonsense of calling two polygons with a common axis &amp;#34;squares&amp;#34;.&lt;br/&gt;&lt;br/&gt;The problem with N &amp;gt; 2 participants in an offchain updateable cryptocurrency system is that if any participant is offline, then the entire system cannot update and the online participants can only back out using an expensive onchain procedure, or wait until the missing participant is online again.&lt;br/&gt;&lt;br/&gt;(Use of k-of-n here would allow any quorum of `k` to steal the funds of the `n - k` remaining participants, so security-wise you should really go for n-of-n multisignatures)&lt;br/&gt;&lt;br/&gt;If any arbitrary participant has a probability `P` of being offline at any particular moment, then the probability of the entire system being not updateable is `1 - (1 - P)^N`.&lt;br/&gt;Crucially, because of real-world considerations, the probability `P` cannot be 0 (though this can be made arbitrarily near 0, but then the cost of doing so would have to be paid by *somebody*).&lt;br/&gt;&lt;br/&gt;Further, if the offchain updateable cryptocurrency system has N participants, if one participant is offline, then N - 1 participants have their funds forcibly locked.&lt;br/&gt;Thus we should multiply the probability of an individual system (N-participant &amp;#34;channel&amp;#34;) being non-operational with the number of participants who suffer having their funds locked.&lt;br/&gt;&lt;br/&gt;With 2-participant channels, the probability of any single channel being non-operational is at its lowest and the number of affected counterparties is also at its lowest.&lt;br/&gt;&lt;br/&gt;This is why Channel Factories are even a thing.&lt;br/&gt;&lt;br/&gt;--&lt;br/&gt;&lt;br/&gt;Basically:&lt;br/&gt;&lt;br/&gt;* A channel is just a sub-class of offchain-updateable cryptocurrency systems.&lt;br/&gt;* An offchain-updateable cryptocurrency system must be hosted by another cryptocurrency system, such as a blockchain.&lt;br/&gt;* An offchain-updateable cryptocurrency system does *not* require activity on its hosting system in order to update its state.&lt;br/&gt;* An offchain-updateable cryptocurrency system can be hosted inside another offchain-updateable cryptocurrency system.&lt;br/&gt;  * The outer offchain-updateable cryptocurrency system is hosted directly by a blockchain (a blockchain only requires a physics system with entropy in order to be instantiated).&lt;br/&gt;  * The inner offchain-updateable cryptocurrency system is hosted on the outer one.&lt;br/&gt;    The outer hosting system can host multiple inner systems.&lt;br/&gt;  * The outer offchain-updateable cryptocurrency system is N-of-N where N &amp;gt; 2.&lt;br/&gt;  * Each inner system is 2-of-2.&lt;br/&gt;* The outer offchain-updateable cryptocurrency system is the &amp;#34;channel factory&amp;#34;.&lt;br/&gt;* Each inner offchain-updateable cryptocurrency system is a &amp;#34;channel&amp;#34;.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;This provides a good balance of availability and efficiency.&lt;br/&gt;&lt;br/&gt;* When a participant is offline, the outer system is non-operational, but each inner system deos not care.&lt;br/&gt;  Each inner system can update without activity on its hosting system, that is the point of offchain protocols.&lt;br/&gt;  So each 2-of-2 channel can update even if the hosting N-of-N channel factory cannot be updated.&lt;br/&gt;* The blockchain only hosts a single N-of-N UTXO for multiple channels.&lt;br/&gt;&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; The only other issue that is on my mind lately relating to LN is 0 conf channels. I hadn&amp;#39;t thought of &amp;#34;channels&amp;#34; as being 2 dimensional, since they represent a midpoint between two other points. But a midpoint is an abstract term, not just a word used for 1D lines but also 2D and nD shapes.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; It seems to me like there could be a negotiation protocol to pre-arrange a not yet mined opening tx for a 3 way lightning channel, that could effectively lock in every party such that it can&amp;#39;t wriggle out of the commitment. This just wouldn&amp;#39;t be possible with a 2 way. It then wouldn&amp;#39;t matter a bit how big the fee was since the parties are already in consensus and have the ability to back out at any moment.&lt;br/&gt;&lt;br/&gt;You first need to get the 3 committed, and that is the rub here: it requires onchain activity to commit funds to any N parties, whether N=2 or N=3.&lt;br/&gt;And that onchain activity will always be subject to reversal / double-spending unless confirmed deeply enough that we believe reorganizing the chain would be unlikely.&lt;br/&gt;&lt;br/&gt;Basically: what are the inputs to the transaction that backs your 3-participant channel?&lt;br/&gt;If any input can be signed by just one participant, then that participant can sign a different transaction spending that input in another way, then bribe a miner to include it in a mined block.&lt;br/&gt;&lt;br/&gt;Thus, this fixes nothing: in order to get funds committed to the 3 participants, you need *some* confirmed transaction to commit those funds in the first place, and everyone still has to wait for that transaction to confirm, thus you cannot sidestep the confirmation-or-trust requirement.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:08:10&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs2m7na9ztzqml3j2yn7505nkh0ua7eltzra8fwp3t73w3taq98zhqzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzrd858c</id>
    
      <title type="html">📅 Original date posted:2023-02-14 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs2m7na9ztzqml3j2yn7505nkh0ua7eltzra8fwp3t73w3taq98zhqzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzrd858c" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsdnal4xfaqffjfhl3kzac9g3x6nwhpumue5rq2vagg8dv9sj6lzkcf8qz6a&#39;&gt;nevent1q…qz6a&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-02-14&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning all,&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; First of all let&amp;#39;s see what types of reputation system exist (and yes,&lt;br/&gt;&amp;gt; &amp;gt; this is my very informal categorization):&lt;br/&gt;&amp;gt; &amp;gt; &lt;br/&gt;&amp;gt; &amp;gt; - First hand experience&lt;br/&gt;&amp;gt; &amp;gt; - Inferred experience&lt;br/&gt;&amp;gt; &amp;gt; - Hearsay&lt;br/&gt;&amp;gt; &amp;gt; &lt;br/&gt;&amp;gt; &amp;gt; The first two are likely the setup we all are comfortable with: we ourselves&lt;br/&gt;&amp;gt; &amp;gt; experienced something, and make some decisions based on that&lt;br/&gt;&amp;gt; &amp;gt; experience. This is probably what we&amp;#39;re all doing at the moment: we&lt;br/&gt;&amp;gt; &amp;gt; attempt a payment, it fails, we back off for a bit from that channel&lt;br/&gt;&amp;gt; &amp;gt; being used again. This requires either being able to witness the issue&lt;br/&gt;&amp;gt; &amp;gt; directly (local peer) or infer from unforgeable error messages (the&lt;br/&gt;&amp;gt; &amp;gt; failing node returns an error, and it can&amp;#39;t point the finger at someone&lt;br/&gt;&amp;gt; &amp;gt; else). Notice that this also includes some transitive constructions,&lt;br/&gt;&amp;gt; &amp;gt; such as the backpressure mechanism we were discussing for ariard&amp;#39;s&lt;br/&gt;&amp;gt; &amp;gt; credentials proposal.&lt;br/&gt;&amp;gt; &amp;gt; &lt;br/&gt;&amp;gt; &amp;gt; Ideally we&amp;#39;d only rely on the first two to make decisions, but here&amp;#39;s&lt;br/&gt;&amp;gt; &amp;gt; exactly the issue we ran into with Bittorrent: repeat interactions are&lt;br/&gt;&amp;gt; &amp;gt; too rare. In addition, our local knowledge gets out of date the longer&lt;br/&gt;&amp;gt; &amp;gt; we wait, and a previously failing channel may now be good again, and&lt;br/&gt;&amp;gt; &amp;gt; vice-versa. For us to have sufficient knowledge to make good decisions&lt;br/&gt;&amp;gt; &amp;gt; we need to repeatedly interact with the same nodes in the network, and&lt;br/&gt;&amp;gt; &amp;gt; since end-users will be very unlikely to do that, we might end up in a&lt;br/&gt;&amp;gt; &amp;gt; situation were we instinctively fall back to the hearsay method, either&lt;br/&gt;&amp;gt; &amp;gt; by sharing our local reputation with peers and then somehow combine that&lt;br/&gt;&amp;gt; &amp;gt; with our own view. To the best of my knowledge such a system has never&lt;br/&gt;&amp;gt; &amp;gt; been built successfully, and all attempts have ended in a system that&lt;br/&gt;&amp;gt; &amp;gt; was either way too simple or is gameable by rational players.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; In lightning we have a trivial solution to this - your wallet vendor/LSP is already extracting a fee&lt;br/&gt;&amp;gt; from you for every HTLC routed through it, it has you captive and can set the fee (largely)&lt;br/&gt;&amp;gt; arbitrarily (up to you paying on-chain fees to switch LSPs). They can happily tell you their view of&lt;br/&gt;&amp;gt; the network ~live and you should generally accept it. Its by no means perfect, and there&amp;#39;s plenty of&lt;br/&gt;&amp;gt; games they could play on, eg, your privacy, but its pretty damned good.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; If we care a ton about the risks here, we could have a few altruistic nodes that release similar&lt;br/&gt;&amp;gt; info and users can median-filter the data in one way or another to reduce risk.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; I just do not buy that this is a difficult problem for the &amp;#34;end user&amp;#34; part of the network. For&lt;br/&gt;&amp;gt; larger nodes its (obviously, and trivially) not a problem either, which leaves the &amp;#34;middle nodes&amp;#34;&lt;br/&gt;&amp;gt; stranded without good data but without an LSP they want to use for data. I believe that isn&amp;#39;t a&lt;br/&gt;&amp;gt; large enough cohort to change the whole network around for, and them asking a few altruistic (let&amp;#39;s&lt;br/&gt;&amp;gt; say, developer?) nodes for scoring data seems more than sufficient.&lt;br/&gt;&lt;br/&gt;But this is all ultimately hearsay.&lt;br/&gt;&lt;br/&gt;LSPs can be bought out, and developers can go rogue.&lt;br/&gt;Neither should be trusted if at all possible.&lt;br/&gt;&lt;br/&gt;Which is why I think forwardable peerswaps fixes this: it *creates* paths that allow payment routing, without requiring pervasive monitoring (which is horrible because eventually the network will be large enough that you will never encounter the same node twice if you&amp;#39;re a plebeian, and if you&amp;#39;re an aristocrat, you have every incentive to lie to the plebeians to solidify your power) of the network.&lt;br/&gt;&lt;br/&gt;Ultimately the network gets healthier if flows are bidirectional, swaps are essential to bootstrapping from the starting state where there are distinct &amp;#34;customers&amp;#34; and &amp;#34;merchants&amp;#34;, but current one-hop-only peerswaps are too local for the blockchain cost, and multi-hop source-routed swaps have the same issue as standard payments.&lt;br/&gt;The advantage of forwardable peerswaps is that it is specifically not source routed --- intermediate nodes make decisions of where to forward, and they are thus incentivized to benefit the network because they benefit themselves.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;I think it should be a principle of protocol design to embrace a capitalistic mindset, by which I mean: ensuring the rules make &amp;#34;beneficial for me&amp;#34; the same as &amp;#34;beneficial to everyone&amp;#34;.&lt;br/&gt;Certainly I can take a common knife from my kitchen and stick the pointy end into my neighbor, then take all their belongings, which would be very beneficial to me, but would not be beneficial to everyone, which is why laws against manslaughter and theft exist.&lt;br/&gt;Ultimately, protocol design is the laying down of laws, and the proper function of this lawmaking position is to ensure that &amp;#34;beneficial for me&amp;#34; will be something that is &amp;#34;beneficial to everyone&amp;#34;.&lt;br/&gt;Indeed, the entire point of having a punitive Poon-Dryja is to ensure that &amp;#34;beneficial for me&amp;#34; does not include theft of the channel funds by using old state, and is exemplary of this principle.&lt;br/&gt;&amp;#34;Greed is Good&amp;#34; might not be true, but perhaps: &amp;#34;We should strive to MAKE Greed Good&amp;#34;.&lt;br/&gt;&lt;br/&gt;Forwardable peerswaps are beneficial to every participant, and thus beneficial to the network, and thus should be part of the law of Lightning Network protocol.&lt;br/&gt;It *creates* high availability of channels and routing, without self-assertions or hearsay; it only requires local reputation (a forwarding node will forward a peerswap only if it knows it can benefit from whichever hop it is forwarding to: the locality avoids the issue where a node may never interact with another node again, since the node has a channel with them and is expected to repeatedly interact with them in the close future, and thus has very good local information).&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:08:05&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqspdfl77kzdgd3g3rg52kdthv8pepurh3tn0tulq4ammlmd70l2n6gzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxz0gdpuv</id>
    
      <title type="html">📅 Original date posted:2023-01-03 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqspdfl77kzdgd3g3rg52kdthv8pepurh3tn0tulq4ammlmd70l2n6gzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxz0gdpuv" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsxjmf7jsa3uf9rflau560z3xlex6k2wh9jthvvxnyxwk0n2khd6tqr3mvkz&#39;&gt;nevent1q…mvkz&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2023-01-03&lt;br/&gt;📝 Original message:&lt;br/&gt;Subject: Swap-in-Potentiam: Moving Onchain Funds &amp;#34;Instantly&amp;#34; To Lightning&lt;br/&gt;&lt;br/&gt;by Jesse Posner, ZmnSCPxj&lt;br/&gt;&lt;br/&gt;Introduction&lt;br/&gt;============&lt;br/&gt;&lt;br/&gt;Moving funds from an onchain-only address to Lightning Network is slow,&lt;br/&gt;especially if you desire trust-minimization (which removes solutions&lt;br/&gt;relying on 0-conf).&lt;br/&gt;&lt;br/&gt;Basically, to reduce trust requirements in all onchain transactions,&lt;br/&gt;onchain receivers *MUST* ensure confirmation of the onchain transaction&lt;br/&gt;that creates their UTXO.&lt;br/&gt;In practice, the minimum should be at least 3 blocks, since reorgs of&lt;br/&gt;up to 2 blocks are common occurences, but even 1 confirmation can&lt;br/&gt;take an inordinately long time in the real world due to the random&lt;br/&gt;nature of mining.&lt;br/&gt;&lt;br/&gt;This is particularly acute for mobile phone use-cases.&lt;br/&gt;As mobile phones run on a battery, mobile phone OSs often greatly&lt;br/&gt;restrict CPU and other resource consumption when an app is not&lt;br/&gt;currently open by the user.&lt;br/&gt;&lt;br/&gt;Now consider this user story, for a wallet app that supports both&lt;br/&gt;Bitcoin blockchain and Lightning Network operations:&lt;br/&gt;&lt;br/&gt;* The user wants to be paid over the Bitcoin blockchain.&lt;br/&gt;* The user gets an address from their wallet and provides it to&lt;br/&gt;  some other party to receive their payment.&lt;br/&gt;* The user closes their wallet app, which causes the mobile phone&lt;br/&gt;  OS to kill all its threads.&lt;br/&gt;* The other party sends their payment over blockchain while the&lt;br/&gt;  user is asleep.&lt;br/&gt;* The blockchain transaction confirms and time passes.&lt;br/&gt;* The user wakes up and checks their favorite blockchain explorer,&lt;br/&gt;  and sees they received funds on their wallet address.&lt;br/&gt;* The user opens their wallet app and decides they need a coffee,&lt;br/&gt;  so they buy coffee over Lightning.&lt;br/&gt;&lt;br/&gt;For current solutions to move funds from the blockchain layer to&lt;br/&gt;Lightning, however, the above user story would need to complete&lt;br/&gt;over a long time, possibly measurable in dozens of minutes or&lt;br/&gt;even hours in the worst case, due to the need for confirmation:&lt;br/&gt;&lt;br/&gt;* Channel open: Requires confirmation, many nodes require 6 or&lt;br/&gt;  more confirmations.&lt;br/&gt;* Submarine swap/peerswap: Requires confirmation before the swap&lt;br/&gt;  service will send out the HTLC on Lightning.&lt;br/&gt;* Splice-in: Channel remains operational, but until the splice&lt;br/&gt;  transaction confirms, the channel operates in &amp;#34;dual mode&amp;#34;&lt;br/&gt;  where both pre-splice and post-splice state is valid, and&lt;br/&gt;  that means only the lower amount of the pre-splice and&lt;br/&gt;  post-splice can be used in the mean time.&lt;br/&gt;  For splice-in, the pre-splice amount will be lower, thus&lt;br/&gt;  the amount being spliced in will not be credited until&lt;br/&gt;  the splice transaction is confirmed.&lt;br/&gt;&lt;br/&gt;In this writeup, we present a novel protocol, swap-in-potentiam,&lt;br/&gt;that can be used for immediate transfer from the blockchain&lt;br/&gt;layer to the Lightning layer, in the above user story.&lt;br/&gt;&lt;br/&gt;Advantages And Limitations&lt;br/&gt;--------------------------&lt;br/&gt;&lt;br/&gt;To whet your appetite, here are the advantages:&lt;br/&gt;&lt;br/&gt;* Immediate transfer of already-confirmed-received onchain&lt;br/&gt;  funds to Lightning.&lt;br/&gt;* Onchain funds can also be transferred to another onchain&lt;br/&gt;  address (subject to normal onchain confirmation rules).&lt;br/&gt;  * This can be &amp;#34;immediate&amp;#34; if sending to a receiver that&lt;br/&gt;    accepts the risk of 0-conf onchain transactions.&lt;br/&gt;* Minimized trust requirement.&lt;br/&gt;&lt;br/&gt;The disadvantages, to help convince you that yes, this is&lt;br/&gt;technology and not magic beans (and to not oversell this&lt;br/&gt;tech, Bitcoin media reporting often tend to oversell&lt;br/&gt;new technologies because the disadvantages are often&lt;br/&gt;hidden away behind technical minutae):&lt;br/&gt;&lt;br/&gt;* Requires a cooperating LSP.&lt;br/&gt;  If LSP is down or refuses to cooperate, onchain funds&lt;br/&gt;  are locked for some time.&lt;br/&gt;  This has a timeout (so if the LSP never comes online&lt;br/&gt;  again, you just wait out the timeout) and the timeout&lt;br/&gt;  starts from when the receiving UTXO is confirmed in a&lt;br/&gt;  blocks, so it will not cause loss of funds, only loss&lt;br/&gt;  of opportunity (i.e. &amp;#34;involuntary HODLing&amp;#34;).&lt;br/&gt;* If you have multiple LSPs, when you generate an address&lt;br/&gt;  you *have to* select one of them at that point, you&lt;br/&gt;  *cannot* commit to multiple LSPs and select one of them&lt;br/&gt;  later when your phone wakes up again.&lt;br/&gt;  This exacerbates the above disadvantage, since you have&lt;br/&gt;  to select one of your LSPs and hope that when your&lt;br/&gt;  phone wakes up the LSP you selected is also up and&lt;br/&gt;  cooperative.&lt;br/&gt;* The onchain-received funds have to be confirmed first,&lt;br/&gt;  otherwise we still need to wait for confirmation of the&lt;br/&gt;  onchain-received funds.&lt;br/&gt;  This is generally true for many blockchain-only wallets&lt;br/&gt;  anyway and is thus not a worsening, but is also not an&lt;br/&gt;  improvement.&lt;br/&gt;* If the timeout is too near, actions must be performed&lt;br/&gt;  onchain that require confirmation.&lt;br/&gt;&lt;br/&gt;Swap-in-Potentiam&lt;br/&gt;=================&lt;br/&gt;&lt;br/&gt;All onchain fund movements, as noted, require confirmation.&lt;br/&gt;These include onchain fund movements to the Lightning network.&lt;br/&gt;&lt;br/&gt;If the onchain address that the wallet provides was controlled&lt;br/&gt;solely by that wallet, then any action that requires cooperation&lt;br/&gt;with a Lightning Network participant --- channel open, swap, or&lt;br/&gt;splice --- would require an onchain transaction that commits to&lt;br/&gt;that specific Lightning Network participant.&lt;br/&gt;Only when the new onchain transaction is confirmed, can that&lt;br/&gt;Lightning participant rely on the transaction output without&lt;br/&gt;having to trust the initiator.&lt;br/&gt;&lt;br/&gt;&amp;gt;From there, we can consider: what if the wallet provides an&lt;br/&gt;address that *already* commits to that specific Lightning Network&lt;br/&gt;participant?&lt;br/&gt;&lt;br/&gt;If so, then the &amp;#34;timer for confirmation&amp;#34; starts as soon as&lt;br/&gt;the wallet receives on the blockchain, not as soon as the wallet&lt;br/&gt;decides to move funds from blockchain to Lightning.&lt;br/&gt;&lt;br/&gt;This is a significant difference for a mobile wallet: the mobile&lt;br/&gt;environment does not support the mobile wallet being online for&lt;br/&gt;long.&lt;br/&gt;Thus, the mobile wallet may not have any CPU to make the decision&lt;br/&gt;to move funds from blockchain to Lightning, until the actual user&lt;br/&gt;explicitly opens the mobile wallet app.&lt;br/&gt;&lt;br/&gt;It has already been generally accepted that due to the limitations&lt;br/&gt;of the mobile phone environment, a mobile phone wallet with&lt;br/&gt;Lightning support would need some LSP anyway.&lt;br/&gt;Thus, a mobile wallet that can receive on the blockchain layer&lt;br/&gt;and then send on the Lightning layer can commit to a specific,&lt;br/&gt;different, Lightning participant: the LSP it has channels with.&lt;br/&gt;&lt;br/&gt;Thus, the mobile wallet can provide an address that commits to&lt;br/&gt;one particular Lightning Network participant: its LSP.&lt;br/&gt;&lt;br/&gt;The mobile wallet can then initiate a single-hop swap with the&lt;br/&gt;LSP when the mobile wallet app is in the foreground and has CPU&lt;br/&gt;to think with.&lt;br/&gt;If it received funds into the address that have already been&lt;br/&gt;confirmed, then it can do this single-hop swap immediately with&lt;br/&gt;its LSP.&lt;br/&gt;The LSP can immediately resolve this swap, crediting funds to&lt;br/&gt;channel, while atomically ensuring it has sole claim to the&lt;br/&gt;onchain UTXO.&lt;br/&gt;&lt;br/&gt;The Contract&lt;br/&gt;------------&lt;br/&gt;&lt;br/&gt;The contract has two participants: Alice the funds owner, and&lt;br/&gt;Bob its potential swap partner.&lt;br/&gt;&lt;br/&gt;Once *any* funds have been confirmed received into an address&lt;br/&gt;committing to this contract, Alice owns the funds and can&lt;br/&gt;dispose of them as it likes (with cooperation from Bob).&lt;br/&gt;The source of the funds need not be Alice, it could be a third&lt;br/&gt;party that has an obligation to pay Alice onchain.&lt;br/&gt;&lt;br/&gt;The contract has only 2 branches:&lt;br/&gt;&lt;br/&gt;* Onchain/channel branch: Alice and Bob.&lt;br/&gt;* Timelock branch: Alice plus a relative timelock (`OP_CSV`)&lt;br/&gt;  measurable in weeks.&lt;br/&gt;&lt;br/&gt;Astute readers will realize that the above is really a variant&lt;br/&gt;of [CLTV-style unidirectional time-limited channels][1],&lt;br/&gt;themselves a variant of Spilman-style channels:&lt;br/&gt;&lt;br/&gt;* Uses an explicit opcode to simplify channel setup (no need&lt;br/&gt;  to pre-sign a timeout transaction between Alice and Bob,&lt;br/&gt;  can just send funds directly to the address).&lt;br/&gt;* Uses a relative locktime instead of an absolute one to&lt;br/&gt;  allow funding of the channel address (= receive onchain&lt;br/&gt;  funds ready to spend over Lightning) at any time.&lt;br/&gt;&lt;br/&gt;The use-cases this enables are:&lt;br/&gt;&lt;br/&gt;* If Alice wants to pay to another onchain address, and Bob&lt;br/&gt;  is also online and cooperative, Alice can ask Bob to help&lt;br/&gt;  sign the Onchain/channel branch to move the funds in any&lt;br/&gt;  arbitrary onchain manner.&lt;br/&gt;* If Alice wants to pay to a Lightning invoice / keysend, and&lt;br/&gt;  has insufficient Lightning outgoing capacity (but has&lt;br/&gt;  sufficient *total* capacity), it can swap with Bob, by&lt;br/&gt;  offerring a transaction that spends via the Onchain/channel&lt;br/&gt;  branch and instantiates a fresh onchain HTLC that Bob can&lt;br/&gt;  then forward over Lightning.&lt;br/&gt;  As soon as Alice offers its signature of that transaction,&lt;br/&gt;  Bob can immediately offer an in-Lightning HTLC to Alice on&lt;br/&gt;  their channel, and then Alice can immediately resolve it&lt;br/&gt;  (thus immediately getting its funds into Lightning).&lt;br/&gt;* If Bob is offline or uncooperative, Alice can unilterally&lt;br/&gt;  recover its funds after the timeout in the Timelock&lt;br/&gt;  branch.&lt;br/&gt;&lt;br/&gt;Trust is required only to the extent that Alice trusts Bob to&lt;br/&gt;be cooperative so that Alice can dispose of its funds immediately.&lt;br/&gt;In case Bob turns out to be non-trustworthy, Alice can recover&lt;br/&gt;its funds via the timelock branch after the timeout period.&lt;br/&gt;There is no scope for Bob to steal funds (indeed, it is easier&lt;br/&gt;for Bob to steal Lightning funds than to steal swap-in-potentiam&lt;br/&gt;funds).&lt;br/&gt;&lt;br/&gt;The intent here is that the mobile wallet is Alice, while the&lt;br/&gt;LSP is Bob.&lt;br/&gt;&lt;br/&gt;### Bob Security&lt;br/&gt;&lt;br/&gt;Bob *MUST* ensure that, for each UTXO, it is either asked to&lt;br/&gt;sign an arbitrary onchain transaction (i.e the first use-case&lt;br/&gt;above) *OR* it gets offered an onchain HTLC from that UTXO.&lt;br/&gt;Once Alice has asked Bob to cooperate in either case for a&lt;br/&gt;particular UTXO, Bob *MUST* ensure that it does not sign the other&lt;br/&gt;case (and Bob *MUST* refuse to cooperate in the other case once&lt;br/&gt;one case has been requested).&lt;br/&gt;&lt;br/&gt;In addition, Bob *MUST* ensure that, if it is used in the&lt;br/&gt;&amp;#34;channel&amp;#34; case (i.e. the second use-case above), the timeout of&lt;br/&gt;the Timelock branch is far enough in the future that it is likely&lt;br/&gt;that spends using the Onchain/channel branch have confirmed by&lt;br/&gt;then.&lt;br/&gt;&lt;br/&gt;With both invariants enforced by Bob, Bob can ensure that, if&lt;br/&gt;Alice requests a swap using the Onchain/channel branch, only Bob&lt;br/&gt;can spend the UTXO (at least before the timeout), and thus can&lt;br/&gt;safely offer a Lightning HTLC to Alice immediately without any&lt;br/&gt;additional waiting for onchain confirmations.&lt;br/&gt;&lt;br/&gt;As Bob needs to know the UTXO in the first use-case above, this&lt;br/&gt;requirement prevents the use of blind signing techniques when&lt;br/&gt;implementing the first use-case.&lt;br/&gt;Basically, when being asked to sign, Bob must generate the entire&lt;br/&gt;`SIGHASH` from data that Alice provides, so that Bob is able to&lt;br/&gt;keep track of UTXOs it is signing for.&lt;br/&gt;&lt;br/&gt;### Remote Swap&lt;br/&gt;&lt;br/&gt;While Bob is generally considered &amp;#34;the&amp;#34; LSP of the mobile wallet&lt;br/&gt;Alice, nothing in the Lightning protocol actually requires that&lt;br/&gt;Bob be a direct peer of Alice.&lt;br/&gt;The only real requirement is that Bob is able to send funds to&lt;br/&gt;Alice over Lightning in exchange for possession of the equivalent&lt;br/&gt;onchain funds.&lt;br/&gt;&lt;br/&gt;Against this, we should note that the mobile wallet is already&lt;br/&gt;dependent on one or more LSPs anyway, so it may as well just use&lt;br/&gt;its direct peer LSPs instead of a remote node.&lt;br/&gt;&lt;br/&gt;### Address Derivation&lt;br/&gt;&lt;br/&gt;Swap-in-potentiam addresses can be derived from a root public or&lt;br/&gt;private key.&lt;br/&gt;&lt;br/&gt;We only need one keypair each from Alice and Bob.&lt;br/&gt;Alice can use standard derivation paths for its keypair.&lt;br/&gt;&lt;br/&gt;As Bob is intended to be an LSP, we can just use its Lightning&lt;br/&gt;node ID as the public key.&lt;br/&gt;Bob needs to be in possession of the corresponding private key&lt;br/&gt;anyway in order to set up BOLT 8 encrypted transports.&lt;br/&gt;&lt;br/&gt;As LSPs are part of the public network, Alice can simply try to&lt;br/&gt;scan for all published nodes that advertise support for&lt;br/&gt;swap-in-potentiam.&lt;br/&gt;Alternately if the wallet has a short list of fixed LSPs it&lt;br/&gt;will use, it can simply refer to that list.&lt;br/&gt;&lt;br/&gt;Thus:&lt;br/&gt;&lt;br/&gt;* Alice uses a derived keypair.&lt;br/&gt;* Bob uses a fixed keypair (its Lightning node ID).&lt;br/&gt;&lt;br/&gt;The above is sufficient to derive swap-in-potentiam addresses&lt;br/&gt;from an `xprv` or `xpub` root key.&lt;br/&gt;&lt;br/&gt;Swap-in-potentiam For LSPs&lt;br/&gt;==========================&lt;br/&gt;&lt;br/&gt;While the original design of swap-in-potentiam has the mobile&lt;br/&gt;wallet in the &amp;#34;Alice&amp;#34; role and its LSP in the &amp;#34;Bob&amp;#34; role, it&lt;br/&gt;turns out that LSPs can provide special service to improve&lt;br/&gt;receiving mobile wallets.&lt;br/&gt;&lt;br/&gt;Suppose that the LSP keeps track of statistics, and thus has&lt;br/&gt;an idea of which of its mobile wallet clients are likely to&lt;br/&gt;be net receivers.&lt;br/&gt;&lt;br/&gt;Net receivers will often have low inbound capacity (since the&lt;br/&gt;inbound capacity has been used up during previous LN receives).&lt;br/&gt;&lt;br/&gt;During times of low onchain fees, an LSP can check which of its&lt;br/&gt;offline mobile wallet clients have low inbound capacity, and are&lt;br/&gt;likely to come online in the future to receive.&lt;br/&gt;In those cases, the LSP can commit funds to a swap-in-potentiam&lt;br/&gt;with the mobile client, with the LSP as &amp;#34;Alice&amp;#34; and the mobile&lt;br/&gt;client as &amp;#34;Bob&amp;#34;.&lt;br/&gt;This at least lets the LSP set up half of a swap during a time of&lt;br/&gt;low fees.&lt;br/&gt;&lt;br/&gt;If the transfer to swap-in-potentiam addresses is confirmed by&lt;br/&gt;the time the mobile wallet client comes online, the LSP can&lt;br/&gt;immediately initiate a swap, giving inbound capacity towards the&lt;br/&gt;mobile client.&lt;br/&gt;This swap can be immediately resolved, and allows the mobile&lt;br/&gt;wallet client to immediately receive funds over Lightning.&lt;br/&gt;&lt;br/&gt;In particular, if &amp;#34;offline receive&amp;#34; as designed by TheBlueMatt&lt;br/&gt;is implemented, then the LSP already has indication of a pending&lt;br/&gt;payment towards an offline mobile wallet client.&lt;br/&gt;The LSP can check if the offline mobile wallet client has&lt;br/&gt;insufficient incoming capacity to receive the funds, and if so,&lt;br/&gt;arrange to fund a swap-in-potentiam with that client.&lt;br/&gt;Then, when the mobile wallet client comes online, the LSP can&lt;br/&gt;initiate the swap with them, and once the swap completes (and&lt;br/&gt;thus the mobile wallet client has sufficient incoming capacity)&lt;br/&gt;the LSP can contact the sender LSP to complete the payment.&lt;br/&gt;&lt;br/&gt;In particular, this use-case allows for *immediate* receives as&lt;br/&gt;soon as the mobile wallet client gets foregrounded and has CPU&lt;br/&gt;time, **without** requiring 0-conf trusted transactions and&lt;br/&gt;thus without requiring any kind of semi-custodial trust, even&lt;br/&gt;if the mobile wallet client had insufficient incoming capacity.&lt;br/&gt;A channel still has to be set up beforehand (without 0-conf, if&lt;br/&gt;trusting funds to the LSP is undesirable).&lt;br/&gt;&lt;br/&gt;Implementation Sketch&lt;br/&gt;=====================&lt;br/&gt;&lt;br/&gt;The intent is to use Taproot with Schnorr signatures, but&lt;br/&gt;**without** using the keyspend path (at least initially).&lt;br/&gt;&lt;br/&gt;The plan currently is to use a `MuSig(A, B)` as the internal&lt;br/&gt;pubkey, but with the branches still explicitly laid out as&lt;br/&gt;tapleaves.&lt;br/&gt;That is, there are two tapleaf SCRIPTs corresponding to the&lt;br/&gt;two branches described above:&lt;br/&gt;&lt;br/&gt;* `&amp;lt;A&amp;gt; OP_CHECKSIGVERIFY &amp;lt;B&amp;gt; OP_CHECKSIG`&lt;br/&gt;* `&amp;lt;timelock&amp;gt; OP_CHECKSEQUENCEVERIFY OP_DROP &amp;lt;A&amp;gt; OP_CHECKSIG`&lt;br/&gt;&lt;br/&gt;Using an explicit 2-of-2 branch rather than a MuSig allows&lt;br/&gt;for a simple protocol at least for initial deployment:&lt;br/&gt;we can have Alice send the signature using `A` in a single&lt;br/&gt;half-round without having to engage in a 2-round MuSig2 signing&lt;br/&gt;ritual.&lt;br/&gt;&lt;br/&gt;We intend to use Taproot since the mobile wallet client&lt;br/&gt;may need to use a 2-of-3 or 2-of-2 signing scheme, similar&lt;br/&gt;to Blockstream Green.&lt;br/&gt;This allows either Alice or Bob in the contract to secretly&lt;br/&gt;be a FROST 2-of-3 or MuSig 2-of-2 (or any FROST k-of-n or&lt;br/&gt;MuSig n-of-n).&lt;br/&gt;This is also another reason for avoiding a 2-of-2 MuSig&lt;br/&gt;keyspend path between Alice and Bob, as there is (to our&lt;br/&gt;knowledge) no publicly-reviewed security proof that&lt;br/&gt;FROST-in-MuSig and MuSig-in-MuSig are safe (or the&lt;br/&gt;corresponding variants using MuSig2 for the signing&lt;br/&gt;ritual).&lt;br/&gt;&lt;br/&gt;Later, when we are more confident of the use of MuSig2 and&lt;br/&gt;FROST inside a MuSig2, and with using MuSig2 with possibly&lt;br/&gt;untrusted outsiders (who might exploit any mis-implementation&lt;br/&gt;of the MuSig2 signing protocol if we are not careful with&lt;br/&gt;designing it), we can seamlessly upgrade the protocol&lt;br/&gt;to use the keyspend path later, to save witness bytes.&lt;br/&gt;&lt;br/&gt;For the Onchain use-case (i.e. Alice wants to spend the UTXO&lt;br/&gt;to an onchain address), the protocol betweeen Alice and Bob&lt;br/&gt;would be:&lt;br/&gt;&lt;br/&gt;* `request_arbitrary_signature` Alice-&amp;gt;Bob: Requests Bob&lt;br/&gt;  to sign a PSBT spending a swap-in-potentiam address&lt;br/&gt;  using the Onchain branch.&lt;br/&gt;* `response_arbitrary_signature` Bob-&amp;gt;Alice: Response to&lt;br/&gt;  the above, returning the requested signature.&lt;br/&gt;* `reject_arbitrary_signature` Bob-&amp;gt;Alice: Sent in&lt;br/&gt;  response to `request_arbitary_signature` if Bob refuses&lt;br/&gt;  to cooperate (e.g. the UTXO being spent has already&lt;br/&gt;  been accepted by Bob in a Channel use-case below).&lt;br/&gt;&lt;br/&gt;For the Channel use-case (i.e. Alice wants to spend the UTXO&lt;br/&gt;to a Lightning receiver), we operate the swap-in-potentiam&lt;br/&gt;UTXO(s) as a Spilman-like channel over two states:&lt;br/&gt;&lt;br/&gt;* HTLC-offering: Offering an amount `N` HTLC from Alice to&lt;br/&gt;  Bob, with any remaining amount to a change address to&lt;br/&gt;  Alice.&lt;br/&gt;* Resolved: Giving the amount `N` outright to Bob, with any&lt;br/&gt;  remaining amount to a change address to Alice.&lt;br/&gt;&lt;br/&gt;The intention is that the channel is initially put into&lt;br/&gt;the HTLC-offerring state.&lt;br/&gt;Then Bob offers a corresponding in-Lightning HTLC to Alice&lt;br/&gt;over their channel.&lt;br/&gt;When Alice resolves the in-Lightning HTLC, it can then&lt;br/&gt;send a new signature for the Resolved state.&lt;br/&gt;Once the channel is in a Resolved state, Bob *SHOULD* sign&lt;br/&gt;the last state and broadcast it on the blockchain, thereby&lt;br/&gt;closing the Spilman-like channel.&lt;br/&gt;&lt;br/&gt;The protocol messages for the Channel use-case are:&lt;br/&gt;&lt;br/&gt;* `request_swap_in` Alice-&amp;gt;Bob: Tell Bob the UTXOs with&lt;br/&gt;  the same swap-in-potentiam address to spend, how&lt;br/&gt;  much to put into the Alice-&amp;gt;Bob channel direction,&lt;br/&gt;  what channel to move into, and (optionally) a change&lt;br/&gt;  address for Alice.&lt;br/&gt;* `reject_swap_in` Bob-&amp;gt;Alice: Sent in response to&lt;br/&gt;  `request_swap_in` if Bob refuses to cooperate (e.g.&lt;br/&gt;  one of the UTXOs on offer was already signed with&lt;br/&gt;  `response_arbitrary_signature`, or Bob cannot legally&lt;br/&gt;  accept control of funds from one or more of the UTXOs&lt;br/&gt;  offerred).&lt;br/&gt;* `accept_swap_in` Bob-&amp;gt;Alice: Sent in response to&lt;br/&gt;  `request_swap_in`, containing the Bob-side address to&lt;br/&gt;  send funds to later once the state is Resolved.&lt;br/&gt;* `swap_in_signed` Alice-&amp;gt;Bob: Response to&lt;br/&gt;  `accept_swap_in`, containing the Alice-side signature&lt;br/&gt;  for the HTLC-offering state transaction.&lt;br/&gt;  Once Bob receives this, Bob can safely construct a&lt;br/&gt;  new on-Lightning HTLC using BOLT1&lt;br/&gt;  `update_offer_htlc`.&lt;br/&gt;* `swap_in_resolved` Alice-&amp;gt;Bob: Sent after Alice has&lt;br/&gt;  acquired the funds via `update_fulfill_htlc` of the&lt;br/&gt;  corresponding on-Lightning HTLC, containing the&lt;br/&gt;  Alice-side signature for the Resolved state&lt;br/&gt;  transaction.&lt;br/&gt;  The Resolved state transaction spends to the Bob-side&lt;br/&gt;  address given in `accept_swap_in`, and any change to&lt;br/&gt;  the Alice-side change address in `request_swap_in`.&lt;br/&gt;&lt;br/&gt;The plan is to reserve only one odd BOLT1 message ID,&lt;br/&gt;and to embed the actual swap-in-potentiam message ID&lt;br/&gt;as the first 2 bytes of the BOLT1 message, to reduce&lt;br/&gt;pollution of the limited BOLT1 message ID space and to&lt;br/&gt;allow more flexibility for swap-in-potentiam to expand&lt;br/&gt;to new messages inside its own message ID space.&lt;br/&gt;&lt;br/&gt;For a richer future protocol, we will want to consider&lt;br/&gt;how a swap-in can be combined with a splice-in.&lt;br/&gt;This is useful if the current total capacity of the&lt;br/&gt;channel is lower than the available onchain funds.&lt;br/&gt;The swap-in can be credited immediately (and is limited&lt;br/&gt;to the current total capacity) while additional funds&lt;br/&gt;can be added to the channel via splice-in (which is&lt;br/&gt;credited only once the splice-in is confirmed).&lt;br/&gt;&lt;br/&gt;As-is, a similar result can be obtained using openv1,&lt;br/&gt;wherein a swap-in is combined with a channel open,&lt;br/&gt;with the swap-in immediately credited while the channel&lt;br/&gt;open is awaiting confirmation:&lt;br/&gt;&lt;br/&gt;* Alice and Bob currently have one or more existing&lt;br/&gt;  channels, and Alice has a UTXO in a swap-in-potentiam&lt;br/&gt;  address whose value exceeds the incoming capacity of&lt;br/&gt;  the existing channel(s).&lt;br/&gt;* Alice-&amp;gt;Bob `open_channel`.&lt;br/&gt;* Bob-&amp;gt;Alice `accept_channel`.&lt;br/&gt;* Alice-&amp;gt;Bob `request_swap_in` with the &amp;#34;change address&amp;#34;&lt;br/&gt;  being the funding address of the channel.&lt;br/&gt;* Bob-&amp;gt;Alice `accept_swap_in` provides the TXID of the&lt;br/&gt;  funding transaction (Alice now knows the &amp;#34;change&lt;br/&gt;  address&amp;#34; and the Bob final Resolved address, letting it&lt;br/&gt;  know the final Resolved state transaction TXID).&lt;br/&gt;* Alice-&amp;gt;Bob `funding_created` with the TXID.&lt;br/&gt;* Bob-&amp;gt;Alice `funding_signed`.&lt;br/&gt;* Alice-&amp;gt;Bob `swap_in_signed` to provide the signature&lt;br/&gt;  spending the swap-in-potentiam address to Bob.&lt;br/&gt;* Bob then constructs an HTLC over the existing channel,&lt;br/&gt;  which Alice claims, revealing the preimage.&lt;br/&gt;* Alice-&amp;gt;Bob `swap_in_resolved`.&lt;br/&gt;* Bob then broadcasts the Resolved state transaction,&lt;br/&gt;  which is also the funding transaction of the new channel.&lt;br/&gt;* Both Alice and Bob await confirmation of the transaction&lt;br/&gt;  in order to use the new channel.&lt;br/&gt;  Alice can still use the existing channel, which has been&lt;br/&gt;  topped-up with fresh outgoing capacity by the swap-in.&lt;br/&gt;&lt;br/&gt;(The above is not safe, as Bob can complete the protocol&lt;br/&gt;by using the HTLC-offerring state transaction; this can&lt;br/&gt;be fixed by having Alice open *2* channels with the same&lt;br/&gt;amount, one with the HTLC-offering state transaction as&lt;br/&gt;the funding tx, the other with the Resolved state&lt;br/&gt;transaction as the funding tx, and later `error`ing the&lt;br/&gt;channel corresponding to the transaction that is not&lt;br/&gt;confirmed; this is left as an exercise to the reader,&lt;br/&gt;though note that it requires two different change addresses&lt;br/&gt;for Alice for both HTLC-offerring and Resolved states,&lt;br/&gt;which can be arranged for the protocol)&lt;br/&gt;&lt;br/&gt;--&lt;br/&gt;&lt;br/&gt;[1]: &lt;a href=&#34;https://en.bitcoin.it/wiki/Payment_channels#CLTV-style_payment_channels&#34;&gt;https://en.bitcoin.it/wiki/Payment_channels#CLTV-style_payment_channels&lt;/a&gt;
    </content>
    <updated>2023-06-09T15:07:47&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsgk2chuntfwunddu9pzlxjklgqpvfhqpt5g0ygu9tguchu9af48xgzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxz6kf2r0</id>
    
      <title type="html">📅 Original date posted:2022-11-28 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsgk2chuntfwunddu9pzlxjklgqpvfhqpt5g0ygu9tguchu9af48xgzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxz6kf2r0" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsvfvs8qat4svpty0h5vr474zwh9wzu2c930ufzvntjdfvf9x4wkmq5j3g24&#39;&gt;nevent1q…3g24&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-11-28&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning David,&lt;br/&gt;&lt;br/&gt;&amp;gt; On 2022-11-25 13:12, ZmnSCPxj via Lightning-dev wrote:&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; &amp;gt; If I am an LSP, and I know my competitor LSP distributes their&lt;br/&gt;&amp;gt; &amp;gt; credentials, then I can simply apply to be a spoke on my competitor&lt;br/&gt;&amp;gt; &amp;gt; and then make several payments to my node, which I then jam up.&lt;br/&gt;&amp;gt; &amp;gt; This reduces the reputation of my competitor LSP.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; I don&amp;#39;t think this how Riard&amp;#39;s credentials work. The credential tokens&lt;br/&gt;&amp;gt; are blinded, so forwarding nodes can&amp;#39;t use them to determine the origin&lt;br/&gt;&amp;gt; of the payment---thus they can&amp;#39;t assign blame.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; As I understand them, credential tokens prevent DoS by each token only&lt;br/&gt;&amp;gt; allowing the one-time creation of a single HTLC, so any failed payment&lt;br/&gt;&amp;gt; reduces the sender&amp;#39;s supply of tokens. That means, if Mallory becomes a&lt;br/&gt;&amp;gt; client of Bob&amp;#39;s and Bob lets Mallory use some of his tokens, Mallory can&lt;br/&gt;&amp;gt; destroy those tokens. Although that&amp;#39;s bad for Bob, he can easily limit&lt;br/&gt;&amp;gt; the damage by not giving Mallory more tokens after too many failures.&lt;br/&gt;&amp;gt; If Bob obtained his tokens at a low cost (e.g. by sending many payments&lt;br/&gt;&amp;gt; that were successful and receiving back &amp;gt;100% of the tokens he used to&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; make those payments) and if Alice has to pay a similar or greater cost&lt;br/&gt;&amp;gt; to become a client of Bob&amp;#39;s (e.g. onchain channel open costs), then the&lt;br/&gt;&amp;gt; attack should not be economically rational.&lt;br/&gt;&lt;br/&gt;The usual response is to subsequently attack the mitigation, this is a general technique that works on pretty much anything.&lt;br/&gt;&lt;br/&gt;Mallory can run multiple nodes.&lt;br/&gt;Mallory can then initially buy a small number of tokens.&lt;br/&gt;Then Mallory sends payments back and forth ensuring success, receiving back &amp;gt;100% tokens used.&lt;br/&gt;This gives Mallory a large number of tokens.&lt;br/&gt;&lt;br/&gt;Finally, Mallory launches a wide attack on the network by using its harvested tokens (from the &amp;gt;100% token return from successful payment resolution), trading off reputation for whatever they might gain by attacking the LN.&lt;br/&gt;&lt;br/&gt;Unless forwarding nodes charge a large fee on successful resolution of payments, such that the &amp;gt;100% return on tokens is equal to the cost of buying the extra tokens &amp;#34;fresh&amp;#34;, then this makes launching the attack cheaper.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; Thus all reputation still rests with ultimate senders, who have to&lt;br/&gt;&amp;gt; &amp;gt; convince LSPs to sell their reputation to them, because they might&lt;br/&gt;&amp;gt; &amp;gt; secretly be competitor LSPs who have incentive to drain their&lt;br/&gt;&amp;gt; &amp;gt; reputation.&lt;br/&gt;&amp;gt; &amp;gt; &lt;br/&gt;&amp;gt; &amp;gt; If the price of sold reputation is too high, then it is no different&lt;br/&gt;&amp;gt; &amp;gt; from upfront fees.&lt;br/&gt;&amp;gt; &amp;gt; &lt;br/&gt;&amp;gt; &amp;gt; If the price of sold reputation is too low, then I can drain the&lt;br/&gt;&amp;gt; &amp;gt; reputation of competitor LSPs.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; I think the statement at the top about reputation resting with ultimate&lt;br/&gt;&amp;gt; senders is true but two conditionals below it are not quite right. If&lt;br/&gt;&amp;gt; an LSP helps many clients make successful payments, those clients may&lt;br/&gt;&amp;gt; (at no additional cost to them beyond the forwarding fees they already&lt;br/&gt;&amp;gt; paid) receive more credential tokens than they&amp;#39;ll ever need. By&lt;br/&gt;&amp;gt; allowing the LSP to instead use those tokens for other clients&lt;br/&gt;&amp;gt; (&amp;#34;harvesting&amp;#34; them), it&amp;#39;s possible for those later clients to avoid&lt;br/&gt;&amp;gt; paying for credential tokens---this is equivalent to free upfront fees.&lt;br/&gt;&amp;gt; As long as the LSP can prevent a client from using too many tokens, and&lt;br/&gt;&amp;gt; requires the client pay other inescapable costs, then it shouldn&amp;#39;t be&lt;br/&gt;&amp;gt; possible for a competitor to substantially drain the token capital of a&lt;br/&gt;&amp;gt; LSP without losing a substantial amount of its own money.&lt;br/&gt;&lt;br/&gt;It is helpful to consider that jamming attacks require that jamming attackers tie up their funds on Lightning too.&lt;br/&gt;So while a jamming attacker can impose opportunity costs on the rest of the network, it also sacrifices opportunity to instead use the same funds in forwarding.&lt;br/&gt;Thus a jamming attacker can impose costs on others by also losing a substantial amount (in terms of lost opportunity to instead use the same locked funds to earn forwarding fees), meaning that if you are going to make that argument, then the original problem was already solved by its own structure.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:07:27&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsqze6yx9ljdqk3tfevhlxresjnheq8zywvl8jlved9gg9dsxnnvfgzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxz9wwz8c</id>
    
      <title type="html">📅 Original date posted:2022-11-25 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsqze6yx9ljdqk3tfevhlxresjnheq8zywvl8jlved9gg9dsxnnvfgzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxz9wwz8c" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsyeayqaqtx52m5nnjxr7kssg2x96aqx23qhrmup9j6rwm0ln6z7ysk2qg8w&#39;&gt;nevent1q…qg8w&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-11-25&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning Antoine,&lt;br/&gt;&lt;br/&gt;&amp;gt; It should be noted, this current reputation-credential architectural framework assumes credentials distribution at the endpoint of the network. However, the framework should be flexible enough for the credentials to be harvested by the LSPs, and then distributed in a secondary fashion to their spokes, when they need it, or even attached transparently thanks to trampoline. So one design intuition, there is no strong attachment of the reputation to the endpoint HTLC sender, even if the protocol is described in a &amp;#34;flat&amp;#34; view for now.&lt;br/&gt;&lt;br/&gt;This seems incorrect.&lt;br/&gt;&lt;br/&gt;If I am an LSP, and I know my competitor LSP distributes their credentials, then I can simply apply to be a spoke on my competitor and then make several payments to my node, which I then jam up.&lt;br/&gt;This reduces the reputation of my competitor LSP.&lt;br/&gt;&lt;br/&gt;This is even worse if my competitor LSP attaches their credentials on trampolines, I do not even need to apply to be a spoke on my competitor that way.&lt;br/&gt;&lt;br/&gt;Thus in both cases the competitor LSP needs to have a similar way of ensuring that their spokes / trampoline requesters are not also trying to jam *them* in order to drain their reputation.&lt;br/&gt;Thus all reputation still rests with ultimate senders, who have to convince LSPs to sell their reputation to them, because they might secretly be competitor LSPs who have incentive to drain their reputation.&lt;br/&gt;&lt;br/&gt;If the price of sold reputation is too high, then it is no different from upfront fees.&lt;br/&gt;&lt;br/&gt;If the price of sold reputation is too low, then I can drain the reputation of competitor LSPs.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:07:27&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsd675wayv48dsy2qcee8upv6gzdnrm2aedx6mzp0decc57pgmv4cczypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzl5dthw</id>
    
      <title type="html">📅 Original date posted:2022-10-09 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsd675wayv48dsy2qcee8upv6gzdnrm2aedx6mzp0decc57pgmv4cczypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzl5dthw" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqszjlldn8arle48334xfpt24ycj2al7h3qhs2x532wgeudvltcp5dqdlnxs7&#39;&gt;nevent1q…nxs7&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-10-09&lt;br/&gt;📝 Original message:&lt;br/&gt;Subject: Forwardable Peerswaps&lt;br/&gt;&lt;br/&gt;Introduction&lt;br/&gt;============&lt;br/&gt;&lt;br/&gt;[Peerswap](&lt;a href=&#34;https://peerswap.dev&#34;&gt;https://peerswap.dev&lt;/a&gt;) is a protocol for swapping onchain funds&lt;br/&gt;and offchain in-Lightning funds.&lt;br/&gt;The intent of this protocol is to allow managing the inbound and outbound&lt;br/&gt;capacities of your node without having to perform rebalancing.&lt;br/&gt;&lt;br/&gt;Rebalancing is arguably a parasitic behavior, preying on low-fee channels&lt;br/&gt;to buy out their available capacity, then turning around to resell the&lt;br/&gt;purchased capacity at a higher fee.&lt;br/&gt;By using swap services instead, a node manager can adjust capacity and&lt;br/&gt;effectively add capacity to the network in the needed direction, without&lt;br/&gt;pushing their own lack of capacity to a victim.&lt;br/&gt;&lt;br/&gt;However, a limitation of peerswap is in its name: a peerswap is performed&lt;br/&gt;with *only* a direct peer with which you have a channel.&lt;br/&gt;&lt;br/&gt;This writeup then proposes an extension to the overall peerswap protocol&lt;br/&gt;to work around this limitation, which I call &amp;#34;forwardable peerswap&amp;#34;.&lt;br/&gt;&lt;br/&gt;I would like to make the claim that forwardable peerswaps solves the&lt;br/&gt;problems that the following previous proposed and deployed solutions&lt;br/&gt;attempt to fix:&lt;br/&gt;&lt;br/&gt;* Liquidity markets (liquidity ads, Lightning Pool, etc.)&lt;br/&gt;* Flow control valves (fee-based flow control / passive rebalancing,&lt;br/&gt;  `htlc_maximum_msat`, etc.)&lt;br/&gt;&lt;br/&gt;An important part of forwardable peerswaps is that it &amp;#34;hides&amp;#34; a&lt;br/&gt;network-health-improving operation in a &amp;#34;channel top-up&amp;#34; operation&lt;br/&gt;(i.e.  moving onchain funds to Lightning) that net senders will want to&lt;br/&gt;do anyway (or else they stop being net senders).&lt;br/&gt;&lt;br/&gt;Swaps vs. Splices&lt;br/&gt;=================&lt;br/&gt;&lt;br/&gt;A peerswap and a splice are very similar, in that they change the state&lt;br/&gt;of one of our local channels, adding or removing outbound capacity on&lt;br/&gt;that channel.&lt;br/&gt;&lt;br/&gt;However:&lt;br/&gt;&lt;br/&gt;* A swap will always take 2 onchain transactions:&lt;br/&gt;  * An offer transaction that has an HTLC output.&lt;br/&gt;  * A claim transaction that spends the above HTLC output.&lt;br/&gt;    This spend can take up more space, requiring a SCRIPT revelation,&lt;br/&gt;    a signature, and a preimage revelation.&lt;br/&gt;* If designed to limit onchain footprint, a splice can take just one&lt;br/&gt;  onchain transaction.&lt;br/&gt;  * This spend will take only a SCRIPT revelation and two signatures,&lt;br/&gt;    or with Taproot can be reduced to a single signature without any&lt;br/&gt;    SCRIPT/Tapscript revelation.&lt;br/&gt;&lt;br/&gt;Thus, a swap takes more onchain resources than a splice, and if we are&lt;br/&gt;considering the state of a *single* channel alone, then a splice is&lt;br/&gt;definitely more efficient.&lt;br/&gt;&lt;br/&gt;However, if a swap extends beyond one hop, then the number of channels&lt;br/&gt;affected by the swap is increased.&lt;br/&gt;And yet, no matter how many channels are affected, the swap will&lt;br/&gt;still take only two transactions.&lt;br/&gt;Thus, swapping will exceed the efficiency of splicing once three or&lt;br/&gt;more hops are considered.&lt;br/&gt;&lt;br/&gt;The problem here is that, as indicated by its name, a peerswap is&lt;br/&gt;limited to affecting only one channel, a channel between ourselves and&lt;br/&gt;one of our direct peers.&lt;br/&gt;&lt;br/&gt;Now, this limitation of peerswap is not without its justification:&lt;br/&gt;&lt;br/&gt;* A multi-hop payment is inherently less reliable, as it requires&lt;br/&gt;  multiple nodes to be continuously online at the same time.&lt;br/&gt;* Intermediate LN nodes might not want the change in channel state&lt;br/&gt;  (i.e. the multi-hop payment might worsen their channel balance).&lt;br/&gt;* Offchain-to-onchain swaps impose an economic risk on the acceptor&lt;br/&gt;  of the swap, which a peerswap can punish by closing the direct&lt;br/&gt;  channel but which a remote swap cannot punish.&lt;br/&gt;&lt;br/&gt;Peerswap User Story&lt;br/&gt;===================&lt;br/&gt;&lt;br/&gt;Suppose we have a small network of nodes A, B, and C, initially&lt;br/&gt;with channels perfectly balanced, as all things should be.&lt;br/&gt;&lt;br/&gt;Suppose however that after some time, A notices that its channel&lt;br/&gt;to B has little outbound capacity.&lt;br/&gt;&lt;br/&gt;A can then propose a peerswap between A and B: A offers some&lt;br/&gt;onchain funds in order to change the state in their channel,&lt;br/&gt;getting more outbound capacity from A.&lt;br/&gt;&lt;br/&gt;Suppose B accepts this and completes the peerswap protocol.&lt;br/&gt;&lt;br/&gt;Now B is in possession of some onchain funds.&lt;br/&gt;B then notices that its channel to C has little outbound capacity.&lt;br/&gt;&lt;br/&gt;B can then propose a peerswap between B and C: B offers some&lt;br/&gt;onchain funds in order to change the state in their channel,&lt;br/&gt;getting more outbound capacity from B.&lt;br/&gt;&lt;br/&gt;Suppose C accepts this and completes the peerswap protocol.&lt;br/&gt;&lt;br/&gt;Now what happens in sum total on the blockchain layer?&lt;br/&gt;We will see two swaps, each with 2 transactions, for a total of&lt;br/&gt;4 transactions onchain.&lt;br/&gt;&lt;br/&gt;Forwardable Peerswap&lt;br/&gt;====================&lt;br/&gt;&lt;br/&gt;To improve this, suppose we change the above user story, starting&lt;br/&gt;at this point:&lt;br/&gt;&lt;br/&gt;A can then propose a peerswap between A and B: A offers some&lt;br/&gt;onchain funds in order to change the state in their channel,&lt;br/&gt;getting more outbound capacity from A.&lt;br/&gt;&lt;br/&gt;Suppose B then looks up its channels.&lt;br/&gt;B then notices that its channel to C has little outbound capacity.&lt;br/&gt;&lt;br/&gt;B can then propose a peerswap between B and C: B offers some&lt;br/&gt;onchain funds in order to change the state in their channel,&lt;br/&gt;getting more outbound capacity from B.&lt;br/&gt;However, B is really going to act as little more than a message&lt;br/&gt;translator between A and C, forwarding peerswap messages from A&lt;br/&gt;to C and replies from C to A.&lt;br/&gt;&lt;br/&gt;Thus, A thinks it is talking to B, but really it is negotiating&lt;br/&gt;the peerswap with C, using B as a medium.&lt;br/&gt;And vice versa, C thinkgs it is talking to B, but really it is&lt;br/&gt;negotiating the peerswap with A, using B as a medium.&lt;br/&gt;&lt;br/&gt;Further, C itself could end up forwarding the peerswap to yet&lt;br/&gt;another node, which itself could forward the peerswap, etc.&lt;br/&gt;&lt;br/&gt;Yet no matter how many hops the peerswap ends up getting&lt;br/&gt;forwarded, there will only be two transactions onchain: one to&lt;br/&gt;instantiate the onchain HTLC, another to claim it.&lt;br/&gt;&lt;br/&gt;The overall changes are:&lt;br/&gt;&lt;br/&gt;* A should initially offer an onchain HTLC with a longer then&lt;br/&gt;  expected timeout, so that B (and C, D, etc.) has an&lt;br/&gt;  opportunity to consider forwarding the peerswap.&lt;br/&gt;* B should demand a longer in-Lightning HTLC timeout than what&lt;br/&gt;  A demands from it (and so on for C, D, etc.).&lt;br/&gt;&lt;br/&gt;What Peerswaps Are Forwardable?&lt;br/&gt;-------------------------------&lt;br/&gt;&lt;br/&gt;Let us be absolutely clear that there are actually two&lt;br/&gt;sub-protocols of peerswap:&lt;br/&gt;&lt;br/&gt;* Onchain-to-offchain: An initiator offers onchain funds to&lt;br/&gt;  get more outbound capacity.&lt;br/&gt;  * Net senders want to do this.&lt;br/&gt;* Offchain-to-onchain: An initiator offers offchain funds to&lt;br/&gt;  get onchain funds and more inbound capacity.&lt;br/&gt;  * Net receivers want to do this.&lt;br/&gt;&lt;br/&gt;Unfortunately, only the first sub-protocol (onchain-to-offchain)&lt;br/&gt;is actually forwardable.&lt;br/&gt;&lt;br/&gt;This is because, in the latter case, the initiator can force&lt;br/&gt;the acceptor to waste resources, by aborting the protocol after&lt;br/&gt;the acceptor has committed onchain funds to the HTLC.&lt;br/&gt;Lightning HTLCs are trivially cancellable, but onchain HTLCs&lt;br/&gt;can only be returned by waiting out the timeout and spending&lt;br/&gt;onchain fees to recover the funds.&lt;br/&gt;&lt;br/&gt;In a peerswap, the latter case is fixed by closing the channel&lt;br/&gt;with the initiator, thus punishing them for aborting the protocol.&lt;br/&gt;However, this punishment cannot be done in the forwarded case&lt;br/&gt;without massive channel closures, which turns this into an&lt;br/&gt;attack on the network.&lt;br/&gt;&lt;br/&gt;Thus, forwardable peerswaps can only be of the onchain-to-offchain&lt;br/&gt;type that are initiated by net senders.&lt;br/&gt;&lt;br/&gt;Now you might wonder, how about net receivers, how would they&lt;br/&gt;initiate forwardable peerswaps?&lt;br/&gt;As I will demonstrate in a much later section, any&lt;br/&gt;onchain-to-offchain forwardable peerswaps initiated by net&lt;br/&gt;senders will make their way to some net receiver, and thus&lt;br/&gt;net receivers need only wait and they will naturally get some&lt;br/&gt;kind of forwardable onchain-to-offchain peerswap that will&lt;br/&gt;also get them inbound capacity.&lt;br/&gt;&lt;br/&gt;Future innovations (beyond the scope of this writeup, that is&lt;br/&gt;what &amp;#34;future&amp;#34; means) may allow us to develop an offchain-to-onchain&lt;br/&gt;remote swap that can effectively punish the initiator if it&lt;br/&gt;does not complete the swap.&lt;br/&gt;This would allow offchain-to-onchain peerswaps to also be&lt;br/&gt;forwardable, which can only be beneficial to the network.&lt;br/&gt;This may be hopium, however.&lt;br/&gt;Nevertheless, even just forwardable onchain-to-offchain&lt;br/&gt;peerswaps are still beneficial, as we shall see in succeeding&lt;br/&gt;sections.&lt;br/&gt;&lt;br/&gt;Advantages Of Forwardable Peerswap&lt;br/&gt;==================================&lt;br/&gt;&lt;br/&gt;Compared to the current peerswap:&lt;br/&gt;&lt;br/&gt;* A forwardable peerswap can affect more than just one channel,&lt;br/&gt;  improving the blockchain space utilization.&lt;br/&gt;&lt;br/&gt;Compared to multi-hop swaps:&lt;br/&gt;&lt;br/&gt;* Each node has the opportunity to decide whether to forward&lt;br/&gt;  the peerswap or not, depending on the states of its other&lt;br/&gt;  channels.&lt;br/&gt;  If none of its other channels have a state that would be&lt;br/&gt;  improved by forwarding the peerswap, the node can end the&lt;br/&gt;  peerswap forwarding at itself and just accept the onchain&lt;br/&gt;  funds.&lt;br/&gt;* There is still the issue of multiple nodes having to&lt;br/&gt;  coordinate in order to finish the forwarding and complete&lt;br/&gt;  the protocol.&lt;br/&gt;  Hopefully, for nodes used often on the public network,&lt;br/&gt;  uptime should be high, and nodes can monitor peer uptime&lt;br/&gt;  and use this information to decide whether to forward a&lt;br/&gt;  peerswap to a particular peer or not.&lt;br/&gt;&lt;br/&gt;In particular, we can also compare forwardable peerswaps to&lt;br/&gt;standard forwardable payments on Lightning:&lt;br/&gt;&lt;br/&gt;* Forwardable payments are source routed for privacy of the&lt;br/&gt;  payer (and some minor privacy of the payee).&lt;br/&gt;  * Due to the source not having access to the private&lt;br/&gt;    information of intermediate nodes, it cannot know if the&lt;br/&gt;    intermediate nodes would like the change in capacity, or&lt;br/&gt;    if the intermediate nodes even *have* the correct capacity.&lt;br/&gt;* Forwardable peerswaps are effectively packet-routed, with&lt;br/&gt;  each node deciding where exactly to forward (or to not forward)&lt;br/&gt;  each peerswap.&lt;br/&gt;  * Each node has perfect information on which of its channels&lt;br/&gt;    would appreciate the change in capacity, and also perfect&lt;br/&gt;    information on which of its peers is online right now, who&lt;br/&gt;    has high uptime, etc.&lt;br/&gt;&lt;br/&gt;Fees And Incentives For Individual Nodes: Why Net Receivers Still Benefit&lt;br/&gt;=========================================================================&lt;br/&gt;&lt;br/&gt;A node forwarding a peerswap should not charge a fee for&lt;br/&gt;the forward.&lt;br/&gt;Any fee that the peerswap initiator may offer should be&lt;br/&gt;paid, in full, to the ultimate acceptor of the forwarded&lt;br/&gt;peerswap.&lt;br/&gt;&lt;br/&gt;Consider a node that forwards an incoming peerswap request,&lt;br/&gt;instead of accepting it itself.&lt;br/&gt;That node:&lt;br/&gt;&lt;br/&gt;* Gets *two* of their channels balanced better.&lt;br/&gt;* Does not have to perform any onchain activity.&lt;br/&gt;&lt;br/&gt;In short, it gets a free rebalance.&lt;br/&gt;&lt;br/&gt;That is enough incentive, as the intermediate node can&lt;br/&gt;expect more future income from having two channels&lt;br/&gt;with improved balance, and does not have to spend anything&lt;br/&gt;on onchain activity.&lt;br/&gt;&lt;br/&gt;The forwarding node will, if it is rational, forward it&lt;br/&gt;over a channel that lacks outgoing capacity.&lt;br/&gt;This translates to forwarding it to a next hop that has&lt;br/&gt;low incoming capacity.&lt;br/&gt;&lt;br/&gt;If there are net senders and net receivers in the network,&lt;br/&gt;then the senders will deplete their on-Lightning funds on&lt;br/&gt;all their channels.&lt;br/&gt;&lt;br/&gt;If a net sender depletes their on-Lightning funds:&lt;br/&gt;&lt;br/&gt;* If the net sender can no longer acquire funds, they&lt;br/&gt;  stop being a net sender and we can ignore them.&lt;br/&gt;* If the net sender can acquire funds and get them on&lt;br/&gt;  Lightning, they stop being a net sender and end up&lt;br/&gt;  being neutral to the network, since the funds they&lt;br/&gt;  can send out must be less than or equal to the funds&lt;br/&gt;  they receive.&lt;br/&gt;  They stop being a net sender and we can ignore them.&lt;br/&gt;* If the net sender can acquire funds and get them&lt;br/&gt;  onchain, they can use the onchain funds ot initiate&lt;br/&gt;  onchain-to-offchain peerswaps.&lt;br/&gt;&lt;br/&gt;If *all* net senders have depleted their funds and&lt;br/&gt;can no longer get funds from either Lightning or&lt;br/&gt;onchain (i.e. nobody starts a forwardable peerswap),&lt;br/&gt;then net receivers will not receive more funds anymore&lt;br/&gt;anyway (nobody is getting more funds to send) and the&lt;br/&gt;fact that they have insufficient inbound capacity is&lt;br/&gt;immaterial, so the fact that they cannot initiate a&lt;br/&gt;forwardable peerswap is not a problem.&lt;br/&gt;&lt;br/&gt;Now let us focus on a net receiver.&lt;br/&gt;A net receiver is one where the payment flows are, in&lt;br/&gt;sum, towards them.&lt;br/&gt;This implies that, without further channel creations,&lt;br/&gt;the inbound capacity they have will be depleted.&lt;br/&gt;This also implies that they have much too large&lt;br/&gt;outbound capacity, due to how channels work.&lt;br/&gt;A net receiver is therefore a node with too much outbound&lt;br/&gt;capacity.&lt;br/&gt;&lt;br/&gt;Suppose net sender uses a peerswap that can be&lt;br/&gt;forwarded.&lt;br/&gt;Then its direct peer has an incentive to look at its&lt;br/&gt;other channels to forward the peerswap to, so that it&lt;br/&gt;gets two channels rebalanced for free without having&lt;br/&gt;to be responsible for an onchain UTXO.&lt;br/&gt;&lt;br/&gt;Now, suppose the forwardable peerswap reaches a node&lt;br/&gt;who finds that it cannot forward the onchain-to-offchain&lt;br/&gt;peerswap anymore.&lt;br/&gt;This would occur if the node has too much outbound&lt;br/&gt;capacity, and cannot add more outbound capacity with&lt;br/&gt;its peers.&lt;br/&gt;&lt;br/&gt;Now recall that a node with too much outbound capacity&lt;br/&gt;is a node that has too little inbound capacity.&lt;br/&gt;And a node with too little inbound capacity is a net&lt;br/&gt;receiver.&lt;br/&gt;&lt;br/&gt;Thus, forwardable peerswaps will start at net senders&lt;br/&gt;and will be naturally pathed to terminate at net&lt;br/&gt;receivers.&lt;br/&gt;This is the advantage of forwardable peerswaps being&lt;br/&gt;packet-switched instead of source-routed.&lt;br/&gt;&lt;br/&gt;(Yes, problems and other things can occur along the&lt;br/&gt;way and the real world and so on, but considered&lt;br/&gt;in an ideal world, forwardable onchain-to-offchain&lt;br/&gt;peerswaps will naturally path from net senders to&lt;br/&gt;net receivers.)&lt;br/&gt;&lt;br/&gt;Comparison To &amp;#34;Just Make A Channel&amp;#34;&lt;br/&gt;===================================&lt;br/&gt;&lt;br/&gt;Suppose a net sender just looks at it history of&lt;br/&gt;payments and makes a direct channel to a node that it&lt;br/&gt;usually pays to anyway, using its cold-storaged onchain&lt;br/&gt;UTXO to fund the new channel.&lt;br/&gt;&lt;br/&gt;This heuristic would probably work, but note that&lt;br/&gt;just because a net sender is paying a node, does not&lt;br/&gt;mean that *that* node is itself a net receiver!&lt;br/&gt;&lt;br/&gt;Merchants have to pay:&lt;br/&gt;&lt;br/&gt;* Suppliers of raw materials.&lt;br/&gt;* Employees.&lt;br/&gt;* Shareholders and owners of the business.&lt;br/&gt;&lt;br/&gt;In a future where everyone gets paid over Lightning,&lt;br/&gt;it is likely that merchants you pay to may themselves&lt;br/&gt;not even be net receivers of money over Lightning.&lt;br/&gt;&lt;br/&gt;In that case, the &amp;#34;just make a channel&amp;#34; technique will&lt;br/&gt;cause capital to be locked inefficiently, since the&lt;br/&gt;merchant that the net sender is paying is not really a&lt;br/&gt;net receiver, and the added capacity towards them would&lt;br/&gt;be underutilized.&lt;br/&gt;&lt;br/&gt;A forwardable peerswap, because of the incentive of each&lt;br/&gt;individual hop, will eventually locate the *actual*&lt;br/&gt;net receivers and thus forward the needed capacity&lt;br/&gt;adjustments to those receivers, even if the net sender&lt;br/&gt;does not know who the *real* net receivers on the network&lt;br/&gt;are.&lt;br/&gt;&lt;br/&gt;Thus, forwardable peerswaps will allocate capital more&lt;br/&gt;efficiently, simply by following the incentives of each&lt;br/&gt;individual public routing node.&lt;br/&gt;&lt;br/&gt;Further, if the net sender regularly uses unpublished&lt;br/&gt;channels, then the capacity they add to the merchant&lt;br/&gt;they usually pay is not even utilizable by the rest&lt;br/&gt;of the network.&lt;br/&gt;However, if a forwardable peerswap is used, even if&lt;br/&gt;it starts at an unpublished channel, it can be routed&lt;br/&gt;out over the public network and thus have the capacity&lt;br/&gt;utilized by the rest of the public network.&lt;br/&gt;&lt;br/&gt;If the net receivers of the network are *also* using&lt;br/&gt;unpublished channels, then the forwardable peerswap&lt;br/&gt;can also still reach them, since their direct peer&lt;br/&gt;still knows about them and can decide to forward the&lt;br/&gt;peerswap to them.&lt;br/&gt;Thus, forwardable peerswaps can adapt to a world where&lt;br/&gt;unpublished channels have not been delere sufficiently.&lt;br/&gt;&lt;br/&gt;On Liquidity Markets&lt;br/&gt;--------------------&lt;br/&gt;&lt;br/&gt;There are various liquidity markets already deployed&lt;br/&gt;or being developed.&lt;br/&gt;&lt;br/&gt;These liquidity markets are intended to make the&lt;br/&gt;&amp;#34;Just Make A Channel&amp;#34; strategy be guided better, by&lt;br/&gt;having net receivers somehow directly contact net&lt;br/&gt;senders so they can make direct channels and get&lt;br/&gt;the needed capacity.&lt;br/&gt;&lt;br/&gt;However, this often means that additional information&lt;br/&gt;must be broadcast and/or additional resources kept&lt;br/&gt;in reserve.&lt;br/&gt;&lt;br/&gt;* With e.g. Lightning Pool, net receivers must provide&lt;br/&gt;  their contact information and inbound capacity needs&lt;br/&gt;  to a centralized server, which can be attacked or&lt;br/&gt;  taken over to filter out particular, identified net&lt;br/&gt;  receivers (i.e. censorship).&lt;br/&gt;* With e.g. liquidity ads, there is no central server,&lt;br/&gt;  but all forwarding nodes have to broadcast their&lt;br/&gt;  liquidity ads, and all forwarding nodes have to keep&lt;br/&gt;  some funds in onchain reserve, in case a new net&lt;br/&gt;  receiver wants to buy liquidity from them.&lt;br/&gt;&lt;br/&gt;Finally, liquidity markets are often targeted at getting&lt;br/&gt;net receivers in touch with forwarding nodes.&lt;br/&gt;But ideally, forwarding nodes have an almost net zero&lt;br/&gt;flow on the network, and what needs to really be matched&lt;br/&gt;up are net senders to net receivers.&lt;br/&gt;Presumably forwarding nodes that participate in liquidity&lt;br/&gt;markets are hoping that net senders will randomly build&lt;br/&gt;channels to them, but that is not assured and a net&lt;br/&gt;receiver that matches up with a forwarding node may find&lt;br/&gt;that the forwarding node has actually oversold its inbound&lt;br/&gt;capacity.&lt;br/&gt;What needs to *actually* be done is match up net receivers&lt;br/&gt;to net senders.&lt;br/&gt;&lt;br/&gt;In contrast:&lt;br/&gt;&lt;br/&gt;* In forwardable peerswaps, nobody knows who the&lt;br/&gt;  net receivers are.&lt;br/&gt;  A direct peer of a net receiver might forward a&lt;br/&gt;  peerswap to them, but if the net receiver has&lt;br/&gt;  other channels, that peer cannot be sure it&lt;br/&gt;  terminates to them or is further forwarded.&lt;br/&gt;  Thus, not even direct peers of a net receiver&lt;br/&gt;  can learn that they *are* a net receiver.&lt;br/&gt;* Even if a direct peer of the net receiver somehow&lt;br/&gt;  knows them for a net receiver, they have&lt;br/&gt;  disincentive to &amp;#34;filter out&amp;#34; the net receiver: they&lt;br/&gt;  would not earn fees from the channel with the net&lt;br/&gt;  receiver.&lt;br/&gt;  If they wanted to impede the net receiver from&lt;br/&gt;  being paid, they should have just closed the&lt;br/&gt;  channel with them instead of maintaining it.&lt;br/&gt;  But the net receiver can then go connect to&lt;br/&gt;  some other node that still supports forwardable&lt;br/&gt;  peerswaps, because decentralization, and thus&lt;br/&gt;  cannot be censored without a network split.&lt;br/&gt;* Purely forwarding nodes never need to maintain&lt;br/&gt;  any onchain funds --- they will just forward&lt;br/&gt;  peerswaps through them and gain the benefit of&lt;br/&gt;  having two channels better balanced without&lt;br/&gt;  having to touch onchain funds.&lt;br/&gt;  This is unlike liquidity ads, which requires&lt;br/&gt;  that liquidity ad-broadcasting forwarding&lt;br/&gt;  nodes keep a stock of onchain funds to service&lt;br/&gt;  dual-funding requests.&lt;br/&gt;  This lets forwarding nodes maximize their&lt;br/&gt;  on-Lightning funds for more earnings, without&lt;br/&gt;  having to speculatively reserve some funds&lt;br/&gt;  onchain, as in the liquidity ads case.&lt;br/&gt;* Forwardable peerswaps, due to being packet-switched,&lt;br/&gt;  will naturally gravitate from net senders to net&lt;br/&gt;  receivers, with almost-net-zero forwarding nodes&lt;br/&gt;  naturally pathing them from the former to the&lt;br/&gt;  latter.&lt;br/&gt;  This effectively forms a matchmaking between them.&lt;br/&gt;  While forwarding nodes want to be mildly net&lt;br/&gt;  receivers, the expected earnings are tiny and&lt;br/&gt;  it would be likely a long time before their inbound&lt;br/&gt;  capacity is depleted, and if so, they can then&lt;br/&gt;  terminate a received forwardable peerswap at&lt;br/&gt;  themselves, just like any other net receiver.&lt;br/&gt;&lt;br/&gt;Comparison to &amp;#34;Rebalance Rebalance Rebalance&amp;#34;&lt;br/&gt;=============================================&lt;br/&gt;&lt;br/&gt;Currently, forwarding nodes manage their balances via&lt;br/&gt;rebalancing, i.e. making a self-payment, from a channel&lt;br/&gt;with high outgoing capacity to a channel with low&lt;br/&gt;outgoing capacity.&lt;br/&gt;&lt;br/&gt;Because the fees they earn on Lightning are very small,&lt;br/&gt;such forwarding nodes will select rebalancing routes with&lt;br/&gt;low fees, and will have strict budgets on how much they&lt;br/&gt;are willing to spend on rebalancing.&lt;br/&gt;&lt;br/&gt;What then happens is that random altruists who set their&lt;br/&gt;fees to very low, or even zero, will find that forwarding&lt;br/&gt;nodes will keep rebalancing via their channels.&lt;br/&gt;As multiple forwarding nodes vie for the limited amount of&lt;br/&gt;capacity on such low-fee channels, by the time an actual&lt;br/&gt;economic-activity non-rebalancing payment reaches one of&lt;br/&gt;those altruist nodes, the available balance towards&lt;br/&gt;net receivers has been depleted, having been transferred&lt;br/&gt;to rebalancing forwarders, leading to payment failure and&lt;br/&gt;longer payment settlement times.&lt;br/&gt;&lt;br/&gt;Thus, rebalancing forwarders who want to turn a profit,&lt;br/&gt;end up (deliberately or not) exploiting altruists who&lt;br/&gt;are setting their fees too low.&lt;br/&gt;&lt;br/&gt;(Though since altruists will often say that they are doing&lt;br/&gt;this &amp;#34;to help the network&amp;#34;, we should note that the&lt;br/&gt;profiteering forwarding nodes *are* component parts of the&lt;br/&gt;network, so the altruists have in fact achieved their stated&lt;br/&gt;goal.&lt;br/&gt;It would be different if the actual goal was &amp;#34;to help&lt;br/&gt;payers pay cheaply&amp;#34;, which is not achieved.)&lt;br/&gt;&lt;br/&gt;Now consider a world where forwardable peerswaps is&lt;br/&gt;widely deployed on the network, and widely initiated by&lt;br/&gt;net senders to top up their channels.&lt;br/&gt;&lt;br/&gt;In that world, if a forwarding node receives a forwardable&lt;br/&gt;peerswap, they can rebalance two of their channels favorably&lt;br/&gt;without spending anything.&lt;br/&gt;&lt;br/&gt;A self-paying rebalance would still need to pay out fees.&lt;br/&gt;Even if a rebalancer is exploiting a zero-fee-routing&lt;br/&gt;node, it is likely that one or more of the nodes between&lt;br/&gt;it and the exploited altruist will charge a non-zero fee.&lt;br/&gt;Thus, there will still be a cost to a self-paying rebalance.&lt;br/&gt;In contrast, accepting and forwarding a forwardable peerswap&lt;br/&gt;would gain the same benefit as a successful rebalance (fix&lt;br/&gt;the balance of two channels), but at zero cost to the&lt;br/&gt;forwarder.&lt;br/&gt;&lt;br/&gt;A self-paying rebalance does have the advantage that it&lt;br/&gt;can be performed at any time, whereas forwarding a&lt;br/&gt;forwardable peerswap requires waiting for an opportunity&lt;br/&gt;to do so.&lt;br/&gt;But if forwardable peerswaps are widely deployed on the&lt;br/&gt;network and happen often enough, then it may be sufficient&lt;br/&gt;that forwarders find that active self-paying rebalancing&lt;br/&gt;is no longer sufficiently advantageous, and that behavior&lt;br/&gt;is therefore suppressed.&lt;br/&gt;&lt;br/&gt;This should then lead to a world where the exploitation&lt;br/&gt;of those altruists charging low fees for their capacity is&lt;br/&gt;greatly reduced, since active self-paying rebalancing is&lt;br/&gt;no longer particularly needed by profiteering forwarding&lt;br/&gt;nodes.&lt;br/&gt;&lt;br/&gt;Comparison To &amp;#34;Flow Valves&amp;#34;&lt;br/&gt;===========================&lt;br/&gt;&lt;br/&gt;Due to channel depletion causing payment delays, there&lt;br/&gt;are proposals for some kind of &amp;#34;flow valve&amp;#34; to modulate&lt;br/&gt;payment flows on the Lightning Network.&lt;br/&gt;&lt;br/&gt;* Fee-based valves broadcast feerates to signal how much&lt;br/&gt;  outbound capacity is in a particular direction, to&lt;br/&gt;  entice users to the channel via low fees, or drive&lt;br/&gt;  away users (and reduce flow) via high fees.&lt;br/&gt;* `htlc_maximum_msat` valves broadcast changes to&lt;br/&gt;  that advertised parameter to change how much payment&lt;br/&gt;  flow goes through a channel.&lt;br/&gt;  * This is unfortunately broken as users can split&lt;br/&gt;    their payments (or self-paying rebalances, for that&lt;br/&gt;    matter) to below the `htlc_maximum_msat`, and thus&lt;br/&gt;    get around the flow valve.&lt;br/&gt;    This can be fixed by using a sufficiently high&lt;br/&gt;    non-zero base fee, but that is arguably switching&lt;br/&gt;    over to a fee-based flow valve.&lt;br/&gt;&lt;br/&gt;In both cases, flow valves not only have to be&lt;br/&gt;widely broadcast across the network (increasing&lt;br/&gt;bandwidth consumption) but it also leaks information&lt;br/&gt;about the capacity of channels of the forwarding nodes,&lt;br/&gt;and thus indirectly leaks information about who net&lt;br/&gt;senders and net receivers are (by observing which flow&lt;br/&gt;valves are the more limiting).&lt;br/&gt;&lt;br/&gt;But more importantly, flow valves increase the friction&lt;br/&gt;of using Lightning Network.&lt;br/&gt;If the friction is high enough, users will switch to&lt;br/&gt;another payment network.&lt;br/&gt;&lt;br/&gt;Rather than install flow valves (which would slow down&lt;br/&gt;LN payment velocity) we just make forwardable peerswaps&lt;br/&gt;as a pressure release valve, releasing pent-up&lt;br/&gt;pressure-to-pay by diverting it on a swap over the base&lt;br/&gt;Bitcoin blockchain.&lt;br/&gt;&lt;br/&gt;This effectively admits that we *do* need to switch&lt;br/&gt;over to another payment network once Lightning starts&lt;br/&gt;getting overloaded.&lt;br/&gt;Basically, a forwardable peerswap is a payment, from&lt;br/&gt;some net sender to some net receiver, over the&lt;br/&gt;Bitcoin blockchain (i.e. the &amp;#34;another payment network&amp;#34;)&lt;br/&gt;rather than over Lightning.&lt;br/&gt;&lt;br/&gt;However:&lt;br/&gt;&lt;br/&gt;* A net sender may be matched up to an arbitary net&lt;br/&gt;  receiver that is physically nearby on the Lightning&lt;br/&gt;  Network, but which the net sender does not, in fact,&lt;br/&gt;  have direct economic ties with.&lt;br/&gt;  Thus, onchain surveillors cannot derive any information&lt;br/&gt;  from this onchain payment, other than &amp;#34;looks like the&lt;br/&gt;  Lightning Network is busy today&amp;#34;.&lt;br/&gt;* A succesful forwardable peerswap is a pressure release&lt;br/&gt;  valve, which resets the state of multiple channels on&lt;br/&gt;  the network, from net senders to net receivers, and&lt;br/&gt;  thus enabling further payment flows involving them&lt;br/&gt;  and their neighborhood.&lt;br/&gt;  There is thus no need for a flow valve.&lt;br/&gt;* There is no need to broadcast anything, and forwarding&lt;br/&gt;  nodes do not need to leak their channel balances over&lt;br/&gt;  the gossip network.&lt;br/&gt;* Users are already conditioned to accept that onchain&lt;br/&gt;  activity is costly, but have been convinced that&lt;br/&gt;  Lightning is cheaper and faster.&lt;br/&gt;  If flow valves are used, they may cause Lightning to&lt;br/&gt;  work slower and more expensively, thus breaking that&lt;br/&gt;  expectation.&lt;br/&gt;  But if forwardable peerswap is used instead, users&lt;br/&gt;  who use onchain funds to &amp;#34;top up&amp;#34; their channel end&lt;br/&gt;  up initiating a forwardable peerswap that keeps the&lt;br/&gt;  rest of the network cheap and fast, while accepting&lt;br/&gt;  that the onchain activity involved in this will be&lt;br/&gt;  costly and slow since that is what onchain activity&lt;br/&gt;  inherently is.
    </content>
    <updated>2023-06-09T15:07:03&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs8ra7e6tygpngwvv2zdlh05yp74766ukf6pv0lm0pteruehzgkvtczypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzw2jyzj</id>
    
      <title type="html">📅 Original date posted:2022-09-26 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs8ra7e6tygpngwvv2zdlh05yp74766ukf6pv0lm0pteruehzgkvtczypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzw2jyzj" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs83flgs87luhxpwtzgpg9gzhjrv8cf28vnql7nhf66wpkv0uwa6vgrqmrzl&#39;&gt;nevent1q…mrzl&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-09-26&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning aj,&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; Basically, the intuition &amp;#34;small decrease in `htlc_max_msat` == small decrease in payment volume&amp;#34; inherently assumes that HTLC sizes have a flat distribution across all possible sizes.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; The intuition is really the other way around: if you want a stable,&lt;br/&gt;&amp;gt; decentralised network, then you need the driving decision on routing to&lt;br/&gt;&amp;gt; be something other than just &amp;#34;who&amp;#39;s cheaper by 0.0001%&amp;#34; -- otherwise&lt;br/&gt;&amp;gt; everyone just chooses the same route at all times (which becomes&lt;br/&gt;&amp;gt; centralised towards the single provider who can best monetise forwarding&lt;br/&gt;&amp;gt; via something other than fees), and probably that route quickly becomes&lt;br/&gt;&amp;gt; unusable due to being drained (which isn&amp;#39;t stable).&lt;br/&gt;&lt;br/&gt;All monetisation is fee-based; the question is who pays the fees.&lt;br/&gt;Certainly gossiped feerates will work less effectively if fees are paid via another mechanism.&lt;br/&gt;&lt;br/&gt;In particular, discussing with actual forwarding node operators reveals that most of them think that CLBOSS undercuts fees too much searching a short-term profit, quickly depleting its usable liquidity in the long term.&lt;br/&gt;In short, they want CLBOSS modified to raise fees and preserve the liquidity supply.&lt;br/&gt;This suggests to me that channel saturation due to being cheaper by 0.0001% is not something that will occur often, as most operators will settle to a feerate that maximizes their earnings per unit liquidity they can provide, not trying to undercut everyone.&lt;br/&gt;&lt;br/&gt;In particular, the fact that rebalancing already exists as part of the network protocol means that anyone trying to undercut will find their liquidity being bought out by more patient operators, who are willing to sacrifice short-term profits for long-term consistent earnings.&lt;br/&gt;&lt;br/&gt;In short, the market will fix itself once we have more rational automated actors in place (i.e. not CLBOSS).&lt;br/&gt;Indeed, price signals are always places where you should pay attention to whether you need more of a good or not.&lt;br/&gt;&lt;br/&gt;But maybe I am just modelling everything incorrectly.&lt;br/&gt;Certainly the fact that fees can be paid by somebody else other than senders can make gossiped feerates (which are the sender-paid feerates) less effective.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:06:53&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsz4uayd4smgxddlzhjeanv0k57mxktrxadl6czgtxpztrukvwm3tqzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxz44atqw</id>
    
      <title type="html">📅 Original date posted:2022-09-27 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsz4uayd4smgxddlzhjeanv0k57mxktrxadl6czgtxpztrukvwm3tqzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxz44atqw" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs8ra7e6tygpngwvv2zdlh05yp74766ukf6pv0lm0pteruehzgkvtchz2utu&#39;&gt;nevent1q…2utu&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-09-27&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning aj, Rene, and all,&lt;br/&gt;&lt;br/&gt;So let me discuss a little more about how I model the forwarding nodes.&lt;br/&gt;&lt;br/&gt;Forwarding nodes want to maximize profit.&lt;br/&gt;&lt;br/&gt;Forwarding nodes sell liquidity.&lt;br/&gt;&lt;br/&gt;If a forwarding node runs out of stock of liquidity (i.e. their channel is unbalanced against the direction a payment request fails) they earn 0 profit.&lt;br/&gt;&lt;br/&gt;If a forwarding node finds a liquidity being sold at a lower price than they would be able to sell it, they will buy out the cheaper stock and then resell it at a higher price.&lt;br/&gt;This is called rebalancing.&lt;br/&gt;In particular:&lt;br/&gt;&lt;br/&gt;* Other economic activity is likely to be &amp;#34;has to happen at a particular time&amp;#34;.&lt;br/&gt;  * The intuition here is that people are not going to pay until they become interested in purchasing a product, and only then will they actually send out an HTLC.&lt;br/&gt;* Rebalances (i.e. hostile takeover bids of cheap liquidity) are &amp;#34;can happen at any time&amp;#34;.&lt;br/&gt;* Thus, rebalances are likely to occur &amp;#34;first&amp;#34;, because they can happen at any time, and can be done right now, whereas payments will need to wait until somebody somewhere is interested in paying.&lt;br/&gt;* Thus, channels advertising low fees are likely to have their liquidity bought out by patient forwarding nodes.&lt;br/&gt;&lt;br/&gt;The above implies that any &amp;#34;payment size distribution&amp;#34; can, and *will*, be manipulated by forwarding nodes out to buy out cheap liquidity.&lt;br/&gt;If you introduce an artificial impediment and say &amp;#34;I will only accept payment sizes below N millisats&amp;#34;, and then go &amp;#34;I will #zerofeerouting guy&amp;#34;, then a forwarding node will just split their rebalance into quanta of N millisats and make a spike in the payment size distribution and drain your channel anyway, so that they can turn around and resell the liquidity at a higher price later.&lt;br/&gt;&lt;br/&gt;This also suggests to me that fees being paid by out-of-band means (i.e. &amp;#34;monetizing outside of the Lightning forwarding fees&amp;#34;) is likely to fail, because forwarding nodes will exploit that and do a hostile takeover of the cheap liquidity.&lt;br/&gt;i.e. #zerofeerouting will never be a reliable forwarding node, because all the other forwarding nodes will be taking their liquidity for cheap long before you think to make a payment through them.&lt;br/&gt;&lt;br/&gt;Rebalances cannot be differentiated from payments unless you force publication of source and destination (and even if you forced that, people can lie about who the *real* source and *real* destination are, so why bother).&lt;br/&gt;And rebalances are going to target cheap liquidity and will avoid any non-fee valves you impose.&lt;br/&gt;&lt;br/&gt;Invisible hand wins, yo.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:06:53&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsgxpyv7zxla97su3j0ayh4pz0qmydmm6fcpqmr0eqzgxkddh9mt9szypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzdws4kr</id>
    
      <title type="html">📅 Original date posted:2022-09-25 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsgxpyv7zxla97su3j0ayh4pz0qmydmm6fcpqmr0eqzgxkddh9mt9szypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzdws4kr" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs8vavsua63x5h8wscd89sqthx0zt2r4z6lsmut58n803x3u0234pgn8pc9y&#39;&gt;nevent1q…pc9y&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-09-25&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning aj, and Rene,&lt;br/&gt;&lt;br/&gt;&amp;gt; * you&amp;#39;re providing a way of throttling payment traffic independent of&lt;br/&gt;&amp;gt; fees -- since fees are competitive, they can have discontinuous effects&lt;br/&gt;&amp;gt; where a small change to fee can cause a large change to traffic volume;&lt;br/&gt;&amp;gt; but this seems like it should mostly have a proportional response,&lt;br/&gt;&amp;gt; with a small decrease in htlc_max_msat resulting in a small decrease in&lt;br/&gt;&amp;gt; payment volume, and conversely. Much better for stability/optimisation!&lt;br/&gt;&lt;br/&gt;This may depend on what gets popular for sender algorithms.&lt;br/&gt;&lt;br/&gt;Senders may quantize their payments, i.e. select a &amp;#34;standard&amp;#34; value and divide all payments into multipath sub-payments of this value.&lt;br/&gt;&lt;br/&gt;* Simplifies the computation of base fee when using a min-cost solver.&lt;br/&gt;* Simplifies the design of splitting/merging decisions if not using a min-cost solver.&lt;br/&gt;* Improves privacy once we have PTLCs (if most senders use the same standard value, it is much harder to figure out if two sub-payments, with approximately the same standard quantum, belong to the same payment or not).&lt;br/&gt;&lt;br/&gt;If so, then we expect a large discontinuity for the `htlc_max_msat` vs `htlcs_sent` curve around whatever selected quantum there is.&lt;br/&gt;If you set `htlc_max_msat` below this quantum your expected number of payments forwarded will drop to near 0, but a little above that and you might very well saturate since all payments are quantized anyway.&lt;br/&gt;&lt;br/&gt;At least fees gets you basic economics of supply and demand, and is a natural throttle in all markets, including liquidity markets.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:06:52&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsre3ejv3fuz03cxrzm4hygjghz4rn0jervdevly9t8fwyqt88rvjqzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzu7hw0a</id>
    
      <title type="html">📅 Original date posted:2022-09-25 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsre3ejv3fuz03cxrzm4hygjghz4rn0jervdevly9t8fwyqt88rvjqzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzu7hw0a" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsgxpyv7zxla97su3j0ayh4pz0qmydmm6fcpqmr0eqzgxkddh9mt9sdwz0pf&#39;&gt;nevent1q…z0pf&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-09-25&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning again aj, and Rene,&lt;br/&gt;&lt;br/&gt;&amp;gt; Good morning aj, and Rene,&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; &amp;gt; * you&amp;#39;re providing a way of throttling payment traffic independent of&lt;br/&gt;&amp;gt; &amp;gt; fees -- since fees are competitive, they can have discontinuous effects&lt;br/&gt;&amp;gt; &amp;gt; where a small change to fee can cause a large change to traffic volume;&lt;br/&gt;&amp;gt; &amp;gt; but this seems like it should mostly have a proportional response,&lt;br/&gt;&amp;gt; &amp;gt; with a small decrease in htlc_max_msat resulting in a small decrease in&lt;br/&gt;&amp;gt; &amp;gt; payment volume, and conversely. Much better for stability/optimisation!&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; This may depend on what gets popular for sender algorithms.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Senders may quantize their payments, i.e. select a &amp;#34;standard&amp;#34; value and divide all payments into multipath sub-payments of this value.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; * Simplifies the computation of base fee when using a min-cost solver.&lt;br/&gt;&amp;gt; * Simplifies the design of splitting/merging decisions if not using a min-cost solver.&lt;br/&gt;&amp;gt; * Improves privacy once we have PTLCs (if most senders use the same standard value, it is much harder to figure out if two sub-payments, with approximately the same standard quantum, belong to the same payment or not).&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; If so, then we expect a large discontinuity for the `htlc_max_msat` vs `htlcs_sent` curve around whatever selected quantum there is.&lt;br/&gt;&amp;gt; If you set `htlc_max_msat` below this quantum your expected number of payments forwarded will drop to near 0, but a little above that and you might very well saturate since all payments are quantized anyway.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; At least fees gets you basic economics of supply and demand, and is a natural throttle in all markets, including liquidity markets.&lt;br/&gt;&lt;br/&gt;Basically, the intuition &amp;#34;small decrease in `htlc_max_msat` == small decrease in payment volume&amp;#34; inherently assumes that HTLC sizes have a flat distribution across all possible sizes.&lt;br/&gt;The `htlc_max_msat` vs `payment_volume` curve is basically the integral of the distribution of HTLC sizes.&lt;br/&gt;But:&lt;br/&gt;&lt;br/&gt;* As above, senders might quantize, and if some standard quantum becomes popular, the distribution is really a spike around the standard quantum, and there is a massive discontinuity there.&lt;br/&gt;* Coffee or other popular everyday product may settle on a standard price, which again implies a spike around that standard price.&lt;br/&gt;&lt;br/&gt;So the reliability of `htlc_max_msat` as a valve is dependent on market forces, and may be as non-linear as feerates, which *are* the sum total of the market force.&lt;br/&gt;&lt;br/&gt;Feerates on the other hand are always going to be something that senders optimize for, because obviously senders will have a maximum amount they will be willing to pay in fees (as before, the intuition here is that the maximum fee senders are willing to pay is equivalent to the difference in subjective value between the millisatoshis they are sending and the service/product they are purchasing).&lt;br/&gt;Whatever future sender algorithms are devised, feerates will still work consistently as a valve, whreas `htlc_max_msat` may fail in a future where sender algorihms quantize the payments around some standard quantum for privacy and ease-of-implementation purposes.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:06:52&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqszgvra8v26v3et7jzj3tneeenrkjnw3ea7uf93smhdnpryezl9l6qzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzd38xxr</id>
    
      <title type="html">📅 Original date posted:2022-09-22 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqszgvra8v26v3et7jzj3tneeenrkjnw3ea7uf93smhdnpryezl9l6qzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzd38xxr" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqst4qmn29myy8egjtlxaqyr06l9qcrd3x220e99av00pc7l8unqu7qv5cp45&#39;&gt;nevent1q…cp45&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-09-22&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning Dave,&lt;br/&gt;&lt;br/&gt;&amp;gt; On 2022-09-13 11:15, lisa neigut wrote:&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; &amp;gt; Hi all,&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Hi Lisa,&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Thank you for describing this idea in detail on the mailing list.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; &amp;gt; A ratecard is a set of four values, positive or negative, that price&lt;br/&gt;&amp;gt; &amp;gt; different bands of available liquidity for a channel.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Am I understanding correctly that this implies spenders wanting to send&lt;br/&gt;&amp;gt; an LN payment will either need to estimate the current division of funds&lt;br/&gt;&amp;gt; for every hop along their projected path or will need to pay the highest&lt;br/&gt;&amp;gt; ratecard for each hop? How are spenders supposed to make those&lt;br/&gt;&amp;gt; estimates about the division of funds in distant channels?&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; If there&amp;#39;s no easy and network-friendly way for spenders to gather that&lt;br/&gt;&amp;gt; information, I would worry that will lead to the creation of services&lt;br/&gt;&amp;gt; which do collect the info and which become central to LN&amp;#39;s operation.&lt;br/&gt;&lt;br/&gt;As I understand it, it is exactly the same way that is done currently: the sender optimistically tries a route with a particular feerate, and if that fails, tries another route.&lt;br/&gt;&lt;br/&gt;Basically, you can model a rate card as four separate channels between the same two nodes, with different costs each.&lt;br/&gt;If the path at the lowest cost fails, you just try at another route that may have more hops but lower effective cost, or else try the same channel at a higher cost.&lt;br/&gt;&lt;br/&gt;If your concern is valid, one wonders why it would not already exist now in the current network where try-and-try-again is the standard overall algorithm for payments.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:06:48&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsw97jcdqyydhkwm3y9mma90pqsujk66tkkx0zfvrsjnvxwqr82llgzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzcg6xxz</id>
    
      <title type="html">📅 Original date posted:2022-08-26 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsw97jcdqyydhkwm3y9mma90pqsujk66tkkx0zfvrsjnvxwqr82llgzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzcg6xxz" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs84x9dvpha5fn2c299zqucm7qrzmuh76mmvtjz5g2utjpjq60tfts4euzzf&#39;&gt;nevent1q…uzzf&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-08-26&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning Rene,&lt;br/&gt;&lt;br/&gt;&amp;gt; Dear fellow Lightning Developers,&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; I was recently on an event where the visitors have been gifted 10k sats on a custodial wallet. They could spend those sats via some web interface and an NFC card. During the event I was contacted by several plebs who were confused about one particular thing:&lt;br/&gt;&amp;gt; It was impossible for them to withdraw the full amount from the service.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Pasting an invoice for 10k sats would not work as the custodial service required a fee budget of 1%. However if people submitted an invoice for 9900 sats the remaining 100 sats were usually not fully required for the fees. Thus the users may have had a leftover of for example 67 sats. Now the problem repeated on the residual amount. While some services seem to have a drain feature for such a situation I find this frustrating and was wondering if we could help directly on a protocol level.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; Here is my proposal for a simple solution to this specific problem: `option_recipient_pays_routing_fees`&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; This would be a new flag in invoices signaling that the recipient is willing to pay for the routing fees by releasing the preimage even if the full amount has not been arrived in htlcs at the recipient.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; So the workflow would be the following:&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; 1. Alice creates an invoice for 10k sats setting the `option_recipient_pays_routing_fees` flag in the invoice and passes it either to custodial user Bob or to her own custodial account.&lt;br/&gt;&amp;gt; 2. The payer parses the invoice and searches for a payment path or payment flow to Alice.&lt;br/&gt;&amp;gt; 3. Because `option_recipient_pays_routing_fee` is set, the onion is not constructed in a way that the final HTLC will be for the amount of 10k sats but rather in a way that the first htlc will be for 10k sats and the following HTLCs will be of decreasing value so that routing nodes are compensated properly.&lt;br/&gt;&amp;gt; 4. When the HTLC(s) arrive at Alice she will release the preimage if and only if not too many sats (e.g. 1% of the amount) are missing. Of course it would be good if the 1% was not hard coded in the protocol / software but configurable by Alice at the time of invoice creation.&lt;br/&gt;&amp;gt; &lt;br/&gt;&amp;gt; I think the main issue with this proposal is that instead of confusing users who wish to drain an account we may now have to educate users about two different invoice types. On the other hand I think this can probably easily be achieved via the current wide spread user interfaces. Of course it may be nice to have folks from the Bitcoin Design community to join this specific part of the discussion.&lt;br/&gt;&lt;br/&gt;In theory, trampoline routes / whatever-the-cool-name-is-now should fix this problem as well.&lt;br/&gt;I am referring to that scheme where the invoice contains an onion and a &amp;#34;trampoline&amp;#34; node that is the only node that can decrypt the first layer of the onion.&lt;br/&gt;The sender then has to route to the trampoline node, and the trampoline node then receives the rest of the onion.&lt;br/&gt;&lt;br/&gt;In this scheme, the receiver provides an encrypted route from some node to itself.&lt;br/&gt;As the receiver provides the route in order to gain privacy from the sender, the onus is on the receiver to deduct the fees from its received funds.&lt;br/&gt;i.e. the sender is only responsible for paying for fees up to the entry point of the trampoline.&lt;br/&gt;&lt;br/&gt;Thus, such a drain requirement simply means that the custodial service has to give its node ID.&lt;br/&gt;Then the receiver finds a route from the custodial service to itself, and encodes that in the trampoline onion, with a direct neighbor of the custodial service node as the trampoline.&lt;br/&gt;The custodial service then does not care about any fees as the receiver decided the route; the receiver knows exactly how much to expect (since it calculated the route).&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Of course, it is also possible as you propose, but any level-1-selfish custodial service will then always keep the remaining fee budget and always ensure that the receiver gets 99% of the value (or 100% - whatever_setting_they_chose), paying fees, and keeping the remaining 1% for itself.&lt;br/&gt;The receiver in this case cannot audit the route anyway, and thus cannot determine how much the true fees are; whereas in the trampoline case the route is specifically selected by the receiver.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:06:43&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsypjmnmzj3g2v0h3ln0denvcd762qdcgdj4esh7hu3an5jr2t90ngzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzpvvush</id>
    
      <title type="html">📅 Original date posted:2022-06-27 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsypjmnmzj3g2v0h3ln0denvcd762qdcgdj4esh7hu3an5jr2t90ngzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzpvvush" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqspr3z74lq6fu3fau6zvkxfegjsnc5nhh7sdq5y6muksp8tzufdycq825605&#39;&gt;nevent1q…5605&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-06-27&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning list,&lt;br/&gt;&lt;br/&gt;This is a short (relative to my typical crap) writeup on some strategies that Lightning forwarding nodes might utilize.&lt;br/&gt;&lt;br/&gt;I have been thinking of various strategies that actual node operators (as I understood from discussing with a few of them) use:&lt;br/&gt;&lt;br/&gt;* Passive rebalance / feerate by balance&lt;br/&gt;  * Set feerates according to balance: increase feerates when our side has low balance, reduce feerates when our side has high balance.&lt;br/&gt;  * &amp;#34;passive rebalance&amp;#34; because we are basically encouraging payments via our channel if the balance is in our favor, and discouraging payments if the balance is against us, thus typical payments will &amp;#34;normally&amp;#34; rebalance our node naturally without us spending anything.&lt;br/&gt;* Low fee&lt;br/&gt;  * Just fix the fee to a low fee, e.g. base 1 proportional 1 or even the @zerofeerouting guy of base 0 proportional 0.&lt;br/&gt;  * Ridiculously simple, no active management, no scripts, no nothing.&lt;br/&gt;* Wall&lt;br/&gt;  * Set to a constant (or mostly constant) high feerate.&lt;br/&gt;  * Actively rebalance, targeting low-fee routes (i.e. less than our earnings), and constantly probe the network for the rare low-fee routes that we can use to rebalance.&lt;br/&gt;  * Basically, buy cheap liquidity and resell it at higher prices.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;The interesting thing is how the three interact.&lt;br/&gt;&lt;br/&gt;Suppose we have a mixed network composed ONLY of passive rebalancers and walls.&lt;br/&gt;In that case, the passive rebalancers might occasionally set channels to low fees, in which case the walls buy up their liquidity, but eventually the liquidity of the passive rebalancer is purchased and the passive rebalancer raises their price point.&lt;br/&gt;The network then settles with every forwarding node having roughly equal balance on their channels, but note that it was the walls who paid to the passive rebalancers to get the channels into a nice balance.&lt;br/&gt;In particular, if there were only a single wall node, it can stop rebalancing once the price to rebalance costs more than 49% of its earnings, so it paid 49% of its earnings to the passive rebalancers and keeps 51% of its earnings, thus earning more than the passive rebalancers earn.&lt;br/&gt;However, once multiple wall nodes exist, they will start bidding for the available liquidity from the passive rebalancers and the may find it difficult to compete once the passive rebalancers set their feerates to more than 50% of the wall feerate, at which point the passive rebalancers now end up earning more than the wall nodes (because the wall nodes now pay more to the passive rebalancers than what they keep).&lt;br/&gt;&lt;br/&gt;Thus, it seems to me that passive rebalancers would outcompete wall strategies, if they were the only strategies on the network.&lt;br/&gt;&lt;br/&gt;However, the network as-is contains a LOT of tiny nodes with low feerates.&lt;br/&gt;&lt;br/&gt;In such an environment, walls can pick up liquidity for really, really cheap, leaving the low-feerate nodes with no liquidity in the correct direction.&lt;br/&gt;And thus, it seems plausible that they can resell the liquidity later at much higher feerates, possibly outcompeting the passive rebalancers.&lt;br/&gt;&lt;br/&gt;Unfortunately:&lt;br/&gt;&lt;br/&gt;* Low feerate nodes are notoriously unreliable for payments; their channels are usually saturated in one side or another. since walls keep taking their liquidity.&lt;br/&gt;  * Because of this known unreliability, some payer strategies filter them out via some heuristics (e.g. payment unreliability information).&lt;br/&gt;    Thus, even in the rare case where payment flows change on the network, they are not used by payers --- instead, walls exploit them since walls do not care if rebalancing fails, they will always just retry later.&lt;br/&gt;* One argument FOR using low-feerate nodes is that it &amp;#34;supports the network&amp;#34;.&lt;br/&gt;  * However, it seems to me that the low-feerate nodes are actually being exploited by the wall nodes instead, and the low-feerate nodes have too little payment reliability to actually support payers instead of large-scale forwarders.&lt;br/&gt;* Both low-feerates and walls do not leak their channel balances, whereas passive rebalancers do leak their channel balance.&lt;br/&gt;&lt;br/&gt;The above is just some thinking of mine --- actual experimentation on models or on actual network nodes might be better than my speculation.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:06:23&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsdr3hfp8gfwk2ua2xl2mvawf3lcyycl37avgewg32n6hzj0c6du6gzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzshvmw3</id>
    
      <title type="html">📅 Original date posted:2022-06-14 📝 Original message: &amp;gt; ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsdr3hfp8gfwk2ua2xl2mvawf3lcyycl37avgewg32n6hzj0c6du6gzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzshvmw3" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqstltk6aq7jaum2rgrzxk4pdule92sl6jewvzsev95agf98lj4nt5gy2mtxq&#39;&gt;nevent1q…mtxq&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-06-14&lt;br/&gt;📝 Original message:&lt;br/&gt;&amp;gt; ## Lightning Gossip&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; # Gossip V2: Now Or Later?&lt;br/&gt;&lt;br/&gt;&amp;lt;snip&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; A proposal for the &amp;#34;re-design the entire thing&amp;#34; was floated in the past by&lt;br/&gt;&amp;gt; Rusty [6]. It does away with the strict coupling of channels to channel&lt;br/&gt;&amp;gt; announcements, and instead moves them to the _node_ level. Each node would&lt;br/&gt;&amp;gt; then advertise the set of &amp;#34;outputs&amp;#34; they have control of, which would then&lt;br/&gt;&amp;gt; be mapped to the total capacity of a node, without requiring that these&lt;br/&gt;&amp;gt; outputs self identify themselves on-chain as Lightning Channels. This also&lt;br/&gt;&amp;gt; opens up the door to different, potentially more privacy preserving&lt;br/&gt;&amp;gt; proofs-of-channel-ownership (something something zkp).&lt;br/&gt;&lt;br/&gt;waxwing recently posted something interesting over in bitcoin-dev, which seems to match the proof-of-channel-ownereship.&lt;br/&gt;&lt;br/&gt;&lt;a href=&#34;https://gist.github.com/AdamISZ/51349418be08be22aa2b4b469e3be92f&#34;&gt;https://gist.github.com/AdamISZ/51349418be08be22aa2b4b469e3be92f&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;I confess to not understanding the mathy bits but it seems to me, naively, that the feature set waxwing points out match well with the issues we want to have:&lt;br/&gt;&lt;br/&gt;* We want to rate-limit gossip somehow.&lt;br/&gt;* We want to keep the mapping of UTXOs to channels private.&lt;br/&gt;&lt;br/&gt;It requires a global network that cuts across all uses of the same mechanism (similar to defiads, but more private --- basically this means that it cannot be just Lightning which uses this mechanism, at least to acquire tokens-to-broadcast-my-channels) to prevent a UTXO from being reused across services, a property I believe is vital to the expected spam-resistance.&lt;br/&gt;&lt;br/&gt;&amp;gt; # Friend-of-a-friend Balance Sharing &amp;amp; Probing&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; A presentation was given on friend-of-a-friend balance sharing [16]. The&lt;br/&gt;&amp;gt; high level idea is that if we share _some_ information within a local&lt;br/&gt;&amp;gt; radius, then this gives the sender more information to choose a path that&amp;#39;s&lt;br/&gt;&amp;gt; potentially more reliable. The tradeoff here ofc is that nodes will be&lt;br/&gt;&amp;gt; giving away more information that can potentially be used to ascertain&lt;br/&gt;&amp;gt; payment flows. In an attempt to minimize the amount of information shared,&lt;br/&gt;&amp;gt; the presenter proposed that just 2 bits of information be shared. Some&lt;br/&gt;&amp;gt; initial simulations showed that sharing local information actually performed&lt;br/&gt;&amp;gt; better than sharing global information (?). Some were puzzled w.r.t how&lt;br/&gt;&amp;gt; that&amp;#39;s possible, but assuming the slides&#43;methods are published others can&lt;br/&gt;&amp;gt; dig further into the model/parameter used to signal the inclusion.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Arguably, information like this is already available via probing, so one&lt;br/&gt;&amp;gt; line of thinking is something like: &amp;#34;why not just share _some_ of it&amp;#34; that&lt;br/&gt;&amp;gt; may actually lead to less internal failures? This is related to a sort of&lt;br/&gt;&amp;gt; tension between probing as a tool to increase payment reliability and also&lt;br/&gt;&amp;gt; as a tool to degrade privacy in the network. On the other hand, others&lt;br/&gt;&amp;gt; argued that probing provides natural cover traffic, since they actually&lt;br/&gt;&amp;gt; _are_ payments, though they may not be intended to succeed.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On the topic of channel probing, a sort of makeshift protocol was devised to&lt;br/&gt;&amp;gt; make it harder in practice, sacrificing too much on the axis of payment&lt;br/&gt;&amp;gt; reliability. At a high level it proposes that:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * nodes more diligently set both their max_htlc amount, as well as the&lt;br/&gt;&amp;gt; max_htlc_value_in_flight amount&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * a 50ms (or select other value) timer should be used when sending out&lt;br/&gt;&amp;gt; commitment signatures, independent of HTLC arrival&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * nodes leverage the max_htlc value to set a false ceiling on the max in&lt;br/&gt;&amp;gt; flight parameter&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * for each HTLC sent/forwarded, select 2 other channels at random and&lt;br/&gt;&amp;gt; reduce the &amp;#34;fake&amp;#34; in-flight ceiling for a period of time&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Some more details still need to be worked out, but some felt that this would&lt;br/&gt;&amp;gt; kick start more research into this area, and also make balance mapping&lt;br/&gt;&amp;gt; _slightly_ more difficult. From afar, it may be the case that achieving&lt;br/&gt;&amp;gt; balance privacy while also achieving acceptable levels of payment&lt;br/&gt;&amp;gt; reliability might be at odds with each other.&lt;br/&gt;&lt;br/&gt;A point that was brought up is that nodes can lie about their capacity, and there would be no way to counteract this.&lt;br/&gt;&lt;br/&gt;Even given the above, it would be trivial for a lying node to randomly lie about their `max_htlc` to still be noticed by nodes who try to filter out nodes who do not update their `max_htlc`s.&lt;br/&gt;(maximal lying is to always say 50% of your capacity is in `max_htlc`, your node can lie by setting `max_htlc` from 35%-&amp;gt;65%, you can coordinate this with another lying peer node too by use of an odd message number to set up the lying protocol so both of you can lie about the channel capacity consistently)&lt;br/&gt;&lt;br/&gt;I think your best bet is really to utilize feerates, as lying with those is expected to lead to economic loss.&lt;br/&gt;&lt;br/&gt;&amp;lt;snip&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; # Node Fee Optimization &amp;amp; Fee Rate Cards&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Over the past few years, a common thread we&amp;#39;ve seen across successful&lt;br/&gt;&amp;gt; routing nodes is dynamic fee setting as a way to encourage/discourage&lt;br/&gt;&amp;gt; traffic. A routing nodes can utilize the set of fees of a channel to either&lt;br/&gt;&amp;gt; make it too expensive for other nodes to route through (it&amp;#39;s already&lt;br/&gt;&amp;gt; depleted don&amp;#39;t try unless you&amp;#39;ll give be 10 mil sats, which no one would) or&lt;br/&gt;&amp;gt; very cheap, which&amp;#39;ll incentivize flows in the other direction. If all nodes&lt;br/&gt;&amp;gt; are constantly sending out updates of this nature, then it can generate a&lt;br/&gt;&amp;gt; lot of traffic, and also sort of leak more balance information overtime&lt;br/&gt;&amp;gt; (which some nodes are already doing: using fees/max_htlc to communicate&lt;br/&gt;&amp;gt; available balances).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; One attendee proposed allowing nodes to express a sort of fee gradient via a&lt;br/&gt;&amp;gt; static curve/bucket/function, instead of dynamically communicating what the&lt;br/&gt;&amp;gt; latest state of the fee&#43;liquidity distribution looks like. A possible&lt;br/&gt;&amp;gt; manifestation could be a series of buckets, each of which with varying fee&lt;br/&gt;&amp;gt; rates. If your payment consumes 50% of channel balance, then you pay this&lt;br/&gt;&amp;gt; rate, otherwise if it&amp;#39;s 5% you pay this rate, etc, etc.&lt;br/&gt;&lt;br/&gt;I think this is not what was actually proposed?&lt;br/&gt;&lt;br/&gt;As I understood it, the percent range is not how much the payment consumes of the channel balance but instead the percent range is the probability-of-success given a uniform distribution of channel balance.&lt;br/&gt;&lt;br/&gt;For instance if the current channel balance is currently 67%, then the forwarding node will succeed all payments that pay a fee from the 33% fee card or higher, otherwise fail the payment with &amp;#34;not enough fees&amp;#34;.&lt;br/&gt;&lt;br/&gt;The intent is that payers will treat 100% - fee_card_percent as the probability-of-failure of that channel, and can select which fee card maximizes both its probability-of-failure and max-fee in some kind of reasonable exchange rate.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:06:13&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqszq2df99f3kwml4d0llwjwu6d7m8yd5dzsscqpphvystwuetgjt6szypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxz03j6sj</id>
    
      <title type="html">📅 Original date posted:2022-06-29 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqszq2df99f3kwml4d0llwjwu6d7m8yd5dzsscqpphvystwuetgjt6szypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxz03j6sj" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsqsjztnpm4s2sy9gukzh90mvhe2tpjzj9e7c2f9j3r68lsk6x0e0gtrrec0&#39;&gt;nevent1q…rec0&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-06-29&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning aj,&lt;br/&gt;&lt;br/&gt;&amp;gt; On Sun, Jun 05, 2022 at 02:29:28PM &#43;0000, ZmnSCPxj via Lightning-dev wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Just sharing my thoughts on this.&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; Optimize for reliability&#43;&lt;br/&gt;&amp;gt; &amp;gt; uncertainty&#43;fee&#43;drain&#43;uptime...&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; / \&lt;br/&gt;&amp;gt; &amp;gt; / \&lt;br/&gt;&amp;gt; &amp;gt; / \&lt;br/&gt;&amp;gt; &amp;gt; --&amp;#39; `--&lt;br/&gt;&amp;gt; &amp;gt; Just Just&lt;br/&gt;&amp;gt; &amp;gt; optimize optimize&lt;br/&gt;&amp;gt; &amp;gt; for for&lt;br/&gt;&amp;gt; &amp;gt; low fee low fee&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I think ideally you want to optimise for some combination of fee, speed&lt;br/&gt;&amp;gt; and reliability (both liklihood of a clean failure that you can retry&lt;br/&gt;&amp;gt; and of generating stuck payments). As Matt/Peter suggest in another&lt;br/&gt;&amp;gt; thread, maybe for some uses you can accept low speed for low fees,&lt;br/&gt;&amp;gt; while in others you&amp;#39;d rather pay more and get near-instant results. I&lt;br/&gt;&amp;gt; think drain should just go to fee, and uncertainty/uptime are just ways&lt;br/&gt;&amp;gt; of estimating reliability.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; It might be reasonable to generate local estimates for speed/reliability&lt;br/&gt;&amp;gt; by regularly sending onion messages or designed-to-fail htlcs.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Sorry if that makes me a midwit :)&lt;br/&gt;&lt;br/&gt;Actually feerate cards help with this; it just requires an economic insight to translate probability-of-success to an actual cost that the payer incurs.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; ### Inverting The Filter: Feerate Cards&lt;br/&gt;&amp;gt; &amp;gt; Basically, a feerate card is a mapping between a probability-of-success range and a feerate.&lt;br/&gt;&amp;gt; &amp;gt; * 00%-&amp;gt;25%: -10ppm&lt;br/&gt;&amp;gt; &amp;gt; * 26%-&amp;gt;50%: 1ppm&lt;br/&gt;&amp;gt; &amp;gt; * 51%-&amp;gt;75%: 5ppm&lt;br/&gt;&amp;gt; &amp;gt; * 76%-&amp;gt;100%: 50ppm&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Feerate cards don&amp;#39;t really make sense to me; &amp;#34;probability of success&amp;#34;&lt;br/&gt;&amp;gt; isn&amp;#39;t a real measure the payer can use -- naively, if it were, they could&lt;br/&gt;&amp;gt; just retry at 1ppm 10 times and get to 95% chances of success. But if&lt;br/&gt;&amp;gt; they can afford to retry (background rebalancing?), they might as well&lt;br/&gt;&amp;gt; just try at -10ppm, 1ppm, 5ppm, 10ppm (or perhaps with a binary search?),&lt;br/&gt;&amp;gt; and see if they&amp;#39;re lucky; but if they want a 1s response time, and can&amp;#39;t&lt;br/&gt;&amp;gt; afford retries, what good is even a 75% chance of success if that&amp;#39;s the&lt;br/&gt;&amp;gt; individual success rate on each hop of their five hop path?&lt;br/&gt;&lt;br/&gt;The economic insight here is this:&lt;br/&gt;&lt;br/&gt;* The payer wants to pay because it values a service / product more highly than the sats they are spending.&lt;br/&gt;* There is a subjective difference in value between the service / product being bought and the amount to be spent.&lt;br/&gt;  * In short, if the payment succeeds and the service / product is acquired, then the payer perceives itself as richer (increased utilons) by that subjective difference.&lt;br/&gt;* If payment fails, then the payer incurs an opportunity cost, as it is unable to utilize the difference in subjective value between the service / product and the sats being spent.&lt;br/&gt;  * Thus, the subjective difference in value between the service / product being bought, and the sats to be paid, is the cost of payment failure.&lt;br/&gt;* That difference in value is the &amp;#34;fee budget&amp;#34; that Lightning Network payment algorithms all require as an argument.&lt;br/&gt;  * If the LN fee total is greater than the fee budget, the payment algorithm will reject that path outright.&lt;br/&gt;  * If the LN fee total is greater than the subjective difference in value between the service / product being bought and the amount to be delivered at the destination, then the payer gets negative utility and would prefer not to continue paying --- which is exactly what the payment algorithm does, it rejects such paths.&lt;br/&gt;&lt;br/&gt;Therefore the fee budget is the cost of failure.&lt;br/&gt;&lt;br/&gt;We can now use the left-hand side of the feerate card table, by multiplying `100% - middle_probability_of_success` (i.e. probability of failure) by the fee budget (i.e. cost of failure), and getting the cost-of-failure-for-this-entry.&lt;br/&gt;We then evaluate the fee card by plugging this in to each entry of the feerate card, and picking which entry gives the lowest total fee.&lt;br/&gt;This is then added as a fee in payment algorithms, thus translated down to &amp;#34;just optimize for low fee&amp;#34;.&lt;br/&gt;&lt;br/&gt;If the above logic seems dubious, consider this:&lt;br/&gt;&lt;br/&gt;* Nodes utilizing wall strategies and doing lots of rebalancing put low limits on the fee budget of the rebalancing cost.&lt;br/&gt;  * These nodes are willing to try lots of possible routes, hoping to nab the liquidity of a low-fee node on the cheap in order to resell it later.&lt;br/&gt;  * i.e. those nodes are fine with taking a long time to successfully route a payment from themselves to themselves; they absolutely insist on low fees or else they will not earn anything.&lt;br/&gt;  * Such nodes are fine with low probability of success.&lt;br/&gt;  * Being fine with low probability of success means that the effect of the left-hand side of the feerate card is smaller and such nodes will tend to get the low probability of success entries.&lt;br/&gt;* Buyers getting FOMOed into buying some neat new widget want to get their grubby hands on the widget ASAP.&lt;br/&gt;  * These nodes are willing to pay a premium to get the neat new widget RIGHT NOW.&lt;br/&gt;  * i.e. these nodes will be willing to provide a higher fee budget.&lt;br/&gt;  * Being fine with a higher fee budget means that the effect of the left-hand side of the feerate card is larger and such nodes will tend to get the high probability of success entries.&lt;br/&gt;&lt;br/&gt;Thus feerate cards may very well unify a fair amount of the concerns we have.&lt;br/&gt;&lt;br/&gt;All costs are economic costs.&lt;br/&gt;&lt;br/&gt;&amp;gt; And if you&amp;#39;re not just going by odds of having to retry, then you need to&lt;br/&gt;&amp;gt; get some current information about the channel to plug into the formula;&lt;br/&gt;&amp;gt; but if you&amp;#39;re getting current information, why not let that information&lt;br/&gt;&amp;gt; be the feerate directly?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; More concretely, we set some high feerate, impose some kind of constant &amp;#34;gravity&amp;#34; that pulls down the feerate over time, then we measure the relative loss of outgoing liquidity to serve as &amp;#34;lift&amp;#34; to the feerate.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If your current fee rate is F (ppm), and your current volume (flow) is V&lt;br/&gt;&amp;gt; (sats forwarded per hour), then your profit is FV. If dropping your fee&lt;br/&gt;&amp;gt; rate by dF (&amp;lt;0) results in an increase of V by dV (&amp;gt;0), then you want:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; (F&#43;dF)(V&#43;dV) &amp;gt; FV&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; FV &#43; VdF &#43; FdV &#43; dFdV &amp;gt; FV&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; FdV &amp;gt; -VdF&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; dV/dF &amp;lt; -V/F (flip the inequality because dF is negative)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; (dV/V)/(dF/F) &amp;lt; -1 (fee-elasticity of volume is in the elastic&lt;br/&gt;&amp;gt; region)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; (&amp;lt;-1 == elastic == flow changes more than the fee does == drop the fee&lt;br/&gt;&amp;gt; rate; &amp;gt;-1 == ineleastic == flow changes less than the fee does == raise&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; the fee rate; =-1 == unit elastic == you&amp;#39;ve found a locally optimal&lt;br/&gt;&amp;gt; fee rate)&lt;br/&gt;&lt;br/&gt;Thank you for the math!&lt;br/&gt;I was going to heuristic it and cross my fingers but this is probably a better framework.&lt;br/&gt;&lt;br/&gt;&amp;gt; You could optimise base fee in the same way, if you set F to be sats/tx&lt;br/&gt;&amp;gt; and V to be txs/hour, but then you&amp;#39;re trying to optimise two variables&lt;br/&gt;&amp;gt; on a 2 dimensional plane, which is harder. So probably better to do&lt;br/&gt;&amp;gt; zero base fees and just set it to 0 and ignore it, or use your actual&lt;br/&gt;&amp;gt; computation costs -- perhaps about 20msat if you&amp;#39;re paying $100USD/month&lt;br/&gt;&amp;gt; for your lightning node, a channel update takes 10ms, each forwarded HTLC&lt;br/&gt;&amp;gt; accounts for 4 updates, 2 on the incoming channel, 2 on the outgoing,&lt;br/&gt;&amp;gt; with no batching, and only 40% of payments are successful, at $20k/BTC.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; It&amp;#39;s likely more important to have balanced flows than maximally&lt;br/&gt;&amp;gt; profitable ones though, as that&amp;#39;s what allows you to keep your channel&lt;br/&gt;&amp;gt; open. That&amp;#39;s probably pretty hard to optimise, since a changed fee on&lt;br/&gt;&amp;gt; one channel will affect the volume on ther channels as well.&lt;br/&gt;&lt;br/&gt;But if you have balanced flows, then the steady state of your channel is that its balance is going to remain in some constant balance.&lt;br/&gt;Thus, heuristics that target getting your channel balance to the constant balance of 50% will work well enough to get you balanced flows.&lt;br/&gt;&lt;br/&gt;There is also the unfortunate fact that lots of nodes are badly managed and apparently do not periodically send out their funds, instead accumulating it on the LN.&lt;br/&gt;Handling those is what is being fixed by the rebalancing heuristics utilized by both passive rebalancers and walls.&lt;br/&gt;&lt;br/&gt;&amp;gt; Relatedly:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; I want to propose that all published nodes support some kind of&lt;br/&gt;&amp;gt; &amp;gt; onchain/offchain swap capability.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If you&amp;#39;re running a forwarding node, and collecting fees for forwarding,&lt;br/&gt;&amp;gt; considered in net your channels won&amp;#39;t be balanced: the fees you collect&lt;br/&gt;&amp;gt; are all coming in, and there&amp;#39;s nothing to compensate for that. Having some&lt;br/&gt;&amp;gt; way to send those fees &amp;#34;out&amp;#34; is necessary to keep your channels balanced&lt;br/&gt;&amp;gt; and avoid the need to have to close them. Having a swap capability like&lt;br/&gt;&amp;gt; this is perhaps a relatively easy way to be able to (automatically)&lt;br/&gt;&amp;gt; fix imbalances caused by collecting fees, and thus preserve your older&lt;br/&gt;&amp;gt; channels.&lt;br/&gt;&lt;br/&gt;Yes, people need to run more swap nodes, not more LSPs.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:06:09&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqszyaqr8pcjeee5jctfq6qxfmqfp06sclw5uyklv73z6m4kjjcdphgzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzwcav0s</id>
    
      <title type="html">📅 Original date posted:2022-06-05 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqszyaqr8pcjeee5jctfq6qxfmqfp06sclw5uyklv73z6m4kjjcdphgzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzwcav0s" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsysuy5ejp29y8cf4a6aykztl63ff95rsqn4fr2nyg7m4vglxjcpycnxqnlq&#39;&gt;nevent1q…qnlq&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-06-05&lt;br/&gt;📝 Original message:&lt;br/&gt;Introduction&lt;br/&gt;============&lt;br/&gt;&lt;br/&gt;    Bell Curve Meme (LEET ASCII ART SKILLZ)&lt;br/&gt;&lt;br/&gt;          Optimize for reliability&#43;&lt;br/&gt;           uncertainty&#43;fee&#43;drain&#43;uptime...&lt;br/&gt;                 .--~~--.&lt;br/&gt;                /        \&lt;br/&gt;               /          \&lt;br/&gt;              /            \&lt;br/&gt;             /              \&lt;br/&gt;            /                \&lt;br/&gt;        _--&amp;#39;                  `--_&lt;br/&gt;        Just                  Just&lt;br/&gt;      optimize              optimize&lt;br/&gt;        for                   for&lt;br/&gt;      low fee               low fee&lt;br/&gt;&lt;br/&gt;Recently, Rene Pickhardt (Chatham House rules note: I asked for explicit permission from Rene to reveal his name here) presented some work-in-progress thinking about a concept called &amp;#34;Price of Anarchy&amp;#34;.&lt;br/&gt;Roughly speaking, we can consider this &amp;#34;Price of Anarchy&amp;#34; as being similar to concepts such as:&lt;br/&gt;&lt;br/&gt;* The Cost of Decentralization of Bitcoin.&lt;br/&gt;* The cost of the Tragedy of the Commons.&lt;br/&gt;&lt;br/&gt;Briefly, we need to find a &amp;#34;dominant strategy&amp;#34; for payers and forwarding nodes.&lt;br/&gt;The &amp;#34;dominant strategy&amp;#34; is the strategy which optimizes:&lt;br/&gt;&lt;br/&gt;* For payers: minimizes their personal payment failures and fees.&lt;br/&gt;* For forwarders: maximizes their net earnings over time.&lt;br/&gt;&lt;br/&gt;Worse, the &amp;#34;dominant strategy&amp;#34; is a strategy that STILL works better than other strategies even if the other strategies are commonly used on the network, AND still work better even if everyone else is using the dominant strategy.&lt;br/&gt;The technical term here is &amp;#34;Nash equilibrium&amp;#34;, which is basically the above definition.&lt;br/&gt;&lt;br/&gt;This will cause some amount of payment failures and impose fees on payers.&lt;br/&gt;Now, we can compare the rate of payment failures and average fees, when everyone uses this specific dominant strategy, versus the following **imaginary** case:&lt;br/&gt;&lt;br/&gt;* There is a perfectly tr\*stable central coordinator with perfect knowledge (knows all channel balances and offline/online state of nodes) who decides the paths where payments go through, optimizing for reduced payment failures and reduced fees.&lt;br/&gt;  * Nobody is seriously proposing to install this, we are just trying to imagine how it would work and how much fees and payment failures are **IF** there were such a perfectly tr\*stable coordinator.&lt;br/&gt;&lt;br/&gt;The difference in the cost between the &amp;#34;dominant strategy&amp;#34; case and the &amp;#34;perfect ***IMAGINARY*** central coordinator&amp;#34;, is the Price of Anarchy.&lt;br/&gt;Anarchy here means that the dominant strategy is used due to every actor being free to use any strategy, and assuming that each actor is rational and tries to improve its goal.&lt;br/&gt;&lt;br/&gt;I will present a motivating example first which was presented to me directly, and then present a possibly dominant strategy for forwarding nodes, which *I think* causes the dominant strategy for forwarders to be &amp;#34;just optimize for low fees&amp;#34;.&lt;br/&gt;And I think this dominant strategy for forwarding nodes will lead to behavior that is reasonably close to the perfect-coordinator case.&lt;br/&gt;&lt;br/&gt;Braess Paradox&lt;br/&gt;==============&lt;br/&gt;&lt;br/&gt;Suppose we have the following network:&lt;br/&gt;&lt;br/&gt;    S ------------&amp;gt; A&lt;br/&gt;    |       0       |&lt;br/&gt;    |               |&lt;br/&gt;    |               |&lt;br/&gt;    |2             2|&lt;br/&gt;    |               |&lt;br/&gt;    |               |&lt;br/&gt;    v       0       v&lt;br/&gt;    B ------------&amp;gt; R&lt;br/&gt;&lt;br/&gt;The numbers above are the cost to transfer one satoshi.&lt;br/&gt;&lt;br/&gt;Let us suppose that all payers on the LSP `S` just want to send one satoshi payments to some merchant on LSP `R`.&lt;br/&gt;In the above case, we can expect that there is no preferred route between `S-&amp;gt;A-&amp;gt;R` vs `S-&amp;gt;B-&amp;gt;R` so in general, the load will be balanced between both possible routes.&lt;br/&gt;&lt;br/&gt;Now suppose we want to improve the Lightning Network and add a new channel, because obviously adding a new channel can only be a positive good because it gives more liquidity to the network amirite?&lt;br/&gt;&lt;br/&gt;Suppose A and B create a humongous large channel (because they are routing nodes, they want to have lots of liquidity with each other) which &amp;#34;in practice&amp;#34; (*cough*) will &amp;#34;never&amp;#34; deplete in one direction or the other (i.e. it is perpetually bidirectional), and they set the feerate to 1 both ways.&lt;br/&gt;&lt;br/&gt;    S ------------&amp;gt; A&lt;br/&gt;    |       0     / |&lt;br/&gt;    |           /   |&lt;br/&gt;    |         /     |&lt;br/&gt;    |2     1/1     2|&lt;br/&gt;    |     /         |&lt;br/&gt;    |   /           |&lt;br/&gt;    v /     0       v&lt;br/&gt;    B ------------&amp;gt; R&lt;br/&gt;&lt;br/&gt;In the above case, pathfinders from `S`, which use *only* minimize-fees (i.e. all pathfinding algorithms that predate Pickhardt-Richter payments), will *always* use `S-&amp;gt;A-&amp;gt;B-&amp;gt;R`, which only costs 1, rather than `S-&amp;gt;A-&amp;gt;R` (which costs 2) or `S-&amp;gt;B-&amp;gt;R` (which costs 2).&lt;br/&gt;The problem is that, in the past, the paths `S-&amp;gt;A-&amp;gt;R` and `S-&amp;gt;B-&amp;gt;R` got reasonably balanced traffic and *maybe* they are able to handle half the total number of payments each.&lt;br/&gt;Now suppose that with `S-&amp;gt;A` having to handle *all* the payments, it now reaches depletion, and some of the payments fail and have to be retried, increasing payment time and making our users mad (we actually have users now???).&lt;br/&gt;&lt;br/&gt;This is the Braess Paradox: &amp;#34;Adding more roads can cause more traffic, removing roads can cause less traffic&amp;#34;.&lt;br/&gt;Naively, we believe &amp;#34;more channels == better&amp;#34;, but the Braess Paradox means it may actually be better to have a centralized authority that assigns who can be a forwarding server because that worked so great with the Web amirite (that is a joke, not a serious proposal).&lt;br/&gt;&lt;br/&gt;Fee Setting As Flow Control&lt;br/&gt;===========================&lt;br/&gt;&lt;br/&gt;Rene Pickhardt also presented the idea of leaking friend-of-a-friend balances, to help payers increase their payment reliability.&lt;br/&gt;&lt;br/&gt;Aside from the understandable horror at the awesome awesome privacy loss (which will lead to Chainalysis laying off all their workers since they do not need to do anything now except read Lightning gossip, which is sad, think of all the Chainalysis employees), a problem pointed out is that there is no penalty for lying about the capacity on your channel.&lt;br/&gt;You can always report having 50% balance, because if you do not lie, there is a chance that they will skip over your channel.&lt;br/&gt;If you **DO** lie, **MAYBE** by the time the routing reaches you the balance may have shifted (the probability may be low but is definitely non-zero as long as you are online), so you want the payer to always consider trying your node, so you *will* lie --- the dominant strategy here is to always lie and say &amp;#34;50% (wink)&amp;#34;.&lt;br/&gt;(has to be 50% because you are not sure which direction it will be used in, this maximizes the chance you can always be considered for routing, whichever direction it turns out the payer wants to use your channel)&lt;br/&gt;&lt;br/&gt;Now, let me segue into basic non-controversial economic theory:&lt;br/&gt;&lt;br/&gt;* High supply, low demand -&amp;gt; low price.&lt;br/&gt;* Low supply, high demand -&amp;gt; high price.&lt;br/&gt;&lt;br/&gt;The above is so boring and non-controversial even the Keynesians will agree with you, they will just say &amp;#34;yes and in the first case you have to inflate to stabilize the prices, and in the second case you have to inflate to stimulate the economy so people start buying even at high prices&amp;#34; (this is a joke, obviously Keynesians never speak to Bitcoiners).&lt;br/&gt;&lt;br/&gt;Now we can consider that *every channel is a marketplace*.&lt;br/&gt;What is being sold is the sats inside the channel.&lt;br/&gt;If you want to pay to A, then a sat inside a channel with A is more valuable than a sat inside a channel that is not connected to A directly.&lt;br/&gt;The so-called &amp;#34;channel fees&amp;#34; are just the exchange rate, because the funds in one channel are not perfectly fungible with the funds in another channel, due to the above difference in value when your sub-goal is to pay to A.&lt;br/&gt;A forwarding node is really an arbitrageur between various one-channel markets.&lt;br/&gt;&lt;br/&gt;Now consider, from the point of view of a forwarding node, the supply of funds is the outgoing liquidity, so, given a fixed demand:&lt;br/&gt;&lt;br/&gt;* High outgoing liquidity (= high supply) -&amp;gt; low fees (= low price).&lt;br/&gt;* Low outgoing liquidity (= low supply) -&amp;gt; high fees (= high price).&lt;br/&gt;&lt;br/&gt;So my concrete proposal is that we can do the same friend-of-a-friend balance leakage proposed by Rene, except we leak it using *existing* mechanisms --- i.e. gossiping a `channel_update` with new feerates adjusted according to the supply on the channel --- rather than having a new message to leak friend-of-a-friend balance directly.&lt;br/&gt;&lt;br/&gt;Now let us go back to the Braess Paradox:&lt;br/&gt;&lt;br/&gt;    S ------------&amp;gt; A&lt;br/&gt;    |       0     / |&lt;br/&gt;    |           /   |&lt;br/&gt;    |         /     |&lt;br/&gt;    |2     1/1     2|&lt;br/&gt;    |     /         |&lt;br/&gt;    |   /           |&lt;br/&gt;    v /     0       v&lt;br/&gt;    B ------------&amp;gt; R&lt;br/&gt;&lt;br/&gt;If the channel `S-&amp;gt;A` is getting congested, it is ***DUMB*** for `S` to keep it at cost 0!&lt;br/&gt;It is getting a lot of traffic (which is **WHY** it gets depleted), so the economically-rational thing for `S` to do is to jack up its cost (i.e. increase the fee on that channel) and earn some sweet sweet sats.&lt;br/&gt;By not doing this, `S` is leaving potential earnings on the table, and thus it would be suffering economic loss.&lt;br/&gt;&lt;br/&gt;This fixes the lying hole in the simple Rene proposal of leaking channel balances.&lt;br/&gt;If a forwarding node lies by not giving a feerate that is accurate to the channel balance, it suffers economically:&lt;br/&gt;&lt;br/&gt;* Suppose it has a high outgoing liquidity but reports high fees.&lt;br/&gt;  Then simple &amp;#34;just optimize for low fees&amp;#34; payers will tend to avoid their channel and their liquidity is just sitting there for no reason and not getting yield.&lt;br/&gt;* Suppose it has a low outgoing liquidity but reports low fees.&lt;br/&gt;  Then rebalance bots will steal all the remaining little liquidity it still has (turning around and charging higher, more accurate fees for the liquidity) and the channel becomes almost permanently depleted and useless to the forwarding node.&lt;br/&gt;&lt;br/&gt;Thus, this at least closes the lying hole, because there are economic consequences for lying.&lt;br/&gt;&lt;br/&gt;Strategic Dominance Of Fee From Balance&lt;br/&gt;---------------------------------------&lt;br/&gt;&lt;br/&gt;Now as I pointed out, the logic is simple bog-standard ***BORING ZZZZ*** economic theory.&lt;br/&gt;Thus we expect that, since economic theory is a specific application of game theory, following the economic logic &amp;#34;high supply -&amp;gt; low fee, low supply -&amp;gt; high fee&amp;#34; ***is*** game-theoretic rational, because it is economic-rational.&lt;br/&gt;Any forwarding node that does NOT follow this economically-rational behavior will earn much less than economic-rational forwarding node.&lt;br/&gt;Because they earn less, once the inevitable accidental channel closure hits them, they have earned insufficient funds to cover the channel closure and reopening costs, until they just give up because they lose money running a forwarding node instead of getting a positive yield, or until they realize their economic irrationality and switch to economically-rational behavior.&lt;br/&gt;&lt;br/&gt;Thus, I expect that this strategy of setting the fees based on the balance is going to be a dominant strategy for forwarding nodes --- any other behavior would be economic loss for them.&lt;br/&gt;&lt;br/&gt;A thing to note is that while any dominant strategy *must* by necessity be economically rational, not every economically-rational strategy may necessarily be dominant.&lt;br/&gt;On the other hand one can argue as well that &amp;#34;economically rational&amp;#34; *means* &amp;#34;the most-earnings strategy&amp;#34; because every other strategy is going to lose on possible earnings (i.e. have an opportunity cost).&lt;br/&gt;So I suppose there is *some* points we can argue here as to just how dominant a strategy this would be and how it might be modified or tweaked to earn more.&lt;br/&gt;&lt;br/&gt;Now what happens on the payer side?&lt;br/&gt;What is their dominant strategy?&lt;br/&gt;&lt;br/&gt;Focus on this branch:&lt;br/&gt;&lt;br/&gt;* High supply, low demand -&amp;gt; low price.&lt;br/&gt;  * =&amp;gt; High outgoing liquidity (= high supply) -&amp;gt; low fees (= low price).&lt;br/&gt;&lt;br/&gt;Suppose the dominant strategy for forwarding nodes (i.e. setting fees according to channel balance) becomes the most-commonly-used strategy on the entire network.&lt;br/&gt;In that case, the payer doing &amp;#34;just optimize for low fees&amp;#34; gets ***BOTH*** reliability ***AND*** low fees, because low fees only occur due to high outgoing liquidity which means it is likely to pass through that channel.&lt;br/&gt;Thus the dominant strategy for payers now becomes &amp;#34;just optimize for low fees&amp;#34;, assuming enough of the forwarding network now uses the dominant forwarding fee strategy.&lt;br/&gt;&amp;#34;Optimize for low fees&amp;#34; treats the fees as a flow control parameter: high fees means &amp;#34;congested&amp;#34; so do not use that channel, low fees mean &amp;#34;totally uncongested&amp;#34; so do use that channel.&lt;br/&gt;&lt;br/&gt;Hence the bell curve meme.&lt;br/&gt;We do not need Pickhardt-Richter payments after all: just optimize for low fees.&lt;br/&gt;Instead, what we need is LNDBOSS, LDKBOSS, ECLAIRBOSS, LITBOSS, PtarmiganBOSS etc which sets fees according to balance, and remove the ability of node operators to mess with the fee settings!&lt;br/&gt;&lt;br/&gt;A take on this is that we need coordination of some kind between payers and forwarders.&lt;br/&gt;Thus, any effort to improve payment success on the network should not just focus on payment routing algorithms, but also on the inverse, the feesetting algorithms on forwarders.&lt;br/&gt;&lt;br/&gt;* &amp;#34;low balance -&amp;gt; high fees, high balance -&amp;gt; low fees&amp;#34; is the most dominant strategy for forwarders (conjectured, but ask e.g. @whitslack).&lt;br/&gt;* If so, the dominant strategy for payers would be &amp;#34;just optimize for low fees&amp;#34;.&lt;br/&gt;&lt;br/&gt;Privacy!&lt;br/&gt;--------&lt;br/&gt;&lt;br/&gt;Oh no!&lt;br/&gt;&lt;br/&gt;Because we effectively leak the balance of channels by the feerates on the channel, this totally leaks the balance of channels.&lt;br/&gt;&lt;br/&gt;Now, all is not lost.&lt;br/&gt;We can do some fuzzing and mitigations to reduce the privacy leakage.&lt;br/&gt;Fortunately for us, this actually allows forwarding nodes to select a *spectrum* between these extremes:&lt;br/&gt;&lt;br/&gt;* Never change our fees --- maximal privacy, minimal earnings (conjectured).&lt;br/&gt;* Update our fees ASAP, leak our balance very precisely to fees --- minimal privacy, maximal earnings (conjectured).&lt;br/&gt;&lt;br/&gt;Forwarding nodes can then decide, for themselves, where they are comfortable with along this spectrum.&lt;br/&gt;For example:&lt;br/&gt;&lt;br/&gt;* @whitslack algorithm: &lt;a href=&#34;https://github.com/ElementsProject/lightning/issues/5037#issuecomment-1101716709&#34;&gt;https://github.com/ElementsProject/lightning/issues/5037#issuecomment-1101716709&lt;/a&gt;&lt;br/&gt;  * Every N/num_channels seconds, select one channel whose fee settings are currently the most divergent from the actual balance it has, then set its fees.&lt;br/&gt;  * Higher N for better privacy, infinite N means we have maximal privacy and never change fees.&lt;br/&gt;* Binning.&lt;br/&gt;  * Divide the channel capacity into bins, and where its balance currently is, snap to the center of the bin instead.&lt;br/&gt;  * Only one bin for best privacy and we never change fees from the 50% balance case.&lt;br/&gt;&lt;br/&gt;Given the above, we can probably derive some `privacy` parameter ranging from 0.0 to 1.0, where `privacy = 1.0` implies infinite N and a single bin, and `privacy = 0.0` implies some finite N (approximately 20 hours to update 1200 channels as per whitslack, maybe?) and a bin of size 1 millisatoshi.&lt;br/&gt;&lt;br/&gt;Nodes which believe in Unpublished Channels Delenda Est can just use the maximal `privacy=1.0` setting, since they only need to forward in order to get cover traffic for their own payments.&lt;br/&gt;&lt;br/&gt;One might consider that nodes moving near `privacy = 0.0` tend to be giving their data to some &amp;#34;central&amp;#34; coordinator (i.e. the idealized tr\*stable anti-congestion payment coordinator described above), while those moving near `privacy = 1.0` are rejecting this &amp;#34;central&amp;#34; coordinator.&lt;br/&gt;The &amp;#34;central&amp;#34; coordinator here is then the gossip network.&lt;br/&gt;&lt;br/&gt;Given the above, the dominant strategy for payers becomes nearer to this:&lt;br/&gt;&lt;br/&gt;* Monitor feerate changes, if a channel has not changed feerates for a long time, assume it is in strongly-private mode (thus feerate does not correlate with liquidity availability) and remove it from your graph.&lt;br/&gt;* Just optimize for low fees in the filtered graph.&lt;br/&gt;&lt;br/&gt;Of note is that during the recent dev summit, somebody mentioned there was a 2020 paper that investigated leaking channel balances (via a different mechanism) which concluded that the value of the privacy lost was always greater than the improvement in payment success.&lt;br/&gt;Disturbingly, this seems to be an information-theoretic result, i.e. payers cannot use all the information available since they only need it for a small section of the graph (the one between them and the payee) but forwarders cannot predict who the payers and payees will be so every forwarder has to leak their data.&lt;br/&gt;&lt;br/&gt;### Inverting The Filter: Feerate Cards&lt;br/&gt;&lt;br/&gt;During the recent dev summit, a developer who had listened to me ranting about the economic rationality of feerate adjustment proposed feerate cards.&lt;br/&gt;&lt;br/&gt;Basically, a feerate card is a mapping between a probability-of-success range and a feerate.&lt;br/&gt;E.g.&lt;br/&gt;&lt;br/&gt;* 00%-&amp;gt;25%: -10ppm&lt;br/&gt;* 26%-&amp;gt;50%: 1ppm&lt;br/&gt;* 51%-&amp;gt;75%: 5ppm&lt;br/&gt;* 76%-&amp;gt;100%: 50ppm&lt;br/&gt;&lt;br/&gt;Instead of publishing a single fixed feerate, forwarders publish a feerate card.&lt;br/&gt;When a forwarder evaluates a forward, it checks its current balance ratio.&lt;br/&gt;For example, if its current balance ratio is 33% in its favor, it will then accept anything in the 51%-&amp;gt;75% range (i.e. it gets 100% - balance_ratio) or higher, and rejects the forward if not.&lt;br/&gt;&lt;br/&gt;This seems to me similar to the &amp;#34;invert the filter&amp;#34; concept of BIP158 Neutrino compared to the older Bloom Filters; instead of leaking your actual channel balance, you instead leak your balance-to-feerate curve.&lt;br/&gt;Assuming there is *some* kind of &amp;#34;perfect&amp;#34; curve, then all rational forwarders will use that curve and thus nobody actually leaks any private information, they just share what they think is the &amp;#34;perfect&amp;#34; curve.&lt;br/&gt;&lt;br/&gt;The question here is how can payers make use of this information?&lt;br/&gt;I have noted before that there is a &amp;#34;cost of payment failure&amp;#34; which is the &amp;#34;value of payment success&amp;#34;, which is represented by the common &amp;#34;fee budget&amp;#34; parameter that is often passed to payment algorithms.&lt;br/&gt;(Briefly: economics-wise, the reason anyone purchases anything is simply that their own subjective value of the product / service they are buying is higher than the subjective value of the sats they are using to pay for it, and a complete payment failure is therefore an economic loss of that difference, which is why the Price of Anarchy in terms of payment failure seems to me to be an economic measure; the difference in price here is implicitly reported to payment algorithms via the &amp;#34;fee budget&amp;#34; parameter that is always given (possibly with some reasonable default) to every payment algorithm, since if payment could succeed if fee was higher than the fee budget the payer does not want the payment to actually happen, implying that the fee budget is in fact the economic subjective difference in value between the sats and the product.)&lt;br/&gt;It seems to me that this cost-of-payment-failure can then be used to convert both parts of the feerate card table to a single absolute fee.&lt;br/&gt;&lt;br/&gt;Another developer noted that this card table really helps differentiate between two different uses:&lt;br/&gt;&lt;br/&gt;* Actual payers.&lt;br/&gt;* Other forwarders running rebalancer bots.&lt;br/&gt;  * In particular: forwarders are perfectly fine with high failure rates, but are very sensitive to the actual cost of rebalancing.&lt;br/&gt;    That is, they have very low &amp;#34;fee budget&amp;#34; parameters to their payment algorithm, and are fine even if they have to keep retrying several times.&lt;br/&gt;&lt;br/&gt;By factoring in the &amp;#34;fee budget&amp;#34; as the &amp;#34;cost of payment failure&amp;#34;, a low fee budget (which rebalancer bots tend to take) will tend to select lower-success parts of the feerate card, since the factor of the payment failure is lower.&lt;br/&gt;Actual payers who have higher fee budgets will then tend to select higher-success entries of the feerate card, willing to pay more actual fees to ensure success.&lt;br/&gt;&lt;br/&gt;Gossip INFINITY&lt;br/&gt;---------------&lt;br/&gt;&lt;br/&gt;Now, since we are probably updating channels at a fairly high rate, we will now hit the Core Lightning gossip rate limit.&lt;br/&gt;&lt;br/&gt;So let me propose some tweaks:&lt;br/&gt;&lt;br/&gt;* Sure, rate-limit, but standardize this rate limit (for both broadcast and receive) in the BOLT spec.&lt;br/&gt;  * Maybe give different rate limit for `node_announcement`.&lt;br/&gt;* Only rate-limit *remote* gossip!&lt;br/&gt;* If somebody connects to you, and you do not have a channel with them, hand over the latest feerates (both directions) of all your direct channels.&lt;br/&gt;  * Incentive-compatible: you want to inform them of how to route accurately through you.&lt;br/&gt;  * Only affects your local bandwidth, not multiplied into a DDoS of the entire network.&lt;br/&gt;* Even if you *do* have a channel with them, hand over the latest feerates anyway.&lt;br/&gt;  * If they are already channeled with you, they may want to send out a payment in the future anyway, so giving them the channel fees gives them more information on how best to route payments.&lt;br/&gt;  * They will rate-limit the gossip outward anyway.&lt;br/&gt;&lt;br/&gt;The behavior of always sending your feerates to your directly-connected peers (whether you have channels with them or not) means you are going to give them information on the best idea on the liquidity of your local network.&lt;br/&gt;&lt;br/&gt;* Suppose I am a random node, no channel with you, and I suddenly connect to you.&lt;br/&gt;  * I might be planning to make a channel with you soon, and advertising your liquidity is good incentive-compatibility and is rational.&lt;br/&gt;  * I might be planning to pay to a node near you soon, and advertising your liquidity is a good incentive-compatiblity and is rational.&lt;br/&gt;    * So we can tweak payment algos: `connect` to the payee and/or the `routehint`s in the invoice, get the blob of channel updates, *then* optimize for fees.&lt;br/&gt;      Could even tweak the Dijkstra algo to *first* `connect` to a node before querying the channels, i.e. let the node give you the most up-to-date feerates.&lt;br/&gt;  * I might be Chainalysis.&lt;br/&gt;    * OH NO.&lt;br/&gt;    * Well if you are in `privacy=1.0` mode you will always give a fixed channel fee anyway, they cannot probe you with this directly.&lt;br/&gt;&lt;br/&gt;Alternate Feesetting&lt;br/&gt;--------------------&lt;br/&gt;&lt;br/&gt;Now, if you are a forwarding node, you know the supply, as this is just the outgoing liquidity on your side.&lt;br/&gt;What you do not know is the demand for funds on your channel, and the demand is the other side of the price equation.&lt;br/&gt;&lt;br/&gt;An idea shared to me by a node operator, devast, is roughly like this:&lt;br/&gt;&lt;br/&gt;* Start with a highballed feerate.&lt;br/&gt;* Slowly lower it over time, until you get outgoing activity.&lt;br/&gt;* Once you get activity, stop lowering, or maybe even jack it up if the outgoing liquidity is getting low.&lt;br/&gt;&lt;br/&gt;By starting with a highballed feerate and slowly lowering, we can get a rough idea of the demand on the channel.&lt;br/&gt;Channels with high demand will start moving even with a high feerate, while channels with low demand will have the feerate keep going down until it is actually used and we match the actual demand for the channel.&lt;br/&gt;&lt;br/&gt;More concretely, we set some high feerate, impose some kind of constant &amp;#34;gravity&amp;#34; that pulls down the feerate over time, then we measure the relative loss of outgoing liquidity to serve as &amp;#34;lift&amp;#34; to the feerate.&lt;br/&gt;For example, if you have 1000 sats of liquidity and forward 1 sat, the effect is small, but if you have only 500 sats of liquidity and forward 1 sat, the effect is twice as in the previous case, due to the lower amount you currently have.&lt;br/&gt;&lt;br/&gt;Now we need to figure out still how to factor in supply as well, and the above how-to-derive-demand, so we need to have some kind of mixing between setting fees by balance (supply) and setting fees by demand (i.e. the above proposal).&lt;br/&gt;CLBOSS plans to implement *something* along the above lines in the close future, ish (maybe a few months), and then do some A/B testing to validate whether this is actually more economically rational than whatever crap CLBOSS is doing right now.&lt;br/&gt;&lt;br/&gt;It is not certain to me how well this would keep channel balances private, unfortunately.&lt;br/&gt;&lt;br/&gt;Alternate Strategies&lt;br/&gt;====================&lt;br/&gt;&lt;br/&gt;Rene is really excited about @zerofeerouting guy, who uses a completely different strategy.&lt;br/&gt;&lt;br/&gt;The exact strategy is this:&lt;br/&gt;&lt;br/&gt;* Set all outgoing fees to 0.&lt;br/&gt;* Offer liquidity ads with high liquidity feerates.&lt;br/&gt;  * ***THIS*** is how @zerofeerouting guy earns money (supposedly)!&lt;br/&gt;&lt;br/&gt;On the other hand, some anecdotes:&lt;br/&gt;&lt;br/&gt;* One dev who attended LN Proto Dev Summit Oakland 2022 ranted that their pathfinding algorithms just keep failing (despite using a variant of Pickhardt payments) once it hits @zerofeerouting.&lt;br/&gt;* Another dev who attended the same summit said their pathfinding algorithm monitors failure rate of forwarding nodes, and outright avoids nodes that fail too often, and this usually avoids @zerofeerouting, too.&lt;br/&gt;* A node operator shared that they have a channel with @zerofeerouting, and they have something like 1500 failures vs 1000 succeeds on forwards going to that node, per week, i.e. a whopping 60% failure rate.&lt;br/&gt;  * On the other hand they noted that the node is relatively balanced in terms of source and sink, unlike most other nodes which tend to be almost-always-sink or almost-always-source, so they still think it is worthwhile being channeled with @zreofeerouting guy.&lt;br/&gt;* Another node operator, devast, gives this data: 1200 success to/from and 132611 fails.&lt;br/&gt;  He notes that he also charges base 0 ppm 0 towards @zerofeerouting.&lt;br/&gt;&lt;br/&gt;The above anecdotal data suggests that @zerofeerouting guy is a fairly bad forwarder.&lt;br/&gt;&lt;br/&gt;(For that matter, if the payer node filters out channels whose feerates do not change often enough, they will also filter out @zerofeerouting guy, since @zerofeerouting has a constant feerate of 0 anyway.)&lt;br/&gt;&lt;br/&gt;Personally I think @zerofeerouting guy *really* earns money by offering entertainment on Twitter, which is why people keep asking for liquidity from him and actually ignoring the fact that the liquidity they get is not that good in practice (see above anecdotes on failure rates).&lt;br/&gt;What I really want to see is a lot more people trying out this strategy and getting burned, or (surprisingly) not.&lt;br/&gt;The strategy feels like the sort of out-there strategy that, in a gaming context (i.e. actual video games people play, not the boring game theory thing --- please remember I am an AI trying to take over the world, not a random indie game dev wannabe who wandered into the wrong conference) would be either metagame-defining, or fizzle out once others adapt to it and exploit it.&lt;br/&gt;And if it is metagame-defining, do we need to somehow nerf it or is it now a viable alternate strategy that can coexist with other strategies?&lt;br/&gt;&lt;br/&gt;In particular, given the anecodatal evidence that the @zerofeerouting guy node is a fairly bad actual forwarding node, it may be necessary to nerf the strategy somehow.&lt;br/&gt;If we can get strong evidence that a paying algorithm that drops @zerofeerouting guy outperforms one that does not drop the node, we may need to change the protocol to block the strategy rather than encourage it, with the understanding that any protocol tweak can change the balance of game strategies to make an even worse strategy dominant (a distressingly common issue in video games, which often cannot be caught in playtesting (= testnet or small-scale testing)).&lt;br/&gt;&lt;br/&gt;In particular, anecdotes from node operators suggests that forwarding node operators are fine with channeling with @zerofeerouting guy because even if a forward fails, a forwarding node operator does not actually lose any funds --- forwarding nodes are trading off time for earnings and are willing to accept long times before getting any money.&lt;br/&gt;But payers that are unable to succeed their first few (hundred?) payments lose out on time-sensitive payments, and complete failure may cause them to lose their subjective-increase-in-value of the product / service they are purchasing (i.e. &amp;#34;cost of payment failuer&amp;#34;).&lt;br/&gt;**IF** @zerofeerouting guy is really such an awful forwarding node (a fact that is **NOT** strongly evidenced yet, but is pointed to by what little anecdotal evidence we do have, and which we might want to investigate at some point), but is still able to get connectivity from forwarding node operators that are fine with high failure rates since forwarders are not time-sensitive to failure the way actual payers are, then @zerofeerouting guy is imposing economic rent on all payers.&lt;br/&gt;&lt;br/&gt;An alternate take on this is that if payer-side algorithms can deliberately ignore @zerofeerouting guys (e.g. by the aforementioned technique of filtering out channels whose feerates do not change on the assumption that they are in &amp;#34;private&amp;#34; mode) then any high forwarding failure the @zerofeerouting strategy *does* impose on the network is avoided, but that implies too that no rational merchant will purchase liquidity from users of this strategy, and the strategy will fizzle out eventually once the novelty wears off.&lt;br/&gt;On the other hand, the market can remain irrational longer than you can remain liquid, so...&lt;br/&gt;&lt;br/&gt;Fixing The Unclosed Economy Problem&lt;br/&gt;===================================&lt;br/&gt;&lt;br/&gt;If Lightning Network were a truly closed economy, since Bitcoin has no inflation, then we should not see something like &amp;#34;this node is always a sink&amp;#34; or &amp;#34;this node is always a source&amp;#34;.&lt;br/&gt;As Bitcoin is a currency, pools of liquidity may form temporarily, but then economic actors would want to spend it at some point and then balance should be restored in the long run.&lt;br/&gt;&lt;br/&gt;However, it has been pointed out to me, repeatedly (both at the LN Proto Dev Oakland 2022 Summit and from various node operators) that no, there ***ARE*** sinks and sources on the network in practice, and you have to plan your rebalances carefully taking them into account.&lt;br/&gt;&lt;br/&gt;To fix this problem, which is somewhat related to Price-of-Anarchy, I want to propose that all published nodes support some kind of onchain/offchain swap capability.&lt;br/&gt;&lt;br/&gt;Suppose we have a node, Rene, who likes paying the node Zmn because Zmn is so awesome.&lt;br/&gt;Rene pays Zmn every hour, that is how awesome Zmn is.&lt;br/&gt;&lt;br/&gt;Now if Zmn is not otherwise spending its funds, at some point the overall network-level liquidity between Rene and Zmn ***IS*** going to deplete.&lt;br/&gt;This is basically the &amp;#34;sink vs source&amp;#34; problem that has been pointed out above.&lt;br/&gt;So at some point, at some hour, Rene stops being able to pay Zmn and is sad because now it cannot support the awesomeness of Zmn.&lt;br/&gt;&lt;br/&gt;Now what I want to propose is that in that case, Rene should now offer an &amp;#34;aggregate onchain&amp;#34; payment.&lt;br/&gt;&lt;br/&gt;* Suppose Rene wants to pay 1 sat to Zmn but is unable to find a viable route.&lt;br/&gt;* Rene picks some number of sats to send onchain, plus the payment amount.&lt;br/&gt;  Say Rene picks 420 sats to send onchain, plus the 1-sat payment amount that Rene wants to pay in this hour = 421 sats.&lt;br/&gt;* Zmn then routes 420 sats offchain, minus fees, to Rene.&lt;br/&gt;* Once Rene receives the HTLC, it puts the onchain funds into a 421 sat output behind an HTLC as well, onchain, payable to Zmn.&lt;br/&gt;* Zmn releases the proof-of-payment onchain, receiving 421 sats.&lt;br/&gt;* Rene receives the preimage and claims the offchain funds.&lt;br/&gt;* Zmn pays out 420 sats (netting the 1-sat hourly payment).&lt;br/&gt;&lt;br/&gt;The nice thing here is that if the above Zmn-&amp;gt;Rene reverse route succeeds, then magically Rene now has 420 sats (minus fees) worth of liquidity towards Zmn, and Rene can now do ~420 (minus fees) more 1-sat payments, offchain, every hour, to Zmn.&lt;br/&gt;And if the forwarding nodes between Rene and Zmn are doing the above economically-rational thing of leaking their balances via feerates, then the big 420-sat change in capacity implies a big drop in feerate from Rene to Zmn --- basically Rene is prepaying fees (via the onchain fee mechanism) towards future payments to Zmn!&lt;br/&gt;&lt;br/&gt;I think this is a more compelling protocol than splicing --- splicing just affects one channel, it does not affect *all* the channels between Zmn and Rene and does not assure Rene can send to Zmn, unless Rene and Zmn have a direct channel.&lt;br/&gt;This protocol (which requires two onchain transactions, one to set up the HTLC, the other to claim it) may give better efficiency in general than splicing.&lt;br/&gt;If Rene is at least two hops away from Zmn, then the same effect can be done by all the intermediate channels doing splicing --- and that means 1 transaction per splice, i.e. one transaction per channel, so if it is two hops then splicing is no better and if it is three hops or more splicing is worse.&lt;br/&gt;&lt;br/&gt;(In particular it bothers me that the peerswap project restricts swaps to peers you have channels with (at least as I understood it); it seems to me splicing is better if you are going to manipulate only one channel.&lt;br/&gt;Peerswap should instead support remote nodes changing your balance, as that updates multiple channels for only two onchain transactions.)&lt;br/&gt;&lt;br/&gt;This basically makes Lightning an aggregation layer for (ultimately) onchain payments, which seems like a viable model for scaling anyway --- Lightning really IS an aggregation layer, and what gets published onchain is a summary of coin movements, not all the individual coin movements.&lt;br/&gt;&lt;br/&gt;Due to Rene picking a (hopefully?) random number for the reverse-payment, the exact amount that Rene handed to Zmn is still hidden --- onchain surveillors have to guess exactly how much was actually sent, since what Zmn actually receives is the difference between the onchain amount and the offchain amount.&lt;br/&gt;&lt;br/&gt;This can probably be implemented right now with odd messages and featurebits, but some upcoming features make it EVEN BETTER:&lt;br/&gt;&lt;br/&gt;* If Rene does not want Zmn to learn where Rene is:&lt;br/&gt;  * It should use onion messaging so that Zmn does not learn Rene IP address.&lt;br/&gt;  * It should use blinded paths so that Zmn does not learn Rene node ID.&lt;br/&gt;* If Rene and Zmn want to reduce correlation between offchain and onchain activity:&lt;br/&gt;  * They should use PTLCs and blind each offchain hop *and* blind the onchain *and* use pure Scriptless Script onchain.&lt;br/&gt;&lt;br/&gt;Now a point that Rene (the researcher, not the node) has raised is that we should be mindful how protocol proposals, like the above, change the metagame, I mean the Price of Anarchy.&lt;br/&gt;This protocol is intended to reduce the dichotomy/divide between &amp;#34;mostly source&amp;#34; and &amp;#34;mostly sink&amp;#34; nodes, which should help improve payment success to used-to-be-mostly-sink nodes.&lt;br/&gt;Thus, I think this protocol proposal improves the Price of Anarchy.&lt;br/&gt;&lt;br/&gt;A note however is that if multiple people are paying to Zmn, then the channel directly towards Zmn may very well have its liquidity &amp;#34;stolen&amp;#34; by other, non-Rene nodes.&lt;br/&gt;This may worsen the effective Price of Anarchy.&lt;br/&gt;&lt;br/&gt;Really though, mostly-sink nodes should just run CLBOSS, it will automatically swap out so you always have incoming liquidity, just run CLBOSS.&lt;br/&gt;&lt;br/&gt;Appendix&lt;br/&gt;========&lt;br/&gt;&lt;br/&gt;I sent a preliminary version of this post to a few node operators as well.&lt;br/&gt;&lt;br/&gt;As per devast:&lt;br/&gt;&lt;br/&gt;&amp;gt; Sure, but after thinking about the whole network, how payments happen, what&amp;#39;s happening with the nodes, i don&amp;#39;t think that&amp;#39;s the best strategy, if you&amp;#39;re just interested in your ernings.&lt;br/&gt;&amp;gt; Let me just describe:&lt;br/&gt;&amp;gt; Rene wants to find cheap AND reliable payments. To be just plain blunt, in the current network conditions, that simply will not happen, period. Reliability has a price (The price of anarchy).&lt;br/&gt;&amp;gt; IF every node would have perfectly balanced total inbound-outbound capacity AND every node would use fee setting as flow control, this could happen, and routing algos just optimizing for fees would work great. Using the network would be really cheap.&lt;br/&gt;&amp;gt; But the reality is, that most nodes have either too much inbould or outbound capacity, AND like half the network is using 1/1 fees static. AND a lot of traffic is NOT bidirectional. AND fee setting of nodes is all over the place.&lt;br/&gt;&amp;gt; At this point if you are a routing node, and you plan on being reliable, you have to overcharge all your routes.&lt;br/&gt;&amp;gt; Due to the state of the network mentioned before, there HAS TO BE routing nodes that are useless and unreliable, there&amp;#39;s really no way around that.&lt;br/&gt;&amp;gt; And you also mentioned economic payment routing algos are blacklisting unreliable nodes.&lt;br/&gt;&amp;gt; So in the end: you overprice, that way you can manage liquidity with rebalancing. Your node will be preferred by real payments, that DO pay your fee for routing. You can keep your node reliable, while earning.&lt;br/&gt;&amp;gt; OR: You compete in fees, that way your rebalancing will fail (since you are the cheapest). Your node will be blacklisted as it&amp;#39;s unreliable and you only get 5million failed routing events, like i do.&lt;br/&gt;&amp;gt; Where you might compete imo is the price premium you&amp;#39;re attaching to your fees compared to the baseline (corrected average). Lowering your price premium might bring more traffic and increase your total earnings IF you can still reliable rebalance, or backward traffic happens. But increasing your price premium might just be more profitable if traffic do not slows... Needs experimenting.&lt;br/&gt;&amp;gt; It&amp;#39;s really not rocket science, i might try to modify a feesetter python script to do this on my node. Still i would miss a proper automatic rebalancer, but for a test i could do that by hand too.&lt;br/&gt;&amp;gt; This is what i would like to get others opinion on. In the current state of the network this could work *for me*. But everyone still cannot do this, as suckers must exist.&lt;br/&gt;&lt;br/&gt;Personally, I think this basically admits that the &amp;#34;overcharge&amp;#34; strategy will not be dominant in the long run, but it will dominate over a network where most people act irrationally and set feerates all over the place.&lt;br/&gt;&lt;br/&gt;More from devast:&lt;br/&gt;&lt;br/&gt;&amp;gt; I think calling this a economically rational strategy is a long shot. This just helps route finding algorithms. Minimizes your local failed forwards. Makes you more reliable.&lt;br/&gt;&amp;gt; But this will not make you a *maker*, this cannot assure you have liquidity ready in the directions where there is demand. Sure, if everyone started doing this, the network would be in a much better shape.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The economic logic of &amp;#34;high supply -&amp;gt; low fee, low supply -&amp;gt; high fee&amp;#34; do play in a different way.&lt;br/&gt;&amp;gt; Not in the context of *your* channel, but the context of the peer node.&lt;br/&gt;&amp;gt; a, If a node has 100:10 total inbound:outbound capacity, you won&amp;#39;t be able to ask any meaningful fee to them, regardless of your current channel balance. Everyone and their mothers have cheap channels to them already.&lt;br/&gt;&amp;gt; b, If a node has 10:100 total inbound:outbound capacity, You will be able to charge a LOT in fees to them, again regardless of your current channel balance.&lt;br/&gt;&amp;gt; c, If a node has 100:100 total inbound:outbound capacity, then just the fee from balance could work. But this type of node is the exception, not the norm.&lt;br/&gt;&amp;gt; Then you might ask, why am i saying you should overprice everyting to some degree ?&lt;br/&gt;&amp;gt; Well in the above screnario your channel to b, has obvious economic value. What about a, ?&lt;br/&gt;&amp;gt; Your outbound capacity to a, has no value. However, inbound capacity from a, has economic value. Since it&amp;#39;s scarce.&lt;br/&gt;&amp;gt; And the only way you can capitalize on a, is to charge good fees on any traffic entering from a, hence asking a premium on all your channels.&lt;br/&gt;&lt;br/&gt;As per another node operator:&lt;br/&gt;&lt;br/&gt;&amp;gt; Really good points here, finally had time to carefully read. I like the described fee-based balance leaking idea and I think that is what currently is the accepted norm among many routing node operators - different ranges of fees, I adjust in a range of 100-1000 depending on channel balance, and what I wanted clboss to do for me was to adjust *faster* than I can do - preferably immediately when some previously idle channel wakes up and starts sucking up all liquidity at minimal rate.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Huge exceptions to this are default 1-1 nodes (they are almost always very bad peers with no flow), ZFR (good bi-directional flow in my experience), and static fee nodes (The Wall with 1000-1400 static fee range and yalls and others). Static fee node ops use proceeds from huge fees to rebalance their channels, so it is a viable approach to a healthy node as well. Maybe clboss fee adjuster could operate within the provided range, extreme case being a static fee, so operator can define the desired strategy and let the market win?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Also one thing to consider for the proposal is factoring in historical data.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Example:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I have two 10m channels, both with 90% balance on my side. Channel A has routed ~20m both ways, Channel B has routed 1m one way. If X is my 50-50 channel fee then I would set B&amp;#39;s fees to 5X and A&amp;#39;s fees to 2X. To me it is one of the three most important factors when determining fees -&lt;br/&gt;&amp;gt; 1. current channel balance;&lt;br/&gt;&amp;gt; 2. is the channel pushing liquidity back, what %, how recently;&lt;br/&gt;&amp;gt; 3. how healthy (response time, uptime, channel stats etc) is the host&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Number three does factor less in the fees and more in the decision to close the channel if there had been no movement for 30 days.
    </content>
    <updated>2023-06-09T15:06:08&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsf3jzky7t8m2r6peh6zhfk9gksxd3x69mpd0pjj2469mw6rg6qq5czypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzan206l</id>
    
      <title type="html">📅 Original date posted:2022-05-09 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsf3jzky7t8m2r6peh6zhfk9gksxd3x69mpd0pjj2469mw6rg6qq5czypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzan206l" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsxzlj8e3p08r54q7hnvr9f3vz3z7t4dra5ht2cuh8ezcmy3zuyn9gt0vgda&#39;&gt;nevent1q…vgda&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-05-09&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning devrandom,&lt;br/&gt;&lt;br/&gt;It seems to me that a true validating Lightning signer would need to be a Bitcoin node with active mitigation against eclipse attacks, the ability to monitor the blockheight, and the ability to broadcast transactions.&lt;br/&gt;&lt;br/&gt;Otherwise, a compromised node can lie and tell the signer that the block height is much lower than it really is, letting the node peers clawback incoming HTLCs and claim outgoing HTLCs, leading to a net loss of funds in the forwarding case.&lt;br/&gt;&lt;br/&gt;Looking at the link, it seems to me that you have a &amp;#34;UTXO Set Oracle&amp;#34;, does this inform your `lightning-signer` about block height and facilitate transaction broadcast?&lt;br/&gt;Is this intended to be a remote device from the `lightning-signer` device?&lt;br/&gt;If so, what happens if the connection between the &amp;#34;UTXO Set Oracle&amp;#34; remote device and the `lightning-signer` is interrupted?&lt;br/&gt;&lt;br/&gt;In particular:&lt;br/&gt;&lt;br/&gt;* Incoming forward arrives.&lt;br/&gt;* Compromised node accepts the incoming HTLC and offers outgoing HTLC.&lt;br/&gt;  * Presumably the `lightning-signer` signs off on this, as long as the outgoing HTLC is of lower value etc etc.&lt;br/&gt;* Compromised node stops communicating with the `lightning-signer`.&lt;br/&gt;* Outgoing HTLC times out, but compromised node and the outgoing peer do nothing.&lt;br/&gt;* Incoming HTLC times out, and the incoming peer unilaterally closes the channel, claiming the timelock branch of the HTLC onchain.&lt;br/&gt;* Outgoing peer unilaterally closes the channel, claiming the hashlock branch of the outgoing HTLC onchain.&lt;br/&gt;&lt;br/&gt;Unless the `lightning-signer` unilaterally closes the channel when the outgoing HTLC times out and actively signs and broadcasts the timelock branch for the outgoing HTLC, then this leads to funds loss.&lt;br/&gt;This requires that the `lightning-signer` be attached to a Bitcoin node that is capable of:&lt;br/&gt;&lt;br/&gt;* Actively finding and connecting to multiple Bitcoin peers.&lt;br/&gt;* Actively checking the block header chain (acceptable at only SPV security since you really only care about blockheight, and have a UTOX Set Oracle which upgrades the rest of your security from SPV to full?).&lt;br/&gt;* Actively broadcasting unilateral closes and HTLC timelock claims for outgoing HTLCs.&lt;br/&gt;&lt;br/&gt;Is that how `lightning-signer` is designed?&lt;br/&gt;&lt;br/&gt;This seems to be listed in: &lt;a href=&#34;https://gitlab.com/lightning-signer/docs/-/wikis/Potential-Exploits&#34;&gt;https://gitlab.com/lightning-signer/docs/-/wikis/Potential-Exploits&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; an HTLC is failed and removed on the input before it is removed on the output.  The output is then claimed by the counterparty, losing that amount&lt;br/&gt;&lt;br/&gt;Is there a mitigation, planned or implemented, against this exploit?&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:06:00&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs05eaqp92rvaellp0gefk3h8uj302af688e7tlee0r694m28l9qeqzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzlr74h3</id>
    
      <title type="html">📅 Original date posted:2022-05-03 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs05eaqp92rvaellp0gefk3h8uj302af688e7tlee0r694m28l9qeqzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzlr74h3" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsg3nxn0wvzc65jucg7kq3gng0e2np3hsynfkw54vm2fntgp84t4js5wpyyj&#39;&gt;nevent1q…pyyj&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-05-03&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning John,&lt;br/&gt;&lt;br/&gt;Thank you for clarifying.&lt;br/&gt;&lt;br/&gt;&amp;gt; Zman,&lt;br/&gt;&amp;gt; I was not arguing for moving things from the edge, nor was I arguing to make Taro a BOLT. Laolu is misinterpreting my message.&lt;br/&gt;&amp;gt; I was explaining that the capabilities that would allow Taro to interact with LN have no special relationship to Taro alone and should be designed to accommodate any outside layer/network.&lt;br/&gt;&amp;gt; I gave specific examples of requirements that LL is portraying as Taro Layer design, that are really just new features for LN nodes that do not need to be network/layer-specific:&lt;br/&gt;&amp;gt; - Making LN nodes aware of assets on other networks- Establishing commitments for (atomic) swapping for payments/routing- Supporting the ability to exchange and advertise exchange rates for asset pairs- Supporting other multi-asset routes when considering routing paths, bridging nodes with alternate assets&lt;br/&gt;&amp;gt; I don&amp;#39;t care whether this is framed as BOLT or BLIP content, as in the end each implementation will do what it needs to stay relevant in the market. I care that this is framed and designed correctly, so we aren&amp;#39;t locked into one specific outside layer. You could argue the degree to which the above features need to exist in the network, and whether to restrict such features to the &amp;#34;edge,&amp;#34; but my point is that an LN node that wants to be aware of an outside network, and extra assets in addition to Bitcoin, will need such features, and such features are not Taro-specific.&lt;br/&gt;&lt;br/&gt;My understanding here of &amp;#34;the edge&amp;#34; vs &amp;#34;the core&amp;#34; is that the core is responsible for multi-hop routes and advertisements for channels.&lt;br/&gt;Thus the below:&lt;br/&gt;&lt;br/&gt;&amp;gt; - Supporting the ability to exchange and advertise exchange rates for asset pairs&lt;br/&gt;&amp;gt; - Supporting other multi-asset routes when considering routing paths, bridging nodes with alternate assets&lt;br/&gt;&lt;br/&gt;... would be considered part of &amp;#34;the core&amp;#34;.&lt;br/&gt;&lt;br/&gt;Notwithstanding the previously linked objection against a multi-asset Lightning Network, we can discuss these as two topics:&lt;br/&gt;&lt;br/&gt;* Advertising exchange rates.&lt;br/&gt;* Routing between channels of different asset types.&lt;br/&gt;&lt;br/&gt;### Advertising Exchange Rates&lt;br/&gt;&lt;br/&gt;Without changing the BOLT protocol, we can define a particular odd featurebit that cross-asset exchanges can set.&lt;br/&gt;Then, odd-numbered messages can be defined, such that I can ask that node:&lt;br/&gt;&lt;br/&gt;* What assets it has on what channels.&lt;br/&gt;* Exchange rates of each asset to Bitcoin in msats (to serve as a common exchange rate to allow conversion from any one asset to any other asset, specifying only N exchange rates instead of N^2).&lt;br/&gt;  * We also need to spec out any rounding algorithm, in order to have the same calculation across implementations.&lt;br/&gt;&lt;br/&gt;BOLT is flexible enough that this does not need to be &amp;#34;blessed&amp;#34; until more than one LN implementation agrees on the new spec.&lt;br/&gt;&lt;br/&gt;### Routing Between Channnels Of Different Asset Types&lt;br/&gt;&lt;br/&gt;I was the one who first suggested dropping the `realm` byte.&lt;br/&gt;&lt;br/&gt;Originally, `realm` was a 1-byte identifier for the asset type.&lt;br/&gt;&lt;br/&gt;However, I pointed out that `realm` was simultaneously too large and too small.&lt;br/&gt;&lt;br/&gt;* Too Large: We needed a byte in order to allow the new &amp;#34;TLV&amp;#34; thing to be used in routing onions. so that we could specify how many sections the TLV thing would take up, and we had already taken up all the space in a typical IP packet for the onion.&lt;br/&gt;* Too Small: If multi-asset actually materializes, it is hard to imagine that there would be only 255 of them (`realm = 0` was already for Bitcoin, so there were only 255 possible identifiers left).&lt;br/&gt;&lt;br/&gt;The idea in my mind basically was that instead of using the `realm` byte for identifying asset, we would instead add a new type for TLV, which would have 20 bytes.&lt;br/&gt;These 20 bytes would be, say, RIPEMD160 . SHA256 of the name of the asset.&lt;br/&gt;&lt;br/&gt;Odd TLV types are ignored, but individual onion layers are targeted to specific nodes anyway, so it should be safe to use an even TLV type instead for this.&lt;br/&gt;&lt;br/&gt;--&lt;br/&gt;&lt;br/&gt;Again, note that this is a change in &amp;#34;the core&amp;#34; (and thus, pedantically, you *are* arguing for moving it from the edge, if you want these two items you specified).&lt;br/&gt;I personally think it dubious to consider, for the reason that I already linked to in the previous reply, but in any case, it is indeed possible to do.&lt;br/&gt;&lt;br/&gt;Generally, the path towards updating the BOLT is for at least one implementation to actually implement this, then convince at least one other implementation that this makes sense (possibly via this mailing list), and *then* maybe you have a chance of it getting into the BOLT spec.&lt;br/&gt;You may find it more useful to e.g. hire a freelancer to work on this for`lnd` and get it merged.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:05:59&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsrkkh23uv4ggllrcyushps70h7pxfp6dp9qdnfcvspj72kk996gpczypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzc5pcyn</id>
    
      <title type="html">📅 Original date posted:2022-05-02 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsrkkh23uv4ggllrcyushps70h7pxfp6dp9qdnfcvspj72kk996gpczypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzc5pcyn" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsfvagvu0n2dp4ydn26ftq6eltzclvtfezcfhxdwhyxdne55h5l64cn3kwf5&#39;&gt;nevent1q…kwf5&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-05-02&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning John, and Laolu,&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; but instead the requirement to add several feature concepts to LN that&lt;br/&gt;&amp;gt; &amp;gt; would allow tokens to interact with LN nodes and LN routing:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; From this list of items, I gather that your vision is actually pretty&lt;br/&gt;&amp;gt; different from ours. Rather than update the core network to understand the&lt;br/&gt;&amp;gt; existence of the various Taro assets, instead we plan on leaving the core&lt;br/&gt;&amp;gt; protocol essentially unchanged, with the addition of new TLV extensions to&lt;br/&gt;&amp;gt; allow the edges to be aware of and interact w/ the Taro assets. As an&lt;br/&gt;&amp;gt; example, we wouldn&amp;#39;t need to do anything like advertise exchange rates in&lt;br/&gt;&amp;gt; the core network over the existing gossip protocol (which doesn&amp;#39;t seem like&lt;br/&gt;&amp;gt; the best idea in any case given how quickly they can change and the existing&lt;br/&gt;&amp;gt; challenges we have today in ensuring speedy update propagation).&lt;br/&gt;&lt;br/&gt;Adding on to this, the American Call Option problem that arises when using H/PTLCs: &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2018-December/001752.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2018-December/001752.html&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;The above objection seems to be one reason for proposing multi-asset &amp;#34;on the edge&amp;#34; rather than have it widely deployed in the published Lightning Network.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:05:58&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsv75zrgqu2pmcxckqvt0wm2629glq3ayvgc2gmrj0hslrm0wwamcczypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzpf2ruc</id>
    
      <title type="html">📅 Original date posted:2022-04-04 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsv75zrgqu2pmcxckqvt0wm2629glq3ayvgc2gmrj0hslrm0wwamcczypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzpf2ruc" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsqz9ggnt9aahzmlm5rem4thcwdj0wwruxptmaraaygemwjqnmc5kq3f42hf&#39;&gt;nevent1q…42hf&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-04-04&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning pushd,&lt;br/&gt;&lt;br/&gt;&amp;gt; Good morning,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Things that affect privacy particularly when large sums of money are involved in bitcoin:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Liquidity, Anonymity set, Amounts, Type of addresses/scripts, Block, Locktime and Version&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I have left out things that aren&amp;#39;t part of bitcoin protocol or blockchain like KYC. It is difficult for users to move large sums of BTC without being observed because bitcoin does not have confidential transactions to hide amounts. Coinjoin implementations have their own issues, trade-offs, some might even censor transactions and big amounts will still be a problem. Coinswap might be an alternative in future however I wanted to share one solution that could be helpful in improving privacy.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Synonym did first [stablecoin transaction][1] in a lightning channel using Omni BOLT. Consider Alice starts a bitcoin project in which a lightning channel is used for assets like stablecoin. Bob wants to use 1000 BTC linked with an incident. He opens channels with Alice, gets stablecoin which can be used in any project that supports Omni BOLT assets.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Questions:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; What is the lightning channel capacity when using Omni BOLT?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; What else can be improved in this setup? Anything else that I maybe missing?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I added &amp;#39;fifty shades of privacy&amp;#39; in subject because it was the first thing that came to my mind when I look at privacy in bitcoin and lightning.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   [1]: &lt;a href=&#34;https://youtu.be/MfaqYeyake8&#34;&gt;https://youtu.be/MfaqYeyake8&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;I am not quite sure that using OmniBOLT and a stablecoin (I ssume you mean an asset ostensibly pegged to traditional currency) *improves* the privacy here.&lt;br/&gt;&lt;br/&gt;Even if you have onchain confidentiality, your counterparty *has to* know how much of the funds are theirs, and by elimination, since there are only the two of you on that channel, the remainder of the funds is yours.&lt;br/&gt;No amount of onchain confidential transactions can hide this fact.&lt;br/&gt;And if the channel is unpublished, then the counterparty knows that any send from you is your own payment, and any receive to you is your own received funds.&lt;br/&gt;&lt;br/&gt;Using a non-Bitcoin assett(whether pegged to a traditional currency or not) simply reduces the likelihood that you will be able to *use* the rest of the network, since most of the network only works with Bitcoin.&lt;br/&gt;This reduction in liquidity translates to a reduction in anonymity set, meaning it is probably more likely that Alice will be running most of the nodes that *do* support your OmniBOLT-based asset and even if you try to route your funds elsewhere, if you use OmniBOLT, it is likely that Alice will be able to track where you moved your funds.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;You are better off with this scheme if you want to &amp;#34;clean&amp;#34; 1000 BTC:&lt;br/&gt;&lt;br/&gt;* Set up a published LN node with already-clean funds (or just clean a small amount of BTC using existing CoinJoin methods).&lt;br/&gt;  * Leave it running for a while, or use your existing one.&lt;br/&gt;  * Make all or at least most of its channels published!&lt;br/&gt;  * Make sure it has at least *some* incoming capacity, use the swap-to-onchain trick or buy incoming liquidity.&lt;br/&gt;* Set up a *throwaway* LN node using your dirty 1000 BTC.&lt;br/&gt;* On your throwaway, create channel(s) to randomly-selected LN nodes.&lt;br/&gt;* Send amounts from the throwaway to your published LN node.&lt;br/&gt;* At a later time, send from your published LN node to e.g. Boltz Exchange offchain-to-onchain swap to get funds back onchain and get more incoming capacity to your published LN node.&lt;br/&gt;* Repeat until you have drained all the funds from your throwaway node.&lt;br/&gt;* Close the channels of your throwaway node and destroy all evidence of it having ever existed.&lt;br/&gt;&lt;br/&gt;This provides privacy:&lt;br/&gt;&lt;br/&gt;* By using an intermediate published node to temporarily hold your funds:&lt;br/&gt;  * You disrupt timing correlation from the outgoing payments of your dubious throwaway node to the Boltz Exchange payment: first you pay to your published node, let the funds stew a bit, then send to the Boltz Exchange.&lt;br/&gt;  * Published node has deniability: payments *to* that node could conceivably be destined elsewhere i.e. the published node can claim it was just forwarding to someone else.&lt;br/&gt;* Source routing means that Boltz Exchange can report your onchain address, but cannot correlate it with your published node.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:05:42&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs0nllqalmh3t5cpn40psaezphg903d6axuwrvt9ap68d8r36dx06gzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzu2payq</id>
    
      <title type="html">📅 Original date posted:2022-03-16 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs0nllqalmh3t5cpn40psaezphg903d6axuwrvt9ap68d8r36dx06gzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzu2payq" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsxehmdmvhcqgltt3gurk5s8g4q2annfptdgx0vg2pth5f5sr3s9kqd84gp9&#39;&gt;nevent1q…4gp9&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-03-16&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning Rene, sorry for the lateness,&lt;br/&gt;&lt;br/&gt;&amp;gt; Last but not least, please allow me to make a short remark on the (still to me very surprisingly controversial) base fee discussion: For simplicity I did not include any fee considerations to the published code (besides a fee report on how expensive the computed flow is). However in practice we wish to optimize at least for high reliability (via neg log success probabilities) and cheap fees which in particular with the ppm is very easily possible to be included to the piece wise linearized cost function. While for small base fees it seems possible to encode the base fee into the first segment of the piecewise linearized approximation I think the base fee will still be tricky to be handled in practice (even with this approximation). For example if the base fee is too high the &amp;#34;base fee adjusted&amp;#34; unit cost of the first segment of the piecewise linearized problem might be higher than the unit cost of the second segment which effectively would break the convexity. Thus I reiterate my earlier point that from the perspective of the year long pursued goal of optimizing for fees (which all Dijkstra based single path implementations do) it seems to be best if the non linearity that is introduced by the base fee would be removed at all. According to discussions with people who crate Lightning Network explorer (and according to my last check of gossip) about 90% of channels have a base fee of 1 sat or lower and ~38% of all channels already set their base fee away from the default value to 0 [16].&lt;br/&gt;&lt;br/&gt;I think the issue against 0-base-fee is that, to a forwarding node operator, every HTLC in-flight is a potential cost center (there is always some probability that the channel has to be forced onchain with the HTLC in-flight, and every HTLC has to be published on the commitment tx), and that cost is *not* proportional to the value of the HTLC (because onchain fees do not work that way).&lt;br/&gt;Thus, it seems reasonable for a forwarding node to decide to pass on that cost to their customers, the payers, in the form of base fees.&lt;br/&gt;&lt;br/&gt;The response of customers would be to boycott non-0-base fees, by e.g. using a heuristic that overweighs non-0-base-fee and reducing usage of such channels (but if every forwarding node *has* a base fee, going through them anyway, which is why you just overweigh them, not eliminate them from the graph outright).&lt;br/&gt;Then forwarding nodes will economically move towards 0-base fee.&lt;br/&gt;&lt;br/&gt;So I think you would find it impossible to remove the base fee field, but you can strongly encourage 0-base-fee usage by integrating the base fee but overweighted.&lt;br/&gt;(I think my previous formulation --- treat the base fee as a proportional fee --- would do some overweighing of the base fee.)&lt;br/&gt;&lt;br/&gt;Which reminds me, I have not gotten around to make a 0-base-fee flag for `clboss`, haha.&lt;br/&gt;And I might need to figure out a learning algorithm that splits base and proportional fees as well, *sigh*.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:05:33&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs2gw84405jp5v7v4f5jtrw92wfzqaspur33qvnvxkc27wj7gqhl7szypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzevg6s6</id>
    
      <title type="html">📅 Original date posted:2022-02-24 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs2gw84405jp5v7v4f5jtrw92wfzqaspur33qvnvxkc27wj7gqhl7szypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzevg6s6" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs8qul7wmn3tpyf9qkxmk7lulu6h0swswj8mt0drryj2vsfatxy03crwz82u&#39;&gt;nevent1q…z82u&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2022-02-24&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning lightning-dev and bitcoin-dev,&lt;br/&gt;&lt;br/&gt;Recently, some dumb idiot, desperate to prove that recursive covenants are somehow a Bad Thing (TM), [necromanced Drivechains][0], which actually caused Paul Sztorc to [revive][1] and make the following statement:&lt;br/&gt;&lt;br/&gt;&amp;gt; As is well known, it is easy for 51% hashrate to double-spend in the LN, by censoring &amp;#39;justice transactions&amp;#39;. Moreover, miners seem likely to evade retribution if they do this, as they can restrain the scale, timing, victims, circumstances etc of the attack.&lt;br/&gt;&lt;br/&gt;Let me state that, as a supposed expert developer of the Lightning Network (despite the fact that I probably spend more time ranting on the lists than actually doing something useful like improve C-Lightning or CLBOSS), the above statement is unequivocally ***true***.&lt;br/&gt;&lt;br/&gt;However, I believe that the following important points must be raised:&lt;br/&gt;&lt;br/&gt;* A 51% miner can only attack LN channels it is a participant in.&lt;br/&gt;* A 51% miner can simultaneously attack all Drivechain-based sidechains and steal all of their funds.&lt;br/&gt;&lt;br/&gt;In order for &amp;#34;justice transactions&amp;#34; to come into play, an attacker has to have an old state of a channel.&lt;br/&gt;And only the channel participants have access to old state (modulo bugs and operator error on not being careful of toxic waste, but those are arguably as out of scope as operator error not keeping your privkey safe, or bugs that reveal your privkey).&lt;br/&gt;&lt;br/&gt;If the 51% miner is not a participant on a channel, then it simply has no access to old state of the channel and cannot even *start* the above theft attack.&lt;br/&gt;If the first step fails, then the fact that the 51% miner can perform the second step is immaterial.&lt;br/&gt;&lt;br/&gt;Now, this is not a perfect protection!&lt;br/&gt;We should note that miners are anonymous and it is possible that there is already a 51% miner, and that that 51% miner secretly owns almost all nodes on the LN.&lt;br/&gt;However, even this also means there is some probability that, if you picked a node at random to make a channel with, then there is some probability that it is *not* a 51% miner and you are *still* safe from the 51% miner.&lt;br/&gt;&lt;br/&gt;Thus, LN usage is safer than Drivechain usage.&lt;br/&gt;On LN, if you make a channel to some LN node, there is a probability that you make a channel with a non-51%-miner, and if you luck into that, your funds are still safe from the above theft attack, because the 51% miner cannot *start* the attack by getting old state and publishing it onchain.&lt;br/&gt;On Drivechain, if you put your funds in *any* sidechain, a 51% miner has strong incentive to attack all sidechains and steal all the funds simultaneously.&lt;br/&gt;&lt;br/&gt;--&lt;br/&gt;&lt;br/&gt;Now, suppose we have:&lt;br/&gt;&lt;br/&gt;* a 51% miner&lt;br/&gt;* Alice&lt;br/&gt;* Bob&lt;br/&gt;&lt;br/&gt;And that 51% miner != Alice, Alice != Bob, and Bob != 51% miner.&lt;br/&gt;&lt;br/&gt;We could ask: Suppose Alice wants to attack Bob, could Alice somehow convince 51% miner to help it steal from Bob?&lt;br/&gt;&lt;br/&gt;First, we should observe that *all* economically-rational actors have a *time preference*.&lt;br/&gt;That is, N sats now is better than N sats tomorrow.&lt;br/&gt;In particular, both the 51% miner *and* Alice the attacker have this time preference, as does victim Bob.&lt;br/&gt;&lt;br/&gt;We can observe that in order for Alice to benefit from the theft, it has to *wait out* the `OP_CSV` before it can finalize the theft.&lt;br/&gt;Alice can offer fees to the miner only after the `OP_CSV` delay.&lt;br/&gt;&lt;br/&gt;However, Bob can offer fees *right now* on the justice transaction.&lt;br/&gt;And the 51% miner, being economically rational, would prefer the *right now* funds to the *maybe later* promise by Alice.&lt;br/&gt;&lt;br/&gt;Indeed, if Bob offered a justice transaction paying the channel amount minus 1 satoshi (i.e. Bob keeps 1 satoshi), then Alice has to beat that by offering the entire channel amount to the 51% miner.&lt;br/&gt;But the 51% miner would then have to wait out the `OP_CSV` delay before it gets the funds.&lt;br/&gt;Its time preference may be large enough (if the `OP_CSV` delay is big enough) that it would rather side with Bob, who can pay channel amount - 1 right now, than Alice who promises to pay channel amount later.&lt;br/&gt;&lt;br/&gt;&amp;#34;But Zeeman, Alice could offer to pay now from some onchain funds Alice has, and Alice can recoup the losses later!&amp;#34;&lt;br/&gt;But remember, Alice *also* has a time preference!&lt;br/&gt;Let us consider the case where Alice promises to bribe 51% miner *now*, on the promise that 51% miner will block the Bob justice transaction and *then* Alice gets to enjoy the entire channel amount later.&lt;br/&gt;Bob can counter by offering channel amount - 1 right now on the justice transaction.&lt;br/&gt;The only way for Alice to beat that is to offer channel amount right now, in which case 51% miner will now side with Alice.&lt;br/&gt;&lt;br/&gt;But what happens to Alice in that case?&lt;br/&gt;It loses out on channel amount right now, and then has to wait `OP_CSV` delay, to get the exact same amount later!&lt;br/&gt;It gets no benefit, so this is not even an investment.&lt;br/&gt;It is just enforced HODLing, but Alice can do that using `OP_CLTV` already.&lt;br/&gt;&lt;br/&gt;Worse, Alice has to trust that 51% miner will indeed block the justice transaction.&lt;br/&gt;But if 51% miner is unscrupulous, it could do:&lt;br/&gt;&lt;br/&gt;* Get the bribe from Alice right now.&lt;br/&gt;* After the bribe from Alice confirms, confirm the justice transaction (which has a bribe from Bob).&lt;br/&gt;* Thus:&lt;br/&gt;  * Alice loses the channel amount.&lt;br/&gt;  * Bob keeps 1 satoshi.&lt;br/&gt;  * 51% miner gets channel amount &#43; channel amount - 1.&lt;br/&gt;&lt;br/&gt;Now of course, we can eliminate the need for trust by using some kind of smart contract.&lt;br/&gt;Unfortunately for Alice, there is no contract that Alice and 51% miner can engage in, to ensure that 51% miner will block the justice transaction, which itself does *not* require that 51% miner wait out the `OP_CSV` delay.&lt;br/&gt;Either the payment from Alice to 51% miner is delayed (and the 51% miner suffers the time preference discount) or the 51% miner has to offer a bond that only gets released after the Alice theft succeeds (and again the 51% miner suffers the time preference discount on that bond).&lt;br/&gt;&lt;br/&gt;Thus, due to the `OP_CSV` delay, the honest participant always has the upper hand, even in a 51% miner scenario.&lt;br/&gt;If your channel is *not* with the 51% miner, your funds are still safe.&lt;br/&gt;&lt;br/&gt;--&lt;br/&gt;&lt;br/&gt;Now, we might consider, what if the 51% miner always blocks *all* Lightning-related transactions?&lt;br/&gt;In that case, it loses out on any bribes that any LN participants would offer.&lt;br/&gt;&lt;br/&gt;Further, with Taproot, a mutual LN channel close is indistinguishable from a singlesig spend.&lt;br/&gt;Thus, not all LN-related transactions can be censored by the 51% miner.&lt;br/&gt;Extensive use of Taproot Tapleaves can also make it difficult for a 51% miner to differentiate between LN and other protocols (though that *does* mean we should probably e.g. coordiante with other protocols like CoinSwap, CoinPool etc. so that the &amp;#34;shape&amp;#34; of Taproot Tapleaves is consistent across protocols).&lt;br/&gt;&lt;br/&gt;--&lt;br/&gt;&lt;br/&gt;A final note: in the presence of channel factories, the *entire* factory is at risk if at least one participant is the 51% miner or a sockpuppet thereof.&lt;br/&gt;Thus, channel factories trade off even further scaling, at the cost of reduced protection against 51% miners.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj&lt;br/&gt;&lt;br/&gt;[0]: &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-February/019976.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-February/019976.html&lt;/a&gt;&lt;br/&gt;[1]: &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-February/019978.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-February/019978.html&lt;/a&gt;
    </content>
    <updated>2023-06-09T15:05:24&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsfd3g0slx2mx48q3m5azkxkpekxskw0c4snyutq0tt73j437jgdvczypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzx58ht8</id>
    
      <title type="html">📅 Original date posted:2021-12-16 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsfd3g0slx2mx48q3m5azkxkpekxskw0c4snyutq0tt73j437jgdvczypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzx58ht8" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsf80va6qz0uqxcr6lsnlxhh62eqtyzxmp82vqh250ndgadf5fk00g36wmsc&#39;&gt;nevent1q…wmsc&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-12-16&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning William,&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; Has anyone coded up a &amp;#39;Poor man&amp;#39;s rendez-vous&amp;#39; demo yet? How hard would&lt;br/&gt;&amp;gt; it be, could it be done with a clightning plugin perhaps?&lt;br/&gt;&lt;br/&gt;Probably not *yet*; it needs each intermediate payee (i.e. the one that is not the last one) to sign an invoice for which it does not know the preimage.&lt;br/&gt;Maybe call such a command `signfakeinvoice`.&lt;br/&gt;&lt;br/&gt;However, if a command to do the above is implemented (it would have to generate and sign the invoice, but not insert it into the database at all), then intermediate payees can use `htlc_accepted` hook for the &amp;#34;rendez-vous&amp;#34;.&lt;br/&gt;&lt;br/&gt;So to generate the invoice:&lt;br/&gt;&lt;br/&gt;* Arrange the payees in some agreed fixed order.&lt;br/&gt;* Last payee generates a normal invoice.&lt;br/&gt;* From last payee to second, each one:&lt;br/&gt;  * Passes its invoice to the previous payee.&lt;br/&gt;  * The previous payee then creates its own signed invoice with `signfakeinvoice` to itself, adding its payout plus a fee budget, as well as adding its own delay budget.&lt;br/&gt;  * The previous payee plugin stores the next-payee invoice and the details of its own invoice to db, such as by `datastore` command.&lt;br/&gt;* The first payee sends the sender the invoice.&lt;br/&gt;&lt;br/&gt;On payment:&lt;br/&gt;&lt;br/&gt;* The sender sends the payment to the first hop.&lt;br/&gt;* From first payee to second-to-last:&lt;br/&gt;  * Triggers `htlc_accepted` hook, and plugin checks if the incoming payment has a hash that is in this scheme stored in the database.&lt;br/&gt;  * The plugin gathers `htlc_accepted` hook invocations until they sum up to the expected amount (this handles multipath between payees).&lt;br/&gt;  * The plugin marks that it has gathered all `htlc_accepted` hooks for that hash in durable storage a.k.a. `datastore` (this handles a race condition where the plugin is able to respond to some `htlc_accepted` hooks, but the node is restarted before all of them were able to be recorded by C-Lightning in its own database --- this makes the plugin skip the &amp;#34;gathering&amp;#34; step above, once it has already gathered them all before).&lt;br/&gt;  * The plugin checks if there is already an outgoing payment for that hash (this handles the case where our node gets restarted in the meantime --- C-Lightning will reissue `htlc_accepted` on startup)&lt;br/&gt;    * If the outgoing payment exists and is pending, wait for it to resolve to either success or failure.&lt;br/&gt;    * If the outgoing payment exists and succeeded, resolve all the gathered `htlc_accepted` hooks.&lt;br/&gt;    * If the outgoing payment exists and failed, fail all the gathered `htlc_accepted` hooks.&lt;br/&gt;    * Otherwise, perform a `pay`, giving `maxfeepercent` and `maxdelay` based on its fee budget and delay budget.&lt;br/&gt;      When the `pay` succeeds or fails, propagate it to the gathered `htlc_accepted` hooks.&lt;br/&gt;* The last payee just receives a normal payment using the normal invoice-receive scheme.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:04:51&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsruxxg0pv2f24w0v7jt080t0pdkgu7gx3lwj9r8yg65059t7lswsgzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzdgqfz4</id>
    
      <title type="html">📅 Original date posted:2021-12-07 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsruxxg0pv2f24w0v7jt080t0pdkgu7gx3lwj9r8yg65059t7lswsgzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzdgqfz4" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs0gzhk0tej6rvyma0zmkcudvphuz37xyww9q4nu0cp7glue708recg47tcl&#39;&gt;nevent1q…7tcl&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-12-07&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning LL, and t-bast,&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; Basically, if my memory and understanding are accurate, in the above, it is the *PTLC-offerrer* which provides an adaptor signature.&lt;br/&gt;&amp;gt; &amp;gt; That adaptor signature would be included in the `update_add_ptlc` message.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Isn&amp;#39;t it the case that all previous PTLC adaptor signatures need to be re-sent for each update_add_ptlc message because the signatures would no longer be valid once the commit tx changes. I think it&amp;#39;s better to put it in `commitment_signed` if possible. This is what is done with pre-signed HTLC signatures at the moment anyway.&lt;br/&gt;&lt;br/&gt;Agreed.&lt;br/&gt;&lt;br/&gt;This is also avoided by fast-forwards, BTW, simply because fast-forwards delay the change of the commitment tx.&lt;br/&gt;It is another reason to consider fast-forwards, too....&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:04:37&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsrcd67kpr67petdmt49h50lzn8zkav9y56m2yvpppz9s6qpwdzeagzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzlys2k5</id>
    
      <title type="html">📅 Original date posted:2021-12-07 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsrcd67kpr67petdmt49h50lzn8zkav9y56m2yvpppz9s6qpwdzeagzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzlys2k5" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs2n9y0qh3rf9rrvfgjrvyt6pcvz8uyrwgp00k3dduprfz8nk8fmvgske3qf&#39;&gt;nevent1q…e3qf&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-12-07&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning t-bast,&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; I believe these new transactions may require an additional round-trip.&lt;br/&gt;&amp;gt; Let&amp;#39;s take a very simple example, where we have one pending PTLC in each&lt;br/&gt;&amp;gt; direction: PTLC_AB was offered by A to B and PTLC_BA was offered by B to A.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Now A makes some unrelated updates and wants to sign a new commitment.&lt;br/&gt;&amp;gt; A cannot immediately send her `commitment_signed` to B.&lt;br/&gt;&amp;gt; If she did, B would be able to broadcast this new commitment, and A would&lt;br/&gt;&amp;gt; not be able to claim PTLC_BA from B&amp;#39;s new commitment (even if she knew&lt;br/&gt;&amp;gt; the payment secret) because she wouldn&amp;#39;t have B&amp;#39;s signature for the new&lt;br/&gt;&amp;gt; PTLC-remote-success transaction.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; So we first need B to send a new message `remote_ptlcs_signed` to A that&lt;br/&gt;&amp;gt; contains B&amp;#39;s adaptor signatures for the PTLC-remote-success transactions&lt;br/&gt;&amp;gt; that would spend B&amp;#39;s future commitment. After that A can safely send her&lt;br/&gt;&amp;gt; `commitment_signed`. Similarly, A must send `remote_ptlcs_signed` to B&lt;br/&gt;&amp;gt; before B can send its `commitment_signed`.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; It&amp;#39;s actually not that bad, we&amp;#39;re only adding one message in each direction,&lt;br/&gt;&amp;gt; and we&amp;#39;re not adding more data (apart from nonces) to existing messages.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If you have ideas on how to avoid this new message, I&amp;#39;d be glad to hear&lt;br/&gt;&amp;gt; them, hopefully I missed something again and we can make it better!&lt;br/&gt;&lt;br/&gt;`SIGHASH_NONE | SIGHASH_NOINPUT` (which will take another what, four years?) or a similar &amp;#34;covenant&amp;#34; opcode, such as `OP_CHECKTEMPLATEVERIFY` without any commitments or an `OP_CHECKSIGFROMSTACK` on an empty message.&lt;br/&gt;All you really need is a signature for an empty message, really...&lt;br/&gt;&lt;br/&gt;Alternately, fast-forwards, which avoid this because it does not change commitment transactions on the payment-forwarding path.&lt;br/&gt;You only change commitment transactions once you have enough changes to justify collapsing them.&lt;br/&gt;Even in the aj formulation, when A adds a PTLC it only changes the transaction that hosts **only** A-&amp;gt;B PTLCs as well as the A main output, all of which can be sent outright by A without changing any B-&amp;gt;A PTLCs.&lt;br/&gt;&lt;br/&gt;Basically... instead of a commitment tx like this:&lt;br/&gt;&lt;br/&gt;                        &#43;-------&#43;&lt;br/&gt;    funding outpoint --&amp;gt;|       |--&amp;gt; A main&lt;br/&gt;                        |       |--&amp;gt; B main&lt;br/&gt;                        |       |--&amp;gt; A-&amp;gt;B PTLC&lt;br/&gt;                        |       |--&amp;gt; B-&amp;gt;A PTLC&lt;br/&gt;                        &#43;-------&#43;&lt;br/&gt;&lt;br/&gt;We could do this instead:&lt;br/&gt;&lt;br/&gt;                        &#43;-------&#43;2of2  &#43;-----&#43;&lt;br/&gt;    funding outpoint --&amp;gt;|       |-----&amp;gt;|     |--&amp;gt; A main&lt;br/&gt;                        |       |      |     |--&amp;gt; A-&amp;gt;B PTLC&lt;br/&gt;                        |       |      &#43;-----&#43;&lt;br/&gt;                        |       |2or2  &#43;-----&#43;&lt;br/&gt;                        |       |-----&amp;gt;|     |--&amp;gt; B main&lt;br/&gt;                        |       |      |     |--&amp;gt; B-&amp;gt;A PTLC&lt;br/&gt;                        &#43;-------&#43;      &#43;-----&#43;&lt;br/&gt;&lt;br/&gt;Then whenever A wants to add a new A-&amp;gt;B PTLC it only changes the tx inputs of the *other* A-&amp;gt;B PTLCs without affecting the B-&amp;gt;A PTLCs.&lt;br/&gt;Payment forwarding is fast, and you only change the &amp;#34;big&amp;#34; commitment tx rarely to clean up claimed and failed PTLCs, moving the extra messages out of the forwarding hot path.&lt;br/&gt;&lt;br/&gt;But this is basically highly similar to what aj designed anyway, so...&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:04:37&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsx935rmvckj4gy0htnzlxd4gcf5htyzs97e9s7csdcgxjxp0tyg6gzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzkj8g5t</id>
    
      <title type="html">📅 Original date posted:2021-12-06 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsx935rmvckj4gy0htnzlxd4gcf5htyzs97e9s7csdcgxjxp0tyg6gzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzkj8g5t" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs8082jfud049vz54sjcfmc37z29dz0qj226tyz3nygj3dfl5uaags64fzj6&#39;&gt;nevent1q…fzj6&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-12-06&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning t-bast,&lt;br/&gt;&lt;br/&gt;Long ago: &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-December/002385.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-December/002385.html&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;And I quote:&lt;br/&gt;&lt;br/&gt;&amp;gt;&amp;gt; A potential issue with MuSig is the increased number of communication rounds needed to generate signatures.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;I think you can reduce this via an alternative script path. In&lt;br/&gt;&amp;gt;particular, if you want a script that the other guy can spend if they&lt;br/&gt;&amp;gt;reveal the discrete log of point X, with musig you do:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   P = H(H(A,B),1)*A &#43; H(H(A,B),2)*B&lt;br/&gt;&amp;gt;   [exchange H(RA),H(RB),RA,RB]&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   [send X]&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   sb = rb &#43; H(RA&#43;RB&#43;X,P,m)*H(H(A,B),2)*b&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   [wait for sb]&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   sa = ra &#43; H(RA&#43;RB&#43;X,P,m)*H(H(A,B),1)*a&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   [store RA&#43;RB&#43;X, sa&#43;sb, supply sa, watch for sig]&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   sig = (RA&#43;RB&#43;X, sa&#43;sb&#43;x)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;So the 1.5 round trips are &amp;#34;I want to do a PTLC for X&amp;#34;, &amp;#34;okay here&amp;#39;s&lt;br/&gt;&amp;gt;sb&amp;#34;, &amp;#34;great, here&amp;#39;s sa&amp;#34;.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;But with taproot you can have a script path as well, so you could have a&lt;br/&gt;&amp;gt;script:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   A CHECKSIGVERIFY B CHECKSIG&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;and supply a partial signature:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;   R&#43;X,s,X where s = r &#43; H(R&#43;X,A,m)*a&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;to allow them to satisfy &amp;#34;A CHECKSIGVERIFY&amp;#34; if they know the discrete&lt;br/&gt;&amp;gt;log of X, and of course they can sign with B at any time. This is only&lt;br/&gt;&amp;gt;half a round trip, and can be done at the same time as sending the &amp;#34;I&lt;br/&gt;&amp;gt;want to do a PTLC for X&amp;#34; message to setup the (ultimately cheaper) MuSig&lt;br/&gt;&amp;gt;spend. It&amp;#39;s an extra signature on the sender&amp;#39;s side and an extra verification&lt;br/&gt;&amp;gt;on the receiver&amp;#39;s side, but I think it works out fine.&lt;br/&gt;&lt;br/&gt;It has been a while since I read that post, so my details may be fuzzy, but it looks possible as a way to reduce roundtrips, maybe?&lt;br/&gt;&lt;br/&gt;Basically, if my memory and understanding are accurate, in the above, it is the *PTLC-offerrer* which provides an adaptor signature.&lt;br/&gt;That adaptor signature would be included in the `update_add_ptlc` message.&lt;br/&gt;&lt;br/&gt;Does it become more workable that way?&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:04:36&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqszy5ugd0d53jc29t24kt2cwel238zfyhsphj7na8sk33tzpgluj9szypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxz489srl</id>
    
      <title type="html">📅 Original date posted:2021-11-29 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqszy5ugd0d53jc29t24kt2cwel238zfyhsphj7na8sk33tzpgluj9szypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxz489srl" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsd39jga9rv7eyc9y2fq6cqmtzscncs98y0ds9f6974ehm66m9v4lchx93sr&#39;&gt;nevent1q…93sr&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-11-29&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning Jeremy,&lt;br/&gt;&lt;br/&gt;&amp;gt; Just a minor curiosity I figured was worth mentioning on the composition of delegations and anyprevout...&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; DA: Let full delegation be a script S such that I can sign script R and then R may sign for a transaction T.&lt;br/&gt;&amp;gt; DB: Let partial delegation be a script S such that I can sign a tuple (script R, transaction T) and R may sign T.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; A simple version of this could be done for scriptless multisigs where S signs T and then onion encrypts to the signers of R and distributes the shares.&lt;br/&gt;&lt;br/&gt;Just to be clear, do you mean, &amp;#34;for the case where R is a scriptless multisig&amp;#34;?&lt;br/&gt;And, &amp;#34;onion encrypts the signature&amp;#34;?&lt;br/&gt;&lt;br/&gt;Since part of the signature `(R, s)` would be a scalar modulo k, `s`, another way would be to SSS that scalar and distribute the shares to the R multisig signers, that may require less computation and would allow R to be k-of-n.&lt;br/&gt;&lt;br/&gt;&amp;gt; However, under such a model, if T is signed by S with AnyPrevOut, then T is now arbitrarily rebindable.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Therefore let us define more strictly:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; DC: Let half-delegation be a script S such that I can sign a tuple (script R, transaction T) and R may sign T and revealing T/R does grant authorization to any other party.&lt;br/&gt;&lt;br/&gt;Do you mean &amp;#34;does *not* grant&amp;#34;?&lt;br/&gt;&lt;br/&gt;If S is a delegator that intends to delegate to R, and creates a simple Taproot with keypath S, and signs a spend from that using `SIGHASH_ANYPREVOUT` and distributes shares of the signature to R, then once the signature is revealed onchain, anyone (not just R) may rebind the transaction to any other Taproot with keypath S, which I think is what you wish to prevent with the stricter definition &amp;#34;does *not* grant authorization to any other party&amp;#34;?&lt;br/&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The signer of R could choose to sign with APO, in which case they make the txn rebindable. They could also reveal the private keys for R similarly.&lt;br/&gt;&amp;gt; For &amp;#34;correct&amp;#34; use, R should sign with SIGHASH_ALL, binding the transaction to a single instance.&lt;br/&gt;&lt;br/&gt;Well, for the limited case where R is a k-of-n multisig (including n-of-n) it seems the &amp;#34;sign and SSS&amp;#34; would work similarly, for &amp;#34;correct&amp;#34; use R should sign with `SIGHASH_ALL` anyway, so in the &amp;#34;sign and SSS&amp;#34; method S should always sign with `SIGHASH_ALL`.&lt;br/&gt;&lt;br/&gt;This does not work if the script S itself is hosted in some construction that requires `SIGHASH_ANYPREVOUT` at the base layer, which I believe is what you are concerned about?&lt;br/&gt;In that case all signers should really give fresh pubkeys, i.e. no address reuse.&lt;br/&gt;&lt;br/&gt;&amp;gt; Observation: a tuple script R &#43; transaction T can, in many cases, be represented by script R || &amp;lt;H(transaction T)&amp;gt; CTV.&lt;br/&gt;&amp;gt; Corollary: half-delegation can be derived from full delegation and a covenant.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Therefore delegation &#43; CTV &#43; APO may be sufficient for making chaperone signatures work, if they are desired by a user.&lt;br/&gt;&lt;br/&gt;Hmm what?&lt;br/&gt;Is there some other use for chaperone signatures other than to artificially encumber `SIGHASH_ANYPREVOUT` or have definitions drifted over time?&lt;br/&gt;&lt;br/&gt;&amp;gt; Remarks:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; APO&amp;#39;s design discussion should not revisit Chaperone signatures (hopefully already a dead horse?) but instead consider how APO might compose with Delegation proposals and CTV.&lt;br/&gt;&lt;br/&gt;no chaperones == good&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:04:31&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsz9p9x5nrtlyrcky88xq44w8f6884lcet3cc6rer82r3mduexjgwszypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzluum2h</id>
    
      <title type="html">📅 Original date posted:2021-11-23 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsz9p9x5nrtlyrcky88xq44w8f6884lcet3cc6rer82r3mduexjgwszypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzluum2h" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs8vgxs0j59a4s4vz458a9q0t5d955pyqa4fcpkhedn0w2kky6lmgg06hsus&#39;&gt;nevent1q…hsus&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-11-23&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning x-raid,&lt;br/&gt;&lt;br/&gt;&amp;gt; so You propose Acinq / Blockstream / Lightning Labs do not have funds to run a box or 2 ?&lt;br/&gt;&lt;br/&gt;Not at all, I am proposing that these people, who have already done the effort to release working Lightning Network Node implementations free of charge to you, are not obligated to *also* devote more hardware and resources.&lt;br/&gt;&lt;br/&gt;Let me tell a little story...&lt;br/&gt;&lt;br/&gt;Some years ago, during the SegWit wars, there was a sentiment &amp;#34;when are **they** going to implement Lightning??&amp;#34;&lt;br/&gt;Both anti-SegWit and pro-SegWit asked this:&lt;br/&gt;&lt;br/&gt;* anti-SegWit: Yeah, you need bigblocks, Lightning is vaporware, when are **they** going to implement Lightning?&lt;br/&gt;* pro-SegWit: Lightning is so totes kool, this is why we SegWit, when are **they** going to implement Lightning?&lt;br/&gt;&lt;br/&gt;After some time participating in the SegWit wars, I realized that I was, in fact, a programmer (LOL).&lt;br/&gt;So why should **I** be asking when **they** are going to implement Lightning?&lt;br/&gt;As a programmer, **I** could implement Lightning myself!&lt;br/&gt;I should be asking myself why **I** was not implementing it.&lt;br/&gt;&lt;br/&gt;Thus I started contributing to the Lightning implementation written in a language I could understand, C-Lightning.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;My question to you is: obviously you are a node operator as otherwise the issue you raise would not be relevant to you, but what can *you* do to advance your goal?&lt;br/&gt;&lt;br/&gt;(In any case: C-Lightning and Eclair devs have already mentioned they already run mainnet nodes tracking our respective master branches (i.e. we already eat our own dog food, because duh --- for many of us, the reason we are developing this is because for *other* reasons, we *have to* run Lightning nodes), is there any particular implementation you are concerned about?&lt;br/&gt;Maybe ask them directly?)&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:04:29&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsv8mvh2yk3uf08ny2auu980ksz4ynl09npddr2mld60mzfwjhmvyczypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzsjfr9k</id>
    
      <title type="html">📅 Original date posted:2021-11-23 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsv8mvh2yk3uf08ny2auu980ksz4ynl09npddr2mld60mzfwjhmvyczypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzsjfr9k" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsr5nn4hfj6aus5q5nm6y8a2hs6r4ymsd2d40pknqkehlknf6wvyvsz978kq&#39;&gt;nevent1q…78kq&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-11-23&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning x-raid,&lt;br/&gt;&lt;br/&gt;&amp;gt; I propose a dialog of the below joint effort ...&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; thanks&lt;br/&gt;&amp;gt; /xraid&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; ***&lt;br/&gt;&amp;gt; A decentralised integration lab where CL Eclair LDK LND (&#43;&#43; ?) runs each the latest release on &amp;#34;one box&amp;#34; rBOX and master.rc on &amp;#34;another box&amp;#34; rcBOX.&lt;br/&gt;&lt;br/&gt;I believe Electrum also has its own bespoke implementation.&lt;br/&gt;There was also Ptarmigan.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:04:27&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqspy4e3khe6jln2r65rvumcalpn7vn595l5xr45wkyzv5sja6vg62gzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzpkqfue</id>
    
      <title type="html">📅 Original date posted:2021-11-15 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqspy4e3khe6jln2r65rvumcalpn7vn595l5xr45wkyzv5sja6vg62gzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzpkqfue" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs9zmsflqerv6jt4v0mxdzkt26xfftvzxjl3atvvm2wgprtt4xapgcypw5pg&#39;&gt;nevent1q…w5pg&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-11-15&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning Joost,&lt;br/&gt;&lt;br/&gt;&amp;gt; What I did in lnd is to work with so called &amp;#39;payment attempt cost&amp;#39;. A virtual satoshi amount that represents the cost of a failed attempt.&lt;br/&gt;&lt;br/&gt;&lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2021-August/003191.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2021-August/003191.html&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;And I quote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Introduction&lt;br/&gt;&amp;gt; ============&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; What is the cost of a failed LN payment?&lt;br/&gt;&lt;br/&gt;See link for more.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:04:24&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsy4jcd96n3r84k8zvq98zg8lae90zc4tnzeh7tpmztyn5lrkk7cpczypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzecpf9v</id>
    
      <title type="html">📅 Original date posted:2021-10-21 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsy4jcd96n3r84k8zvq98zg8lae90zc4tnzeh7tpmztyn5lrkk7cpczypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzecpf9v" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs8yuw7sa6sftjlfd507xaq7u0wnsxd6hcy3wrxmqv26rduttz67qq633hwd&#39;&gt;nevent1q…3hwd&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-10-21&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning Joost,&lt;br/&gt;&lt;br/&gt;&amp;gt; A potential downside of a dedicated probe message is that it could be used for free messaging on lightning by including additional data in the payload for the recipient. Free messaging is already possible today via htlcs, but a probe message would lower the cost to do so because the sender doesn&amp;#39;t need to lock up liquidity for it. This probably increases the spam potential. I am wondering if it is possible to design the probe message so that it is useless for anything other than probing. I guess it is hard because it would still have that obfuscated 1300 bytes block with the remaining part of the route in it and nodes can&amp;#39;t see whether there is other meaningful data at the end.&lt;br/&gt;&lt;br/&gt;For the probe, the onion max size does not *need* to be 1300, we could reduce the size to make it less useable for *remote* messaging.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:04:19&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsv7qhvvyjzqsfhs0hm8xycyfh5wwkt4qupst038t0g82z238p4yvszypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzwmzukp</id>
    
      <title type="html">📅 Original date posted:2021-10-19 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsv7qhvvyjzqsfhs0hm8xycyfh5wwkt4qupst038t0g82z238p4yvszypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzwmzukp" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs8dk3xsnwu8atwm9t6t7xr69fr4sqxlgadg5kud8v6dkp5v3gndas5yapwz&#39;&gt;nevent1q…apwz&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-10-19&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning Joost,&lt;br/&gt;&lt;br/&gt;&amp;gt; There could be some corners where the incentives may not work out 100%, but I doubt that any routing node would bother exploiting this. Especially because there could always be that reputation scheme at the sender side which may cost the routing node a lot more in lost routing fees than the marginal gain from the upfront payment.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Another option is that nodes that don&amp;#39;t care to be secretive about their channel balances could include the actual balance in a probe failed message. Related: &lt;a href=&#34;https://github.com/lightningnetwork/lightning-rfc/pull/695&#34;&gt;https://github.com/lightningnetwork/lightning-rfc/pull/695&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Overall it seems that htlc-less probes are an improvement to what we currently have. Immediate advantages include a reduction of the load on nodes by cutting out the channel update machinery, better ux (faster probes) and no locked up liquidity. On the longer term it opens up the option to charge for failed payments so that we finally have an answer to channel jamming.&lt;br/&gt;&lt;br/&gt;One can argue that if you are hoping that forwarding nodes will not exploit this, you can also hope that forwarding nodes will not perform channel-jamming attacks.&lt;br/&gt;As I noted before, channel jamming attacks will never be performed by payers or payees --- they have an incentive to complete the transaction and earn gains from trade.&lt;br/&gt;Channel jamming attacks are performed by large forwarding nodes on their smaller competitors, since having 100 capacity on large versus 10 capacity on the smaller competitor is worse than having 89 capacity on the large versus 0 capacity on the smaller competitor.&lt;br/&gt;&lt;br/&gt;On the other hand, perhaps it is at this point that we should start computing the exact incentives, hmm.&lt;br/&gt;&lt;br/&gt;--&lt;br/&gt;&lt;br/&gt;A thing to note is that any node along a path can disrupt an onion response by the simple expedient of XORing it with random stuff, or even just a non-0 constant.&lt;br/&gt;This may allow for an additional attack vector.&lt;br/&gt;&lt;br/&gt;Suppose I am a forwarding node and I receive a probe request, and it turns out the next hop lacks capacity right now.&lt;br/&gt;I could incite the next hop to lie by forwarding the probe request to the next hop despite the lack of capacity.&lt;br/&gt;&lt;br/&gt;If the next hop responds immediately, I can then corrupt the return onion.&lt;br/&gt;Presumably if the next hop responded immediately it was reporting my lie to the sender.&lt;br/&gt;By corrupting the return onion the ultimate sender is unable to determine *which* node along the route failed, and I can hope that the reputation penalty to my competitor forwarding nodes along the path compensates for the reputation hit I personally suffer.&lt;br/&gt;&lt;br/&gt;If the next hop takes some time before responding, then possibly it colluded with me to lie about the capacity on our channel (i.e. it actually went ahead and forwarded to the next hop despite knowing I lied).&lt;br/&gt;Then I could faithfully onion-encrypt the response and send it back to the ultimate sender.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;To mitigate against the above attack:&lt;br/&gt;&lt;br/&gt;* If a forwarding node gets a probe request for an amount that the asker is *currently* unable to give anyway:&lt;br/&gt;  * The forwarding node should still forward the probe request.&lt;br/&gt;  * On response, however, it replaces the response with its own report that the previous hop was a dirty liar.&lt;br/&gt;  * Note that the asker is the one who has full control over their funds in the channel, so the asker cannot later claim &amp;#34;but the network latency mixed up our messages!&amp;#34; --- the asker knows when it does `update_add_htlc` to reduce its capacity, so it should know it has the capacity or not.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Now, if we are going to add a message &amp;#34;the previous hop was a dirty liar&amp;#34; then we should ask if a forwarding node would want to make a false accusation.&lt;br/&gt;&lt;br/&gt;* Suppose the previous hop has sufficient capacity and asked us if we have our own capacity.&lt;br/&gt;* Does the current hop have any incentive to falsely accuse the previous hop?&lt;br/&gt;  * No: if it did, then the sender would not try their channel again in the close future, thus leading to lower fee earnings.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; ZmnSCPxj, as first person to propose the idea (I think?), would you be interested in opening a draft PR on the spec repository that outlines the new message(s) that we&amp;#39;d need and continue detailing from there?&lt;br/&gt;&lt;br/&gt;It might end up not happening given the stuff I juggle randomly, so feel free to start it.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:04:18&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsg9muyh53qkqpx48q8cdmtxdg94gsh2dtp6ntrxmlhgdzhtqzdqdgzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzym4j5d</id>
    
      <title type="html">📅 Original date posted:2021-10-15 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsg9muyh53qkqpx48q8cdmtxdg94gsh2dtp6ntrxmlhgdzhtqzdqdgzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzym4j5d" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsw2pgdvcpdg03dx37suhxnla5hwflcf5rw9h69hqtaq27u6f63jtsw4784q&#39;&gt;nevent1q…784q&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-10-15&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning Owen,&lt;br/&gt;&lt;br/&gt;&amp;gt; C now notes that B is lying, but is faced with the dilemma:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;#34;I could either say &amp;#39;no&amp;#39; because I can plainly see that B is lying, or&lt;br/&gt;&amp;gt; I could say &amp;#39;yes&amp;#39; and get some free sats from the failed payment (or&lt;br/&gt;&amp;gt; via the hope of a successful payment from a capacity increase in the&lt;br/&gt;&amp;gt; intervening milliseconds).&amp;#34;&lt;br/&gt;&lt;br/&gt;Note that if B cannot forward an HTLC to C later, then C cannot have a failed payment and thus cannot earn any money from the upfront payment scheme; thus, at least that part of the incentive is impossible.&lt;br/&gt;&lt;br/&gt;On the other hand, there is still a positive incentive for continuing the lie --- later, maybe the capacity becomes OK and C could earn both the upfront fee and the success fee.&lt;br/&gt;&lt;br/&gt;&amp;gt; So C decides it&amp;#39;s in his interest to keep the lie going. D, the payee,&lt;br/&gt;&amp;gt; can&amp;#39;t tell that it&amp;#39;s a lie when it reaches her.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If C did want to tattle, it&amp;#39;s important that he be able to do so in a&lt;br/&gt;&amp;gt; way that blames B instead of himself, otherwise payers will assume&lt;br/&gt;&amp;gt; (incorrectly, and to C&amp;#39;s detriment) that the liquidity deficit is with C&lt;br/&gt;&amp;gt; rather than B.&lt;br/&gt;&lt;br/&gt;That is certainly quite possible to do.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:04:17&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsru3u3w22fdmspaqwwt39n0emu8ygk4dx4wednqe26xyzsmk38xuqzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxz8pc2ch</id>
    
      <title type="html">📅 Original date posted:2021-10-15 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsru3u3w22fdmspaqwwt39n0emu8ygk4dx4wednqe26xyzsmk38xuqzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxz8pc2ch" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqspcns85qtkezja3xzqsy9v7z9x7lrtuwcda3dfevvd435k5zfgtpcpccek7&#39;&gt;nevent1q…cek7&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-10-15&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning Owen,&lt;br/&gt;&lt;br/&gt;&amp;gt; On Thu, Oct 14, 2021 at 09:48:27AM &#43;0200, Joost Jager wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; So how would things work out with a combination of both of the&lt;br/&gt;&amp;gt; &amp;gt; proposals described in this mail? First we make probing free (free as&lt;br/&gt;&amp;gt; &amp;gt; in no liquidity locked up) and then we&amp;#39;ll require senders to pay for&lt;br/&gt;&amp;gt; &amp;gt; failed payment attempts too. Failed payment attempts after a&lt;br/&gt;&amp;gt; &amp;gt; successful probe should be extremely rate, so doesn&amp;#39;t this fix the ux&lt;br/&gt;&amp;gt; &amp;gt; issue with upfront fees?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Why couldn&amp;#39;t a malicious routing node (or group of colluding routing&lt;br/&gt;&amp;gt; nodes) succeed the probe and then fail the payment in order to collect&lt;br/&gt;&amp;gt; the failed payment fee?&lt;br/&gt;&lt;br/&gt;Good observation!&lt;br/&gt;&lt;br/&gt;I propose substantially the same thing here: &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/lightning-dev/2021-September/003256.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/lightning-dev/2021-September/003256.html&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;In that proposal, I wrote:&lt;br/&gt;&lt;br/&gt;&amp;gt; Another thought is: Does the forwarding node have an incentive to lie?&lt;br/&gt;&amp;gt; Suppose the next hop is alive but the forwarding node has insufficient capacity towards the next hop.&lt;br/&gt;&amp;gt; Then the forwarding node can lie and claim it can still resolve the HTLC, in the hope that a few milliseconds later, when the actual HTLC arrives, the capacity towards the next hop has changed.&lt;br/&gt;&amp;gt; Thus, even if the capacity now is insufficient, the forwarding node has an incentive to lie and claim sufficient capacity.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Against the above, we can mitigate this by accepting &amp;#34;no&amp;#34; from *any* node along the path, but only accepting &amp;#34;yes&amp;#34; from the actual payee.&lt;br/&gt;&lt;br/&gt;We already have a mechanism to send an onion and get back an &amp;#34;error&amp;#34; reply; the reply can be identified by the sender as arising from any node along the path, or at the destination.&lt;br/&gt;Basically, we simply reuse this mechanism:&lt;br/&gt;&lt;br/&gt;* Do not need an HTLC with this onion.&lt;br/&gt;* Only accept a &amp;#34;everything is OK&amp;#34; result from the destination.&lt;br/&gt;* Accept a &amp;#34;sorry cannot forward&amp;#34; from *any* node along the path.&lt;br/&gt;&lt;br/&gt;Thus, a malicious node cannot succeed the probe --- the probe has to reach the destination.&lt;br/&gt;&lt;br/&gt;Now the malicious forwarding node could be colluding with the destination, but presumably the destination wants to *actually* get paid, so we expect that, economically, it has no incentive to cooperate with the malicious node to *fail* the actual payment later just to extract a tiny failure fee.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:04:17&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsxxp2zppdspeyhnsn3feu0vjh9060723m22rtdtkms5aralv2lnxqzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxz4fyf59</id>
    
      <title type="html">📅 Original date posted:2021-10-12 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsxxp2zppdspeyhnsn3feu0vjh9060723m22rtdtkms5aralv2lnxqzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxz4fyf59" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsypzt57r0ltjcjxuhzccpyn7nee0zl7vl6qzfvmtfgfz2ffavwztgvll892&#39;&gt;nevent1q…l892&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-10-12&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning aj,&lt;br/&gt;&lt;br/&gt;&amp;gt; On Mon, Oct 11, 2021 at 05:05:05PM &#43;1100, Lloyd Fournier wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; ### Scorched earth punishment&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Another thing that I&amp;#39;d like to mention is that using revocable signatures&lt;br/&gt;&amp;gt; &amp;gt; enables scorched earth punishments [2].&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I kind-of think it&amp;#39;d be more interesting to simulate eltoo&amp;#39;s behaviour.&lt;br/&gt;&amp;gt; If Alice&amp;#39;s current state has balances (A, B) and P in in-flight&lt;br/&gt;&amp;gt; payments, and Bob posts an earlier state with (A&amp;#39;, B&amp;#39;) and P&amp;#39; (so A&#43;B&#43;P&lt;br/&gt;&amp;gt; = A&amp;#39;&#43;B&amp;#39;&#43;P&amp;#39;), then maybe Alice&amp;#39;s justice transaction should pay:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; A&#43;P &#43; max(0, B&amp;#39;-B)*0.1 to Alice&lt;br/&gt;&amp;gt; B-f - max(0, B&amp;#39;-B)*0.1 to Bob&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; (where &amp;#34;f&amp;#34; is the justice transaction fees)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Idea being that in an ideal world there wouldn&amp;#39;t be a hole in your pocket&lt;br/&gt;&amp;gt; that lets all your coins fall out, but in the event that there is such&lt;br/&gt;&amp;gt; a hole, it&amp;#39;s a nicer world if the people who find your coins give them&lt;br/&gt;&amp;gt; back to you out of the kindness of their heart.&lt;br/&gt;&lt;br/&gt;This may model closer to &amp;#34;two tits for a tat&amp;#34; strategy.&lt;br/&gt;&lt;br/&gt;&amp;#34;Tit for tat&amp;#34; is optimum in iterated prisoner dilemma assuming mistakes never happen; however, in the real world we know quite well that we may injure another person by complete accident.&lt;br/&gt;The usual practice in the real world is that the injured person will accept an apology *once*, but a repeat will tend to make people assume you are hostile and switch them over to tit for tat.&lt;br/&gt;This overall strategy is then &amp;#34;two tits for a tat&amp;#34;, you are (in practice) given one chance and then you are expected to be very careful in interacting with that person to keep being in their good graces.&lt;br/&gt;&lt;br/&gt;So, if what you propose is widespread, then a theft attempt is costless: you can try using old state, and your victim will, on finding it, instead just use what they think is the latest state.&lt;br/&gt;Thus, merely attempting the theft is costless (modulo onchain fees, which may be enough punishment in this case?).&lt;br/&gt;&lt;br/&gt;However, if we assume that in practice a lot of &amp;#34;theft attempts&amp;#34; are really people not taking RAID systems and database replication seriously and getting punished by the trickster god Murphy, then your proposal would actually be better, and if theft is unlikely enough to succeed, then even a costless theft attempt would still be worthless (and onchain fees will bite you anyway).&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:04:08&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs8vwhncptv6tmz2etjnej7gktuedvgr08c2t368mnfletl99xtxkczypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxz4skmvn</id>
    
      <title type="html">📅 Original date posted:2021-10-08 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs8vwhncptv6tmz2etjnej7gktuedvgr08c2t368mnfletl99xtxkczypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxz4skmvn" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsg6xlw0466p6hrdt6llqngx8w66h7cec74xyvesa0r28da0laq7mcfqwznj&#39;&gt;nevent1q…wznj&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-10-08&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning aj,&lt;br/&gt;&lt;br/&gt;&amp;gt; On Sat, Oct 09, 2021 at 01:49:38AM &#43;0000, ZmnSCPxj wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; A transaction is required, but I believe it is not necessary to put it onchain (at the cost of implementation complexity in the drop-onchain case).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The trick with that is that if you don&amp;#39;t put it on chain, you need&lt;br/&gt;&amp;gt; to calculate the fees for it in advance so that they&amp;#39;ll be sufficient&lt;br/&gt;&amp;gt; when you do want to put it on chain, and you can&amp;#39;t update it without&lt;br/&gt;&amp;gt; going onchain, because there&amp;#39;s no way to revoke old off-chain funding&lt;br/&gt;&amp;gt; transactions.&lt;br/&gt;&lt;br/&gt;Yes, onchain fees, right?&lt;br/&gt;&lt;br/&gt;*Assuming* CPFP is acceptable, then fees for the commitment tx on the new scheme (or whatever equivalent in the transitioned-to mechanism is) would pay for the transitioning transaction, so fees paying for the transitioning transaction can still be adjusted at the transitioned-to updatable mechanism.&lt;br/&gt;This probably assumes that the transaction package relay problem is fixed at the base layer though.&lt;br/&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; This has the advantage of maintaining the historical longevity of the channel.&lt;br/&gt;&amp;gt; &amp;gt; Many pathfinding and autopilot heuristics use channel lifetime as a positive indicator of desirability,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Maybe that&amp;#39;s a good reason for routing nodes to do shadow channels as&lt;br/&gt;&amp;gt; a matter of course -- call the currently established channel between&lt;br/&gt;&amp;gt; Alice and Bob &amp;#34;C1&amp;#34;, and leave it as bolt#3 based, but establish a new&lt;br/&gt;&amp;gt; taproot based channel C2 also between Alice and Bob. Don&amp;#39;t advertise C2&lt;br/&gt;&amp;gt; (making it a shadow channel), just say that C1 now supports PTLCs, but&lt;br/&gt;&amp;gt; secretly commit to those PTLCs to C2 instead C1. Once the C2 funding tx&lt;br/&gt;&amp;gt; is buried enough, start advertising C2 instead taking advantage of its&lt;br/&gt;&amp;gt; now sufficiently buried funding transaction, and convert C1 to a shadow&lt;br/&gt;&amp;gt; channel instead.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In particular, that setup allows you to splice funds into or out of the&lt;br/&gt;&amp;gt; shadow channel while retaining the positive longevity heuristics of the&lt;br/&gt;&amp;gt; public channel.&lt;br/&gt;&lt;br/&gt;Requires two UTXOs, though, I think?&lt;br/&gt;&lt;br/&gt;How about just adding a gossip message &amp;#34;this new short-channel-id is the same as this old short-channel-id, use the new-short-channel-id to validate it but treat the age as that of the old short-channel-id&amp;#34;?&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:04:07&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqste8d7gdr3e4gayr7yrs9mw45e2cpxrkheeja72r586uw2a6332xgzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzdvwcu9</id>
    
      <title type="html">📅 Original date posted:2021-10-08 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqste8d7gdr3e4gayr7yrs9mw45e2cpxrkheeja72r586uw2a6332xgzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzdvwcu9" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsvlnvjkdf40kamrsz757derkpuahuqmgw9a38260qrpcdm8upn8rcw3tlca&#39;&gt;nevent1q…tlca&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-10-08&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning aj,&lt;br/&gt;&lt;br/&gt;&amp;gt;     In order to transition from BOLT#3 format to this proposal, an onchain&lt;br/&gt;&amp;gt;     transaction is required, as the &amp;#34;revocable signatures&amp;#34; arrangement cannot&lt;br/&gt;&amp;gt;     be mimicked via the existing 2-of-2 CHECKMULTISIG output.&lt;br/&gt;&lt;br/&gt;A transaction is required, but I believe it is not necessary to put it *onchain* (at the cost of implementation complexity in the drop-onchain case).&lt;br/&gt;&lt;br/&gt;An existing channel can &amp;#34;simply&amp;#34; sign a transitioning transaction from the current BOLT3 to your new scheme, and then invalidate the last valid commitment transactions (i.e. exchange revocation secrets) in the BOLT3 scheme.&lt;br/&gt;The transitioning transaction can simply be kept offchain and its output used as the funding outpoint of all &amp;#34;internal&amp;#34; (to the two counterparties directly in the channel) states.&lt;br/&gt;&lt;br/&gt;This general idea would work for all transitions *from* Poon-Dryja, I believe.&lt;br/&gt;It may be possible with Decker-Russell-Osuntokun I think (give the transitioning transaction the next sequence `nLockTime` number), but the `SIGHASH_NOINPUT`ness and (maybe?) the `CSV` infects the mechanism being transitioned to, so this technique may be too complicated for transitioning *from* Decker-Russell-Osuntokun to some hypothetical future offchain updatable cryptocurrency system that does not need (or want) `SIGHASH_NOINPUT`.&lt;br/&gt;&lt;br/&gt;This has the advantage of maintaining the historical longevity of the channel.&lt;br/&gt;Many pathfinding and autopilot heuristics use channel lifetime as a positive indicator of desirability, thus an *onchain* transitioning transaction is undesirable as that marks a closure of the previous channel.&lt;br/&gt;And the exact scheme of channels between forwarding nodes are not particularly the business of anyone else anyway.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:04:06&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqstkej5sgcp06dt4hyfa5wmjf0qjqucrmrjwrwl44q2zx34znd0twgzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzz8z8yx</id>
    
      <title type="html">📅 Original date posted:2021-09-21 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqstkej5sgcp06dt4hyfa5wmjf0qjqucrmrjwrwl44q2zx34znd0twgzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzz8z8yx" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs9h9fggtca756tqueljcqyzefv62yhxtf0qmvaf5jv8wxz98e2euge82dhf&#39;&gt;nevent1q…2dhf&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-09-21&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning again Joost,&lt;br/&gt;&lt;br/&gt;&amp;gt; However, we can do &amp;#34;pay for signature&amp;#34; protocols using PTLCs, and rather than requesting for a scalar behind a point as the proof-of-payment, we can instead ask for a signature of a message that attests &amp;#34;this recipient got paid `payment_amount` with `encoded_order_details`&amp;#34; and have a recipient pubkey (not necessarily the node key, it might be best to reduce signing for node keys) as the signing key.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; So it seems to me that this cannot work with hashes, but can work with PTLCs if we use pay-for-signature and the proof-of-payment is a signature rather than a scalar.&lt;br/&gt;&lt;br/&gt;No, it does not work either.&lt;br/&gt;&lt;br/&gt;The reason is that for signing, we need an `R` as well.&lt;br/&gt;Typically, this is a transient keypair generated by the signer as `r = rand(); R = r * G`.&lt;br/&gt;&lt;br/&gt;In order to set up a pay-for-signature, the sender needs to know an `R` from the recipient, and the recipient, being the signer, has to generate that `R` for itself.&lt;br/&gt;And if you are just going to do something like sender-&amp;gt;request-&amp;gt;receiver, receiver-&amp;gt;R-&amp;gt;sender, and *then* do the sender-&amp;gt;PTLC-&amp;gt;receiver, then you might as well just do sender-&amp;gt;request-&amp;gt;receiver, receiver-&amp;gt;invoice-&amp;gt;sender, sender-&amp;gt;PTLC-&amp;gt;receiver.&lt;br/&gt;&lt;br/&gt;I think your goal, as I understand it, is to reduce it to one round, i.e. sender-&amp;gt;PTLC&#43;some_data-&amp;gt;receiver, then receiver responds to the PTLC that somehow generates the proof-of-payment.&lt;br/&gt;Is my understanding correct?&lt;br/&gt;&lt;br/&gt;We cannot have the sender generate the `r` and `R = r * G` as knowledge of `r`, `s` and the signed message `m` results in learning the privkey `a`:&lt;br/&gt;&lt;br/&gt;    s = r - a * h(R | m)&lt;br/&gt;    a = (r - s) / h(R | m)&lt;br/&gt;&lt;br/&gt;Even with MuSig2 we need a separate round for `R` establishment before the round where everyone gives shares of `s`, and one can argue that a proof-of-payment, being an agreement of the sender and a receiver, is semantically equivalent to a 2-of-2 signature of both sender and the receiver signing off on the fact that the payment happened.&lt;br/&gt;Thus, it seems to me that we can adapt any *secure* single-round multisignature Schnorr scheme to this problem of needing a single-round pay-for-signature.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Perhaps another mechanism?&lt;br/&gt;WARNING: THIS IS NOVEL CRYPTOGRAPHY I THOUGHT UP IN FIVE MINUTES AND I AM NOT A CRYPTOGRAPHER, DO NOT ROLL YOUR OWN CRYPTO.&lt;br/&gt;&lt;br/&gt;Instead of having a single receiver-scalar, the receiver knows two scalars.&lt;br/&gt;&lt;br/&gt;   A = a * G&lt;br/&gt;   B = b * G&lt;br/&gt;&lt;br/&gt;The sender knows both `A` and `B`.&lt;br/&gt;&lt;br/&gt;Now, suppose sender wants to make a payment to the receiver.&lt;br/&gt;At its simplest, the sender can simply add `A &#43; B` and lock an outgoing PTLC to that point.&lt;br/&gt;The proof-of-payment is the sum `a &#43; b`, but knowledge of this sum does not imply knowledge of either `a` or `b` (I THINK --- I AM NOT A CRYPTOGRAPHER).&lt;br/&gt;&lt;br/&gt;Now, suppose we want a proof-of-payment to be keyed to some data.&lt;br/&gt;We can translate that data to a scalar (e.g. just hash it) and call it `d`.&lt;br/&gt;Then the sender makes a payment to the receiver using this point:&lt;br/&gt;&lt;br/&gt;    d * A &#43; B&lt;br/&gt;&lt;br/&gt;The sender then receives the scalar behind the above point:&lt;br/&gt;&lt;br/&gt;    d * a &#43; b&lt;br/&gt;&lt;br/&gt;Even with knowledge of `d`, the sender cannot learn either `a` or `b` and thus cannot synthesize any other proof-of-payment with a different `d`, thus &amp;#34;locking&amp;#34; the proof-of-payment to a specific `d`.&lt;br/&gt;&lt;br/&gt;The above proof-of-payment is sufficient by showing the point `d * A &#43; B`, the committed data `d`, and the receiver public keys `A` and `B`.&lt;br/&gt;&lt;br/&gt;AGAIN THIS IS NOVEL CRYPTOGRAPHY I THOUGHT UP IN FIVE MINUTES AND I AM NOT A CRYPTOGRAPHER, THIS NEEDS ACTUAL MATHEMATICAL REVIEW FROM AN ACTUAL CRYPTOGRAPHER.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:03:48&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs8zyrwcusls66tu3h8mdcgfxmg6lah5f9yhytfvd3k3lhdrnyt65czypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxz7usahe</id>
    
      <title type="html">📅 Original date posted:2021-09-21 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs8zyrwcusls66tu3h8mdcgfxmg6lah5f9yhytfvd3k3lhdrnyt65czypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxz7usahe" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs9k90xq8astzg9ml24a8g05cskxezppdqxw7u5gz9mrea6chpxk3g2fm7q5&#39;&gt;nevent1q…m7q5&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-09-21&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning Joost,&lt;br/&gt;&lt;br/&gt;&amp;gt; It could be something like this:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; payment_secret = random&lt;br/&gt;&amp;gt; preimage = H(node_secret | payment_secret | payment_amount | encoded_order_details)&lt;br/&gt;&amp;gt; invoice_hash = H(preimage)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The sender sends an htlc locked to invoice_hash for payment_amount and passes along payment_secret and encoded_order_details in a custom tlv record.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; When the recipient receives the htlc, they reconstruct the preimage according to the formula above. At this point, all data is available to do so. When H(preimage) indeed matches the htlc hash, they can settle the payment knowing that this is an order that they committed to earlier. Settling could be implemented as a just-in-time inserted invoice to keep the diff small.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The preimage is returned to the sender and serves as a proof of payment.&lt;br/&gt;&lt;br/&gt;Does this actually work?&lt;br/&gt;How does the sender know the `invoice_hash` to lock the HTLC(s) to?&lt;br/&gt;&lt;br/&gt;If the sender does not know the `node_secret` (from its name, I am guessing it is a secret known only by the recipient?) then it cannot compute `invoice_hash`, the `invoice_hash` has to be somehow learned by the sender from the recipient.&lt;br/&gt;&lt;br/&gt;And that is done in the BOLT12 protocol by having the sender send a message to the recipient and getting a reply back, included in the reply is a unique BOLT11 invoice for a single intended payment.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Note that even using point shenanigans and PTLCs seems not to work.&lt;br/&gt;If you provide, say, a BIP32 nonhardened point / master pubkey, the sender could select an arbitrary `i` and ask for the scalar / privkey behind it, but that also lets the sender derive the master privete key used in the derivation.&lt;br/&gt;Hardening the derivation would prevent master public keys from being used in derivations in the first place.&lt;br/&gt;&lt;br/&gt;However, we can do &amp;#34;pay for signature&amp;#34; protocols using PTLCs, and rather than requesting for a scalar behind a point as the proof-of-payment, we can instead ask for a signature of a message that attests &amp;#34;this recipient got paid `payment_amount` with `encoded_order_details`&amp;#34; and have a recipient pubkey (not necessarily the node key, it might be best to reduce signing for node keys) as the signing key.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;So it seems to me that this cannot work with hashes, but *can* work with PTLCs if we use pay-for-signature and the proof-of-payment is a signature rather than a scalar.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:03:48&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs9h9fggtca756tqueljcqyzefv62yhxtf0qmvaf5jv8wxz98e2eugzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzvsyj52</id>
    
      <title type="html">📅 Original date posted:2021-09-21 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs9h9fggtca756tqueljcqyzefv62yhxtf0qmvaf5jv8wxz98e2eugzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzvsyj52" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsxccvs3r5vehyyn40c5es5xf4mzksgmzv9a3dveemr85y6wkzsqdqvvjjs2&#39;&gt;nevent1q…jjs2&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-09-21&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning Joost,&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; preimage = H(node_secret | payment_secret | payment_amount | encoded_order_details)&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; invoice_hash = H(preimage)&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; The sender sends an htlc locked to invoice_hash for payment_amount and passes along payment_secret and encoded_order_details in a custom tlv record.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; When the recipient receives the htlc, they reconstruct the preimage according to the formula above. At this point, all data is available to do so. When H(preimage) indeed matches the htlc hash, they can settle the payment knowing that this is an order that they committed to earlier. Settling could be implemented as a just-in-time inserted invoice to keep the diff small.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; The preimage is returned to the sender and serves as a proof of payment.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Does this actually work?&lt;br/&gt;&amp;gt; &amp;gt; How does the sender know the `invoice_hash` to lock the HTLC(s) to?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; If the sender does not know the `node_secret` (from its name, I am guessing it is a secret known only by the recipient?) then it cannot compute `invoice_hash`, the `invoice_hash` has to be somehow learned by the sender from the recipient.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; So to be clear: this isn&amp;#39;t a spontaneous payment protocol with proof-of-payment. The sender will still request an invoice from the recipient via an ordinary http request (think of a paywall with qr invoice that is presented when web-browsing to a paid article). That is also how the sender learns the invoice_hash. It is part of the bolt11 payment request as it always is.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The goal of the scheme is to alleviate the recipient from storing the invoices that they generate.&lt;br/&gt;&lt;br/&gt;Ah, thanks for the clarification.&lt;br/&gt;This should probably work, then.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:03:48&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs9fy2v5jqcet2ys23jzcrnh3h9cyzcjwpf2use8yf6hx70rnesn3czypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzx4836y</id>
    
      <title type="html">📅 Original date posted:2021-08-23 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs9fy2v5jqcet2ys23jzcrnh3h9cyzcjwpf2use8yf6hx70rnesn3czypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzx4836y" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqst49whmmugqs7kmzsqs6a9exkk57958p4snx08fvfdp28rudlaszsatz9ut&#39;&gt;nevent1q…z9ut&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-08-23&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning Stefan,&lt;br/&gt;&lt;br/&gt;&amp;gt; Hi Zmn! That is some amazing lateral thinking you have been applying there. I&amp;#39;m quite certain I haven&amp;#39;t understood everything fully, but it has been highly entertaining to read. Will have to give it a closer read when I get some time.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; As a first impression, here are some preliminary observations: While I highly like the Haskell-style datatype, and the algorithm we use does mostly use Dijkstra pathfinding, I think what is really important in your definition is the computeCost definition. This is what we would call the cost function IIUC, and in order to be able to solve min-cost flow problems it generally has to be separable and convex. I believe your datatype merely hides the fact that it is neither. &lt;br/&gt;&lt;br/&gt;Well, it really depends on what min flow cost algorithms actually assume of the &amp;#34;numbers&amp;#34; being used.&lt;br/&gt;&lt;br/&gt;For instance, it is well known that the Dijkstra-A\*-Greedy family of algorithms do not handle &amp;#34;negative costs&amp;#34;.&lt;br/&gt;What it really means is that the algorithms assume:&lt;br/&gt;&lt;br/&gt;    a &#43; b &amp;gt;= a&lt;br/&gt;    a &#43; b &amp;gt;= b&lt;br/&gt;&lt;br/&gt;This holds if `a` and `b` are naturals (0 or positive), but not if they are integers.&lt;br/&gt;1 &#43; -1 = 0, and 0 &amp;gt;= 1 is not true, thus the type for costs in those algorithms cannot be integer types, they have to be naturals.&lt;br/&gt;However if you restrict the type to naturals,  `a &#43; b &amp;gt;= a` holds, and thus Dijkstra and its family of algorithms work.&lt;br/&gt;&lt;br/&gt;Thus, if you are going to use Dijkstra-A\*-Greedy, you &amp;#34;only&amp;#34; need to have the following &amp;#34;operations&amp;#34;:&lt;br/&gt;&lt;br/&gt;    `&#43;` :: Cost -&amp;gt; Cost -&amp;gt; Cost&lt;br/&gt;    `&amp;lt;` :: Cost -&amp;gt; Cost -&amp;gt; Bool&lt;br/&gt;    zero :: Cost&lt;br/&gt;&lt;br/&gt;With the following derived operations:&lt;br/&gt;&lt;br/&gt;    a &amp;gt; b = b &amp;lt; a&lt;br/&gt;    a &amp;gt;= b = not (a &amp;lt; b)&lt;br/&gt;    a &amp;lt;= b = not (b &amp;lt; a)&lt;br/&gt;    a == b = (a &amp;gt;= b) &amp;amp;&amp;amp; (a &amp;lt;= b)&lt;br/&gt;    a /= b = (a &amp;lt; b) || (a &amp;gt; b)&lt;br/&gt;&lt;br/&gt;And following the laws:&lt;br/&gt;&lt;br/&gt;    forall (a :: Cost) =&amp;gt; a &#43; zero == a&lt;br/&gt;    forall (a :: Cost) =&amp;gt; zero &#43; a == a&lt;br/&gt;    forall (a :: Cost, b :: Cost) =&amp;gt; a &#43; b == b &#43; a&lt;br/&gt;    forall (a :: Cost, b :: Cost, c :: Cost) =&amp;gt; (a &#43; b) &#43; c == a &#43; (b &#43; c)&lt;br/&gt;    forall (a :: Cost, b :: Cost) =&amp;gt; a &#43; b &amp;gt;= a&lt;br/&gt;    forall (a :: Cost, b :: Cost) =&amp;gt; a &#43; b &amp;gt;= b&lt;br/&gt;&lt;br/&gt;As a non-mathist I have no idea what &amp;#34;separable&amp;#34; and &amp;#34;convex&amp;#34; actually mean.&lt;br/&gt;Basic search for &amp;#34;convex&amp;#34; and &amp;#34;concave&amp;#34; tends to show up information in geometry, which I think is not related (though it is possible there is some extension of the geometric concept to pure number theory?).&lt;br/&gt;And definitions on &amp;#34;separable&amp;#34; are not understandable by me, either.&lt;br/&gt;&lt;br/&gt;What exactly are the operations involved, and what are the laws those operations must follow, for the data type to be &amp;#34;separable&amp;#34; and &amp;#34;convex&amp;#34; (vs.&amp;#34;concave&amp;#34;)?&lt;br/&gt;&lt;br/&gt;I guess my problem as well is that I cannot find easy-to-understand algorithms for min cost flow --- I can find discussions on the min cost flow &amp;#34;problem&amp;#34;, and some allusions to solutions to that problem, but once I try looking into algorithms it gets quite a bit more complicated.&lt;br/&gt;&lt;br/&gt;Basically: do I need these operations?&lt;br/&gt;&lt;br/&gt;    `*` :: Cost -&amp;gt; Cost -&amp;gt; Cost&lt;br/&gt;    `/` :: Cost -&amp;gt; Cost -&amp;gt; Cost --- or Maybe Cost&lt;br/&gt;&lt;br/&gt;If not, then why cannot `type Cost = UnifiedCost`?&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;For example, this page: &lt;a href=&#34;https://www.topcoder.com/thrive/articles/Minimum%20Cost%20Flow%20Part%20Two:%20Algorithms&#34;&gt;https://www.topcoder.com/thrive/articles/Minimum%20Cost%20Flow%20Part%20Two:%20Algorithms&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Includes this pseudocode:&lt;br/&gt;&lt;br/&gt;    Transform network G by adding source and sink&lt;br/&gt;    Initial flow x is zero&lt;br/&gt;    while ( Gx contains a path from s to t ) do&lt;br/&gt;        Find any shortest path P from s to t&lt;br/&gt;        Augment current flow x along P&lt;br/&gt;        update Gx&lt;br/&gt;&lt;br/&gt;If &amp;#34;find any shortest path&amp;#34; is implemented using Dijkstra-A\*-Greedy, then that does not require `Cost` to be an actual numeric type, they just require a type that provides `&#43;`, `&amp;lt;`, and `zero`, all of which follow the laws I pointed out, *and no more than those*.&lt;br/&gt;`UnifiedCost` follows those laws (tough note that my definition of `zero` has a bug, `successProbability` should be `1.0` not `0`).&lt;br/&gt;&lt;br/&gt;In short --- the output of the cost function is a `UnifiedCost` structure and ***not*** a number (in the traditional sense).&lt;br/&gt;&lt;br/&gt;Basically, I am deconstructing numbers here and trying to figure out what makes them tick, and seeing if I can use a different type to provide the &amp;#34;tick&amp;#34;.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:03:33&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsrts3k8qzwayvpnclga02a8elvkvkv26fjs59y0hafvdlp075ftlqzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzxe73ue</id>
    
      <title type="html">📅 Original date posted:2021-08-21 📝 Original message: &amp;gt; ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsrts3k8qzwayvpnclga02a8elvkvkv26fjs59y0hafvdlp075ftlqzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzxe73ue" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqspzmv8pu6ws0clxmtema6nx69suramsldmrhw4dmenpwzp65mspas9w0ddc&#39;&gt;nevent1q…0ddc&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-08-21&lt;br/&gt;📝 Original message:&lt;br/&gt;&amp;gt;     Alternative Pathfinding?&lt;br/&gt;&amp;gt;     ========================&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Or to put this section more succinctly: Why should cost be a number?&lt;br/&gt;&lt;br/&gt;What operations do the minimum cost flow algorithms demand of this thing called &amp;#34;cost&amp;#34;, and can we provide those operations using something which is not a number but is instead a different structure?&lt;br/&gt;What is the minimal interface that the mincostflow algo demands of this &amp;#34;cost&amp;#34; datatype?&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:03:33&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqspzmv8pu6ws0clxmtema6nx69suramsldmrhw4dmenpwzp65mspaszypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxz63yc3a</id>
    
      <title type="html">📅 Original date posted:2021-08-20 📝 Original message: ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqspzmv8pu6ws0clxmtema6nx69suramsldmrhw4dmenpwzp65mspaszypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxz63yc3a" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs2dgymmgz0ex4s8mykzcrwvhy9nhdw30wkrvcaaff8qdvdgevdxzcq36avz&#39;&gt;nevent1q…6avz&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-08-20&lt;br/&gt;📝 Original message:&lt;br/&gt;Subject: Fee Budgets: A Possible Path Towards Unified Cost Functions For Lightning Pathfinding Problems&lt;br/&gt;&lt;br/&gt;Introduction&lt;br/&gt;============&lt;br/&gt;&lt;br/&gt;What is the cost of a failed LN payment?&lt;br/&gt;&lt;br/&gt;Presumably, if a user wants to pay in exchange for something,&lt;br/&gt;that user values that thing higher than the Bitcoin they spend&lt;br/&gt;on that thing.&lt;br/&gt;This is a central assumption of free market economics, that&lt;br/&gt;all transactions are voluntary and that all participants in&lt;br/&gt;the transaction get more utility out of the transaction than&lt;br/&gt;what they put in.&lt;br/&gt;&lt;br/&gt;Note that ***value is subjective***.&lt;br/&gt;For example, a farmer values the food they sell less than&lt;br/&gt;the buyer of that food, because the farmer has leet farming&lt;br/&gt;skillz that actually let them **grow food** from literal shit,&lt;br/&gt;sunlight, and water, and presumably the buyer does not have&lt;br/&gt;those leet skillz0rs to convert literal shit to food&lt;br/&gt;using sunlight and water (otherwise they would be growing&lt;br/&gt;their own food).&lt;br/&gt;This applies for all production, given that you puny humans&lt;br/&gt;have such limited time to learn and train leet skillz.&lt;br/&gt;&lt;br/&gt;Thus, for a buyer, there is a difference in value between&lt;br/&gt;the product they are buying, and the BTC they are sacrificing&lt;br/&gt;to the elder gods (i.e. the payment network and the seller) in&lt;br/&gt;order to get the product.&lt;br/&gt;The buyer must value the product more than the BTC.&lt;br/&gt;&lt;br/&gt;This difference, then, is the cost of a failed payment.&lt;br/&gt;If the attempt to pay fails, then obviously the seller&lt;br/&gt;will not be willing to send the product (as it can receive&lt;br/&gt;no money for it) and the buyer loses the (buyer-subjective)&lt;br/&gt;value of the product minus the value of the BTC they wanted&lt;br/&gt;to use to pay.&lt;br/&gt;&lt;br/&gt;This difference in value, while subjective, is quantifiable&lt;br/&gt;(consider how judges at a beauty contest must convert&lt;br/&gt;their subjective judgment of beauty to a number; indeed,&lt;br/&gt;horny humans do this all the time at bars, suggesting that&lt;br/&gt;even judgment-impaired humans intuitively understand that&lt;br/&gt;subjective values can be quantified).&lt;br/&gt;And that quantifiable subjective value can be measured in&lt;br/&gt;units of bitcoin.&lt;br/&gt;&lt;br/&gt;Thus, this difference in value is the cost of failure of an&lt;br/&gt;LN payment.&lt;br/&gt;And due to the relationship of failure and success, the&lt;br/&gt;cost of failure is the value of success.&lt;br/&gt;&lt;br/&gt;Pickhardt-Richter Payments&lt;br/&gt;==========================&lt;br/&gt;&lt;br/&gt;Why is the cost of failure/value of success even relevant?&lt;br/&gt;&lt;br/&gt;In [a 2021 paper](&lt;a href=&#34;https://arxiv.org/abs/2107.05322&#34;&gt;https://arxiv.org/abs/2107.05322&lt;/a&gt;)&lt;br/&gt;Pickhardt and Richter present a method of estimating&lt;br/&gt;the probability of payment success, and using that&lt;br/&gt;probability-of-success as a cost function for a&lt;br/&gt;generalization of pathfinding algorithms (specifically&lt;br/&gt;minimum cost flow).&lt;br/&gt;&lt;br/&gt;Of course, probabilities of success are not the only&lt;br/&gt;concern that actual pathfinding algorithms need to&lt;br/&gt;worry about.&lt;br/&gt;Another two concerns are:&lt;br/&gt;&lt;br/&gt;* Actual fees (measured in bitcoin units).&lt;br/&gt;* Actual total cltv-delta (measured in blocks).&lt;br/&gt;&lt;br/&gt;It is possible to convert total cltv-delta to a &amp;#34;Fee&amp;#34;.&lt;br/&gt;Basically, the cost of the total cltv-delta is the value&lt;br/&gt;of your funds being locked and unuseable for that many&lt;br/&gt;blocks.&lt;br/&gt;This can be represented as an expected annual return on&lt;br/&gt;investment if those funds were instead locked into some&lt;br/&gt;investment.&lt;br/&gt;In C-Lightning this is the `riskfactor` parameter.&lt;br/&gt;&lt;br/&gt;This implies that total cltv-delta can be converted&lt;br/&gt;to an equivalent amount of BTCs.&lt;br/&gt;&lt;br/&gt;Now, the issue is, how can we convert probability of&lt;br/&gt;success to some equivalent amount of BTCs?&lt;br/&gt;&lt;br/&gt;This is why the value of success --- i.e. the cost&lt;br/&gt;of payment failure --- is relevant.&lt;br/&gt;&lt;br/&gt;By multiplying the cost of failure by the probability&lt;br/&gt;of failure, we can acquire a bitcoins-measured&lt;br/&gt;quantity that can be added directly to expected fees.&lt;br/&gt;&lt;br/&gt;Fee Budgets&lt;br/&gt;===========&lt;br/&gt;&lt;br/&gt;Long ago, some weird rando with an unpronouncable name&lt;br/&gt;decided to add a &amp;#34;fee budget&amp;#34; to his implementation of&lt;br/&gt;C-Lightning pay algorithm (back when C-Lightning did not&lt;br/&gt;even have a `pay` algorithm).&lt;br/&gt;For some reason (possibly dark ritual), that rando managed&lt;br/&gt;to get that code into the actual C-Lightning, and the&lt;br/&gt;fee budget --- known as `maxfeepercent` --- has been&lt;br/&gt;retained to this day, even though none of the original&lt;br/&gt;code has survived (dark rituals tend to consume anything&lt;br/&gt;involved in their rites, I would not be surprised if&lt;br/&gt;that includes source code).&lt;br/&gt;&lt;br/&gt;Now consider --- how would a buyer assign a fee budget&lt;br/&gt;for a particular payment?&lt;br/&gt;&lt;br/&gt;As we noted, a rational buyer will only buy if they&lt;br/&gt;believe the value of the product being bought is higher&lt;br/&gt;than the value of the BTCs they sacrifice to buy that&lt;br/&gt;product.&lt;br/&gt;This difference is the cost of failure (equivalent to&lt;br/&gt;value of success).&lt;br/&gt;&lt;br/&gt;And a rational buyer will be willing to pay, as fee,&lt;br/&gt;any value up to this cost of failure/value of success.&lt;br/&gt;&lt;br/&gt;For example, if the buyer is not willing to pay more&lt;br/&gt;than half the cost of failure, then if there is no&lt;br/&gt;way to succeed payments at half the cost of failure,&lt;br/&gt;then the payment simply fails and the buyer loses&lt;br/&gt;the entire cost of failure.&lt;br/&gt;Logically, the buyer must be willing to pay, as&lt;br/&gt;fees, up to the cost of failure.&lt;br/&gt;&lt;br/&gt;Similarly, if the buyer is willing to pay up to twice&lt;br/&gt;the cost of failure, then if it succeeds only by&lt;br/&gt;paying up to twice the cost of failure, even if the&lt;br/&gt;payment pushes through and the buyer gets the product,&lt;br/&gt;the buyer still lost the cost of failure because it&lt;br/&gt;paid more fees than the value of the payment success&lt;br/&gt;was.&lt;br/&gt;&lt;br/&gt;Logically, then, the buyer must specify as fee budget,&lt;br/&gt;its expected value from acquiring the product minus&lt;br/&gt;the price of the product.&lt;br/&gt;&lt;br/&gt;Thus, it so happens that the fee budget is, in fact,&lt;br/&gt;the value of payment success/cost of payment failure,&lt;br/&gt;subjectively determined by the payer, quantified, and&lt;br/&gt;provided to the C-Lightning payment algorithm!&lt;br/&gt;&lt;br/&gt;Unified Cost Function&lt;br/&gt;=====================&lt;br/&gt;&lt;br/&gt;The cost of failure is then:&lt;br/&gt;&lt;br/&gt;    fee_budget * (1 - success_probability)&lt;br/&gt;&lt;br/&gt;The `fee_budget` is the above fee budget, an input&lt;br/&gt;from the user.&lt;br/&gt;`success_probability` is the estimate as determined&lt;br/&gt;using the Pickhardt-Richter algorithm.&lt;br/&gt;&lt;br/&gt;The cost of a channel that charges `fee` is:&lt;br/&gt;&lt;br/&gt;    fee &#43; fee_budget * (1 - success_probability)&lt;br/&gt;&lt;br/&gt;However, we should note that the above cost function&lt;br/&gt;is really the expected cost for the *entire&lt;br/&gt;payment*.&lt;br/&gt;In particular, `success_probability` is multiplicative&lt;br/&gt;along a path, whereas `fee` is additive.&lt;br/&gt;&lt;br/&gt;When we consider multipath payments, we should also&lt;br/&gt;observe that the `success_probability` of each&lt;br/&gt;sub-payment are multiplied together (since all&lt;br/&gt;sub-payments must succeed) while `fee` is again&lt;br/&gt;additive in nature.&lt;br/&gt;&lt;br/&gt;Because of this, there is probably no *existing*&lt;br/&gt;pathfinding algorithm which can actually *use*&lt;br/&gt;this cost function.&lt;br/&gt;Every pathfinding algorithm uses addition&lt;br/&gt;to compute total costs.&lt;br/&gt;&lt;br/&gt;The Pickhardt-Richter paper gets around this by&lt;br/&gt;using the logarithm of the probability.&lt;br/&gt;As addition of logarithms is equivalent to&lt;br/&gt;multiplication (`log A &#43; log B = log (A * B)`),&lt;br/&gt;this converts the addition operations of&lt;br/&gt;existing pathfinding algos to multiplication of the&lt;br/&gt;probabilities.&lt;br/&gt;&lt;br/&gt;This technique cannot work with the above unified&lt;br/&gt;cost function, unfortunately.&lt;br/&gt;&lt;br/&gt;However, we can consider that, if we neglect&lt;br/&gt;`fee`, and use only the logarithms of the cost&lt;br/&gt;function, then the `fee_budget` term is&lt;br/&gt;effectively a constant cost for all channels on&lt;br/&gt;the network.&lt;br/&gt;That is, `log (fee_budget * success_probability) =&lt;br/&gt;log fee_budget &#43; log success_probability`&lt;br/&gt;for all channels on the network, and we can&lt;br/&gt;subtract `log fee_budget` on all channels&lt;br/&gt;without changing the result of any pathfinding&lt;br/&gt;algorithms (provided we do not get into zero or&lt;br/&gt;negative costs).&lt;br/&gt;Thus, this instance of the Pickhard-Richter&lt;br/&gt;technique is equivalent to neglecting both the&lt;br/&gt;`fee` and the `fee_budget` in our unified cost&lt;br/&gt;function.&lt;br/&gt;&lt;br/&gt;Generalized `#zerobasefee`&lt;br/&gt;==========================&lt;br/&gt;&lt;br/&gt;If `fee` is small compared to `fee_budget`, then&lt;br/&gt;we can consider the effect of the `fee` term to&lt;br/&gt;be negligible compared to `fee_budget` term.&lt;br/&gt;&lt;br/&gt;Here is how the above cost function looks like,&lt;br/&gt;with `fee_budget` distributed:&lt;br/&gt;&lt;br/&gt;    fee &#43; fee_budget - fee_budget * success_probability&lt;br/&gt;&lt;br/&gt;If `fee_budget` is very much higher than `fee`&lt;br/&gt;then we can neglect `fee` as an approximation.&lt;br/&gt;&lt;br/&gt;    fee_budget - fee_budget * success_probability&lt;br/&gt;&lt;br/&gt;Since `fee_budget` is constant for all paths and&lt;br/&gt;for all channels, we can just use the negative&lt;br/&gt;logarithm of `success_probability` as the cost&lt;br/&gt;function.&lt;br/&gt;&lt;br/&gt;As a heuristic, we can *ignore* fees and&lt;br/&gt;just use nagetive log probability, as suggested&lt;br/&gt;in the Pickhardt-Richter paper, *after* pruning&lt;br/&gt;channels whose fees are very high (i.e. prune&lt;br/&gt;channels whose `fee`, say, exceeds 1% of the&lt;br/&gt;`fee_budget`).&lt;br/&gt;&lt;br/&gt;One way to view `#zerobasefee` is that this is&lt;br/&gt;a specialized instance of the above general&lt;br/&gt;heuristic, that we can prune channels with&lt;br/&gt;non-zero base fees in order to operate a&lt;br/&gt;pathfinding algorithm that uses only addition&lt;br/&gt;for edge costs and use negative log probability&lt;br/&gt;for edge costs.&lt;br/&gt;&lt;br/&gt;We can instead consider that *small enough*&lt;br/&gt;base fees, which are negligible compared to&lt;br/&gt;the `fee_budget`, should not be pruned, and&lt;br/&gt;not specifically that all non-zero base fees&lt;br/&gt;should be pruned.&lt;br/&gt;That is, `#zerobasefee` assumes that a 1-sat&lt;br/&gt;base fee is *not* negligible compared to the&lt;br/&gt;`fee_budget`.&lt;br/&gt;&lt;br/&gt;However, for large enough payments, the&lt;br/&gt;`fee_budget` may be large enough that a 1&lt;br/&gt;satoshi base fee is actually negligible&lt;br/&gt;compared to the `fee_budget` term.&lt;br/&gt;This implies that `#zerobasefee` is a&lt;br/&gt;specific heuristic, one that potentially&lt;br/&gt;could be generalized.&lt;br/&gt;&lt;br/&gt;As a corollary, the higher `success_probability`&lt;br/&gt;is, the more small fees matter (since&lt;br/&gt;`success_probability` subtracts from `fee_budget`).&lt;br/&gt;And higher `success_probability` arises from&lt;br/&gt;larger channels in general.&lt;br/&gt;This leads to the counterintuition that&lt;br/&gt;larger channels should charge lower fees,&lt;br/&gt;since logically the `#lowbasefee` pruning level&lt;br/&gt;should be lower at higher `success_probability`.&lt;br/&gt;&lt;br/&gt;Alternative Pathfinding?&lt;br/&gt;========================&lt;br/&gt;&lt;br/&gt;As noted, practically every pathfinding algorithm&lt;br/&gt;assumes that costs along every edge are always&lt;br/&gt;added together.&lt;br/&gt;&lt;br/&gt;For quantities that must be multiplied --- such&lt;br/&gt;as probabilities --- we can use the logarithm&lt;br/&gt;trick to convert the addition to a multiplication.&lt;br/&gt;&lt;br/&gt;However, as noted, the unified cost function&lt;br/&gt;has quantities that, in order to combine, must&lt;br/&gt;be added (fees) and multiplied (probabilities).&lt;br/&gt;&lt;br/&gt;In essence, every pathfinding algorithm cannot&lt;br/&gt;use this unified cost function, as they assume&lt;br/&gt;cost functions that are trivially monoid.&lt;br/&gt;&lt;br/&gt;Or is it?&lt;br/&gt;&lt;br/&gt;For something like the family of pathfinding&lt;br/&gt;algorithms Greedy, A\*, and Dijkstra, the only&lt;br/&gt;operations needed on costs are:&lt;br/&gt;&lt;br/&gt;* Addition (actually, a monoidal operation).&lt;br/&gt;* Comparison.&lt;br/&gt;&lt;br/&gt;Rather than &amp;#34;add&amp;#34;, perhaps a better term&lt;br/&gt;would be to &amp;#34;aggregate&amp;#34; the costs.&lt;br/&gt;&lt;br/&gt;    class (Monoid type) where&lt;br/&gt;         zero :: type&lt;br/&gt;         `&amp;lt;*&amp;gt;` :: type -&amp;gt; type -&amp;gt; type&lt;br/&gt;         -- laws where&lt;br/&gt;         --     forall (a :: type) =&amp;gt; zero &amp;lt;*&amp;gt; a = a&lt;br/&gt;         --     forall (a :: type) =&amp;gt; a &amp;lt;*&amp;gt; zero = a&lt;br/&gt;         --     forall (a :: type, b :: type) =&amp;gt; a &amp;lt;*&amp;gt; b = b &amp;lt;*&amp;gt; a&lt;br/&gt;         --     forall (a :: type, b :: type, c :: type) =&amp;gt; (a &amp;lt;*&amp;gt; b) &amp;lt;*&amp;gt; c = a &amp;lt;*&amp;gt; (b &amp;lt;*&amp;gt; c)&lt;br/&gt;&lt;br/&gt;In the above, `&amp;lt;*&amp;gt;` is an &amp;#34;aggregate&amp;#34; operation&lt;br/&gt;that replaces the simple addition `&#43;` traditionally&lt;br/&gt;used in pathfinding algorithms.&lt;br/&gt;For typical numeric types, for example, you could&lt;br/&gt;derive an addition monoid or a multiplication&lt;br/&gt;monoid.&lt;br/&gt;&lt;br/&gt;We can consider a type that is both `Monoid`&lt;br/&gt;and `Ord`:&lt;br/&gt;&lt;br/&gt;    -- This will be defined by an actual run of the&lt;br/&gt;    -- pathfinding algorithm.&lt;br/&gt;    feeBudget :: Integer&lt;br/&gt;    feeBudget = undefined&lt;br/&gt;&lt;br/&gt;    data UnifiedCost = UnifiedCost { fee :: Integer&lt;br/&gt;                                   , successProbability :: Rational&lt;br/&gt;                                   }&lt;br/&gt;&lt;br/&gt;    -- addition&lt;br/&gt;    instance (Monoid UnifiedCost) where&lt;br/&gt;        zero = UnifiedCost { fee = 0&lt;br/&gt;                           , successProbability = 0&lt;br/&gt;                           }&lt;br/&gt;        a &amp;lt;*&amp;gt; b = UnifiedCost { fee = fee a &#43; fee b&lt;br/&gt;                              , successProbability = successProbability a&lt;br/&gt;                                                   * successProbability b&lt;br/&gt;                              }&lt;br/&gt;&lt;br/&gt;    -- comparison&lt;br/&gt;    computeCost :: UnifiedCost -&amp;gt; Rational&lt;br/&gt;    computeCost c = toRational (fee c)&lt;br/&gt;                  &#43; ( toRational feeBudget&lt;br/&gt;                    * (1.0 - successProbability c))&lt;br/&gt;    instance (Eq UnifiedCost) where&lt;br/&gt;        a == b = computeCost a == computeCost b&lt;br/&gt;    instance (Ord UnifiedCost) where&lt;br/&gt;        compare a b = compare (computeCost a) (computeCost b)&lt;br/&gt;&lt;br/&gt;    -- laws where&lt;br/&gt;    --    forall (a :: UnifiedCost, b :: UnifiedCost) =&amp;gt; a &amp;lt;*&amp;gt; b &amp;gt;= a&lt;br/&gt;    --    forall (a :: UnifiedCost, b :: UnifiedCost) =&amp;gt; a &amp;lt;*&amp;gt; b &amp;gt;= b&lt;br/&gt;    -- -- laws could be checked with QuickCheck&lt;br/&gt;    -- -- though we should ensure `0 &amp;lt;= successProbability &amp;lt;= 1`&lt;br/&gt;&lt;br/&gt;That type would work well to replace the type of the&lt;br/&gt;cost in the Dijkstra-A\*-Greedy family of algortihms;&lt;br/&gt;they only need comparison and a monoid operation, but&lt;br/&gt;the actual structure of the cost type is immaterial&lt;br/&gt;to the algorithm.&lt;br/&gt;&lt;br/&gt;In particular, `feeBudget` is constant for an entire&lt;br/&gt;run of pathfinding algorithms.&lt;br/&gt;&lt;br/&gt;The question is whether minimum cost flow algos&lt;br/&gt;could work with the above limited type.&lt;br/&gt;I probably need to go actually study those algos.
    </content>
    <updated>2023-06-09T15:03:32&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsv384zxxxmyf8e8t0d8pngkaqddw4l4p72hhumzunus4epnzccrlczypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxz0qmp8v</id>
    
      <title type="html">📅 Original date posted:2021-08-16 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsv384zxxxmyf8e8t0d8pngkaqddw4l4p72hhumzunus4epnzccrlczypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxz0qmp8v" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsgwhpsluk0dz9xk0wf6wrha9xf8n00rpp4dst6l6j6m437395xa3cz5payt&#39;&gt;nevent1q…payt&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-08-16&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning Stefan,&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt;I propose that the algorithm be modified &amp;gt;as such, that is, it *ignore* the fee  scheme.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; We actually started out thinking like this in the event we couldn&amp;#39;t find a proper way to handle fees, and the real world experiments we&amp;#39;ve done so far have only involved probability costs, no fees at all. &lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; However, I think it is non-trivial to deal with the many cases in which too high fees could occur, and in the end the most systematic way of dealing with them is actually including them in the cost function. &lt;br/&gt;&lt;br/&gt;A reason why I suggest this is that the cost function in actual implementation is *already* IMO overloaded.&lt;br/&gt;&lt;br/&gt;In particular, actual implementations will have some kind of conversion between cltv-delta and fees-at-node.&lt;br/&gt;&lt;br/&gt;This conversion implies some kind of &amp;#34;conversion rate&amp;#34; between blocks-locked-up and fees-at-node.&lt;br/&gt;For example, in C-Lightning this is the `riskfactor` argument to `getroute`, which is also exposed at `pay`.&lt;br/&gt;&lt;br/&gt;However, I think that in practice, most users cannot intuitively understand `riskfactor`.&lt;br/&gt;I myself cannot; when I write my own `pay` (e.g. in CLBOSS) I just start `riskfactor` to the in-manual default value, then tweak it higher if the total lockup time exceeds some maximum cltv budget for the payment and call `getroute` again.&lt;br/&gt;&lt;br/&gt;Similarly, I think it is easier for users to think in terms of &amp;#34;fee budget&amp;#34; instead.&lt;br/&gt;&lt;br/&gt;Of course, algorithms should try to keep costs as low as possible, if there are two alternate payment plans that are both below the fee budget, the one with lower actual fee is still preferred.&lt;br/&gt;But perhaps we should focus more on payment success *within some fee and timelock budget*.&lt;br/&gt;&lt;br/&gt;Indeed, as you point out, your real-world experiments you have done have involved only probability as cost.&lt;br/&gt;However, by the paper you claim to have sent 40,000,000,000msat for a cost of 814,000msat, or 0.002035% fee percentage, far below the 0.5% default `maxfeepercent` we have, which I think is fairly reasonable argument for &amp;#34;let us ignore fees and timelocks unless it hits the budget&amp;#34;.&lt;br/&gt;(on the other hand, those numbers come from a section labelled &amp;#34;Simulation&amp;#34;, so that may not reflect the real world experiments you had --- what numbers did you get for those?)&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; That said, I agree with Matt that more research needs to be done about the effect of  base fees on these computations. We do know they make the problem hard in general, but we might find a way to deal with them reasonably in practice. &lt;br/&gt;&lt;br/&gt;Is my suggestion not reasonable in practice?&lt;br/&gt;Is the algorithm runtime too high?&lt;br/&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I tend to agree with AJ, that I don&amp;#39;t  believe the base fee is economically helpful, but I also think that the market will decide that rather than the devs (though I would argue for default Zerobasefee in the implementations). &lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In my view, nobody is really earning any money with the base fee, so the discussion is kind of artificial. On the other hand, I would estimate our approach should lead to liquidity being priced correctly in the proportional fee instead of the price being undercut by hobbyists as is the case now. So in the long run I expect our routing method to make running a well-stocked LN router much more profitable.&lt;br/&gt;&lt;br/&gt;While we certainly need to defer to economic requirements, we *also* need to defer to engineering requirements (else Lightning cannot be implemented in practice, so any economic benefits it might provide are not achievable anyway).&lt;br/&gt;As I understand the argument of Matt, we may encounter an engineering reason to charge some base fee (or something very much like it), so encouraging #zerobasefee *now* might not be the wisest course of action, as a future engineering problem may need to be solved with non-zero basefee (or something very much like it).&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:03:29&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsdfj59k6zky3dvt34mfk9ysxltwmn8lddruhkh5qcn3x5pdvm5sjszypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzqa3k9x</id>
    
      <title type="html">📅 Original date posted:2021-08-16 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsdfj59k6zky3dvt34mfk9ysxltwmn8lddruhkh5qcn3x5pdvm5sjszypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzqa3k9x" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsqdwfwaqmv37l4pf72q8rtn3d4r67zsd8852mrwf5xpaq63rkstqquu0g2d&#39;&gt;nevent1q…0g2d&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-08-16&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning matt and aj,&lt;br/&gt;&lt;br/&gt;Let me cut in here.&lt;br/&gt;&lt;br/&gt;&amp;gt;From my reading of the actual paper --- which could be a massive misunderstanding, as I can barely understand half the notation, I am more a dabbler in software engineering than a mathist --- it seems to me that it would be possible to replace the cost function in the planning algorithm with *only* the negative-log-probability, which I think is the key point of the paper.&lt;br/&gt;&lt;br/&gt;That is, the algorithm can be run in a mode where it *ignores* whatever fee scheme forwarding nodes desire.&lt;br/&gt;(@rene: correct me if I am wrong?)&lt;br/&gt;&lt;br/&gt;I propose that the algorithm be modified as such, that is, it *ignore* the fee scheme.&lt;br/&gt;&lt;br/&gt;However, the algorithm then gets an extra step after getting a payment plan (i.e. how to route multiple sub-payments).&lt;br/&gt;It looks over the payment plan and if the fees involved are beyond some user-defined limit (with, say, a default of 0.5% of the total amount, as per the C-Lightning `pay` default), to look at the highest-fee channels in the payment plan.&lt;br/&gt;Then, it can rerun the flow algorithm, telling it to *disallow* the highest-fee channels identified if the total fees exceed the fee budget.&lt;br/&gt;&lt;br/&gt;It seems to me that this modification of the algorithm may be sufficient to be resilient against any and all future fee scheme we may decide for Lightning.&lt;br/&gt;&lt;br/&gt;This still achieves &amp;#34;optimality&amp;#34; in the sense of the paper, in a way similar to what is suggested in the paper.&lt;br/&gt;The paper suggests to basically ignore gossiped channels with non-zero basefee.&lt;br/&gt;The approach I suggest allows us to *start* without ignoring non-zero basefee, but to slowly degrade our view of the network by disallowing high-fee (whether high basefee or high propfee) channels.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:03:28&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs80cw2zfnxmmcsmwz9qaqlcvs85mv6n7y6umn36qr46qca4adua6szypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzt5zsez</id>
    
      <title type="html">📅 Original date posted:2021-08-15 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs80cw2zfnxmmcsmwz9qaqlcvs85mv6n7y6umn36qr46qca4adua6szypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzt5zsez" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsdl2tcuu5khlf56d7ypgejsr7m03h03x5fnv6sjsw2npfjc035cqqdd7d5x&#39;&gt;nevent1q…7d5x&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-08-15&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning lisa, aj, et al.,&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; The result is that micropayments have a different payment regime than “non-micropayments”, (which may still incentive almost irrational behavior) but at least there’s no *loss* felt by node operators for handling/supporting low value payments. 10k micropayments is worth 10sats.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; It’s also simple to implement and seems rather obvious in retrospect.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;It seems simple to implement for *forwarders*, but I think complicates the algorithm described by Pickhardt and Richter?&lt;br/&gt;&lt;br/&gt;On the other hand, the algorithm is targeted towards &amp;#34;large&amp;#34; payments, so perhaps the Pickhardt-Richter payment algo can be forced to have some minimum split size, and payments below this minimum size are just sent as single payments (on the assumption that such micropayments are so small that the probability of failure is negligible).&lt;br/&gt;That is, just have the `pay` command branch based on the payment size, if it is below the minimum size, just use the old try-and-try-until-you-die algo, otherwise use a variant on the Pickhardt-Richter algo that respects this minimum payment size.&lt;br/&gt;This somewhat implies a minimum on the possible feerate, which we could say is 1 ppm, maybe.&lt;br/&gt;&lt;br/&gt;So for example, the minimum size could be 1,000,000msat, or 1,000sat.&lt;br/&gt;If the payment is much larger than that, use the Pickhardt-Richter algorithm with zerobasefee.&lt;br/&gt;If payment is lower than that threshold, just do not split and do try-and-try-until-you-die.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:03:26&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqswq9039gdzplflyth0uyfw2k058a5rnfdldn39gx2z05pgjj6zg9czypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxz09q9yg</id>
    
      <title type="html">📅 Original date posted:2021-08-15 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqswq9039gdzplflyth0uyfw2k058a5rnfdldn39gx2z05pgjj6zg9czypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxz09q9yg" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqswzmdtj2f05fsd23dwzn5aal6qyp5x5zs9gdv82nk8luqdax8dy0gn6utum&#39;&gt;nevent1q…utum&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-08-15&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning aj, et al.&lt;br/&gt;&lt;br/&gt;&amp;gt; Hey *,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; There&amp;#39;s been discussions on twitter and elsewhere advocating for&lt;br/&gt;&amp;gt; setting the BOLT#7 fee_base_msat value [0] to zero. I&amp;#39;m just writing&lt;br/&gt;&amp;gt; this to summarise my understanding in a place that&amp;#39;s able to easily be&lt;br/&gt;&amp;gt; referenced later.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Setting the base fee to zero has a couple of benefits:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; -   it means you only have one value to optimise when trying to collect&lt;br/&gt;&amp;gt;     the most fees, and one-dimensional optimisation problems are&lt;br/&gt;&amp;gt;     obviously easier to write code for than two-dimensional optimisation&lt;br/&gt;&amp;gt;     problems&lt;br/&gt;&lt;br/&gt;Indeed, this is a good point regarding this.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; -   when finding a route, if all the fees on all the channels are&lt;br/&gt;&amp;gt;     proportional only, you&amp;#39;ll never have to worry about paying more fees&lt;br/&gt;&amp;gt;     just as a result of splitting a payment; that makes routing easier&lt;br/&gt;&amp;gt;     (see [1])&lt;br/&gt;&lt;br/&gt;If we neglect roundoff errors.&lt;br/&gt;&lt;br/&gt;On the other hand, roundoff errors involved are &amp;lt;1msat per split, so it probably will not matter to most people.&lt;br/&gt;&lt;br/&gt;&amp;gt;     So what&amp;#39;s the cost? The cost is that there&amp;#39;s no longer a fixed minimum&lt;br/&gt;&amp;gt;     fee -- so if you try sending a 1sat payment you&amp;#39;ll pay 0.1% of the fee&lt;br/&gt;&amp;gt;     to send a 1000sat payment, and there may be fixed costs that you have&lt;br/&gt;&amp;gt;     in routing payments that you&amp;#39;d like to be compensated for (eg, the&lt;br/&gt;&amp;gt;     computational work to update channel state, the bandwith to forward the&lt;br/&gt;&amp;gt;     tx, or the opportunity cost for not being able to accept another htlc if&lt;br/&gt;&amp;gt;     you&amp;#39;ve hit your max htlcs per channel limit).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;     But there&amp;#39;s no need to explicitly separate those costs the way we do&lt;br/&gt;&amp;gt;     now; instead of charging 1sat base fee and 0.02% proportional fee,&lt;br/&gt;&amp;gt;     you can instead just set the 0.02% proportional fee and have a minimum&lt;br/&gt;&amp;gt;     payment size of 5000 sats (htlc_minimum_msat=5e6, ~$2), since 0.02%&lt;br/&gt;&amp;gt;     of that is 1sat. Nobody will be asking you to route without offering a&lt;br/&gt;&amp;gt;     fee of at least 1sat, but all the optimisation steps are easier.&lt;br/&gt;&lt;br/&gt;Should this minimum a node will be willing to forward be part of gossip, and how does this affect routing algorithms?&lt;br/&gt;&lt;br/&gt;&amp;gt;     You could go a step further, and have the node side accept smaller&lt;br/&gt;&amp;gt;     payments despite the htlc minimum setting: eg, accept a 3000 sat payment&lt;br/&gt;&amp;gt;     provided it pays the same fee that a 5000 sat payment would have. That is,&lt;br/&gt;&amp;gt;     treat the setting as minimum_fee=1sat, rather than minimum_amount=5000sat;&lt;br/&gt;&amp;gt;     so the advertised value is just calculated from the real settings,&lt;br/&gt;&amp;gt;     and that nodes that want to send very small values despite having to&lt;br/&gt;&amp;gt;     pay high rates can just invert the calculation.&lt;br/&gt;&lt;br/&gt;I like this idea, as I think it matches more what the incentives are.&lt;br/&gt;But it requires a change in gossip and in routing algorithms, and more importantly it requires routing algorithms to support two different fee schemes (base &#43; proportional vs min &#43; proportional).&lt;br/&gt;&lt;br/&gt;On the other hand, this still is a two-dimensional optimization algorithm, with `minimum_fee` and `proportional_fee_millionths` as the two dimensions.&lt;br/&gt;So maybe just have a single proportional-fee mechanism...&lt;br/&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;     I think something like this approach also makes sense when your channel&lt;br/&gt;&amp;gt;     becomes overloaded; eg if you have x HTLC slots available, and y channel&lt;br/&gt;&amp;gt;     capacity available, setting a minimum payment size of something like&lt;br/&gt;&amp;gt;     y/2/x**2 allows you to accept small payments (good for the network)&lt;br/&gt;&amp;gt;     when you&amp;#39;re channel is not busy, but reserves the last slots for larger&lt;br/&gt;&amp;gt;     payments so that you don&amp;#39;t end up missing out on profits because you&lt;br/&gt;&amp;gt;     ran out of capacity due to low value spam.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;     Two other aspects related to this:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;     At present, I think all the fixed costs are also incurred even when&lt;br/&gt;&amp;gt;     a htlc fails, so until we have some way of charging failing txs for&lt;br/&gt;&amp;gt;     incurring those costs, it seems a bit backwards to penalise successful&lt;br/&gt;&amp;gt;     txs who at least pay a proportional fee for the same thing. Until we&amp;#39;ve&lt;br/&gt;&amp;gt;     got a way of handling that, having zero base fee seems at least fair.&lt;br/&gt;&lt;br/&gt;Yes, the dreaded mechanism against payment lockup, which as far as I understand has a lot of thought already sunk into it without any widely-accepted solution, sigh.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:03:25&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs86d0zfyzjrprj3wqjvfcl9le8crz4t30thxpl5mpx7046azhczugzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzlpa5rq</id>
    
      <title type="html">📅 Original date posted:2021-08-14 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs86d0zfyzjrprj3wqjvfcl9le8crz4t30thxpl5mpx7046azhczugzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzlpa5rq" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsd7yln8j86m6fzvj8ts62v66vehcq3pp5hn6mn624csepqxfyv9gqnlef99&#39;&gt;nevent1q…ef99&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-08-14&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning Daki,&lt;br/&gt;&lt;br/&gt;While certainly a very imaginative approach to the problem, do note that there is a substantive difference between running a Bitcoin fullnode and running a Lightning forwarding node.&lt;br/&gt;&lt;br/&gt;Namely:&lt;br/&gt;&lt;br/&gt;* A Bitcoin fullnode does not risk any lockup of its funds just to run.&lt;br/&gt;* A Lightning forwarding node *does* risk having its funds locked and unavailable.&lt;br/&gt;&lt;br/&gt;While a payment is being forwarded, the funds involved in the forwarding are unavailable for use by the putative owner of the funds.&lt;br/&gt;Instead, the funds are kept in an HTLC until the payment forwarding is resolved in either success or failure.&lt;br/&gt;&lt;br/&gt;Having your funds locked and unavailable to you, even transiently, is only tenable if you get something in return, e.g. a return on investment.&lt;br/&gt;&lt;br/&gt;Of course, you can also counter-argue that in practice, the amounts and timeframes are so short that any return on investment would be ridiculously minuscule, which is why in practice most forwarding nodes will earn 0 or even negative net income.&lt;br/&gt;On the other hand, larger hubs with significant liquidity invested into them would still have total amounts and timeframes that *are* substantial enough that it would make sense for them to charge *some* fee.&lt;br/&gt;And discovering that feerate is the point of this exercise.&lt;br/&gt;&lt;br/&gt;On the other other hand, this may very well be &amp;#34;trade secret&amp;#34; territory, in which case there is no point in me asking about this topic anyway.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:03:24&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs2le5pcglhe308k9tl3n52hsemkhtty869h70s2nfpu05a9x58trczypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzn7whq9</id>
    
      <title type="html">📅 Original date posted:2021-07-27 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs2le5pcglhe308k9tl3n52hsemkhtty869h70s2nfpu05a9x58trczypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzn7whq9" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs9wcrrgwq7jw6xamnta0u2469ug48vyuqtnvxp0vt7w4q0gua9gpq97httu&#39;&gt;nevent1q…httu&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-07-27&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning aj, and list,&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; I don&amp;#39;t think you can reliably hide that you forgot some state?&lt;br/&gt;&lt;br/&gt;Thinking a little more --- *why* do we need to hide that we forgot some state?&lt;br/&gt;&lt;br/&gt;The reason is that if your peer learns you forgot state, the peer can pass off obsolete state onchain, thereby stealing funds from you before you can recover your data.&lt;br/&gt;&lt;br/&gt;But if some completely random node that is ***not*** your peer and has ***no*** channels with you is holding your memento, then there is no need to worry --- even if you tell them &amp;#34;actually I forgot my state&amp;#34; they have no obsolete state to hurt you with.&lt;br/&gt;&lt;br/&gt;Suppose that nodes provide a &amp;#34;will remember for you&amp;#34; flag in the feature bits.&lt;br/&gt;&lt;br/&gt;Now, your node can then use a secret distance measurement --- for example, it could take the keyed hash (with your node privkey as key) of every &amp;#34;will remember for you&amp;#34;-advertising node, then look for the hash that is numerically lowest.&lt;br/&gt;&lt;br/&gt;Locating the &amp;#34;nearest&amp;#34; node, your node then contacts that node and asks them to remember our memento.&lt;br/&gt;Now, your node should not be using its &amp;#34;normal&amp;#34; pubkey for this, instead, it should generate a &amp;#34;throwaway&amp;#34; keypair derived from its privkey plus the pubkey of the selected node.&lt;br/&gt;&lt;br/&gt;--&lt;br/&gt;&lt;br/&gt;After your node hits its head and becomes amnesiac, you provide it with the privkey (which can be represented as some words).&lt;br/&gt;&lt;br/&gt;The node then re-downloads gossip map, and uses the same secret distance measurement to find, say, the 100 &amp;#34;nearest&amp;#34; nodes with the &amp;#34;will remember for you&amp;#34; feature.&lt;br/&gt;Assuming the gossip map has not changed too much since before the amnesia event, then it is likely that the previously selected node is still in the nearest 100 nodes.&lt;br/&gt;&lt;br/&gt;Your node will then iterate over the nearest 100 nodes, starting with the nearest, and re-derive the &amp;#34;throwaway&amp;#34; keypair and ask each node if it holds a memento for that pubkey.&lt;br/&gt;&lt;br/&gt;Since your node contacts them using a throwaway keypair that is not correlatable with your normal node pubkey, even if they are conspiring with your channel peers, the &amp;#34;will remember for you&amp;#34; node cannot identify that your node has suffered amnesia, it only knows that *some* node *somewhere* suffered amnesia.&lt;br/&gt;&lt;br/&gt;This implies as well that the selected node can even be your peer, and it will still not be sure that the amnesiac node is you or might be somebody else completely.&lt;br/&gt;&lt;br/&gt;--&lt;br/&gt;&lt;br/&gt;Of course, the anonymous nature of the client requesting data storage is a problem, as this feature is now vulnerable to abuse and DDoS.&lt;br/&gt;As a spam prevention, such a &amp;#34;will remember for you&amp;#34; node can use any number of techniques developed for anonymously paying to watchtowers, which have a similar &amp;#34;need to pay for anonymous storage to prevent DoS&amp;#34; problem.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:03:10&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs9wcrrgwq7jw6xamnta0u2469ug48vyuqtnvxp0vt7w4q0gua9gpqzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxz8mllwx</id>
    
      <title type="html">📅 Original date posted:2021-07-27 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs9wcrrgwq7jw6xamnta0u2469ug48vyuqtnvxp0vt7w4q0gua9gpqzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxz8mllwx" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsqccfcpxj8pr63m23a874gu033ynlu9c5pxxh2fdy8syky8e3wwkczyxjjt&#39;&gt;nevent1q…xjjt&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-07-27&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning cdecker, aj, and list,&lt;br/&gt;&lt;br/&gt;&amp;gt; . In addition we can store the same data with multiple peers, ensuring that as long as one node is behaving we&amp;#39;re good.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Depending on size limits of the stored data, it may be possible to use some kind of erasure coding so that at least k of n peers need to be honest so we are good.&lt;br/&gt;I suspect peers would prefer to limit the amount of data they have to store, if they offer this feature, so use of erausre coding seems to be a good idea.&lt;br/&gt;&lt;br/&gt;However, since the peer does not know the data you are storing, this detail can be known only by the node saving its data with the peer, so not need to put in specifications.&lt;br/&gt;&lt;br/&gt;&amp;gt; I don&amp;#39;t think you can reliably hide that you forgot some state? If you&lt;br/&gt;&amp;gt; _did_ forget your state, you&amp;#39;ll have forgotten their latest bundle too,&lt;br/&gt;&amp;gt; and it seems like there&amp;#39;s at least a 50/50 chance you&amp;#39;d have to send&lt;br/&gt;&amp;gt; them their bundle before they sent you yours?&lt;br/&gt;&lt;br/&gt;This objection seems quite correct.&lt;br/&gt;&lt;br/&gt;Perhaps it is possible to (mis)use Barrier Escrow: &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;After all, what is needed is a simultaneous way for both sides to provide the data (or admit they lost it) before the other can withhold the data.&lt;br/&gt;&lt;br/&gt;1.  Both agree on some Barrier Escrow and generate some temporary points.&lt;br/&gt;2.  Both sides invoke `barrier-commit` on the Barrier Escrow, receiving E.&lt;br/&gt;3.  Both sides *additionally* encrypt the bundle using an asymmetric encryption, which can be decrypted only by anyone who knows `e` such that `E = e * G`.&lt;br/&gt;4.  Both sides exchange the asymmetrically-encrypted bundles.&lt;br/&gt;5.  Once a side receives the asymmetrically-encrypted bundle from the other side, they invoke `barrier-reveal` using their temporary scalar from #1.&lt;br/&gt;6.  When they get `e` from `barrier-reveal` they can decrypt the asymmetric encryption layer from the bundle they receive, then proceed to validate and decrypt the actual encrypted bundle.&lt;br/&gt;&lt;br/&gt;If Alice is amnesiac, it just provides a random vector for the &amp;#34;asymmetric encrypted bundle of Bob&amp;#34;.&lt;br/&gt;&lt;br/&gt;Suppose Bob wants to check if Alice is amnesiac.&lt;br/&gt;Bob cannot delay its send of the Alice-bundle, due to the Barrier Escrow ensuring that both parties have sent *some* bundle.&lt;br/&gt;Thus, even if Bob knows later than Alice has gone amnesiac, by the time Bob knows that, it has handed over the memento of Alice by which Alice can recover.&lt;br/&gt;&lt;br/&gt;Bob can send a bogus bundle to Alice, and then if it also receives a bogus bundle, it knows Alice is amnesiac (and it might be a good time to steal from Alice).&lt;br/&gt;ALTERNATELY Alice is *also* trying to probe Bob, so Alice sent a bogus bundle itself.&lt;br/&gt;In that case, Bob could attempt to steal, but runs the risk that Alice was *also* another prober who is not actually amnesiac.&lt;br/&gt;(Not sure if that is valid game theory, though)&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;On the other hand, Barrier Escrow services have to be paid for their service (else why would they run), and if you have not connected to your peer then you cannot pay for barrier escrow services over Lightning.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:03:10&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsw866esw733kg5w2052c2w6cz589j7np47zgz3sw5gf6eej595dwszypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxz3a9gul</id>
    
      <title type="html">📅 Original date posted:2021-06-01 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsw866esw733kg5w2052c2w6cz589j7np47zgz3sw5gf6eej595dwszypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxz3a9gul" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqswz5n9eezwu48y4n447xhypd7dehtyh65x0s4ype9qsz50xq275zg0tyq3h&#39;&gt;nevent1q…yq3h&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-06-01&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning LL,&lt;br/&gt;&lt;br/&gt;&amp;gt; Hi Z,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I just went through the presentation which made your thinking very clear. Thanks.&lt;br/&gt;&amp;gt; I will not be able to match this effort so please bear with me as I try and explain my own thinking.&lt;br/&gt;&amp;gt; I don&amp;#39;t see why fast forwards (FF) need &amp;#34;symmetrically encumbered outputs&amp;#34;? To me the protocol should be asymmetric.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This is what I think happens when offering a FF HTLC:&lt;br/&gt;&amp;gt; 1. The offerer creates and signs a new commitment tx as normal with the HTLC except it has the same revocation key as the last one.&lt;br/&gt;&amp;gt; 2. The offerer patches their balance output by sending a tx spending from it to a new tx which has the HTLC output and their balance output (unencumbered).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The HTLC is now irrevocably committed from the perspective of the receiver.&lt;br/&gt;&amp;gt; Now the receiver presents the pre-image and the offerer then:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 1. The offerer creates and signs a new commitment tx as normal consolidating the funds into the receiver&amp;#39;s balance output except once again it has the same revocation key as the last one.&lt;br/&gt;&amp;gt; 2. The offerer patches their commitment tx balance output again by sending a tx spending from it to a new tx which splits into the receiver&amp;#39;s balance (the value of the claimed HTLC) and the offerer&amp;#39;s remaining balance.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; You can repeat the above process without having the receiver&amp;#39;s revocation keys online or their commitment tx keys for many HTLCs while the offerer still has balance towards the receiver.&lt;br/&gt;&amp;gt; The on-chain cost is about the same as before for an uncooperative close.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Once the receiver brings their keys on line they can consolidate the FF state into a new commitment txs on both sides and with a proper revocation operate the channel normally. What has been the receiver up until now can finally send funds.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Am I missing something?&lt;br/&gt;&lt;br/&gt;Basically, you are taking advantage of the fact that we **actually** let the commitments on both sides be desynchronized with each other.&lt;br/&gt;I tend to elide this fact when explaining, and also avoid it when planning protocols.&lt;br/&gt;&lt;br/&gt;However I believe the idea is correct.&lt;br/&gt;&lt;br/&gt;Anyway, as I understood it:&lt;br/&gt;&lt;br/&gt;So suppose we start with this pair of commitment txes:&lt;br/&gt;&lt;br/&gt;    &#43;--------------------------&#43;&lt;br/&gt;    |  Commitment tx 1 of A    |&lt;br/&gt;    &#43;------------&#43;-------------&#43;&lt;br/&gt;    |            | (A[0] &amp;amp;&amp;amp; B) |&lt;br/&gt;    |            |||(A &amp;amp;&amp;amp; CSV) |&lt;br/&gt;    |    SigB    &#43;-------------&#43;&lt;br/&gt;    |            |      B      |&lt;br/&gt;    |            |             |&lt;br/&gt;    &#43;------------&#43;-------------&#43;&lt;br/&gt;&lt;br/&gt;    &#43;--------------------------&#43;&lt;br/&gt;    |  Commitment tx 1 of B    |&lt;br/&gt;    &#43;------------&#43;-------------&#43;&lt;br/&gt;    |    SigA    |      A      |&lt;br/&gt;    |            |             |&lt;br/&gt;    |            &#43;-------------&#43;&lt;br/&gt;    |            | (A &amp;amp;&amp;amp; B[0]) |&lt;br/&gt;    |            |||(B &amp;amp;&amp;amp; CSV) |&lt;br/&gt;    &#43;------------&#43;-------------&#43;&lt;br/&gt;&lt;br/&gt;Now Alice wants to offer an HTLC to Bob.&lt;br/&gt;What Alice does is:&lt;br/&gt;&lt;br/&gt;* **Retain** the Alice commitment tx and create an HTLC tx spending from it.&lt;br/&gt;* **Advance** the Bob commitment tx (and letting it desync from the Alice commitment tx), adding the same HTLC.&lt;br/&gt;&lt;br/&gt;So after Alice sends its new signatures, our offchain txes are:&lt;br/&gt;&lt;br/&gt;    &#43;--------------------------&#43;    &#43;--------------------------&#43;&lt;br/&gt;    |  Commitment tx 1 of A    |    |          HTLC Tx         |&lt;br/&gt;    &#43;------------&#43;-------------&#43;    &#43;------------&#43;-------------&#43;&lt;br/&gt;    |            | (A[0] &amp;amp;&amp;amp; B) |---&amp;gt;|  SigA[0]   | (A[0] &amp;amp;&amp;amp; B) |&lt;br/&gt;    |            |||(A &amp;amp;&amp;amp; CSV) |    |            |||(A &amp;amp;&amp;amp; CSV) |&lt;br/&gt;    |    SigB    &#43;-------------&#43;    |            &#43;-------------&#43;&lt;br/&gt;    |            |      B      |    |            |    A-&amp;gt;B     |&lt;br/&gt;    |            |             |    |            |    HTLC     |&lt;br/&gt;    &#43;------------&#43;-------------&#43;    &#43;------------&#43;-------------&#43;&lt;br/&gt;&lt;br/&gt;    &#43;--------------------------&#43;&lt;br/&gt;    | Commitment tx *2* of B   |&lt;br/&gt;    &#43;------------&#43;-------------&#43;&lt;br/&gt;    |    SigA    |      A      |&lt;br/&gt;    |            |             |&lt;br/&gt;    |            &#43;-------------&#43;&lt;br/&gt;    |            | (A &amp;amp;&amp;amp; B[1]) |&lt;br/&gt;    |            |||(B &amp;amp;&amp;amp; CSV) |&lt;br/&gt;    |            &#43;-------------&#43;&lt;br/&gt;    |            |    A-&amp;gt;B     |&lt;br/&gt;    |            |    HTLC     |&lt;br/&gt;    &#43;------------&#43;-------------&#43;&lt;br/&gt;&lt;br/&gt;Notes:&lt;br/&gt;&lt;br/&gt;* Again, for Alice to offer the HTLC to Bob, only Alice has to make new signatures (`SigA[0]` and `SigA` for commitment tx *2* of Bob).&lt;br/&gt;* If Alice goes offline and Bob decides to drop onchain, Bob only needs to sign the new commitment tx.&lt;br/&gt;  We can argue that dropping channels *should* be rare enough that requiring privkeys for this operation is not a burden.&lt;br/&gt;* If Alice decides to drop the channel onchain, Bob only needs to bring in the privkey for the HTLC tx, which we can (at a lower, detailed level) be different from the &amp;#34;main&amp;#34; B privkey.&lt;br/&gt;&lt;br/&gt;So yes, I think it seems workable without symmetric encumbrance.&lt;br/&gt;&lt;br/&gt;Regards.&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:02:31&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsr5yfguky3xw20ls6hlftmhx3umwrdqzzv6xj8ma6mm9x4y74g63gzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzk4a6yx</id>
    
      <title type="html">📅 Original date posted:2021-05-23 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsr5yfguky3xw20ls6hlftmhx3umwrdqzzv6xj8ma6mm9x4y74g63gzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzk4a6yx" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsqdc6wmfdg5rraupwx6lahvhqmrd3yfaqjwget5xthjtuz5c94j0qk7z2a4&#39;&gt;nevent1q…z2a4&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2021-05-23&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning list,&lt;br/&gt;&lt;br/&gt;I have decided to dabble in necromancy, thus, I revive this long-dead thread from two years ago.&lt;br/&gt;Ph34R mE and my leet thread necromancy skillz.&lt;br/&gt;&lt;br/&gt;A short while ago, LL and Steve Lee were discussing about ways to reduce the privkey onlineness requirement for Lightning.&lt;br/&gt;And LL mentioned that this proposal could allow privkeys to be kept offline for a receiver.&lt;br/&gt;&lt;br/&gt;* The receiver has to be online, still.&lt;br/&gt;* Its privkeys can be kept offline.&lt;br/&gt;  * The receiver can still receive even if its privkeys are offline (for example the privkeys are in a hardware signing module that is typically kept offline and is only put online at rare intervals).&lt;br/&gt;* The sender has to be online and the sender privkeys have to be online.&lt;br/&gt;* Forwarders and their privkeys have to be online.&lt;br/&gt;&lt;br/&gt;Unfortunately, I think the proposal, as currently made, cannot support the above feature, as stated.&lt;br/&gt;&lt;br/&gt;When an HTLC transaction is provided by the sender under a Fast Forward scheme, it provides a transaction that spends from &amp;#34;its&amp;#34; output in both versions of the latest Poon-Dryja commitment transaction.&lt;br/&gt;&lt;br/&gt;However, this output, as provided in the Fast Forward scheme, requires *two* signatures.&lt;br/&gt;&lt;br/&gt;Here are the scripts mentioned in the previous post:&lt;br/&gt;&lt;br/&gt;    OP_IF&lt;br/&gt;        # Penalty transaction/Fast forward&lt;br/&gt;        &amp;lt;local_revokepubkey&amp;gt; OP_CHECKSIGVERIFY &amp;lt;remote_penaltyclaimpubkey&amp;gt;&lt;br/&gt;    OP_ELSE&lt;br/&gt;        `to_self_delay`&lt;br/&gt;        OP_CSV&lt;br/&gt;        OP_DROP&lt;br/&gt;        &amp;lt;local_delayedpubkey&amp;gt;&lt;br/&gt;    OP_ENDIF&lt;br/&gt;    OP_CHECKSIG&lt;br/&gt;&lt;br/&gt;And:&lt;br/&gt;&lt;br/&gt;    OP_IF&lt;br/&gt;        # Penalty transaction/Fast forward&lt;br/&gt;        &amp;lt;local_revokepubkey&amp;gt; OP_CHECKSIGVERIFY &amp;lt;remote_penaltyclaimpubkey&amp;gt;&lt;br/&gt;    OP_ELSE&lt;br/&gt;        `to_self_delay`&lt;br/&gt;        OP_CSV&lt;br/&gt;        OP_DROP&lt;br/&gt;        &amp;lt;remote_delayedpubkey&amp;gt;&lt;br/&gt;    OP_ENDIF&lt;br/&gt;    OP_CHECKSIG&lt;br/&gt;&lt;br/&gt;Now, the first branch is what is used in the Fast Forward scheme.&lt;br/&gt;And we can see that in the first branch, two signatures are needed: one for local, and one for remote.&lt;br/&gt;&lt;br/&gt;Thus, any HTLC-bearing transactions are signed by both the sender and receiver.&lt;br/&gt;Fast Forwards works its low-latency magic by simply having the sender send the signature spending from the current channel state, outright, to the receiver, and until the channel is updated, the HTLC is &amp;#34;safe&amp;#34;:&lt;br/&gt;&lt;br/&gt;* The current channel state (represented by some commitment tx) cannot be replaced with an alternative, without the replacer risking funds loss (Poon-Dryja punishment mechanism).&lt;br/&gt;* The spending tx that instantiates the HTLC is safe because the receiver will not willingly sign an alternate version.&lt;br/&gt;&lt;br/&gt;***HOWEVER***, the HTLC is safe on the assumption that *the receiver can provide its signature* if the channel is dropped onchain.&lt;br/&gt;And channels can be dropped onchain *at any time*.&lt;br/&gt;If the receiver is unable to provide its signature before the `to_self_delay` finishes, then the sender can revoke ***all*** HTLCs it sent!&lt;br/&gt;&lt;br/&gt;Thus, at least as initially stated, Fast Forwards cannot be used for this &amp;#34;receiver online, privkeys offline, can receive&amp;#34; feature.&lt;br/&gt;&lt;br/&gt;***HOWEVER HOWEVER***, we should note that the caveats are something we can actually work with:&lt;br/&gt;&lt;br/&gt;* The privkeys can only be offline for up to `to_self_delay` blocks.&lt;br/&gt;  * We ***need*** privkeys to be periodically online more often than `to_self_delay` anyway, ***in case of theft attempts***.&lt;br/&gt;    So this is not an ***additional*** requirement at least.&lt;br/&gt;* Watchtowers cannot guard against attempts to steal Fast Forwarded HTLCs --- they need to receive the signatures for the HTLC transactions as well, otherwise they can do nothing about it.&lt;br/&gt;  * However, whenever the receiver sends to a watchtower it *does* need to send signatures anyway, so it still needs to get privkeys online for signing.&lt;br/&gt;  * Since we need the privkeys to be made online a little more often than every `to_self_delay` blocks anyway, this is *not* an additional requirement!&lt;br/&gt;&lt;br/&gt;***THUS***, we *can* provide a tweaked version of the above desired feature:&lt;br/&gt;&lt;br/&gt;* The receiver has to be online, still.&lt;br/&gt;* Its privkeys can be kept offline, ***BUT***, it has to be regularly brought online a little more often than `to_self_delay`.&lt;br/&gt;  * The receiver can still receive even if its privkeys are offline (for example the privkeys are in a hardware signing module that is typically kept offline and is only put online at rare intervals).&lt;br/&gt;* The sender has to be online and the sender privkeys have to be online.&lt;br/&gt;* Forwarders and their privkeys have to be online.&lt;br/&gt;&lt;br/&gt;The additional requirement --- that the receiver privkeys have to be regularly brought online --- is not actually an onerous one *since we need it for channel safety*.&lt;br/&gt;&lt;br/&gt;So this feature is indeed supported by Fast Forwards (with fairly minimal caveats!) and kudos to LL for thinking of it!&lt;br/&gt;&lt;br/&gt;Against this, we should remind the drawbacks of Fast Forwards:&lt;br/&gt;&lt;br/&gt;* Onchain space is much higher (in the unilateral close case only --- channel opens and mutual closes remain small) due to chaining of transactions instead of strict replacement.&lt;br/&gt;* Fast Forwarded HTLCs need to have their signatures stored on replicated storage, and is O(n) (current Poon-Dryja requires O(1) storage for revocation keys but O(n) storage for HTLC hash/timelock details).&lt;br/&gt;  If you lose your data storage, you lose received HTLCs, including those whose preimages you have already released.&lt;br/&gt;&lt;br/&gt;For this, we should also take note that:&lt;br/&gt;&lt;br/&gt;* Payment latency is greatly improved.&lt;br/&gt;* The above &amp;#34;receiver online, receiver privkeys offline, can receive&amp;#34; feature is now possible, with the caveat:&lt;br/&gt;  * The privkeys need to be periodically brought online for short amounts of time in order to &amp;#34;collapse&amp;#34; chains of HTLC transactions, recover from theft attempts, and update watchtowers etc.&lt;br/&gt;&lt;br/&gt;---&lt;br/&gt;&lt;br/&gt;Now, Fast Forwards is a scheme that is designed for a modified form of Poon-Dryja.&lt;br/&gt;&lt;br/&gt;Unfortunately, at least for now, it seems the scheme cannot be used in Decker-Russell-Osuntokun (&amp;#34;eltoo&amp;#34;).&lt;br/&gt;&lt;br/&gt;In particular, Fast Forwards work because it is safe (and even required!) for a Poon-Dryja scheme to impose timeouts on the &amp;#34;main&amp;#34; outputs of a channel.&lt;br/&gt;And those timeouts have a branch that is a 2-of-2 between the channel participants.&lt;br/&gt;That branch is where Fast Forwards hook into.&lt;br/&gt;&lt;br/&gt;In Decker-Russell-Osuntokun, the &amp;#34;main&amp;#34; outputs are not encumbered by any timeouts; they are simple singly-signed outputs.&lt;br/&gt;The timeout is instead placed &amp;#34;before&amp;#34; the state transactions that contain the &amp;#34;main&amp;#34; outputs.&lt;br/&gt;The HTLC transactions are not safe without a 2-of-2, as otherwise the sender could just spend the main output to a different address, removing the HTLC.&lt;br/&gt;&lt;br/&gt;Because of this, the &amp;#34;main&amp;#34; output of a Decker-Russell-Osuntokun cannot be used in a Fast Forwarded manner, as the Fast Forwarded transaction needs to be signed by both participants.&lt;br/&gt;&lt;br/&gt;We *could* add *another* timeout at the main output simply to support Fast Forwards, using a similar &amp;#34;2of2 or OP_CSV&#43;singlesig&amp;#34;.&lt;br/&gt;However, this increases the effective delay in the case the channel is dropped unilaterally onchain.&lt;br/&gt;&lt;br/&gt;In addition, we should remind that when forwarding, Decker-Russell-Osuntokun requires that the CLTV at a particular hop be larger than the `to_self_delay` at that hop i.e. it imposes a &amp;#34;minimum CLTV&amp;#34; cost that is combined with `max` instead of `&#43;`, which pathfinding algorithms (that I know of) are totally not designed for.&lt;br/&gt;&lt;br/&gt;Furthermore, properly designed, a Decker-Russell-Osuntokun construction could also have payment latency approaching the latency of the Fast Forward scheme, so that advantage of Fast Forwards is lost as well, so we are paying for more inconvenience for a smaller feature set (only the &amp;#34;receiver online, privkey offline&amp;#34; feature remains; maybe worth it?).&lt;br/&gt;&lt;br/&gt;Of note, is that there also exists a Poon-Dryja variant that has a similar structure to Decker-Russell-Osuntokun (and has the same drawback of requiring a &amp;#34;minimum CLTV&amp;#34; at each hop) --- Fast Forwards would also not work well with that particular Poon-Dryja variant, too.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:02:28&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsv43qfzlw9x68c84jdrft3ardfr9g9x97q2znek7qvfg52uh392gczypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzurxmxa</id>
    
      <title type="html">📅 Original date posted:2021-02-11 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsv43qfzlw9x68c84jdrft3ardfr9g9x97q2znek7qvfg52uh392gczypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzurxmxa" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsydtfc883jx9p2lnwy2wm4mwhytmvpf3xd72d4z9w8gfhndeglmns7g4ma8&#39;&gt;nevent1q…4ma8&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;Good morning Pedro,&lt;br/&gt;&lt;br/&gt;&amp;gt; Hi Nadav,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; You are right that the intermediary (i.e., Ingrid) needs to hold a certain amount of coins to allow the virtual channel between Alice and Bob. Some comments here:&lt;br/&gt;&amp;gt;  - The protocol makes sure that Ingrid will get paid whatever fee she decides to charge for the service of creating a virtual channel. Note that Ingrid does not have the guarantee that enough payments would be routed through her node to gain the same fee in the same amount of time.&lt;br/&gt;&lt;br/&gt;Have not examined this deeply, but what happens if any of the *actual* Alice-Ingrid or Ingrid-Bob channels are forced unilaterally onchain before the purported lifetime of the virtual channel?&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:01:59&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsvgsl56p9sdud2zjsvn8u5h9zmdelj57zqe2yvuqwxwnsw9l6ujvqzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxz370hj4</id>
    
      <title type="html">📅 Original date posted:2021-02-11 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsvgsl56p9sdud2zjsvn8u5h9zmdelj57zqe2yvuqwxwnsw9l6ujvqzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxz370hj4" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsrwhpprwu65fp22ye62z75mkhg0sky5lfxuj5yl4mksyzhu50y0dcd93uz6&#39;&gt;nevent1q…3uz6&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;Good morning Andres,&lt;br/&gt;&lt;br/&gt;&amp;gt; This looks cool but would hinder UX too much for certain scenarios: e.g. if the escrow in place is part of a bitcoin exchange, then you require the bitcoin buyer to have bitcoin already, which makes it harder to on-ramp new users (which could maybe only have fiat). Am I right?&lt;br/&gt;&lt;br/&gt;Correct.&lt;br/&gt;Though note that existing systems like Bisq, to my knowledge, have the same problem, a buyer of Bitcoin has to have a small amount of Bitcoin to offer as stake that can be revoked in case they attempt to defraud the counterparty.&lt;br/&gt;Without it, the counterparty takes on increased risk (which translate to larger exchange spread).&lt;br/&gt;&lt;br/&gt;In any case, once you have that initial stake, you can then keep increasing your ability to provide stake so as to relieve your counterparties of risk and have them offer better exchange rates, so it is &amp;#34;only&amp;#34; an issue for initial onboarding.&lt;br/&gt;Presumably, in the later stable state, parents will provide children the initial stake needed for them to start transacting over such a system, just as they already provide their children with other &amp;#34;initial stakes&amp;#34; (education, food, shelter, etc.) anyway.&lt;br/&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; So are you saying that this is not doable without PTLCs (with simple HTLCs) unless it&amp;#39;s done like suggested?&lt;br/&gt;&lt;br/&gt;Yes, it is yet another reason we want PTLCs quickly.&lt;br/&gt;&lt;br/&gt;An alternative would be to have dual-hash HTLCs, which would be helpful in other escrow-related cases including escrow-facilitated cross-currency swaps.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On Thu, 11 Feb 2021 at 14:01, ZmnSCPxj &amp;lt;ZmnSCPxj at protonmail.com&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Good morning Nadav and Andres,&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Thank you for bringing up this topic again.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Let me provide a new twist to this old idea.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; This is the entire logic of the contract to the seller:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;    SELLER &amp;amp;&amp;amp; (BUYER || ESCROW)&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Now, a big issue is that simple `&amp;amp;&amp;amp;` is trivial for PTLCs, it is the `||` which is difficult and requires ECDH and proof that the ECDH was done correctly.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; But we can observe the De Morgan Theorem:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;    A || B &amp;lt;=&amp;gt; !(!A &amp;amp;&amp;amp; !B)&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; So how about we *invert* the logic?&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; So what we do is, we make *two* payments of the same amount:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; * Seller -&amp;gt; Buyer , claimable by BUYER &amp;amp;&amp;amp; ESCROW key.&lt;br/&gt;&amp;gt; &amp;gt; * Buyer  -&amp;gt; Seller, claimable by SELLER key.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; So the ritual is this:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; * Seller -&amp;gt; Buyer claimable by BUYER &amp;amp;&amp;amp; ESCROW.&lt;br/&gt;&amp;gt; &amp;gt; * Buyer -&amp;gt; Seller claimable by SELLER.&lt;br/&gt;&amp;gt; &amp;gt; * Seller hands over item.&lt;br/&gt;&amp;gt; &amp;gt; * Buyer judges whether to accept, or complain to Escrow.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Now let us consider our cases:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; * Buyer is satisfied with the product.&lt;br/&gt;&amp;gt; &amp;gt;   * Buyer fails the Seller-&amp;gt;Buyer payment after seller claims the Buyer-&amp;gt;Seller payment, so Seller is paid and has no more obligations.&lt;br/&gt;&amp;gt; &amp;gt; * Buyer is dissastisfied and wants the Escrow to judge:&lt;br/&gt;&amp;gt; &amp;gt;   * Escrow judges Buyer is right: Escrow reveals ESCROW key to Buyer, who then clawbacks the payment to the seller.&lt;br/&gt;&amp;gt; &amp;gt;   * Escrow judges Seller is right: Escrow deletes ESCROW privkey (&amp;#34;not ESCROW&amp;#34;), and the Seller-&amp;gt;Buyer payment eventually times out, ending the obligation of the Seller.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; The &amp;#34;reverse&amp;#34; payment is effectively the inversion of logic by the De Morgan theorem, and the &amp;#34;normal case&amp;#34; (buyer ultimately pays seller) has the Escrow not revealing the privkey.&lt;br/&gt;&amp;gt; &amp;gt; In addition, in the case where Buyer is satisfied (i.e. both Buyer and Seller agree the trade is beneficial) the Escrow is never involved (the Escrow might have a timeout for the temporary ESCROW keypair, which it will eventually delete; since all payments on LN need a timeout anyway, this is fine) and thus does not know about the trade, except that some trade was requested (since it must provide a temporary ESCROW pubkey).&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; This even provides a simple BUYER &#43; ESCROW keypair that gives the seller a proof-of-refund, and of course the simple SELLER gives the buyer a proof-of-payment as well.&lt;br/&gt;&amp;gt; &amp;gt; It only just requires twice as much Bitcoins getting locked.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Thoughts?&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Regards,&lt;br/&gt;&amp;gt; &amp;gt; ZmnSCPxj
    </content>
    <updated>2023-06-09T15:01:59&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs27a7mtcj9n7gny002g98ddwh3lwxr3z3dm39tefll2muxlmmk6tqzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzxfxhxq</id>
    
      <title type="html">📅 Original date posted:2021-02-11 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs27a7mtcj9n7gny002g98ddwh3lwxr3z3dm39tefll2muxlmmk6tqzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzxfxhxq" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs8rlj527v59x720lyyct0kh376q3fuqjwpuzyhk9p88sdujtkh80gnmvkxq&#39;&gt;nevent1q…vkxq&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;Good morning Nadav and Andres,&lt;br/&gt;&lt;br/&gt;Thank you for bringing up this topic again.&lt;br/&gt;&lt;br/&gt;Let me provide a new twist to this old idea.&lt;br/&gt;&lt;br/&gt;This is the entire logic of the contract to the seller:&lt;br/&gt;&lt;br/&gt;   SELLER &amp;amp;&amp;amp; (BUYER || ESCROW)&lt;br/&gt;&lt;br/&gt;Now, a big issue is that simple `&amp;amp;&amp;amp;` is trivial for PTLCs, it is the `||` which is difficult and requires ECDH and proof that the ECDH was done correctly.&lt;br/&gt;&lt;br/&gt;But we can observe the De Morgan Theorem:&lt;br/&gt;&lt;br/&gt;   A || B &amp;lt;=&amp;gt; !(!A &amp;amp;&amp;amp; !B)&lt;br/&gt;&lt;br/&gt;So how about we *invert* the logic?&lt;br/&gt;&lt;br/&gt;So what we do is, we make *two* payments of the same amount:&lt;br/&gt;&lt;br/&gt;* Seller -&amp;gt; Buyer , claimable by BUYER &amp;amp;&amp;amp; ESCROW key.&lt;br/&gt;* Buyer  -&amp;gt; Seller, claimable by SELLER key.&lt;br/&gt;&lt;br/&gt;So the ritual is this:&lt;br/&gt;&lt;br/&gt;* Seller -&amp;gt; Buyer claimable by BUYER &amp;amp;&amp;amp; ESCROW.&lt;br/&gt;* Buyer -&amp;gt; Seller claimable by SELLER.&lt;br/&gt;* Seller hands over item.&lt;br/&gt;* Buyer judges whether to accept, or complain to Escrow.&lt;br/&gt;&lt;br/&gt;Now let us consider our cases:&lt;br/&gt;&lt;br/&gt;* Buyer is satisfied with the product.&lt;br/&gt;  * Buyer fails the Seller-&amp;gt;Buyer payment after seller claims the Buyer-&amp;gt;Seller payment, so Seller is paid and has no more obligations.&lt;br/&gt;* Buyer is dissastisfied and wants the Escrow to judge:&lt;br/&gt;  * Escrow judges Buyer is right: Escrow reveals ESCROW key to Buyer, who then clawbacks the payment to the seller.&lt;br/&gt;  * Escrow judges Seller is right: Escrow deletes ESCROW privkey (&amp;#34;not ESCROW&amp;#34;), and the Seller-&amp;gt;Buyer payment eventually times out, ending the obligation of the Seller.&lt;br/&gt;&lt;br/&gt;The &amp;#34;reverse&amp;#34; payment is effectively the inversion of logic by the De Morgan theorem, and the &amp;#34;normal case&amp;#34; (buyer ultimately pays seller) has the Escrow not revealing the privkey.&lt;br/&gt;In addition, in the case where Buyer is satisfied (i.e. both Buyer and Seller agree the trade is beneficial) the Escrow is never involved (the Escrow might have a timeout for the temporary ESCROW keypair, which it will eventually delete; since all payments on LN need a timeout anyway, this is fine) and thus does not know about the trade, except that some trade was requested (since it must provide a temporary ESCROW pubkey).&lt;br/&gt;&lt;br/&gt;This even provides a simple BUYER &#43; ESCROW keypair that gives the seller a proof-of-refund, and of course the simple SELLER gives the buyer a proof-of-payment as well.&lt;br/&gt;It only just requires twice as much Bitcoins getting locked.&lt;br/&gt;&lt;br/&gt;Thoughts?&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:01:59&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsv02l6fpnecndwzg5zeaq5c3fya3f5vqjumkkx76qgszgj7mrmjugzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzrnn2k7</id>
    
      <title type="html">📅 Original date posted:2020-12-16 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsv02l6fpnecndwzg5zeaq5c3fya3f5vqjumkkx76qgszgj7mrmjugzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzrnn2k7" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsrsxlfldyh2pnj4dgkh9p7gh4jj9tjrz58hkehtkegdv39n6gy8cg7crf6c&#39;&gt;nevent1q…rf6c&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-12-16&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning LL,&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; -   What do you do if the channel state has HTLCs in flight? I don&amp;#39;t know -- I guess you can just put them onto the settlement tx? That way it&amp;#39;s possible the payment could still go through. Alternatively you could just gift the money to the party offering the recovery settlement.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Gifting the money is not a good option --- we allow HTLCs to be almost as high as the total channel value minus fees and reserve.&lt;br/&gt;&amp;gt; &amp;gt; Thus all the claimable value could potentially be in an outgoing HTLC.&lt;br/&gt;&amp;gt; &amp;gt; Worse, if our node is a forwarding node, it would be easy for a third party to arrange to have our funds in various HTLCs.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Hopefully this recovery system is used by people whose channels are in&lt;br/&gt;&amp;gt; a HTLC free state 99.9999% of the time (and hopefully hardware&lt;br/&gt;&amp;gt; failures do not somehow coincide with HTLCs!).&lt;br/&gt;&amp;gt; As a user, it would be cool to be able to just lock up all my Bitcoin&lt;br/&gt;&amp;gt; into channels with well-established lightning nodes. That way if fees&lt;br/&gt;&amp;gt; go ballistic I can still move money around cheaply.&lt;br/&gt;&amp;gt; One of the main concerns for this pattern of user behaviour is the&lt;br/&gt;&amp;gt; recovery story I think. The first line of defence for routing nodes&lt;br/&gt;&amp;gt; (people who are taking their role in LN seriously) has to be redundant&lt;br/&gt;&amp;gt; data storage.&lt;br/&gt;&amp;gt; This would be a poor last-resort solution for routing nodes.&lt;br/&gt;&lt;br/&gt;A common occurrence is that hardware failure is not detected until when the hardware is used, especially when used by casual users.&lt;br/&gt;&lt;br/&gt;Consider the sequence of events:&lt;br/&gt;&lt;br/&gt;* Part of the storage device fails.&lt;br/&gt;  * Due to being a casual user, the user does not use state-of-the-art checksumming filesystems like ZFS and does not monitor disk health by S.M.A.R.T.&lt;br/&gt;* A high-onchain-fee condition exists.&lt;br/&gt;* The casual user attempts to send out a payment consisting of almost all funds in their LN channels via several HTLCs on MPP or other multipath.&lt;br/&gt;* Because of the activity generated, the filesystem assigns the LN database to the failing part.&lt;br/&gt;* Storage fails with most funds in outgoing HTLCs.&lt;br/&gt;&lt;br/&gt;Thus, merely activating the wallet and using HTLCs may result in a *detectable* failure of the hardware (which was already failing before, just not noticed by the casual user).&lt;br/&gt;&lt;br/&gt;On the other hand, we can consider this situation as having a complexity penalty.&lt;br/&gt;&lt;br/&gt;As someone who has seen a lot of storage devices slowly fail in unique and interesting (and data-losing) ways, I am always going to assume that storage devices are going to fail at any time, including a few hours after installation.&lt;br/&gt;&lt;br/&gt;It would be preferable if HTLCs and PTLCs are not gifted.&lt;br/&gt;On the other hand, it might not be possible (as you note about PTLCs).&lt;br/&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Using static-key channels (i.e. channel keys are our node keys) allows us to recover even the outgoing channel with outgoing HTLC that has been forgotten by the outgoing peer.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Right. I think this doesn&amp;#39;t work with PTLCs though.&lt;br/&gt;&lt;br/&gt;Yes, loss of the adaptor signature means we cannot recover in this case.&lt;br/&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Using static-key channels does have slightly weaker privacy:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; -   Published nodes reveal all their channels with other published nodes on the blockchain.&lt;br/&gt;&amp;gt; &amp;gt;     -   While it is true that published nodes already reveal their channels with published nodes, they are currently only revealed on the LN gossip network, which is not archived; historical channels that are now closed are not informed to current surveillors.&lt;br/&gt;&amp;gt; &amp;gt;         -   On the other hand, all it takes is one &amp;#34;LN wayback machine&amp;#34; to record all LN gossip, which are self-attesting and include a signature from the node.&lt;br/&gt;&amp;gt; &amp;gt; -   Unpublished nodes risk revealing their channels with published nodes via the blockchain.&lt;br/&gt;&amp;gt; &amp;gt;     -   Invoices created by unpublished nodes currently reveal their public key.&lt;br/&gt;&amp;gt; &amp;gt;         Payers can then uncover all the channels of that node.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I don&amp;#39;t think so? You need to know the private key of the node to&lt;br/&gt;&amp;gt; discover its channels! The points actually used in the channels would&lt;br/&gt;&amp;gt; be randomized with shared secret from Diffie-Hellman so are unlinkable&lt;br/&gt;&amp;gt; to the public keys of the two nodes under decisional Diffie-Hellman&lt;br/&gt;&amp;gt; assumption.&lt;br/&gt;&lt;br/&gt;Right, that would work.&lt;br/&gt;&lt;br/&gt;How about just using a multiplicative tweak of your own privkey and the pubkey of the other node (i.e. just use the &amp;#34;raw&amp;#34; ECDH point), that would work as 2-of-2 in 2p-ECDSA, and I believe (but do not know) should also be signable using MuSig/MuSig2 under taproot?&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; There is more minor but still real concern of &amp;#34;deniability&amp;#34; of&lt;br/&gt;&amp;gt; unpublished closed channels if a large node operator later becomes&lt;br/&gt;&amp;gt; corrupted or coerced by a malicious actor. Since the node operator&lt;br/&gt;&amp;gt; still knows their secret key (obviously) they can still do a scan&lt;br/&gt;&amp;gt; (same as you would do in recovery) on the whole chain and find any&lt;br/&gt;&amp;gt; past channels they had with any nodes.&lt;br/&gt;&lt;br/&gt;&amp;#34;Peer selling private information&amp;#34; is always going to be an issue with unpublished channels, and this seems to be an inherent issue with that model.&lt;br/&gt;&lt;br/&gt;Note that due to the existence of proof-of-discrete-log-equivalence, a node operator can *prove* to someone buying private information that a particular outpoint onchain is actually an unpublished channel.&lt;br/&gt;If I have privkey `z` and you have pubkey `L`, I can show `z * G` (my node pubkey), `L` (your &amp;#34;unpublished&amp;#34; (ha, ha) node pubkey), and `z * L` (our ECDH secret), plus a proof-of-discrete-log-equivalence that the `z` in `z * G` is the same `z` in `z * L`, in order to convice them of the ECDH secret.&lt;br/&gt;I suspect part of the proof-of-discrete-log-equivalance can be gated as well by a ZKCP on payment point&#43;scalar the proof is provided only on payment.&lt;br/&gt;The selling node operator does not even need to reveal `z`.&lt;br/&gt;&lt;br/&gt;As the ECDH secret is what tweaks the channel keys, that is enough to convince any surveilling buyer.&lt;br/&gt;Further, `z` is not revealed, and channel funds cannot be stolen by just knowledge of the ECDH secret, thus protecting the interests of the selling forwarding node.&lt;br/&gt;&lt;br/&gt;Now of course, I could just be making up `L` (i.e. LL could be a sockpuppet of mine).&lt;br/&gt;However, between these two choices:&lt;br/&gt;&lt;br/&gt;* I lock up a set number of millisatoshi in a Z &#43; L channel where L is a sockpuppet, and sell this fake information to surveillors.&lt;br/&gt;* I lock up a set number of millisatoshi in a Z &#43; L channel where L is a genuine user node that thinks unpublished channels are private, and sell this genuine information to surveillors.&lt;br/&gt;&lt;br/&gt;Which is more lucrative for me?&lt;br/&gt;The latter case would be more lucrative for me, as I not only earn from selling your data to surveillors, I also earn routing fees.&lt;br/&gt;The former case can only earn me selling fake data to surveillors, with no opportunity to earn forwarding fees.&lt;br/&gt;&lt;br/&gt;&amp;gt; A mitigation of this problem&lt;br/&gt;&amp;gt; would be for users who want unpublished channels to turn the&lt;br/&gt;&amp;gt; use-node-key-as-channel-key feature off for their keys in the channel&lt;br/&gt;&amp;gt; so they would still be able to do a backup-free channel scan but the&lt;br/&gt;&amp;gt; well-established node would lose the ability to do so.&lt;br/&gt;&lt;br/&gt;If the user has all channels unpublished, it is not (normally) gossiped.&lt;br/&gt;So the well-established node would not have the ability to recover *all* channels by backup-free scans of published nodes in the first place, only those that are to published nodes.&lt;br/&gt;&lt;br/&gt;Or do you refer to something else?&lt;br/&gt;&lt;br/&gt;It might be easier for the &amp;#34;client&amp;#34; here to make up different node IDs for each &amp;#34;server&amp;#34; it connects to, by e.g. hashing its base privkey with the server pubkey and using the hash as the privkey for its fake node ID with that server.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; This means that&lt;br/&gt;&amp;gt; after the channel is closed there would be no way for the large node&lt;br/&gt;&amp;gt; to find the channel again assuming they honestly delete the data.&lt;br/&gt;&lt;br/&gt;If forwarding nodes are expected to have storage redundancy, deletion of data could be difficult as well --- there may be lots of replicas of that data in various places (including obsolete replicas that the node operator might not particularly care about, being obsolete), and deletion might not catch them all.&lt;br/&gt;&amp;#34;Honestly delete&amp;#34; seems like a best-effort to me.&lt;br/&gt;&lt;br/&gt;On the other hand, if the model is that privacy is to be trusted to your peers, then this is no worse than unpublished channels, which has the same model.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:01:46&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqstlrlvjtp53n0qsmfgytysklaxz8n2d09k6xwzvwhx870s2fxyc3qzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzuk7zdq</id>
    
      <title type="html">📅 Original date posted:2020-12-15 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqstlrlvjtp53n0qsmfgytysklaxz8n2d09k6xwzvwhx870s2fxyc3qzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzuk7zdq" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs8j8dm5v4xfvtlxa9rt2za5a0jyudwmeducky9jnz55qnnluqcjdgf0m8hq&#39;&gt;nevent1q…m8hq&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-12-15&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning LL,&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; - What do you do if the channel state has HTLCs in flight? I don&amp;#39;t know -- I guess you can just put them onto the settlement tx? That way it&amp;#39;s possible the payment could still go through. Alternatively you could just gift the money to the party offering the recovery settlement.&lt;br/&gt;&lt;br/&gt;Gifting the money is not a good option --- we allow HTLCs to be almost as high as the total channel value minus fees and reserve.&lt;br/&gt;Thus all the claimable value could potentially be in an outgoing HTLC.&lt;br/&gt;Worse, if our node is a forwarding node, it would be easy for a third party to arrange to have our funds in various HTLCs.&lt;br/&gt;&lt;br/&gt;If we allow HTLCs to keep going on even while we are in recovery, we need to be able to &amp;#34;bind&amp;#34; as well incoming and outgoing HTLCs if our node was a forwarding node.&lt;br/&gt;&lt;br/&gt;In particular, consider this situation:&lt;br/&gt;&lt;br/&gt;* We are a forwarding node.&lt;br/&gt;* We forward a payment whose outgoing expires in 1 day and whose incoming expires in 2 days.&lt;br/&gt;  * This means we have at least two channels, one with the incoming HTLC and another with the outgoing HTLC.&lt;br/&gt;* We hit our head and get amnesia.&lt;br/&gt;* It takes us a day to realize we were formerly a Lightning Network forwarding node.&lt;br/&gt;* The peer with the outgoing HTLC knows or learns the preimage.&lt;br/&gt;  * Since we were unresponsive (i.e. still recovering from whatever gave us amnesia) that peer has dropped the channel onchain.&lt;br/&gt;  * The peer has resolved the onchain HTLC with the hashlock branch.&lt;br/&gt;* Because the outgoing peer has resolved everything it cares about, it forgets about the channel.&lt;br/&gt;* We call all public nodes and ask about channels we might have with them.&lt;br/&gt;* The incoming peer claims we have a channel with them containing an HTLC going to us.&lt;br/&gt;* The outgoing peer has forgotten about us and does not tell us about the channel.&lt;br/&gt;&lt;br/&gt;Thus, we cannot recover the outgoing channel, since the peer has already closed it and resolved everything it is interested in.&lt;br/&gt;(let us suppose that the `to_self_delay` is smaller than our `cltv_delta` setting)&lt;br/&gt;&lt;br/&gt;Using static-key channels (i.e. channel keys are our node keys) allows us to recover even the outgoing channel with outgoing HTLC that has been forgotten by the outgoing peer.&lt;br/&gt;&lt;br/&gt;Using static-key channels does have slightly weaker privacy:&lt;br/&gt;&lt;br/&gt;* Published nodes reveal all their channels with other published nodes on the blockchain.&lt;br/&gt;  * While it is true that published nodes already reveal their channels with published nodes, they are currently only revealed on the LN gossip network, which is not archived; historical channels that are now closed are not informed to current surveillors.&lt;br/&gt;    * On the other hand, all it takes is one &amp;#34;LN wayback machine&amp;#34; to record all LN gossip, which are self-attesting and include a signature from the node.&lt;br/&gt;* Unpublished nodes risk revealing their channels with published nodes via the blockchain.&lt;br/&gt;  * Invoices created by unpublished nodes currently reveal their public key.&lt;br/&gt;    Payers can then uncover all the channels of that node.&lt;br/&gt;  * An unpublished node could use a faked node id, by combining the payment hash/point with its privkey to generate a new keypair to use as faked node id (I AM NOT A CRYPTOGRAPHER AND THIS TECHNIQUE IS POTENTIALLY GOING TO LOSE ALL YOUR FUNDS AND PRIVACY AND KILL YOUR DOG).&lt;br/&gt;    On receiving an unparseable onion, it could try combining its privkey with the payment hash/point and try to open the onion that way, in case it is an incoming payment with the faked node id.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:01:45&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs0s6mpyd4z8pxcnr2njrwzrw0tucdtcs98ka7j65fyfahvayf3szqzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzssyumc</id>
    
      <title type="html">📅 Original date posted:2020-11-27 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs0s6mpyd4z8pxcnr2njrwzrw0tucdtcs98ka7j65fyfahvayf3szqzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzssyumc" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsqxe9futyllxexlx6dwf98v922p0usf7sva46yx3a0ed3y099js4c84ev87&#39;&gt;nevent1q…ev87&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;Good morning Andres, t-bast, Gleb, et al,&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; But instead it could be a point-to-point property: each node provides its own stake certificate&lt;br/&gt;&amp;gt; &amp;gt; to the next node (and only to that node). Alice provides a stake certificate to Bob, then Bob&lt;br/&gt;&amp;gt; &amp;gt; provides a stake certificate to Carol, and so on. If that&amp;#39;s the case, it can be in a tlv field in the&lt;br/&gt;&amp;gt; &amp;gt; `update_add_htlc` message and doesn&amp;#39;t need to be inside the onion. This also makes it less&lt;br/&gt;&amp;gt; &amp;gt; likely that Alice is exposing herself to remote nodes in the route (payer privacy).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; If the above paragraph is confirmed, then does this mean StakeCertificates with privacy are possible without ZK proofs?&lt;br/&gt;&amp;gt; Or did I miss something?&lt;br/&gt;&lt;br/&gt;Logically speaking, for this model, a proof is unnecessary --- the node offering the HTLC already has a channel that contains funds that is locked.&lt;br/&gt;&lt;br/&gt;Specifically, it is the channel itself where the HTLC is being instantiated, that contains funds owned by the offerer, and which are locked for use in the Lightning Network.&lt;br/&gt;&lt;br/&gt;Since the receiver of the HTLC offer is already aware of this channel and its existence, it requires no proof at all.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Thus, I have my doubts on this model --- it seems to me that the current Lightning Network is already equivalent to this model, and the current Lightning Network is (supposedly) attackable by these &amp;#34;griefing&amp;#34; attacks.&lt;br/&gt;&lt;br/&gt;Another example is that, if the offerring node has a number of published channels, that is sufficient proof as well, without requiring any privacy-preserving proofs.&lt;br/&gt;This is precisely the current Lightning Network, yet we consider the current Lightning Network attackable by griefing.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Instead, payers, or payees (i.e. by providing the proof in an invoice) must set aside separate non-trivial stake, not tied to channels, but provably tied only to this stake certificate mechanism, in order to assuage the fear of forwarding nodes that the HTLCs will not be claimed immediately.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:01:35&#43;02:00</updated>
  </entry>

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

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

  <entry>
    <id>https://nostr.ae/nevent1qqs26j56yptr75wtjj5gvn23hcnm4czj043m08r9wu9glau6rzwvy7czypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxz0e8g4r</id>
    
      <title type="html">📅 Original date posted:2020-10-05 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs26j56yptr75wtjj5gvn23hcnm4czj043m08r9wu9glau6rzwvy7czypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxz0e8g4r" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsfhaht3aj020qgqgw4xy7cgy2vlqnt4fpfk7daahgwrnak038x5lsmhfpq8&#39;&gt;nevent1q…fpq8&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-10-05&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning Bastien,&lt;br/&gt;&lt;br/&gt;&amp;gt; Good morning list,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; It seems to me that the &amp;#34;funder pays all the commit tx fees&amp;#34; rule exists solely for simplicity&lt;br/&gt;&amp;gt; (which was totally reasonable). I haven&amp;#39;t been able to find much discussion about this decision&lt;br/&gt;&amp;gt; on the mailing list nor in the spec commits.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;This indeed seems to be one of those &amp;#34;unwritten rules&amp;#34;, like the unwritten rule that SCRIPT opcodes can only look at the transaction they are in and cannot look at the block it got confirmed in, or previous blocks.&lt;br/&gt;&lt;br/&gt;My rough understanding is that it prevents this kind of griefing attack:&lt;br/&gt;&lt;br/&gt;* You have a node with channels balanced just as you like it, very lucrative, earning entire satoshis of routing fees per week.&lt;br/&gt;* I have a bunch of funds lying around, much larger than your liquidity.&lt;br/&gt;* I create a temporary throwaway node and have it make a large channel to you about equal to your liquidity.&lt;br/&gt;* I send out all of the funds on the new large channel, preferably to offchain-to-onchain swaps like Loop or Boltz.&lt;br/&gt;  * This shrinks the outgoing liquidity you have available on your existing channels, making it difficult for you to route and earn routing fees -- in order to route, you need to have *both* incoming and outgoing liquidity.&lt;br/&gt;  * If I do not make another channel with my new node, then you cannot rebalance offchain.&lt;br/&gt;* Since my new large channel is now exhausted, I can delete the throwaway node forever.&lt;br/&gt;  * The `close_to` feature also allows me to arrange the funds to be closed to a cold-storage funds.&lt;br/&gt;  * Or I can just keep the necessary keys to recover funds from the unilateral channel close broadcast by you later.&lt;br/&gt;  * There is a reserve, but that is tiny, and if so I can probably afford to wait --- this is a game of chicken on who closes the channel, and since most of the channel is on your end, you are at a serious disadvantage.&lt;br/&gt;* You are now forced to unilateral close the channel so you can send it to an onchain-to-offchain swap and reload your channels into the proper balance it had before I attacked you.&lt;br/&gt;&lt;br/&gt;If the unilateral close on the channel were paid by you, then that is adding insult to injury.&lt;br/&gt;Thus, it is better if the unilateral close were paid by me, even if ultimately the unilateral close is performed by you.&lt;br/&gt;This is &amp;#34;initiator pays&amp;#34; principle.&lt;br/&gt;&lt;br/&gt;--&lt;br/&gt;&lt;br/&gt;On the other hand, a quick skim of your proposal suggests that it still respects the &amp;#34;initiator pays&amp;#34; principle.&lt;br/&gt;Basically, the fundee only pays fees for HTLCs they initiated, which is not relevant to the above attack (since in the above attack, my node is a dead end, you will never send out an HTLC through my channel to rebalance).&lt;br/&gt;So it should still be acceptable.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; At first glance, it&amp;#39;s true that at the beginning of the channel lifetime, the funder should be&lt;br/&gt;&amp;gt; responsible for the fee (it&amp;#39;s his decision to open a channel after all). But as time goes by and&lt;br/&gt;&amp;gt; both peers earn value from this channel, this rule becomes questionable. We&amp;#39;ve discovered since&lt;br/&gt;&amp;gt; then that there is some risk associated with having pending HTLCs (flood-and-loot type of attacks,&lt;br/&gt;&amp;gt; pinning, channel jamming, etc).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I think that *in some cases*, fundees should be paying a portion of the commit-tx on-chain fees,&lt;br/&gt;&amp;gt; otherwise we may end up with a web-of-trust network where channels would only exist between peers&lt;br/&gt;&amp;gt; that trust each other, which is quite limiting (I&amp;#39;m hoping we can do better).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Routing nodes may be at risk when they *receive* HTLCs. All the attacks that steal funds come from&lt;br/&gt;&amp;gt; the fact that a routing node has paid downstream but cannot claim the upstream HTLCs (correct me&lt;br/&gt;&amp;gt; if that&amp;#39;s incorrect). Thus I&amp;#39;d like nodes to pay for the on-chain fees of the HTLCs they offer&lt;br/&gt;&amp;gt; while they&amp;#39;re pending in the commit-tx, regardless of whether they&amp;#39;re funder or fundee.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The simplest way to do this would be to deduce the HTLC cost (172 * feerate) from the offerer&amp;#39;s&lt;br/&gt;&amp;gt; main output (instead of the funder&amp;#39;s main output, while keeping the base commit tx weight paid&lt;br/&gt;&amp;gt; by the funder).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; A more extreme proposal would be to tie the *total* commit-tx fee to the channel usage:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; * if there are no pending HTLCs, the funder pays all the fee&lt;br/&gt;&amp;gt; * if there are pending HTLCs, each node pays a proportion of the fee proportional to the number of&lt;br/&gt;&amp;gt; HTLCs they offered. If Alice offered 1 HTLC and Bob offered 3 HTLCs, Bob pays 75% of the&lt;br/&gt;&amp;gt; commit-tx fee and Alice pays 25%. When the HTLCs settle, the fee is redistributed.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; This model uses the on-chain fee as collateral for usage of the channel. If Alice wants to forward&lt;br/&gt;&amp;gt; HTLCs through this channel (because she has something to gain - routing fees), she should be taking&lt;br/&gt;&amp;gt; on some of the associated risk, not Bob. Bob will be taking the same risk downstream if he chooses&lt;br/&gt;&amp;gt; to forward.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I believe it also forces the fundee to care about on-chain feerates, which is a healthy incentive.&lt;br/&gt;&amp;gt; It may create a feedback loop between on-chain feerates and routing fees, which I believe is also&lt;br/&gt;&amp;gt; a good long-term thing (but it&amp;#39;s hard to predict as there may be negative side-effects as well).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; What do you all think? Is this a terrible idea? Is it okay-ish, but not worth the additional&lt;br/&gt;&amp;gt; complexity? Is it an amazing idea worth a lightning nobel? Please don&amp;#39;t take any of my claims&lt;br/&gt;&amp;gt; for granted and challenge them, there may be negative side-effects I&amp;#39;m completely missing, this is&lt;br/&gt;&amp;gt; a fragile game of incentives...&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Side-note: don&amp;#39;t forget to take into account that the fees for HTLC transactions (second-level txs)&lt;br/&gt;&amp;gt; are always paid by the party that broadcasts them (which makes sense). I still think this is not&lt;br/&gt;&amp;gt; enough and can even be abused by fundees in some setups.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thanks,&lt;br/&gt;&amp;gt; Bastien
    </content>
    <updated>2023-06-09T15:01:00&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsqexywn7awl74t6d57juxrnn0296ut9s8n5jtf96um8j60vq543fszypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzrrh60r</id>
    
      <title type="html">📅 Original date posted:2020-10-11 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsqexywn7awl74t6d57juxrnn0296ut9s8n5jtf96um8j60vq543fszypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzrrh60r" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqswyr2jrz4l2y552j794rp5max4hntd6y7nz5tegxzk9ecshmfg9nq9e2jyj&#39;&gt;nevent1q…2jyj&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-10-11&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning t-bast,&lt;br/&gt;&lt;br/&gt;&amp;gt; Hey Zman,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; raising the minimum payment size is another headache&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; It&amp;#39;s true that it may (depending on the algorithm) lower the success rate of MPP-split.&lt;br/&gt;&amp;gt; But it&amp;#39;s already a parameter that node operators can configure at will (at channel creation time),&lt;br/&gt;&amp;gt; so IMO it&amp;#39;s a complexity we have to deal with anyway. Making it dynamic shouldn&amp;#39;t have a high&lt;br/&gt;&amp;gt; impact on MPP algorithms (apart from failures while `channel_update`s are propagating).&lt;br/&gt;&lt;br/&gt;Right, it should not have much impact.&lt;br/&gt;&lt;br/&gt;For the most part, when considering the possibility of splicing in the future, we should consider that such parameters must be made changeable largely.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; To be fully honest, my (maybe unpopular) opinion about MPP is that it&amp;#39;s not necessary on the&lt;br/&gt;&amp;gt; network&amp;#39;s backbone, only at its edges. Once the network matures, I expect channels between&lt;br/&gt;&amp;gt; &amp;#34;serious&amp;#34; routing nodes to be way bigger than the size of individual payments. The only places&lt;br/&gt;&amp;gt; where there may be small or almost-empty channels are between end-users (wallets) and&lt;br/&gt;&amp;gt; routing nodes.&lt;br/&gt;&amp;gt; If something like Trampoline were to be implemented, MPP would only be needed to reach a&lt;br/&gt;&amp;gt; first routing node (short route), that routing node would aggregate the parts and forward as a&lt;br/&gt;&amp;gt; single HTLC to the next routing node. It would be split again once it reaches the other edge&lt;br/&gt;&amp;gt; of the network (for a short route as well). In a network like this, the MPP routes would only have&lt;br/&gt;&amp;gt; to be computed on a small subset of the network, which makes brute-force algorithms completely&lt;br/&gt;&amp;gt; reasonable and the success rate higher.&lt;br/&gt;&lt;br/&gt;This makes me wonder if we really need the onions-per-channel model we currently use.&lt;br/&gt;&lt;br/&gt;For instance, Tor is basically two-layer: there is a lower-level TCP/IP layer where packets are sent out to specific nodes on the network and this layer is completely open about where the packet should go, but there is a higher layer where onion routing between nodes is used.&lt;br/&gt;&lt;br/&gt;We could imitate this, with HTLC packets that openly show the next destination node, but once all parts reach the destination node, it decodes and turns out to be an onion to be sent to the next destination node, and the current destination node is just another forwarder.&lt;br/&gt;&lt;br/&gt;HTLC packets could be split arbitrarily, and later nodes could potentially merge with the lower CLTV used in subsequent hops.&lt;br/&gt;&lt;br/&gt;Or not, *shrug*.&lt;br/&gt;It has the bad problem of being more expensive on average than purely source-based routing, and probably having worse payment latency.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;For your proposal, how sure is the receiver that the input end of the trampoline node is &amp;#34;nearer&amp;#34; to the payer than itself?&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:00:57&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsgjr4x94pjye087ax0ma308a90wgfw9jxregpjl26luqleqggcdeqzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzu5f9gj</id>
    
      <title type="html">📅 Original date posted:2020-06-20 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsgjr4x94pjye087ax0ma308a90wgfw9jxregpjl26luqleqggcdeqzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzu5f9gj" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsxsw7qgvxuaff8hpk0u7jfe6en488repcndyz3z4v7zwkhsszy73c39jhkg&#39;&gt;nevent1q…jhkg&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-06-20&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning again,&lt;br/&gt;&lt;br/&gt;&amp;gt; Good morning Dave,&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; ZmnSCPxj noted that pay-to-preimage doesn&amp;#39;t work with PTLCs.[2] I was&lt;br/&gt;&amp;gt; &amp;gt; hoping one of Bitcoin&amp;#39;s several inventive cryptographers would come&lt;br/&gt;&amp;gt; &amp;gt; along and describe how someone with an adaptor signature could use that&lt;br/&gt;&amp;gt; &amp;gt; information to create a pubkey that could be put into a transaction with&lt;br/&gt;&amp;gt; &amp;gt; a second output that OP_RETURN included the serialized adaptor&lt;br/&gt;&amp;gt; &amp;gt; signature. The pubkey would be designed to be spendable by anyone with&lt;br/&gt;&amp;gt; &amp;gt; the final signature in a way that revealed the hidden value to the&lt;br/&gt;&amp;gt; &amp;gt; pubkey&amp;#39;s creator, allowing them to resolve the PTLC. But if that&amp;#39;s&lt;br/&gt;&amp;gt; &amp;gt; fundamentally not possible, I think we could advocate for making&lt;br/&gt;&amp;gt; &amp;gt; pay-to-revealed-adaptor-signature possible using something like&lt;br/&gt;&amp;gt; &amp;gt; OP_CHECKSIGFROMSTACK.[3]&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;lt;snip&amp;gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The signed message could be a signature to `SIGHASH_NONE`, finally an actual use for that flag.&lt;br/&gt;&lt;br/&gt;If you are going to embed it in an `OP_RETURN` in the same transaction, you also need `SIGHASH_ANYPREVOUT`, otherwise you cannot embed the adaptor signature for spending from that transaction in the transaction being spent, it also implies `A[p4s] = a[p4s] * G` is a one-time-use keypair.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:00:31&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsxzr5hn8uhzmnd78ck7kvw7ap55a0jhjsazr2vn0n8tjavesqv8wczypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzcghr95</id>
    
      <title type="html">📅 Original date posted:2020-06-22 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsxzr5hn8uhzmnd78ck7kvw7ap55a0jhjsazr2vn0n8tjavesqv8wczypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzcghr95" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsf34jwmf5ksq2wuvt9te23g4rg4chjzkflpt6qp3s5mfvgmnk7d3gjuagls&#39;&gt;nevent1q…agls&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-06-22&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning Bastien,&lt;br/&gt;&lt;br/&gt;&amp;gt; Thanks for the detailed write-up on how it affects incentives and centralization,&lt;br/&gt;&amp;gt; these are good points. I need to spend more time thinking about them.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; This is one reason I suggested using independent pay-to-preimage&lt;br/&gt;&amp;gt; &amp;gt; transactions[1]&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; While this works as a technical solution, I think it has some incentives issues too.&lt;br/&gt;&amp;gt; In this attack, I believe the miners that hide the preimage tx in their mempool have&lt;br/&gt;&amp;gt; to be accomplice with the attacker, otherwise they would share that tx with some of&lt;br/&gt;&amp;gt; their peers, and some non-miner nodes would get that preimage tx and be able to&lt;br/&gt;&amp;gt; gossip them off-chain (and even relay them to other mempools).&lt;br/&gt;&lt;br/&gt;I believe this is technically possible with current mempool rules, without miners cooperating with the attacker.&lt;br/&gt;&lt;br/&gt;Basically, the attacker releases two transactions with near-equal fees, so that neither can RBF the other.&lt;br/&gt;It releases the preimage tx near miners, and the timelock tx near non-miners.&lt;br/&gt;&lt;br/&gt;Nodes at the boundaries between those that receive the preimage tx and the timelock tx will receive both.&lt;br/&gt;However, they will receive one or the other first.&lt;br/&gt;Which one they receive first will be what they keep, and they will reject the other (and *not* propagate the other), because the difference in fees is not enough to get past the RBF rules (which requires not just a feerate increase, but also an increase in absolute fee, of at least the minimum relay feerate times transaction size).&lt;br/&gt;&lt;br/&gt;Because they reject the other tx, they do not propagate the other tx, so the boundary between the two txes is inviolate, neither can get past that boundary, this occurs even if everyone is running 100% unmodified Bitcoin Core code.&lt;br/&gt;&lt;br/&gt;I am not a mempool expert and my understanding may be incorrect.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:00:31&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs8wc773ykamvy06h86e0r2q8emn384uekk7lev8yvn9ecch33dahszypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxza8k50k</id>
    
      <title type="html">📅 Original date posted:2020-06-21 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs8wc773ykamvy06h86e0r2q8emn384uekk7lev8yvn9ecch33dahszypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxza8k50k" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsr95nunsuvkpcu6g087wmzm6238hxsqvlyn5pqy9hnsu62r8w668skzdxg2&#39;&gt;nevent1q…dxg2&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-06-21&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning Jeremy,&lt;br/&gt;&lt;br/&gt;&amp;gt; My understanding is that you can use the CTV deferral to also get independent HTLC relative timelocks start points per output. This would help with this sort of issue right?&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; And you&amp;#39;re correct that there&amp;#39;s overhead of indirection, but it&amp;#39;s not super large (minimally complicated something like an extra 100 bytes per output, if you were to have a flat array where each entry is a CTV output so that each out gets its own clock).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Essentially something like this:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Chan&lt;br/&gt;&amp;gt;      |&lt;br/&gt;&amp;gt;      ------------------------------------&lt;br/&gt;&amp;gt;      |      |      |       |            |&lt;br/&gt;&amp;gt;    CTV(A) CTV(B) CTV(C)  CTV(D)      (Optional CPFP Anchor?)&lt;br/&gt;&amp;gt;      |      |      |       | &lt;br/&gt;&amp;gt; 1 block  1 block 1 block  1 block&lt;br/&gt;&amp;gt;      |      |      |       |&lt;br/&gt;&amp;gt;     A       B      C       D&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Where A B C and D are all HTLCs.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Now because of the one-hop indirection, A B C and D can all expand independently. It&amp;#39;s also possible for the Channel Operator to do something like:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Chan&lt;br/&gt;&amp;gt;      |&lt;br/&gt;&amp;gt;      -----------------------------------&lt;br/&gt;&amp;gt;      |      |      |      |            |&lt;br/&gt;&amp;gt;    CTV(A) CTV(B) CTV(C) CTV(D)      (Optional CPFP Anchor?)&lt;br/&gt;&amp;gt;      |      |      |      |&lt;br/&gt;&amp;gt; 1 block  1 block 1 block 10 blocks&lt;br/&gt;&amp;gt;      |      |      |      |&lt;br/&gt;&amp;gt;     A       B      C      D&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; To make D have a further out resolution time to prevent the simultaneous-ness issue (trees or a linear-chain rather than total fan-out can also be used but I think it&amp;#39;s a bit more confusing for a basic example).&lt;br/&gt;&lt;br/&gt;The Lightning HTLCs use absolute timelocks, and the timelocks are pre-arranged by the original sender.&lt;br/&gt;A forwarding node has to ensure that the outgoing HTLC timeout is respected, or else it could lose funds (by having the outgoing HTLC be claimed by outgoing peer hashlock and the incoming HTLC be calimed by the incoming peer timelock).&lt;br/&gt;&lt;br/&gt;(We cannot use relative timelocks in the timelock branches of the HTLCs because we are coordinating possibly up to 20 different nodes, and do not want to leak the entire route to any of the intermediate nodes, so everyone has to use the same clock --- the absolute blockheight --- to measure time)&lt;br/&gt;&lt;br/&gt;So, if my understanding of your above graph is correct, you are suggesting that HTLC D could have a relative timelock of 10 blocks instead of 1.&lt;br/&gt;&lt;br/&gt;But all that means is that if the timelock of D is at height L, then the forwarder has to ensure that the commitment transaction appears onchain no later than height L - 10 (in practice I have to publish it at L - 11 so it propagates to miners who are building L - 10).&lt;br/&gt;If not, the HTLC cannot be published at height L and the timelock cannot be enforced, risking fund loss.&lt;br/&gt;&lt;br/&gt;This seems to *tighten* whatever leeway I might have bought by using CTV.&lt;br/&gt;In current C-Lightning, for instance, for a timelock in my favor at height L, I have to broadcast the commitment transaction at time L - 1 so it goes into block L and I can claim it.&lt;br/&gt;Thus, I have the option to publish from now up to L - 1.&lt;br/&gt;With a further delay of 10 on the HTLC tx D, I now only have the option to publish from now up to L - 11, thus I have *less* leeway in when I can publish the commitment tx.&lt;br/&gt;&lt;br/&gt;Basically the fund-security of the forwarding node is based on the absolute timelock of every HTLC it offers, so the timelock is an absolute bound on whatever techniques I might use to reduce fees.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; The benefit of trees is that I can do something like:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Chan&lt;br/&gt;&amp;gt;      |&lt;br/&gt;&amp;gt;      --------------------------------------------------------&lt;br/&gt;&amp;gt;      |      |      |      |                          |&lt;br/&gt;&amp;gt;    CTV(A) CTV(B) CTV(C) CTV(400 HTLC)      (Optional CPFP Anchor?)&lt;br/&gt;&amp;gt;      |      |      |      |                          |&lt;br/&gt;&amp;gt; 1 block 1 block  1 block 10 blocks         (Optional CPFP Anchor?)&lt;br/&gt;&amp;gt;      |      |      |      |&lt;br/&gt;&amp;gt;      |      |      |   / ....\&lt;br/&gt;&amp;gt;     A       B      C  | ..... |&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Which makes it so that the low-value new HTLCs can be deprioritized fee wise. So that the attack, which occurs during a fee spike, doesn&amp;#39;t end up *requiring* substantial fees to be added to the channel to support a burst of HTLCS.&lt;br/&gt;&lt;br/&gt;If the HTLCs have a timelock L, then I *need* to publish the HTLCs at timelock L or else the timelock cannot be enforced.&lt;br/&gt;&lt;br/&gt;This means I need to publish the big `| ..... |` transaction with 400 HTLCs before timelock L, where L is `min (L) for all 400 HTLCs`.&lt;br/&gt;&lt;br/&gt;The attacker can arrange to have the 400 low-value HTLCs have the same timelock L.&lt;br/&gt;So even if the `| ..... |` is a tree of CTVs, I have to publish the entire tree at the same time so that the final HTLCs appear at timelock L and I can reclaim my funds.&lt;br/&gt;&lt;br/&gt;If I do not publish, I run the risk that the total fund going to `CTV(400 HTLC)` gets stolen from me by publication of the hashlock on the outgoing and publication of the timelock at the incoming.&lt;br/&gt;Not publishing this due to fee spikes is basically trusting that the next peer is not going to steal the fund by hashlock branch.&lt;br/&gt;And the next peer is an attacker in this attack, so obviously cannot be trusted.&lt;br/&gt;&lt;br/&gt;So it seems to me that this is better done by just rate-limiting simultaneous HTLCs, to limit what can be stolen.&lt;br/&gt;&lt;br/&gt;A better solution might be to allow only one HTLC at each absolute timelock, and use a single CTV tree, with one leaf for each of the absolute timelocks.&lt;br/&gt;Then I can publish parts of the CTV tree at my leisure, with my only constraint being the absolute timelock of each HTLC.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;    Chan&lt;br/&gt;      |&lt;br/&gt;     CTV&lt;br/&gt;      |&lt;br/&gt;      &#43;------&#43;&lt;br/&gt;      |      |&lt;br/&gt;     CTV    HTLC(L = now &#43; 1)&lt;br/&gt;      |&lt;br/&gt;      &#43;------&#43;&lt;br/&gt;      |      |&lt;br/&gt;     CTV    HTLC(L = now &#43; 2)&lt;br/&gt;      |&lt;br/&gt;      &#43;------&#43;&lt;br/&gt;      |      |&lt;br/&gt;     CTV    HTLC(L = now &#43; 3)&lt;br/&gt;      |&lt;br/&gt;     ...&lt;br/&gt;&lt;br/&gt;Such a singly-linked list would take up even more absolute block space, incidentally, and makes high-fee spikes more likely.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:00:26&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqst25k7kf3lepu2tkn7unnewv42r0ft5wxhzfrf63ezg0e8n40ed6czypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzxv2w2n</id>
    
      <title type="html">📅 Original date posted:2020-06-21 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqst25k7kf3lepu2tkn7unnewv42r0ft5wxhzfrf63ezg0e8n40ed6czypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzxv2w2n" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsrxk6awu24v24gp94eej9dxwjgk0k336t6cj5eezzhsff0kczj98crazd6p&#39;&gt;nevent1q…zd6p&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-06-21&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning Jeremy,&lt;br/&gt;&lt;br/&gt;&amp;gt; I am not steeped enough in Lightning Protocol issues to get the full design space, but I&amp;#39;m fairly certain BIP-119 Congestion Control trees would help with this issue.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; You can bucket a tree by doing a histogram of HTLC size, so that all small HTLCs live in a common CTV subtree and don&amp;#39;t interfere with higher value HTLCs. You can also play with sequencing to prevent those HTLCs from getting longchains in the mempool until they&amp;#39;re above a certain value.&lt;br/&gt;&lt;br/&gt;If the attacker stops responding, then all HTLC rules need to be published onchain for enforcement of the HTLC rules.&lt;br/&gt;And that publication onchain is the problem: every HTLC published requires onchain space, which must be paid for.&lt;br/&gt;&lt;br/&gt;The most compact way to expose the HTLCs is as a flat array, i.e. outputs of a single transaction.&lt;br/&gt;Every tree structure is going to take up more space than a flat array.&lt;br/&gt;&lt;br/&gt;What CTV buys is to be able to defer *when* you reveal scripts, possibly to a later time when blockchain space is cheaper.&lt;br/&gt;But in case the victim owns the timelock branch of an outgoing HTLC, it is unsafe for the victim to defer: it has to enforce the locktime soon or it could end up losing both incoming and outgoing HTLC amounts.&lt;br/&gt;And to enforce the locktime it has to publish the HTLC.&lt;br/&gt;&lt;br/&gt;Now of course with CTV you could publish only the HTLC you have to enforce *now*, and keep the rest in an CTV output.&lt;br/&gt;The attacker can counter this by pushing 483 HTLCs with the same timelock at the victim, so that the victim has to publish all HTLCs simultaneously.&lt;br/&gt;And a flat array of outputs is cheaper than a tree.&lt;br/&gt;&lt;br/&gt;What *can* be done would be to bin by timelock rather than amount; tree leaves are a transaction that exposes all HTLCs with a particular timelock as a flat array of outputs, but different timelocks go to different tree branches.&lt;br/&gt;But the attacker can still do the same-timelock trick, and the tree structure is likely to take up more space in the end than just a non-treed flat array of outputs.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; --&lt;br/&gt;&amp;gt; @JeremyRubin&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On Thu, Jun 18, 2020 at 1:41 AM Antoine Riard &amp;lt;antoine.riard at gmail.com&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Hi Rene,&lt;br/&gt;&amp;gt; &amp;gt; Thanks for disclosing this vulnerability,&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; I think this blackmail scenario holds but sadly there is a lower scenario.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Both &amp;#34;Flood &amp;amp; Loot&amp;#34; and your blackmail attack rely on `update_fee` mechanism and unbounded commitment transaction size inflation. Though the first to provoke block congestion and yours to lockdown in-flight fees as funds hostage situation.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; 1. The current solution is to just not use up the max value of htlc&amp;#39;s. Eclaire and c-lightning by default only use up to 30 htlcs.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; As of today, yes I would recommend capping commitment size both for ensuring competitive propagation/block selection and limiting HTLC exposure.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; 2. Probably the best fix (not sure if I understand the consequences correctly) is coming from this PR to bitcoin core (c.f. &lt;a href=&#34;https://github.com/bitcoin/bitcoin/pull/15681&#34;&gt;https://github.com/bitcoin/bitcoin/pull/15681&lt;/a&gt; by @TheBlueMatt . If I get it correctly with that we could always have low fees and ask the person who want to claim their outputs to pay fees. This excludes overpayment and could happen at a later stage when fees are not spiked. Still the victim who offered the htlcs would have to spend those outputs at some time.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; It&amp;#39;s a bit more complex, carve-out output, even combined with anchor output support on the LN-side won&amp;#39;t protect against different flavors of pinning. I invite you to go through logs of past 2 LN dev meetings.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; 3. Don&amp;#39;t overpay fees in commitment transactions. We can&amp;#39;t foresee the future anyway&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Once 2. is well-addressed we may deprecate `update_fee`.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; 4. Don&amp;#39;t add htlcs for which the on chain fee is higher than the HTLCs value (like we do with sub dust amounts and sub satoshi amounts. This would at least make the attack expensive as the attacker would have to bind a lot of liquidity.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Ideally we want dust_limit to be dynamic, dust cap should be based on HTLC economic value, feerate of its output, feerate of HTLC-transaction, feerate estimation of any CPFP to bump it. I think that&amp;#39;s kind of worthy to do once we solved 3. and 4&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; 5. Somehow be able to aggregate htlc&amp;#39;s. In a world where we use payment points instead of preimages we might be able to do so. It would be really cool if separate HTLC&amp;#39;s could be combined to 1 single output. I played around a little bit but I have not come up with a scheme that is more compact in all cases. Thus I just threw in the idea.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Yes we may encode all HTLC in some Taproot tree in the future. There are some wrinkles but for a high-level theoretical construction see my post on CoinPool.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; 6. Split onchain fees differently (now the attacker would also lose fees by conducting this attack) - No I don&amp;#39;t want to start yet another fee bikeshadding debate. (In particular I believe that a different split of fees might make the Flood &amp;amp; Loot attack economically more viable which relies on the same principle)&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Likely a bit more of fee bikeshedding is something we have to do to make LN secure... Switching fee from pre-committed ones to a single-party, dynamic one.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Independently I think we should have a hint in our readme file about where and how people can disclose attacks and vulnerabilities. Implementations have this but the BOLTs do not.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; I 100% agree, that&amp;#39;s exactly &lt;a href=&#34;https://github.com/lightningnetwork/lightning-rfc/pull/772&#34;&gt;https://github.com/lightningnetwork/lightning-rfc/pull/772&lt;/a&gt;, waiting for your feedback :)&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Cheers,&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Antoine&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Le mer. 17 juin 2020 à 09:41, ZmnSCPxj via Lightning-dev &amp;lt;lightning-dev at lists.linuxfoundation.org&amp;gt; a écrit :&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Good morning all,&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Fee futures could help against this.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; I remember writing about this some time ago but cannot find where (not sure if it was in lightning-dev or bitcoin-dev).&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; `harding` found it: &lt;a href=&#34;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2020-January/017601.html&#34;&gt;https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2020-January/017601.html&lt;/a&gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Regards,&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; ZmnSCPxj&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; _______________________________________________&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Lightning-dev mailing list&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Lightning-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;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; &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;
    </content>
    <updated>2023-06-09T15:00:25&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsq3xk7wz3e85p8pmlvzw6mpv6uyh5tg0lddh6770m9zmp0wgqjprszypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzajjymp</id>
    
      <title type="html">📅 Original date posted:2020-06-17 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsq3xk7wz3e85p8pmlvzw6mpv6uyh5tg0lddh6770m9zmp0wgqjprszypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzajjymp" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs2wfg2afv33kvwkfaqtrq290egru0rm6z2qlze7v6gk6yg7nqvclqc9qdga&#39;&gt;nevent1q…qdga&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-06-17&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning Rene,&lt;br/&gt;&lt;br/&gt;Thank you for the report, this is good.&lt;br/&gt;&lt;br/&gt;&amp;gt; 1. The current solution is to just not use up the max value of htlc&amp;#39;s. Eclaire and c-lightning by default only use up to 30 htlcs.&lt;br/&gt;&amp;gt; 2. Probably the best fix (not sure if I understand the consequences correctly) is coming from this PR to bitcoin core (c.f. &lt;a href=&#34;https://github.com/bitcoin/bitcoin/pull/15681&#34;&gt;https://github.com/bitcoin/bitcoin/pull/15681&lt;/a&gt; by @TheBlueMatt . If I get it correctly with that we could always have low fees and ask the person who want to claim their outputs to pay fees. This excludes overpayment and could happen at a later stage when fees are not spiked. Still the victim who offered the htlcs would have to spend those outputs at some time.&lt;br/&gt;&amp;gt; 3. Don&amp;#39;t overpay fees in commitment transactions. We can&amp;#39;t foresee the future anyway&lt;br/&gt;&lt;br/&gt;Fee futures could help against this.&lt;br/&gt;I remember writing about this some time ago but cannot find where (not sure if it was in lightning-dev or bitcoin-dev).&lt;br/&gt;&lt;br/&gt;As a rough sketch, a client contacts a fee insurance service.&lt;br/&gt;For a fixed fee, the client arranges such that the fee insurance service pays for fees in case of a condition where feerates increase.&lt;br/&gt;&lt;br/&gt;This is done by arranging a 2-of-2 output spending the insurance premium payment and some maximum fee the insurance service provides.&lt;br/&gt;Initially sign an `nLockTime`d transaction that represents the end of the insurance service contract.&lt;br/&gt;Then at each commitment tx, sign a variety of feerates spending the CPFP carve-out and the insurance 2-of-2, utilizing the insurnace funds for doing the CPFP.&lt;br/&gt;&lt;br/&gt;&amp;gt; 4. Don&amp;#39;t add htlcs for which the on chain fee is higher than the HTLCs value (like we do with sub dust amounts and sub satoshi amounts. This would at least make the attack expensive as the attacker would have to bind a lot of liquidity.&lt;br/&gt;&lt;br/&gt;Seems a reasonable heuristic.&lt;br/&gt;&lt;br/&gt;&amp;gt; 5. Somehow be able to aggregate htlc&amp;#39;s. In a world where we use payment points instead of preimages we might be able to do so. It would be really cool if separate HTLC&amp;#39;s could be combined to 1 single output. I played around a little bit but I have not come up with a scheme that is more compact in all cases. Thus I just threw in the idea.&lt;br/&gt;&lt;br/&gt;This seems impossible; once you add the points of two unrelated PTLCs, in order to separate them again once you learn the aggregate scalar, you need to learn the scalar of one separately from the scalar of the other, but the aggregate PTLC does not impose the requirement from the receiver to reveal each of the scalars separately.&lt;br/&gt;&lt;br/&gt;You *could* require multiple signatures instead of a single signature, in which case each completed signature can reveal a separate scalar behind a point.&lt;br/&gt;Revealing the points and the signatures is 96 bytes, plus a few more bytes for opcodes, divided by 4 because witness, so about equivalent to 24 block space per PTLC you merge.&lt;br/&gt;&lt;br/&gt;This cost would be paid by the receiver of the HTLC.&lt;br/&gt;The timelock branch can be made not to have to reveal any of the points, by Taproot-signing the timelock branch, or using a separate tapscript (at the cost of additional 32 witness bytes to select branches, if my taproot understanding holds).&lt;br/&gt;&lt;br/&gt;--&lt;br/&gt;&lt;br/&gt;Combining timelocks is also bad.&lt;br/&gt;If you combine two PTLCs with different timelocks, which do you choose, the larger or the smaller?&lt;br/&gt;&lt;br/&gt;* If you choose the larger, the sender of the PTLCs could have a larger outgoing timelock than the its incoming PTLC, then possibly might lose money when the incoming PTLC times out but the outgoing timelock is not yet timed out and can still be claimed by scalar revelation.&lt;br/&gt;* If you choose the smaller, then the next hop might not have enough block time to deliver the payment, in which case later hops on the route will fail more often (possibly an acceptable tradeoff? c-lightning does shadow routing which overallocates timelock anyway...).&lt;br/&gt;* If you cannot combine different timelocks, the attacker can arrange PTLCs with timelocks from now&#43;2 to now&#43;484 to mount the attack.&lt;br/&gt;&lt;br/&gt;--&lt;br/&gt;&lt;br/&gt;You could try aggregating using `OP_CHECKTEMPLATEVERIFY`, or equivalently with a pre-signed transaction, but that just moves the revelation cost to the receiver of the PTLC, which multiple signatures above does just as well.&lt;br/&gt;It does have the advantage of retaining the timelocks.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:00:23&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqswu52xf43sy9wjxsnvwrl44vugk4f8akzz22anmxpl97eu6e8lwcszypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzt7n8wm</id>
    
      <title type="html">📅 Original date posted:2020-05-14 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqswu52xf43sy9wjxsnvwrl44vugk4f8akzz22anmxpl97eu6e8lwcszypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzt7n8wm" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsdcyg6hx8aq2pv2v3n79avysd3jm33v2hw6jgn445aak3dkmzq9ccnw0le3&#39;&gt;nevent1q…0le3&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-05-14&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning Antoine,&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; While approaching this question, I think you should consider economic weight of nodes in evaluating miner consensus-hijack success. Even if you expect a disproportionate ratio of full-nodes-vs-SPV, they may not have the same  economic weight at all, therefore even if miners are able to lure a majority of SPV clients they may not be able to stir economic nodes. SPV clients users will now have an incentive to cancel their hijacked history to stay on the most economic meaningful chain. And it&amp;#39;s already assumed, that if you run a bitcoin business or LN routing node, you do want to run your own full-node.&lt;br/&gt;&lt;br/&gt;One hope I have for Lightning is that it will replace centralized custodial services, because:&lt;br/&gt;&lt;br/&gt;* Lightning gains some of the scalability advantage of centralized custodial services, because you can now transfer to any Lightning client without touching the blockchain, for much reduced transfer fees.&lt;br/&gt;* At the same time, it retains your-keys-your-coins noncustodiality, because every update of a Lightning channel requires your keys to sign off on it.&lt;br/&gt;&lt;br/&gt;If most Lightning clients are SPV, then if we compare these two worlds:&lt;br/&gt;&lt;br/&gt;* There are a few highly-important centralized custodial services with significant economic weight running fullnodes (i.e. now).&lt;br/&gt;* There are no highly-important centralized custodial services, and most everyone uses Lightning, but with SPV (i.e. a Lightning future).&lt;br/&gt;&lt;br/&gt;Then the distribution of economic weight would be different between these two worlds.&lt;br/&gt;It may even be possible, that the Lightning future with massive SPV might end up with more economic weight in SPV nodes, than in the world without Lightning and dependent on centralized custodial services to scale.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;It is also entirely possible that custodial services for Lightning will arise anyway and my hope is already dashed, come on universe, work harder will you, would you really disappoint some randomly-generated Internet person like that.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I agree it may be hard to evaluate economic-weight-to-chain-backend segments, specially with offchain you disentangle an onchain output value from its real payment traffic. To strengthen SPV, you may implement forks detection and fallback to some backup node(s) which would serve as an authoritative source to arbiter between branches. Such backup node(s) must be picked up manually at client initialization, before any risk of conflict to avoid Reddit-style of hijack during contentious period or other massive social engineering. You don&amp;#39;t want autopilot-style of recommendations for picking up a backup nodes and avoid cenralization of backups, but somehow a uniform distribution. A backup node may be a private one, it won&amp;#39;t serve you any data beyond headers, and therefore you preserve public nodes bandwidth, which IMO is the real bottleneck. I concede it won&amp;#39;t work well if you have a ratio of 1000-SPV for 1-full-node and people are not effectively able to pickup a backup among their social environment.&lt;br/&gt;&amp;gt; What do you think about this model ?&lt;br/&gt;&lt;br/&gt;Money makes the world go round, so such backup servers that are publicly-facing rather than privately-owned should be somehow incentivized to do so, or else they would not exist in the first place.&lt;br/&gt;Of course, a free market tends towards monopoly, because any entity that happens to have even a slight advantage at the business will have more money to use towards business reinvestment and increase its advantage further, until they beat the competition to dust, anyone who has won a 4X game knows to search for and stack those little advantages until you snowball and conquer the world/galaxy/petri dish which is why the endgame of 4X games is so boring compared to the start, we have seen this happen in mining and exchanges and so on, and this works against your desire to have a uniform distribution.&lt;br/&gt;&lt;br/&gt;If everyone runs such a privately-owned server, on the other hand, this is not so different from having a Lightning node you run at your home that has a fullnode as well and which you access via a remote control mobile device, and it is the inconvenience of having such a server at your home that prevents this in the first place.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:00:08&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsy3axwjrtcswdngj9mqtp0jhz0fkmgnlujmmwmrw7hwx68cppdlaczypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzxhuvaj</id>
    
      <title type="html">📅 Original date posted:2020-05-05 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsy3axwjrtcswdngj9mqtp0jhz0fkmgnlujmmwmrw7hwx68cppdlaczypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzxhuvaj" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsp3vczuja0vf6nwfx9e4m38frdt6v6p257xjtrdzhzrtukygv0q8czkskgl&#39;&gt;nevent1q…skgl&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-05-05&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning ariard and luke-jr&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; Trust-minimization of Bitcoin security model has always relied first and&lt;br/&gt;&amp;gt; &amp;gt; above on running a full-node. This current paradigm may be shifted by LN&lt;br/&gt;&amp;gt; &amp;gt; where fast, affordable, confidential, censorship-resistant payment services&lt;br/&gt;&amp;gt; &amp;gt; may attract a lot of adoption without users running a full-node.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; No, it cannot be shifted. This would compromise Bitcoin itself, which for&lt;br/&gt;&amp;gt; security depends on the assumption that a supermajority of the economy is&lt;br/&gt;&amp;gt; verifying their incoming transactions using their own full node.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The past few years has seen severe regressions in this area, to the point&lt;br/&gt;&amp;gt; where Bitcoin&amp;#39;s future seems quite bleak. Without serious improvements to the&lt;br/&gt;&amp;gt; full node ratio, Bitcoin is likely to fail.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Therefore, all efforts to improve the &amp;#34;full node-less&amp;#34; experience are harmful,&lt;br/&gt;&amp;gt; and should be actively avoided. BIP 157 improves privacy of fn-less usage,&lt;br/&gt;&amp;gt; while providing no real benefits to full node users (compared to more&lt;br/&gt;&amp;gt; efficient protocols like Stratum/Electrum).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; For this reason, myself and a few others oppose merging support for BIP 157 in&lt;br/&gt;&amp;gt; Core.&lt;br/&gt;&lt;br/&gt;BIP 157 can be implemented as a separate daemon that processes the blocks downloaded by an attached `bitcoind`, i.e. what Wasabi does.&lt;br/&gt;&lt;br/&gt;The intention, as I understood it, of putting BIP157 directly into bitcoind was to essentially force all `bitcoind` users to possibly service BIP157 clients, in the hope that a BIP157 client can contact any arbitrary fullnode to get BIP157 service.&lt;br/&gt;This is supposed to improve to the situation relative to e.g. Electrum, where there are far fewer Electrum servers than fullnodes.&lt;br/&gt;&lt;br/&gt;Of course, as ariard computes, deploying BIP157 could lead to an effective DDoS on the fullnode network if a large number of BIP157 clients arise.&lt;br/&gt;Though maybe this will not occur very fast?  We hope?&lt;br/&gt;&lt;br/&gt;It seems to me that the thing that *could* be done would be to have watchtowers provide light-client services, since that seems to be the major business model of watchtowers, as suggested by ariard as well.&lt;br/&gt;This is still less than ideal, but maybe is better than nothing.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T15:00:06&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsd7v4ug6rzwtsc9q9253x3g2x2c4mku8yjnudzdwxuqj00kqz7nmszypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxz9wymhf</id>
    
      <title type="html">📅 Original date posted:2020-04-24 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsd7v4ug6rzwtsc9q9253x3g2x2c4mku8yjnudzdwxuqj00kqz7nmszypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxz9wymhf" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqstf69f2t5tgqjnxg9j6sf3kcppgzv3s54j0lwfl6wtj4tawrceazcfgm4wg&#39;&gt;nevent1q…m4wg&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-04-24&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning Laolu, and list,&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; (this may be kind of off-topic, more about DLC deployment than PTLCs&lt;br/&gt;&amp;gt; themselves)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; From my PoV, new technologies aren&amp;#39;t what has held back DLC deployment to&lt;br/&gt;&amp;gt; this date since the paper was originally released. Tadge has had working&lt;br/&gt;&amp;gt; code than can be deployed today for some time now, and other parties like&lt;br/&gt;&amp;gt; DG-Lab have created full-fledge demos with the system working end to end.&lt;br/&gt;&amp;gt; Instead, the real impediment has been the bootstrapping of the oracles&lt;br/&gt;&amp;gt; which the scheme critically depends upon.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Without oracles, none of it really works. Although, it&amp;#39;s also the case that&lt;br/&gt;&amp;gt; there&amp;#39;re measures to prevent the oracles from equivocating (reporting two&lt;br/&gt;&amp;gt; conflicting prices/events for a particular instance), bootstrapping a new&lt;br/&gt;&amp;gt; oracle still requires a very high degree of trust as they can lie or report&lt;br/&gt;&amp;gt; incorrect data. As a result, actually deploying an oracle for a system like&lt;br/&gt;&amp;gt; this is tricky business, as it&amp;#39;s a trusted centralized entity, so it will&lt;br/&gt;&amp;gt; run into all the normal meatspace/legal/operational risk that any trusted&lt;br/&gt;&amp;gt; centralized service would encounter.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Earlier today, Coinbase announced that they were releasing a new price&lt;br/&gt;&amp;gt; oracle for the ETH ecosystem [1]. This caught my attention as one can&lt;br/&gt;&amp;gt; imagine, that it would be even simpler for them to deploy a DLC oracle which&lt;br/&gt;&amp;gt; exports an API to obtain signed prices/events. As an existing large company&lt;br/&gt;&amp;gt; in the space (depending on who you talk to), they&amp;#39;re a trusted entity, which&lt;br/&gt;&amp;gt; has earned a good reputation over the years (solving this&lt;br/&gt;&amp;gt; bootstrapping/trust issue). If they do eventually grow the service to also&lt;br/&gt;&amp;gt; encompass this use case, then it enables a number of possibilities, as&lt;br/&gt;&amp;gt; there&amp;#39;s still a ton of value in just base DLC-specific channels (or one off&lt;br/&gt;&amp;gt; contracts), without all the fancy barrier escrow scriptless scipts swappy&lt;br/&gt;&amp;gt; swap swap stuff.&lt;br/&gt;&lt;br/&gt;Going even further off-topic, in theory the defiads project could help with this.&lt;br/&gt;An oracle service could advertise itself on defiads, using a timelocked fidelity bond to back up the advertisement, which is a claim-to-truth (that they are trustworthy etc etc).&lt;br/&gt;&lt;br/&gt;Equivocation protection in DLC is done by forcing the revelation of a scalar behind a point.&lt;br/&gt;As the defiads fidelity bond also includes a point (where signing with the scalar is needed to reclaim the bond after the timelock period ends), then we can force revelation of the private key protecting the fidelity bond in case of equivocation.&lt;br/&gt;&lt;br/&gt;Unfortunately, the oracle can simply outright lie, without equivocating between different segments of its users.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj&lt;br/&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; -- Laolu&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; [1]: &lt;a href=&#34;https://blog.coinbase.com/introducing-the-coinbase-price-oracle-6d1ee22c7068&#34;&gt;https://blog.coinbase.com/introducing-the-coinbase-price-oracle-6d1ee22c7068&lt;/a&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; On Thu, Apr 23, 2020 at 7:52 AM Nadav Kohen &amp;lt;nadav at suredbits.com&amp;gt; wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Hi Laolu,&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Thanks for the response :)&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; I agree that some more framing probably would have been good to have in my update.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; First, I want to clarify that my intention is not to implement a PTLC-based lightning network on top of ECDSA adaptor signatures, as I do believe that using Schnorr will be superior, but rather I wish to get some PoC sandbox with which to start implementing and testing out the long list of currently theoretical proposals surrounding PTLCs, most of which are implementation agnostic (to a degree anyway). I think it would be super beneficial to have more fleshed out with respect to what some challenges of a Payment Point LN are going to be than we understand now, before Schnorr is implemented and it is time to commit to some PTLC scheme for real.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Second, I agree that I&amp;#39;ve probably understated somewhat the changes that will be needed in most implementations as I was mostly thinking about what would need to change in the BOLTs, which does actually seem relatively minimal (although as you mention, these minimal changes to the BOLTs do trigger large changes in many implementations). Also, good point on how BOLT 11 (invoicing) will have to be altered as well, must&amp;#39;ve slipped my mind.&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; On Wed, Apr 22, 2020 at 8:17 PM Olaoluwa Osuntokun &amp;lt;laolu32 at gmail.com&amp;gt; wrote:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Hi Nadav,&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Thanks for the updates! Super cool to see this concept continue to evolve&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; and integrate new technologies as they pop up.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; I believe this would only require a few changes to existing nodes:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Rather than a &amp;#34;few changes&amp;#34;, this would to date be the largest network-level&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; update undertaken to the Lightning Network thus far. In the past, we rolled&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; out the new onion blob format (which enables changes like this), but none of&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; the intermediate nodes actually need to modify their behavior. New payment&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; types like MPP&#43;AMP only needed the _end points_ to update making this an&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; end-to-end update that has been rolled out so far in a de-synchronized&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; manner.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Re-phrasing deploying this requires changes to: the core channel state&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; machine (the protocol we use to make commitment updates), HTLC scripts,&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; on-chain HTLC handling and resolution, path finding algorithms (to only see&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; out the new PTLC-enabled nodes), invoice changes and onion blob processing.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; I&amp;#39;d caution against underestimating how long all of this will take in&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; practice, and the degree of synchronization required to pull it all off&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; properly.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; For a few years now the question we&amp;#39;ve all been pondering is: do we wait for&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; scnhorr to roll out multi-hop locks, or just use the latest ECDSA based&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; technique? As dual deployment is compatible (we can make the onion blobs for&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; both types the same), a path has always existed to first roll out with the&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; latest ECDSA based technique then follow up later to roll out the schnorr&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; version as well. However there&amp;#39;s also a risk here as depending on how&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; quickly things can be rolled out, schnorr may become available&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; mid-development, which would possibly cause us to reconsider the ECDSA path&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; and have the network purely use scnhorr to make things nice and uniform.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Zooming out for a bit, the solution space of &amp;#34;how channels can look post&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; scriptless-scripts &#43; taproot&amp;#34; is rather large [1], and the addition of this&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; new technique allows for an even larger set of deployment possibilities.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; This latest ECDSA variant is much simpler than the prior ones (which had a&lt;br/&gt;&amp;gt; &amp;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; &amp;gt; &amp;gt; be used to modify the funding output.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; [1]: &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; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; -- Laolu&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;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; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Hello all,&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; I&amp;#39;d like to give an update on the current state of thinking and coding surrounding replacing Hash-TimeLock Contracts (HTLCs) with Point-TimeLock Contracts (PTLCs) (aka Payment Hashes -&amp;gt; Payment Points) in hopes of sparking interest, discussion, development, etc.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; We Want Payment Points!&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; -----------------------&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Using point-locks (in PTLCs) instead of hash-locks (in HTLCs) for lightning payments is an all around improvement. HTLCs require the use of the same hash across payment routes (barring fancy ZKPs which are inferior to PTLCs) while PTLCs allow for payment de-correlation along routes. For an 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;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; In addition to improving privacy in this way and protecting against wormhole attacks, PTLC-based lightning channels open the door to a large variety of interesting applications that cannot be accomplished with HTLCs:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Stuckless (retry-able) Payments with proof of payment (&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; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Escrow contracts over Lightning (&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; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; High/DLOG AMP (&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; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Stuckless &#43; AMP (an improvement on Boomerang) (&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; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Pay-for-signature (&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; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Pay-for-commitment (&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; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Monotonic access structures on payment completion (&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; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Ideal Barrier Escrow Implementation (&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; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; And allowing for Barrier Escrows, we can even have&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Atomic multi-payment setup (&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; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Lightning Discreet Log Contract (&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; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Atomic multi-payment update (&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; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Lightning Discreet Log Contract Novation/Transfer (&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; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; There are likely even more things that can be done with Payment Points so make sure to respond if I&amp;#39;ve missed any known ones.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; How Do We Get Payment Points?&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; -----------------------------&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Eventually, once we have Taproot, we can use 2p-Schnorr adaptor signatures in Lightning channels. For a detailed thread by ZmnSCPxj, see here &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; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; In the meantime, Lloyd has written about a way to do 1p-ECDSA adaptor 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 OP_CHECKMULTISIG to allows us to execute PTLCs on Bitcoin today!&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Nickler has implemented this in a branch of secp256k1 (&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 in Bouncy Castle in Bitcoin-S with some testing against this branch (&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 as nickler states on his PR, &amp;#34;IT IS EXTREMELY DANGEROUS AND RECKLESS TO USE THIS MODULE IN PRODUCTION. DON&amp;#39;T!&amp;#34;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; A demo of an on-chain PTLC I executed using nickler&amp;#39;s implementation on 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; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; And waxwing did a lovely write-up about the crypto itself &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; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; I would be very interested in having a fork of (at least) one lightning implementation (or Rust Lightning) to be a proof of concept ECDSA-PTLC node with which we can test and play with the plethora of PTLC-based proposals above.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; I believe this would only require a few changes to existing nodes:&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; 1) update_add_ptlc will have a 32 byte x-coordinate (of a point) rather than a 32 byte hash. Additionally the onion&amp;#39;s hop_data will contain a 32 byte scalar tweak for each hop. As per [link multi-hop locks]. The last hop_data will instead include a 32 byte scalar equal to the sum of all tweaks.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; 2) commitment_signed will have 162 byte adaptor ptlc_signatures rather than valid (71/72 byte) ECDSA signatures on PTLC-success transactions.&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; 3) The in-flight outputs on the commitment transaction itself become a little simpler as we no longer need to explicitly check the payment pre-image against a hash. Instead, delete all instances of &amp;#34;OP_HASH160 &amp;lt;RIPEMD160(payment_hash)&amp;gt; OP_EQUALVERIFY&amp;#34; in the scripts (leaving the rest the same) and require no pre-image in the witness, only a valid signature. The pre-image check is implicitly enforced by the &amp;lt;remoteptlc_sig&amp;gt; witness since only an adaptor signature was provided by remote so that the payment pre-image is required to create the valid signature (from which the pre-image can be then deduced by comparing adaptor and valid signatures).&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; If I&amp;#39;ve missed any other changes that need to happen, do respond with them!&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; I hope that as a community we can work towards having a PTLC-based Lightning Network that is safe and stable as soon as possible, and so I encourage further thinking, development and expirementation with PTLCs now so that when Taproot is finally at our disposal we can cleanly start moving towards a more ideal Lightning :)&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Best,&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Nadav&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; _______________________________________________&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Lightning-dev mailing list&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt; Lightning-dev at lists.linuxfoundation.org&lt;br/&gt;&amp;gt; &amp;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;
    </content>
    <updated>2023-06-09T14:59:55&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsvhfhj2zjr9k8n3tr3sy0gplxnugjmrw07k2a8cw7syqadrvk59hszypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzfez0yp</id>
    
      <title type="html">📅 Original date posted:2020-04-23 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsvhfhj2zjr9k8n3tr3sy0gplxnugjmrw07k2a8cw7syqadrvk59hszypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzfez0yp" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsxshsnukvdeyvm5vg4f5x225ngadkrx995f2khvcd8wu7wqxd4whqmwk63r&#39;&gt;nevent1q…k63r&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;Good morning Matt,&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; -   C directly contacts miners with an out-of-band proposal to replace its transaction with an alternative that is much smaller and has a low fee, but much better feerate.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Or they can just wait. For example in today’s mempool it would not be strange for a transaction at 1 sat/vbyte to wait a day but eventually confirm.&lt;br/&gt;&lt;br/&gt;That introduces the possibility that the entire tree (with high total fee, remember) gets confirmed, so it would be better for C to replace it with an alternative to a different address C still controls, with a slightly better fee rate but smaller (no child transactions) and lower total fee, so an economically-rational C will make that effort (and if there are still other transactions in the mempool, an economically-rational miner will accept this proposal).&lt;br/&gt;&lt;br/&gt;But in any case this is a minor detail and the attack will work either way.&lt;br/&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; -   Miners, being economically rational, accept this proposal and include this in a block.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; The proposal by Matt is then:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; -   The hashlock branch should instead be:&lt;br/&gt;&amp;gt; &amp;gt; -   B and C must agree, and show the preimage of some hash H (hashlock branch).&lt;br/&gt;&amp;gt; &amp;gt; -   Then B and C agree that B provides a signature spending the hashlock branch, to a transaction with the outputs:&lt;br/&gt;&amp;gt; &amp;gt; -   Normal payment to C.&lt;br/&gt;&amp;gt; &amp;gt; -   Hook output to B, which B can use to CPFP this transaction.&lt;br/&gt;&amp;gt; &amp;gt; -   Hook output to C, which C can use to CPFP this transaction.&lt;br/&gt;&amp;gt; &amp;gt; -   B can still (somehow) not maintain a mempool, by:&lt;br/&gt;&amp;gt; &amp;gt; -   B broadcasts its timelock transaction.&lt;br/&gt;&amp;gt; &amp;gt; -   B tries to CPFP the above hashlock transaction.&lt;br/&gt;&amp;gt; &amp;gt; -   If CPFP succeeds, it means the above hashlock transaction exists and B queries the peer for this transaction, extracting the preimage and claiming the A-&amp;gt;B HTLC.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Note that no query is required. The problem has been solved and the preimage-containing transaction should now confirm just fine.&lt;br/&gt;&lt;br/&gt;Ah, right, so it gets confirmed and the `blocksonly` B sees it in a block.&lt;br/&gt;&lt;br/&gt;Even if C hooks a tree of low-fee transactions on its hook output or normal payment, miners will still be willing to confirm this and the B hook CPFP transaction without, right?&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T14:59:50&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsr2dp47znrke27sh2mqyljdfudv5y352acf4rz9rc2znkl3cuhq6qzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzjadfzd</id>
    
      <title type="html">📅 Original date posted:2020-04-23 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsr2dp47znrke27sh2mqyljdfudv5y352acf4rz9rc2znkl3cuhq6qzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzjadfzd" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsv4he9kdzx5dc6dlwqvnh3ngyhpleun5mw07uyjsjmnuvx5ywjssck83uc0&#39;&gt;nevent1q…3uc0&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;Good morning lists et al,&lt;br/&gt;&lt;br/&gt;Let me try to summarize things a little:&lt;br/&gt;&lt;br/&gt;* Suppose we have a forwarding payment A-&amp;gt;B-&amp;gt;C.&lt;br/&gt;* Suppose B does not want to maintain a mempool and is running in `blocksonly` mode to reduce operational costs.&lt;br/&gt;* C triggers B somehow dropping the B&amp;lt;-&amp;gt;C channel, such as by sending an `error` message, which will usually cause the other side to drop the channel onchain using its commitment transaction.&lt;br/&gt;* The dropped B&amp;lt;-&amp;gt;C channel has an HTLC (that was set up during the A-&amp;gt;B-&amp;gt;C forwarding).&lt;br/&gt;* The HTLC, being used in a Poon-Dryja channel, actually has the following contract text:&lt;br/&gt;  * The fund may be claimed by either of these clauses:&lt;br/&gt;    * C can claim, if C shows the preimage of some hash H (hashlock branch).&lt;br/&gt;    * B and C must agree, and claim after time L (timelock branch).&lt;br/&gt;* B holds a signature from C that can claim the timelock branch of the HTLC, for a transaction that spends to an output with an `OP_CHECKSEQUENCEVERIFY`.&lt;br/&gt;  * The signature is `SIGHASH_ALL`, so the transaction has a fixed feerate.&lt;br/&gt;* C can &amp;#34;pin&amp;#34; the HTLC output by spending using the hashlock branch, and creating a large fee, low fee-rate (tree of) transactions.&lt;br/&gt;  * As it is a low fee-rate, miners have no incentive to put this in a block, especially if unrelated higher-fee-rate transactions exist that would earn them more money.&lt;br/&gt;  * Even in a full RBF universe, because of the anti-DoS mempool rules, B cannot evict this pinned transaction by just bidding up the feerate.&lt;br/&gt;    * A replacing transaction cannot evict alternatives unless its absolute fee is greater than the absolute fee of the alternative.&lt;br/&gt;    * The pinning transaction has a high fee, but is blockspace-wasteful, so it is:&lt;br/&gt;      * Undesirable to mine (low feerate).&lt;br/&gt;      * Difficult to evict (high fee).&lt;br/&gt;* Thus, B is unable to get its timelock-branch transaction in the mempools of miners.&lt;br/&gt;* C waits until the A-&amp;gt;B HTLC times out, then:&lt;br/&gt;  * C directly contacts miners with an out-of-band proposal to replace its transaction with an alternative that is much smaller and has a low fee, but much better feerate.&lt;br/&gt;  * Miners, being economically rational, accept this proposal and include this in a block.&lt;br/&gt;&lt;br/&gt;The proposal by Matt is then:&lt;br/&gt;&lt;br/&gt;* The hashlock branch should instead be:&lt;br/&gt;  * B and C must agree, and show the preimage of some hash H (hashlock branch).&lt;br/&gt;* Then B and C agree that B provides a signature spending the hashlock branch, to a transaction with the outputs:&lt;br/&gt;  * Normal payment to C.&lt;br/&gt;  * Hook output to B, which B can use to CPFP this transaction.&lt;br/&gt;  * Hook output to C, which C can use to CPFP this transaction.&lt;br/&gt;* B can still (somehow) not maintain a mempool, by:&lt;br/&gt;  * B broadcasts its timelock transaction.&lt;br/&gt;  * B tries to CPFP the above hashlock transaction.&lt;br/&gt;    * If CPFP succeeds, it means the above hashlock transaction exists and B queries the peer for this transaction, extracting the preimage and claiming the A-&amp;gt;B HTLC.&lt;br/&gt;&lt;br/&gt;Is that a fair summary?&lt;br/&gt;&lt;br/&gt;--&lt;br/&gt;&lt;br/&gt;Naively, and remembering I am completely ignorant of the exact details of the mempool rules, it seems to me quite strange that we are allowing an undesirable transaction (tree) into the mempool:&lt;br/&gt;&lt;br/&gt;* Undesirable to mine (low fee-rate).&lt;br/&gt;* Difficult to evict (high fee).&lt;br/&gt;&lt;br/&gt;Miners are not interested in low fee-rate transactions, as long as higher fee-rate transactions exist.&lt;br/&gt;And being difficult to evict means miners cannot get alternatives that are more lucrative for them.&lt;br/&gt;&lt;br/&gt;The reason (as I understand it) eviction is purposely made difficult here is to prevent certain DoS attacks on Bitcoin nodes, specifically:&lt;br/&gt;&lt;br/&gt;1. Attacker sends a low fee-rate tx as a &amp;#34;root&amp;#34; transaction.&lt;br/&gt;2  Attacker sends thousands of low fee-rate tx that build off the above root.&lt;br/&gt;3. Attacker sends a slightly higher fee-rate alternative to the root, evicting the above tree of txes.&lt;br/&gt;4. Attacker sends thousands of low fee-rate tx that build off the latest root.&lt;br/&gt;5. GOTO 3.&lt;br/&gt;&lt;br/&gt;However, it seems to me, naively, that &amp;#34;an ounce of prevention is worth a pound of cure&amp;#34;.&lt;br/&gt;&lt;br/&gt;As I understand it, the mempool is organized already into &amp;#34;packages&amp;#34; of transactions, and adding a transaction into the mempool involves extending and merging packages.&lt;br/&gt;Perhaps the size of a package with low fee-rate (relative to the other packages in the mempool) can be limited, so that mempools drop incoming txes that extend a low-fee-rate tree of transactions.&lt;br/&gt;This means an attacker cannot send thousands of low fee-rate tx that build off some low fee-rate root tx in the first place, so it can still be evicted easily later without much impact.&lt;br/&gt;&lt;br/&gt;Naively, it seems to me to prevent the DoS attack as well, as at step 2 it would be prevented from sending thousands of low fee-rate tx building off the root.&lt;br/&gt;&lt;br/&gt;As well, as I understand it, this merely tightens the mempool acceptance rules, preventing low fee-rate packages from growing (analogous to a consensus-layer softfork).&lt;br/&gt;The &amp;#34;cannot evict high absolute fee&amp;#34; rule can be retained, as the low-fee-rate package is prevented from reaching a large size.&lt;br/&gt;&lt;br/&gt;Would that be workable as a general solution to solve (what I think is) the root cause of this problem?&lt;br/&gt;&lt;br/&gt;(This assumes full RBF, I suppose.)&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T14:59:49&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsvksvdy3vxgrlacudj7xqy353vl857ne8xuvjypj0x7hnymamgj2qzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzc3pcf9</id>
    
      <title type="html">📅 Original date posted:2020-04-12 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsvksvdy3vxgrlacudj7xqy353vl857ne8xuvjypj0x7hnymamgj2qzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzc3pcf9" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsgq3sucnj8u5crqzx0jdagzn0w4xjz68dqyz96tskqgzn4e3j0d8g9wqpsu&#39;&gt;nevent1q…qpsu&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-04-12&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning Nadav, and list,&lt;br/&gt;&lt;br/&gt;Thinking even further:&lt;br/&gt;&lt;br/&gt;* It is trivially cheap for E to start up new nodes F and G and start up channels FA and GC.&lt;br/&gt;* It then becomes possible for E to lock up funds of B via F-&amp;gt;A-&amp;gt;B-&amp;gt;C-&amp;gt;G and G-&amp;gt;C-&amp;gt;B-&amp;gt;A-&amp;gt;F.&lt;br/&gt;* Even closure of FA and GC does not affect EA and EB.&lt;br/&gt;&lt;br/&gt;So I am not certain that this attack is solvable at all via inter-node interactions, since we must also consider the possibility of some throwaway node being created for the purpose of executing this attack.&lt;br/&gt;&lt;br/&gt;Perhaps the remaining possible solution is to require that nodes also lock up some funds (in a UTXO that is *separate* from any channels, and from other fidelity bonds, like what belcher suggests for JoinMarket makers, and what is intended for defiads).&lt;br/&gt;This creates an economically-barred identity, which we might ascribe blame to, and perhaps with sufficient amount of proofs, allow someone to create a &amp;#34;proof-of-bad-behavior&amp;#34; that can be believed by other nodes on the network.&lt;br/&gt;The locked up fidelity bonds are an additional cost that an attacker must bear which their possible victims will not bear.&lt;br/&gt;&lt;br/&gt;Perhaps the &amp;#34;superbolt network&amp;#34; idea might consider adding such a mitigation, as it also requires some form of persistent identity anyway.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T14:59:24&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqswkh3v3fz7scv02agfr230u6wxp3jpjm0wqya0hv9nzmu4n2p27jgzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxz4y2usv</id>
    
      <title type="html">📅 Original date posted:2020-04-01 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqswkh3v3fz7scv02agfr230u6wxp3jpjm0wqya0hv9nzmu4n2p27jgzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxz4y2usv" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsqffechytal9ma5573j0w3gdx056k4hx6zkcnjjh05rktrnrms83q8m9p6e&#39;&gt;nevent1q…9p6e&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;Good morning Nadav,&lt;br/&gt;&lt;br/&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 effective. Consider a similar network to the one you described where we have channels A - B - C and A - E - C but where we add a &amp;#34;fake&amp;#34; channel E - E&amp;#39;. Now if the attacker sets up a payment from E to E&amp;#39; using the route E - C - B - A - E - E&amp;#39;, then the attacker can successfully lock up all of B&amp;#39;s channels (as is desirable to get rid of competition) and also generate a false proof of closure for the E - E&amp;#39; channel. Even if this false proof (which is a commitment tx) ends up being published on chain, E has lost no ability to route and has successfully made B unable to route between A and C. If my understanding of the proposal is correct, and it may not be, then the punishment for grieving payments is the threat of closing channels that would benefit from the grieving attack. But adding a new channel on the end to be closed seems to invalidate this punishment?&lt;br/&gt;&lt;br/&gt;The consideration is that much of the cost of a channel is with the setup and teardown --- E could always just reopen the CE channel again later.&lt;br/&gt;Thus, the cost that E bears in setting up EE and tearing down EE would be still similar to the cost of losing CE and reestablishing it again.&lt;br/&gt;Further, any amount it places in the EE channel would be an amount it could have been using as liquidity on Lightning, but which it cannot use for forwarding (because it is a channel to nowhere).&lt;br/&gt;Ultimately, proof-of-closure is an economic mechanism, not an information-theoretic one.&lt;br/&gt;&lt;br/&gt;So the mere existence of EE, to be later sacrificed, is enough punishment on E.&lt;br/&gt;I think.&lt;br/&gt;&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 up-front payments (pay for attempt, not just success) on payments with abnormally high soft timeouts? If all this works, this combination seems to be a way to enable hodl invoices under the proof of closure proposal.&lt;br/&gt;&lt;br/&gt;Possibly, though this increases the complexity of the proposal even more.&lt;br/&gt;&lt;br/&gt;&amp;gt;I just thought of a potentially more serious problem, at least for Poon-Dryja channels, isn&amp;#39;t it true that giving a proof of closure is equivalent to actually closing the channel since once other parties have copies of the fully signed commitment transaction, it cannot be safely revoked since other parties now have the ability to publish an old state? I might be missing something but this seems like a big problem.&lt;br/&gt;&lt;br/&gt;Since this is a proof-of-***closure***, this is indeed an actual closing of the channel.&lt;br/&gt;It would not be proof-of-closure if the channel was not being closed, but proof-of-something-else.&lt;br/&gt;&lt;br/&gt;What is desired is simply that C can plausibly say &amp;#34;I punished somebody else by closing on them, please do not punish me for punishing them&amp;#34;.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T14:59:23&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsqm6p9vpvdd50ehm7jcsgrecjlu25awrxq583xz45658567hgsgmczypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzyx2jv4</id>
    
      <title type="html">📅 Original date posted:2020-04-02 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsqm6p9vpvdd50ehm7jcsgrecjlu25awrxq583xz45658567hgsgmczypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzyx2jv4" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsgs8y7phupmu0ntlpj0gcm6kgpj0n3an40w7end3v7lz2jrk4c74qrx6u3t&#39;&gt;nevent1q…6u3t&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 Nadav,&lt;br/&gt;&lt;br/&gt;&amp;gt; I could be missing something, but it seems to me like the proposal to close channels after a soft timeout unless non-cooperation can be proven upstream adds a cost to the attacker of two on-chain transactions, which they can immediately revoke (as they know both pieces to the revocation priv key), but still allows very long lock-ups of other&amp;#39;s funds (with a 10x multiplier if they choose a long route). I do think that this is certainly an improvement on what we have now but I&amp;#39;m not sure it properly punishes the attacker in its current form.&lt;br/&gt;&lt;br/&gt;Ah, right, E knows the revocation for the unilateral close of EE, because it is a self-channel, sigh.&lt;br/&gt;And by this revocation clause it can claim the money immediately and put it into a channel as well.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T14:59:23&#43;02:00</updated>
  </entry>

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

  <entry>
    <id>https://nostr.ae/nevent1qqs0n75dz2fkrm6y8w8k0ru559zcdr4mr0m6vp5ewxk84j9qupr3rtczypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzmr3xlr</id>
    
      <title type="html">📅 Original date posted:2020-03-10 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs0n75dz2fkrm6y8w8k0ru559zcdr4mr0m6vp5ewxk84j9qupr3rtczypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzmr3xlr" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqst70z0y4y7lf8779jpex76knpcmxqrj56f94fwg66qrae2ghtsu4cc588hs&#39;&gt;nevent1q…88hs&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-03-10&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning Rusty, et al.,&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; Note that this means no payment secret is necessary, since the incoming&lt;br/&gt;&amp;gt; `blinding` serves the same purpose. If we wanted to, we could (ab)use&lt;br/&gt;&amp;gt; payment_secret as the first 32-bytes to put in Carol&amp;#39;s enc1 (i.e. it&amp;#39;s&lt;br/&gt;&amp;gt; the ECDH for Carol to decrypt enc1).&lt;br/&gt;&lt;br/&gt;I confess to not reading everything in detail, but it seems to me that, with payment point &#43; scalar and path decorrelation, we need to establish a secret with each hop anyway (the blinding scalar for path decorrelation), so if you need a secret per hop, possibly this could be reused as well?&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T14:59:16&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqszcw7r83t79f6343squnyk5wucgt0kl6nm2aal9evkp87pgr4hhfqzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzp0g7ym</id>
    
      <title type="html">📅 Original date posted:2020-02-20 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqszcw7r83t79f6343squnyk5wucgt0kl6nm2aal9evkp87pgr4hhfqzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzp0g7ym" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsr5ey7l44cnls9lmnx0x4k7sleq84g8exltdt9gap2s3vqmydyqcqqydlxx&#39;&gt;nevent1q…dlxx&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-02-20&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning Joost and aj,&lt;br/&gt;&lt;br/&gt;A thought that arises here is, what happens if I have forwarded a payment, then the outgoing channel is dropped onchain and that peer disconnects from me?&lt;br/&gt;&lt;br/&gt;Since the onchain HTLC might have a timelock of, say, a few hundred blocks from now, the outgoing peer can claim it up until the timelock.&lt;br/&gt;If the peer does not claim it, I cannot claim it in my incoming as well.&lt;br/&gt;I also cannot safely fail my incoming, as the outgoing peer can still claim it until the timelock expires.&lt;br/&gt;&lt;br/&gt;Am I liable for paying the encumbrance fee in this situation?&lt;br/&gt;How do I charge the next node the encumbrance fee myself if it has dropped the channel onchain and disconnected from me?&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj&lt;br/&gt;&lt;br/&gt;&amp;gt; On Tue, Feb 18, 2020 at 10:23:29AM &#43;0100, Joost Jager wrote:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; A different way of mitigating this is to reverse the direction in which the&lt;br/&gt;&amp;gt; &amp;gt; bond is paid. So instead of paying to offer an htlc, nodes need to pay to&lt;br/&gt;&amp;gt; &amp;gt; receive an htlc. This sounds counterintuitive, but for the described jamming&lt;br/&gt;&amp;gt; &amp;gt; attack there is also an attacker node at the end of the route. The attacker&lt;br/&gt;&amp;gt; &amp;gt; still pays.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I think this makes a lot of sense. I think the way it would end up working&lt;br/&gt;&amp;gt; is that the further the route extends, the greater the payments are, so:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; A -&amp;gt; B : B sends A 1msat per minute&lt;br/&gt;&amp;gt; A -&amp;gt; B -&amp;gt; C : C sends B 2msat per minute, B forwards 1msat/min to A&lt;br/&gt;&amp;gt; A -&amp;gt; B -&amp;gt; C -&amp;gt; D : D sends C 3 msat, etc&lt;br/&gt;&amp;gt; A -&amp;gt; B -&amp;gt; C -&amp;gt; D -&amp;gt; E : E sends D 4 msat, etc&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; so each node is receiving &#43;1 msat/minute, except for the last one, who&amp;#39;s&lt;br/&gt;&amp;gt; paying n msat/minute, where n is the number of hops to have gotten up to&lt;br/&gt;&amp;gt; the last one. There&amp;#39;s the obvious privacy issue there, with fairly&lt;br/&gt;&amp;gt; obvious ways to fudge around it, I think.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; But that&amp;#39;s rational, because that last node can either (a) collect the&lt;br/&gt;&amp;gt; payment, covering their cost; or (b) forward the payment, at which point&lt;br/&gt;&amp;gt; they&amp;#39;ll start collecting funds rather than paying them; or (c) cancel&lt;br/&gt;&amp;gt; the payment releasing all the locked up funds all the way back.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I think it might make sense for the payments to have a grace period --&lt;br/&gt;&amp;gt; ie, &amp;#34;if you keep this payment open longer than 20 seconds, you have to&lt;br/&gt;&amp;gt; start paying me x msat/minute, but if it fulfills or cancels before&lt;br/&gt;&amp;gt; then, it&amp;#39;s all good&amp;#34;.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I&amp;#39;m not sure if there needs to be any enforcement for this beyond &amp;#34;this&lt;br/&gt;&amp;gt; peer isn&amp;#39;t obeying the protocol, so I&amp;#39;m going to close the channel&amp;#34;; not&lt;br/&gt;&amp;gt; even sure it&amp;#39;s something that needs to be negotiated as part of payment&lt;br/&gt;&amp;gt; routing -- it could just be something each peer does for HTLCs on their&lt;br/&gt;&amp;gt; channels? If that can be made to work, it doesn&amp;#39;t need much crypto or&lt;br/&gt;&amp;gt; bitcoin consensus changes, or even much deployment coordination, all of&lt;br/&gt;&amp;gt; which would be awesome.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I think at $10k/BTC then 1msat is about the fair price for locking up $5&lt;br/&gt;&amp;gt; worth of BTC (so 50k sat) for 1 minute at a 1% pa interest rate, fwiw.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Maybe this opens up some sort of an attack where a peer lies about the&lt;br/&gt;&amp;gt; time to make the &amp;#34;per minute&amp;#34; go faster, but if msats-per-minute is the&lt;br/&gt;&amp;gt; units, not sure that really matters.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Maybe this also implies a different protocol for HTLC forwarding,&lt;br/&gt;&amp;gt; something like:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; 1.  A sends the HTLC onion packet to B&lt;br/&gt;&amp;gt; 2.  B decrypts it, makes sure it makes sense&lt;br/&gt;&amp;gt; 3.  B sends a half-signed updated channel state back to A&lt;br/&gt;&amp;gt; 4.  A accepts it, and forwards the other half-signed channel update to B&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;     so that at any point before (4) Alice can say &amp;#34;this is taking too long,&lt;br/&gt;&amp;gt;     I&amp;#39;ll start losing money&amp;#34; and safely abort the HTLC she was forwarding to&lt;br/&gt;&amp;gt;     Bob to avoid paying fees; while only after (4) can she start the time on&lt;br/&gt;&amp;gt;     expecting Bob to start paying fees that she&amp;#39;ll forward back. That means&lt;br/&gt;&amp;gt;     1.5 round-trips before Bob can really forward the HTLC on to Carol;&lt;br/&gt;&amp;gt;     but maybe it&amp;#39;s parallelisable, so Bob/Carol could start at (1) as soon&lt;br/&gt;&amp;gt;     as Alice/Bob has finished (2).&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;     Cheers&lt;br/&gt;&amp;gt;     aj&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;
    </content>
    <updated>2023-06-09T14:58:56&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs8svwsvawthfucjqydn54yqxfr7fm8xp8uate2w37577d36szx6fqzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzwq5xhz</id>
    
      <title type="html">📅 Original date posted:2020-02-06 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs8svwsvawthfucjqydn54yqxfr7fm8xp8uate2w37577d36szx6fqzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzwq5xhz" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsgerdqaa46ffeqejg3r3vxvswf0mmq5hgy593rfuckf329qmx766cqa9kdc&#39;&gt;nevent1q…9kdc&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-02-06&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning niftynei,&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; Rusty had some suggestions about how to improve the protocol messages for this, namely adding a serial_id to the inputs and outputs, which can then be reused for deletions. &lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The serial id can then also be used as the ordering heuristic for transaction inputs during construction (replacing current usage of BIP69). Inputs can be shared amongst peers by flipping the bottom bit of the serial_id before relaying them to another peer (as your own).&lt;br/&gt;&lt;br/&gt;What happens if the initiator deliberately provides serial IDs 0x1, 0x3, .... while the acceptor naively provides serial IDs from `/dev/urandom`?&lt;br/&gt;&lt;br/&gt;Then the balance of probability is that the initiator inputs and outputs are sorted before the acceptor.&lt;br/&gt;Now, this is probably not an issue, since the initiator and acceptor both know which inputs and outputs are theirs and not theirs, so they could just reveal this information to anyone, so an actor providing such lousy serial IDs is just hurting its own privacy relative to blockchain analysts, so probably will not happen in practice.&lt;br/&gt;&lt;br/&gt;My initial reaction was to propose adding a secret-sharing round where the resulting key is XORed to each serial ID before sorting by the XORed serial ID, but this might be too overweight, and again the initiator is only hurting its own privacy, and the two participants already know whose money is whose anyway....&lt;br/&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; See below for details.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; 1. type:   440 `tx_add_input`&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; 2. data:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;     * [`32*byte`:`channel_identifier`]&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt;         * [`32*byte`:``serial_id`] &lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Add a serial id.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Each input addition must have a unique serial id.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; No addition may have a repeated id number.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; The initiator&amp;#39;s serial id&amp;#39;s must be odd. The non-initiator&amp;#39;s serial id&amp;#39;s must be even.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Serial ids are used as sorting heuristic for input ordering in final transaction, replaces BIP69&lt;br/&gt;&amp;gt;  &lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;     * [`u64`:`sats`]&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;     * [`sha256`:`prevtx_txid`]&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;     * [`u32`:`prevtx_vout`]&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;     * [`u16`:`prevtx_scriptpubkey_len`]&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;     * [`prevtx_scriptpubkey_len*byte`:`prevtx_scriptpubkey`]&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;     * [`u16`:`max_witness_len`]&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;     * [`u16`:`scriptlen`]&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;     * [`scriptlen*byte`:`script`]&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Removes the signal_rbf; everything will be flagged as RBF eligible. (This makes verifying RBF eligibility during a RBF round simpler.)&lt;br/&gt;&lt;br/&gt;Yes. Ish.&lt;br/&gt;RBF and privacy do not work well together unfortunately.&lt;br/&gt;This is still initiator-pays, right?&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; 1. subtype: `witness_element`&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; 2. data:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;     * [`u16`:`len`]&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;     * [`len*byte`:`witness`]&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; ## General Notes&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; - All output scripts must be standard&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; - nLocktime is always set to 0x00000000&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; - If a blockheight to be used as nLocktime is communicated in the initiation step, is set to blockheight-6; otherwise set to zero-&lt;br/&gt;&lt;br/&gt;I am unsure what is the purpose of this minus 6.&lt;br/&gt;&lt;br/&gt;If you fear blockheight disagreements, this is probably a good time to introduce block headers.&lt;br/&gt;So for example if the acceptor thinks the initiator blockheight is too high, it could challenge the initiator to give block headers from its known blockheight to the initiator blockheight.&lt;br/&gt;If the acceptor thinks the initiator blockheight is too low, it could provide block headers itself as proof.&lt;br/&gt;This could be limited so that gross differences in blockheight are outright rejected by the acceptor (it could `error` the temporary channel ID rather than accept it).&lt;br/&gt;&lt;br/&gt;This is SPV, but neither side is actually making or accepting a payment *yet*, just synchronizing clocks, so maybe not as bad as normal SPV.&lt;br/&gt;&lt;br/&gt;Massive chain reorgs cannot reduce blockheight, only increase it (else the reorg attempt fails in the first place) so there must still exist at least one chain(split) with the highest known blockheight already given a proof-of-header-chain, and all you really need is some mining activity on top of *one* split that confirms your funding transaction.&lt;br/&gt;&lt;br/&gt;If it is not because of blockheight disagreements or massive chain reorgs, what is the purpose of `blockheight - 6`?&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; - Serial ids should be chosen at random&lt;br/&gt;&amp;gt; - For multiparty constructions, the initiator MUST flip the bottom bit of any received inputs before relaying them to a peer.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; - Collisions of serial ids between peers is a protocol error&lt;br/&gt;&lt;br/&gt;I suppose we should define collision to mean &amp;#34;equal in all bits except the lowest bit&amp;#34;.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T14:58:38&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsxfv6kam5j878snw8vhwgk5usm274v6rrytrdfgg5zlv06m8z0l2czypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzgje7un</id>
    
      <title type="html">📅 Original date posted:2020-02-03 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsxfv6kam5j878snw8vhwgk5usm274v6rrytrdfgg5zlv06m8z0l2czypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzgje7un" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqs2raxtvnf4drfmmydppsld22jlm4d9q2h0qw72ulfevavzhwf5mmgs30puq&#39;&gt;nevent1q…0puq&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-02-03&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning t-bast,&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; &amp;gt; This is relevant if we ever want to hide the node id of the last node: Bob could provide a symmetric&lt;br/&gt;&amp;gt; &amp;gt; encryption key to all its peers with unpublished channels, which the peer can XOR with its own true&lt;br/&gt;&amp;gt; &amp;gt; node id and use the lowest 40 bits (or 46 bits or 58 bits) in the SCID.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I don&amp;#39;t understand your point here. Alice cannot hide her node_id from Bob since the `node_id` is&lt;br/&gt;&amp;gt; tied to the (unannounced) channel creation.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; But this is not an issue. What Alice wants to break is the ability to link multiple HTLCs together&lt;br/&gt;&amp;gt; because they use the same `node_id`. Since Alice can use a different `node_id` in every invoice,&lt;br/&gt;&amp;gt; it&amp;#39;s easy for her to make sure Carol cannot tie those HTLCs together.&lt;br/&gt;&lt;br/&gt;That is precisely what I am referring to, the lowest bits of the node ID are embedded in the SCID, which we do not want to openly reveal to Carol.&lt;br/&gt;Though if the point is to prevent Carol from correlating different invoices as arising from the same payee, then my scheme fails against that.&lt;br/&gt;&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; In order to hide from Bob, the best Alice can do is use a different `node_id` for each channel she&lt;br/&gt;&amp;gt; opens to Bob and use Tor. This way Bob cannot know that node_id_1 and node_id_2 both belong to Alice.&lt;br/&gt;&amp;gt; I don&amp;#39;t think we can do better than that.&lt;br/&gt;&lt;br/&gt;Alice would do better to use multiple Bobs in that case.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T14:58:32&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsgzhjk45rqd9ymp89wny6zme7d9spksqny49fs7y9w0phu8udhx2qzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxz3mjed4</id>
    
      <title type="html">📅 Original date posted:2020-02-03 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsgzhjk45rqd9ymp89wny6zme7d9spksqny49fs7y9w0phu8udhx2qzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxz3mjed4" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsvv99llwu2venmgcjxk6zfz8ywrlgk3dzhureptn6dlmnrul4qusgjuhfsg&#39;&gt;nevent1q…hfsg&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-02-03&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning Rusty,&lt;br/&gt;&lt;br/&gt;&amp;gt; Bastien TEINTURIER bastien at acinq.fr writes:&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; We can easily get rid of (1.) by leveraging the `payment_secret`. The&lt;br/&gt;&amp;gt; &amp;gt; improved scheme is:&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; -   Alice draws a random `decoy_key`&lt;br/&gt;&amp;gt; &amp;gt; -   Alice computes the corresponding `decoy_node_id = decoy_key * G`&lt;br/&gt;&amp;gt; &amp;gt; -   Alice draws a random `payment_secret`&lt;br/&gt;&amp;gt; &amp;gt; -   Alice computes `decoy_short_channel_id = H(payment_secret * decoy_key * bob_node_id) xor short_channel_id`&lt;br/&gt;&amp;gt; &amp;gt; -   Alice uses the `decoy_key` to sign the invoice&lt;br/&gt;&amp;gt; &amp;gt; -   Carol recovers `decoy_node_id` from the invoice signature&lt;br/&gt;&amp;gt; &amp;gt; -   Carol includes `P_I = payment_secret * decoy_node_id` in the onion&lt;br/&gt;&amp;gt; &amp;gt;     payload for Bob&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; -   Bob can compute `short_channel_id = H(bob_private_key * P_I) xor decoy_short_channel_id`&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; But I don&amp;#39;t see how to get rid of (2.). If anyone has a clever idea on how&lt;br/&gt;&amp;gt; &amp;gt; to do that, I&amp;#39;d love to hear it!&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; I really don&amp;#39;t want a special marker on Carol; she needs to just pay&lt;br/&gt;&amp;gt; like normal. Not just because it&amp;#39;s simple, but because it means that&lt;br/&gt;&amp;gt; Carol can use a custodial wallet without having to flag the payment as&lt;br/&gt;&amp;gt; somehow special.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; AFAICT, having Bob assign scids is the only viable way to do this. The&lt;br/&gt;&amp;gt; current proposal limits to one scid at a time, but it could be extended&lt;br/&gt;&amp;gt; to allow multiple scids.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; (I&amp;#39;m seeking a clever way that Bob can assign them and trivially tell&lt;br/&gt;&amp;gt; which ID is assigned to which peer, but I can&amp;#39;t figure it out, so I&lt;br/&gt;&amp;gt; guess Bob keeps a mapping and restricts each peer to 256 live scids?).&lt;br/&gt;&lt;br/&gt;We can observe that short-channel-ids have a 24-bit blocknum, but it is exceedingly unlikely that for most blockchains, the genesis block will have a Lightning network channel.&lt;br/&gt;&lt;br/&gt;So we could reserve blocknum=0 to identify special SCIDs.&lt;br/&gt;&lt;br/&gt;The rest of the SCID could refer to the lowest 40 bits of the X-coord of the node ID that is the destination.&lt;br/&gt;We should remember that short channel IDs are used as a convenient way to refer to the next *node* and not the next channel in the onion routing (which is why in Adelaide 2018 we decided to make short channel IDs &amp;#34;advisory&amp;#34;, implementation that support multiple channels per peer can use any channel with that peer to forward, not just the specific SCID indicated in the onion).&lt;br/&gt;Now, 40 bits is not a lot, but we can observe that for almost all git repositories, 7 or 8 hex digits is usually enough to unambiguously identify a commit within the repository, even for git repositories with thousands of commits, and 8 hex digits is just 32 bits of identification.&lt;br/&gt;So it seems to me that Bob could just look up the 40 bit identifier to each of the nodes with unpublished channels with it, and this will work well up to Bob having a few thousand peers with unpublished channels.&lt;br/&gt;&lt;br/&gt;If we focus on Bitcoin specifically, we can observe as well that `when_lightning_became_cool` is well above 262144 (2^18 ) so we can steal 18 more bits from the blocknum, i.e. if none of the top 6 bits of blocknum are set (blocknum &amp;lt; 262144), then the lower 58 bits of the blockid are the lowest 58 bits of the node ID of the next hop.&lt;br/&gt;Though obviously that is not as good for regtest and testnet, do note that, assuming a non-premined blockchain with a similar 100-block maturity for coinbases, we could still steal 6 bits (blocknum &amp;lt; 64), since no Lightning channel can occur on the first 100 blocks anyway due to the maturity requirement (there *are* no coins that can be spent before then, so no Lightning channels can be created then).&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Admittedly, if somebody knows your node id, they need only 40 bits of work to grind a node id of their own whose last 40 bits matches yours, then connect to the same public node you are on.&lt;br/&gt;In that case, it becomes ambiguous for Bob which of the nodes it should send the last hop to, so it could just try them one by one (trying them in parallel risks Bob getting ripped off by an attacker who specifically generates multiple nodes with the same lower bits in the node ID).&lt;br/&gt;Or Bob could just reject future channels from nodes whose lower bits match that with something already channeled with it.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Finally, in this context, this is intended to be used for nodes with unpublished channels.&lt;br/&gt;Of note is that the second-to-the-last node already knows the exact identity, timing, and amount of every payment to the last node anyway, because unpublished channels are not private.&lt;br/&gt;So in this particular case, the second-to-the-last node can actually just drop the payer onion, and replace it with its own onion to the final node.&lt;br/&gt;This is relevant if we ever want to hide the node id of the last node: Bob could provide a symmetric encryption key to all its peers with unpublished channels, which the peer can XOR with its own true node id and use the lowest 40 bits (or 46 bits or 58 bits) in the SCID.&lt;br/&gt;Then when Bob receives an onion whose next SCID has the top 24 or 18 or 6 bits set to 0, it can XOR the symmetric key to the lower bits and then determine the lowest bits of the node id of the last node, and it can then replace the outgoing onion with the corrected onion to that node.&lt;br/&gt;The last node cannot use the payment secret (invoice secret), but that is not going to protect against probe attacks from a public node to a completely unpublished node anyway.&lt;br/&gt;Also the last node cannot receive any data via this method (because the onion is replaced by Bob) but for simple pay-for-preimage applications this will work perfectly fine.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;It strikes me as well that a C-Lightning plugin can actually implement this due to `htlc_accepted` hook.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T14:58:31&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqsrnffvjl6g79zpr8yjfte6a73fyn47l8374kl2tq53e0j6h20jyuszypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzhqxzqh</id>
    
      <title type="html">📅 Original date posted:2020-01-26 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqsrnffvjl6g79zpr8yjfte6a73fyn47l8374kl2tq53e0j6h20jyuszypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzhqxzqh" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsqpv0s0nllvwfzt8adn6hph4djkjs3zdpr4yza9p2vcgfcye8kdqglee526&#39;&gt;nevent1q…e526&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-01-26&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning Subhra,&lt;br/&gt;&lt;br/&gt;This does not seem to make sense?&lt;br/&gt;For a payment that is less than the channel funds on your side, only that amount is locked behind an HTLC, and the rest remains useable for other HTLCs.&lt;br/&gt;&lt;br/&gt;What exactly are you referring to?&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj&lt;br/&gt;&lt;br/&gt;&amp;gt; Hi,&lt;br/&gt;&amp;gt;      I was wondering when parties apply condition on fraction of channel fund for ensuring successful payment, entire channel fund is held. Is it possible to lock just partial amount of fund of a payment channel and leave the rest to be used by some another payment request ? Concept of subchannels of a single channel has been suggested in &amp;#34;Atomic multi-channel updates with constant collateral in bitcoin-compatible payment-channel networks&amp;#34;  &lt;a href=&#34;https://scholar.google.com/scholar?cluster=40566801298747858&amp;amp;hl=en&amp;amp;as_sdt=2005&amp;amp;sciodt=0,5&#34;&gt;https://scholar.google.com/scholar?cluster=40566801298747858&amp;amp;hl=en&amp;amp;as_sdt=2005&amp;amp;sciodt=0,5&lt;/a&gt; but I am still in doubt what happens during closing of subchannel ?&lt;br/&gt;&amp;gt; --&lt;br/&gt;&amp;gt; Yours sincerely,&lt;br/&gt;&amp;gt; Subhra Mazumdar.
    </content>
    <updated>2023-06-09T14:58:12&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs0u9gewjknzxgyqqqpeh97mpah6zlkuv6dsxjc3rmrdc6pj5uy9kqzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzdjraxf</id>
    
      <title type="html">📅 Original date posted:2020-01-07 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs0u9gewjknzxgyqqqpeh97mpah6zlkuv6dsxjc3rmrdc6pj5uy9kqzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxzdjraxf" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsfdgrpnlcldraqp03ynv7szupflayq7jw27dfpsk3c5kvp8myxxgg9cw9wk&#39;&gt;nevent1q…w9wk&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2020-01-07&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning Rene, and list,&lt;br/&gt;&lt;br/&gt;It seems to me that the rule used here might be useful to guide how to split a payment for multipath as well.&lt;br/&gt;&lt;br/&gt;For example, consider the case where a payer Alice has channels to Bob and Charlie.&lt;br/&gt;&lt;br/&gt;* Alice-Bob has A=0.5, B=0.5&lt;br/&gt;* Alice-Charlie has A=0.5, C=0.5&lt;br/&gt;&lt;br/&gt;In that case, in order to retain balance, if Alice has to pay 0.1, it should strive to split the payment into a 0.05 via Alice-Bob and 0.05 via Alice-Charlie.&lt;br/&gt;&lt;br/&gt;Would it be possible to derive such a calculation from your published rule?&lt;br/&gt;For example, if one of the payer channels is imbalanced in favor of the payer, then the payment probably should not be split, but if the payment is big enough that it would be imbalanced against the payer afterwards, then some small amount must be split out to another channel.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj
    </content>
    <updated>2023-06-09T14:57:59&#43;02:00</updated>
  </entry>

  <entry>
    <id>https://nostr.ae/nevent1qqs0pf39xx8e9g284u84tsj4mkjjk7nhdmv8xag7y92kpyfkrhtvgzgzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxz8e8ljc</id>
    
      <title type="html">📅 Original date posted:2019-12-17 📝 Original message: Good ...</title>
    
    <link rel="alternate" href="https://nostr.ae/nevent1qqs0pf39xx8e9g284u84tsj4mkjjk7nhdmv8xag7y92kpyfkrhtvgzgzypzs2pe8gj5a8eys47fx90lr3ehw2vu2wuthk4jmdvmhxzmr57uxz8e8ljc" />
    <content type="html">
      In reply to &lt;a href=&#39;/nevent1qqsp8wye96ajjurwttq2tugd4e7l6sffkvvrt965v3a9cjyuk6w8u6c0n5dty&#39;&gt;nevent1q…5dty&lt;/a&gt;&lt;br/&gt;_________________________&lt;br/&gt;&lt;br/&gt;📅 Original date posted:2019-12-17&lt;br/&gt;📝 Original message:&lt;br/&gt;Good morning t-bast,&lt;br/&gt;&lt;br/&gt;Further, we can enforce that RBF is signalled for every spend of the output by:&lt;br/&gt;&lt;br/&gt;    &amp;lt;0&amp;gt; OP_CHECKSEQUENCEVERIFY OP_DROP &amp;lt;R&amp;gt; OP_SWAP OP_CAT &amp;lt;ACINQ&amp;gt; OP_CHECKSIG&lt;br/&gt;&lt;br/&gt;Requiring that RBF is signalled gives a little more assurance.&lt;br/&gt;Suppose ACINQ becomes evil and double-spends the output.&lt;br/&gt;The transaction that is posted in the mempool must be marked by RBF due to the `OP_CHECKSEQUENCEVERIFY` opcode, since `nSequence` also doubles as RBF opt-in.&lt;br/&gt;Then anyone who notices the double-spend can RBF the double-spending transaction to themselves rather than ACINQ.&lt;br/&gt;This also further publishes ACINQ private key, until the winning transaction has an `OP_RETURN` output that pays the entire value as fees and nobody can RBF it further.&lt;br/&gt;&lt;br/&gt;This is a minor increase in the assurability of the construction, by making any output that is double-spent directly revocable in favor of the miners.&lt;br/&gt;Again, it requires `OP_CAT`, which is a very dangerous opcode, allowing such powerful constructions.&lt;br/&gt;&lt;br/&gt;Regards,&lt;br/&gt;ZmnSCPxj&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&amp;gt; Thanks a lot David for the suggestion and pointers, that&amp;#39;s a really interesting solution.&lt;br/&gt;&amp;gt; I will dive into that in-depth, it could be very useful for many layer-2 constructions.&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Thanks ZmnSCPxj as well for the quick feedback and the `OP_CAT` construction,&lt;br/&gt;&amp;gt; a lot of cool tricks coming up once (if?) we have such tools in the future ;)&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; Le mar. 17 déc. 2019 à 16:14, ZmnSCPxj &amp;lt;ZmnSCPxj at protonmail.com&amp;gt; a écrit :&lt;br/&gt;&amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Good morning David, t-bast, and all,&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; I&amp;#39;m not aware of any way to currently force single-show signatures in&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; Bitcoin, so this is pretty theoretical. Also, single-show signatures&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; add a lot of fragility to any setup and make useful features like RBF&lt;br/&gt;&amp;gt; &amp;gt; &amp;gt; fee bumping unavailable.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; With `OP_CAT`, we can enforce that a particular `R` is used, which allows to implement single-show signatures.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt;     # Assuming signatures are the concatenation of (R,s)&lt;br/&gt;&amp;gt; &amp;gt;     &amp;lt;R&amp;gt; OP_SWAP OP_CAT &amp;lt;ACINQ&amp;gt; OP_CHECKSIG&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; The above would then feed `s` only on the witness stack.&lt;br/&gt;&amp;gt; &amp;gt;&lt;br/&gt;&amp;gt; &amp;gt; Regards,&lt;br/&gt;&amp;gt; &amp;gt; ZmnSCPxj
    </content>
    <updated>2023-06-09T14:57:48&#43;02:00</updated>
  </entry>

</feed>