<oembed><type>rich</type><version>1.0</version><author_name>npub1aslmpzentw224n3s6yccru4dq2qdlx7rfudfnqevfck637cjt6esswfqmx</author_name><author_url>https://nostr.ae/npub1aslmpzentw224n3s6yccru4dq2qdlx7rfudfnqevfck637cjt6esswfqmx</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2020-10-12&#xA;📝 Original message:&#xA;&gt;&#xA;&gt; &gt; A. Prepayment: node pays an amount to its channel peer (for example via&#xA;&gt; keysend) and the channel peer deducts the hold fees from that prepaid&#xA;&gt; balance until it is at zero. At that point it somehow (in the htlc fail&#xA;&gt; message?) communicates Lightning&#39;s version of http 402 to ask for more&#xA;&gt; money.&#xA;&gt;&#xA;&gt; If the node has already forwarded the HTLC onward, what enforcement hold&#xA;&gt; does the node have on the sender of the incoming HTLC?&#xA;&gt; Presumably the sender of the HTLC has already gotten what it wanted --- an&#xA;&gt; outgoing HTLC --- so how can the forwarding node enforce this request to&#xA;&gt; get more money.&#xA;&gt;&#xA;&#xA;The idea is that the available prepaid hold fee balance is enough to cover&#xA;the worst case hold fee. Otherwise the forward won&#39;t happen. The main&#xA;difference with option B is that you pay a sum upfront which can be used to&#xA;cover multiple forwards. And that this payment is a separate Lightning&#xA;payment, not integrated with the add/fail/settle flow. I prefer option B,&#xA;but implementation effort is also a consideration.&#xA;&#xA;&gt; B. Tightly integrated with the htlc add/fail/settle messages. When an&#xA;&gt; htlc is added, the maximum cost (based on maximum lock time) for holding is&#xA;&gt; deducted from the sender&#39;s channel balance. When the htlc settles, a refund&#xA;&gt; is given based on the actual lock time. An additional `update_fee`-like&#xA;&gt; message is added for peers to update their hold fee parameters (fee_base&#xA;&gt; and fee_rate).&#xA;&gt;&#xA;&gt; If I am a forwarding node, and I receive the preimage from the outgoing&#xA;&gt; HTLC, can I deliberately defer claiming the incoming HTLC (pretending that&#xA;&gt; the outgoing HTLC was taking longer than it actually took) in order to&#xA;&gt; reduce the amount I have to refund?&#xA;&gt;&#xA;&#xA;Yes you can. That is the trust part, your peer trusts you not to do this.&#xA;If they don&#39;t trust you, they won&#39;t forward to you if you charge a (high)&#xA;hold fee.&#xA;&#xA;&gt; In both cases the sender needs to trust its peer to not steal the payment&#xA;&gt; and/or artificially delay the forwarding to inflate the hold fee. I think&#xA;&gt; that is acceptable given that there is a trust relation between peers&#xA;&gt; already anyway.&#xA;&gt;&#xA;&gt; I am wary of *adding* trust.&#xA;&gt; You might trust someone to keep an eye on your snacks while you go refill&#xA;&gt; your drink, but not to keep an eye on your hardware wallet when you do the&#xA;&gt; same.&#xA;&gt; (Since consuming snacks and drinks and hardware wallets are human&#xA;&gt; activities, this should show that I am in fact a human.)&#xA;&gt;&#xA;&#xA;So I am arguing that there is trust already between peers. Quite&#xA;considerable trust even in case of high on-chain fee conditions. The added&#xA;risk of being scammed out of these prepay sats may not be significant.&#xA;&#xA;Joost&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20201012/bff0c536/attachment.html&gt;</html></oembed>