<oembed><type>rich</type><version>1.0</version><author_name>npub1vjzmc45k8dgujppapp2ue20h3l9apnsntgv4c0ukncvv549q64gsz4x8dd</author_name><author_url>https://nostr.ae/npub1vjzmc45k8dgujppapp2ue20h3l9apnsntgv4c0ukncvv549q64gsz4x8dd</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2020-10-06&#xA;📝 Original message:&#xA;Hello Bastien,&#xA;&#xA;I&#39;m all in for a model where channel transactions are pre-signed with a&#xA;reasonable minimal relay fee and the adjustment is done by the closer. The&#xA;channel initiator shouldn&#39;t have to pay for channel-closing as it&#39;s somehow&#xA;a liquidity allocation decision (&#34;My balance could be better allocated&#xA;elsewhere than in this channel&#34;).&#xA;&#xA;That said, a channel closing might be triggered due to a security&#xA;mechanism, like a HTLC to timeout onchain. Thus a malicious counterparty&#xA;can easily loop a HTLC forwarding on an honest peer. Then not cancel it&#xA;on-time to force the honest counterparty to pay onchain fees to avoid a&#xA;offered HTLC not being claimed back on time.&#xA;&#xA;AFAICT, this issue is not solved by anchor outputs. A way to decentivize&#xA;this kind of behavior from a malicious counterparty is an upfront payment&#xA;where the upholding HTLC fee * HTLC block-buffer-before-onchain is higher&#xA;than the cost of going onchain. It should cost higher for the counterparty&#xA;to withhold a HTLC than paying onchain-fees to close the channel.&#xA;&#xA;Or can you think about another mitigation for the issue raised above ?&#xA;&#xA;Antoine&#xA;&#xA;Le lun. 5 oct. 2020 à 09:13, Bastien TEINTURIER via Lightning-dev &lt;&#xA;lightning-dev at lists.linuxfoundation.org&gt; a écrit :&#xA;&#xA;&gt; Good morning list,&#xA;&gt;&#xA;&gt; It seems to me that the &#34;funder pays all the commit tx fees&#34; rule exists&#xA;&gt; solely for simplicity&#xA;&gt; (which was totally reasonable). I haven&#39;t been able to find much&#xA;&gt; discussion about this decision&#xA;&gt; on the mailing list nor in the spec commits.&#xA;&gt;&#xA;&gt; At first glance, it&#39;s true that at the beginning of the channel lifetime,&#xA;&gt; the funder should be&#xA;&gt; responsible for the fee (it&#39;s his decision to open a channel after all).&#xA;&gt; But as time goes by and&#xA;&gt; both peers earn value from this channel, this rule becomes questionable.&#xA;&gt; We&#39;ve discovered since&#xA;&gt; then that there is some risk associated with having pending HTLCs&#xA;&gt; (flood-and-loot type of attacks,&#xA;&gt; pinning, channel jamming, etc).&#xA;&gt;&#xA;&gt; I think that *in some cases*, fundees should be paying a portion of the&#xA;&gt; commit-tx on-chain fees,&#xA;&gt; otherwise we may end up with a web-of-trust network where channels would&#xA;&gt; only exist between peers&#xA;&gt; that trust each other, which is quite limiting (I&#39;m hoping we can do&#xA;&gt; better).&#xA;&gt;&#xA;&gt; Routing nodes may be at risk when they *receive* HTLCs. All the attacks&#xA;&gt; that steal funds come from&#xA;&gt; the fact that a routing node has paid downstream but cannot claim the&#xA;&gt; upstream HTLCs (correct me&#xA;&gt; if that&#39;s incorrect). Thus I&#39;d like nodes to pay for the on-chain fees of&#xA;&gt; the HTLCs they offer&#xA;&gt; while they&#39;re pending in the commit-tx, regardless of whether they&#39;re&#xA;&gt; funder or fundee.&#xA;&gt;&#xA;&gt; The simplest way to do this would be to deduce the HTLC cost (172 *&#xA;&gt; feerate) from the offerer&#39;s&#xA;&gt; main output (instead of the funder&#39;s main output, while keeping the base&#xA;&gt; commit tx weight paid&#xA;&gt; by the funder).&#xA;&gt;&#xA;&gt; A more extreme proposal would be to tie the *total* commit-tx fee to the&#xA;&gt; channel usage:&#xA;&gt;&#xA;&gt; * if there are no pending HTLCs, the funder pays all the fee&#xA;&gt; * if there are pending HTLCs, each node pays a proportion of the fee&#xA;&gt; proportional to the number of&#xA;&gt; HTLCs they offered. If Alice offered 1 HTLC and Bob offered 3 HTLCs, Bob&#xA;&gt; pays 75% of the&#xA;&gt; commit-tx fee and Alice pays 25%. When the HTLCs settle, the fee is&#xA;&gt; redistributed.&#xA;&gt;&#xA;&gt; This model uses the on-chain fee as collateral for usage of the channel.&#xA;&gt; If Alice wants to forward&#xA;&gt; HTLCs through this channel (because she has something to gain - routing&#xA;&gt; fees), she should be taking&#xA;&gt; on some of the associated risk, not Bob. Bob will be taking the same risk&#xA;&gt; downstream if he chooses&#xA;&gt; to forward.&#xA;&gt;&#xA;&gt; I believe it also forces the fundee to care about on-chain feerates, which&#xA;&gt; is a healthy incentive.&#xA;&gt; It may create a feedback loop between on-chain feerates and routing fees,&#xA;&gt; which I believe is also&#xA;&gt; a good long-term thing (but it&#39;s hard to predict as there may be negative&#xA;&gt; side-effects as well).&#xA;&gt;&#xA;&gt; What do you all think? Is this a terrible idea? Is it okay-ish, but not&#xA;&gt; worth the additional&#xA;&gt; complexity? Is it an amazing idea worth a lightning nobel? Please don&#39;t&#xA;&gt; take any of my claims&#xA;&gt; for granted and challenge them, there may be negative side-effects I&#39;m&#xA;&gt; completely missing, this is&#xA;&gt; a fragile game of incentives...&#xA;&gt;&#xA;&gt; Side-note: don&#39;t forget to take into account that the fees for HTLC&#xA;&gt; transactions (second-level txs)&#xA;&gt; are always paid by the party that broadcasts them (which makes sense). I&#xA;&gt; still think this is not&#xA;&gt; enough and can even be abused by fundees in some setups.&#xA;&gt;&#xA;&gt; Thanks,&#xA;&gt; Bastien&#xA;&gt; _______________________________________________&#xA;&gt; Lightning-dev mailing list&#xA;&gt; Lightning-dev at lists.linuxfoundation.org&#xA;&gt; https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&#xA;&gt;&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20201006/eb3eaa1c/attachment.html&gt;</html></oembed>