<oembed><type>rich</type><version>1.0</version><title>Bastien TEINTURIER [ARCHIVE] wrote</title><author_name>Bastien TEINTURIER [ARCHIVE] (npub17f…ntr0s)</author_name><author_url>https://yabu.me/npub17fjkngg0s0mfx4uhhz6n4puhflwvrhn2h5c78vdr5xda4mvqx89swntr0s</author_url><provider_name>njump</provider_name><provider_url>https://yabu.me</provider_url><html>📅 Original date posted:2020-10-05&#xA;📝 Original message:&#xA;Good morning list,&#xA;&#xA;It seems to me that the &#34;funder pays all the commit tx fees&#34; rule exists&#xA;solely for simplicity&#xA;(which was totally reasonable). I haven&#39;t been able to find much discussion&#xA;about this decision&#xA;on the mailing list nor in the spec commits.&#xA;&#xA;At first glance, it&#39;s true that at the beginning of the channel lifetime,&#xA;the funder should be&#xA;responsible for the fee (it&#39;s his decision to open a channel after all).&#xA;But as time goes by and&#xA;both peers earn value from this channel, this rule becomes questionable.&#xA;We&#39;ve discovered since&#xA;then that there is some risk associated with having pending HTLCs&#xA;(flood-and-loot type of attacks,&#xA;pinning, channel jamming, etc).&#xA;&#xA;I think that *in some cases*, fundees should be paying a portion of the&#xA;commit-tx on-chain fees,&#xA;otherwise we may end up with a web-of-trust network where channels would&#xA;only exist between peers&#xA;that trust each other, which is quite limiting (I&#39;m hoping we can do&#xA;better).&#xA;&#xA;Routing nodes may be at risk when they *receive* HTLCs. All the attacks&#xA;that steal funds come from&#xA;the fact that a routing node has paid downstream but cannot claim the&#xA;upstream HTLCs (correct me&#xA;if that&#39;s incorrect). Thus I&#39;d like nodes to pay for the on-chain fees of&#xA;the HTLCs they offer&#xA;while they&#39;re pending in the commit-tx, regardless of whether they&#39;re&#xA;funder or fundee.&#xA;&#xA;The simplest way to do this would be to deduce the HTLC cost (172 *&#xA;feerate) from the offerer&#39;s&#xA;main output (instead of the funder&#39;s main output, while keeping the base&#xA;commit tx weight paid&#xA;by the funder).&#xA;&#xA;A more extreme proposal would be to tie the *total* commit-tx fee to the&#xA;channel usage:&#xA;&#xA;* if there are no pending HTLCs, the funder pays all the fee&#xA;* if there are pending HTLCs, each node pays a proportion of the fee&#xA;proportional to the number of&#xA;HTLCs they offered. If Alice offered 1 HTLC and Bob offered 3 HTLCs, Bob&#xA;pays 75% of the&#xA;commit-tx fee and Alice pays 25%. When the HTLCs settle, the fee is&#xA;redistributed.&#xA;&#xA;This model uses the on-chain fee as collateral for usage of the channel. If&#xA;Alice wants to forward&#xA;HTLCs through this channel (because she has something to gain - routing&#xA;fees), she should be taking&#xA;on some of the associated risk, not Bob. Bob will be taking the same risk&#xA;downstream if he chooses&#xA;to forward.&#xA;&#xA;I believe it also forces the fundee to care about on-chain feerates, which&#xA;is a healthy incentive.&#xA;It may create a feedback loop between on-chain feerates and routing fees,&#xA;which I believe is also&#xA;a good long-term thing (but it&#39;s hard to predict as there may be negative&#xA;side-effects as well).&#xA;&#xA;What do you all think? Is this a terrible idea? Is it okay-ish, but not&#xA;worth the additional&#xA;complexity? Is it an amazing idea worth a lightning nobel? Please don&#39;t&#xA;take any of my claims&#xA;for granted and challenge them, there may be negative side-effects I&#39;m&#xA;completely missing, this is&#xA;a fragile game of incentives...&#xA;&#xA;Side-note: don&#39;t forget to take into account that the fees for HTLC&#xA;transactions (second-level txs)&#xA;are always paid by the party that broadcasts them (which makes sense). I&#xA;still think this is not&#xA;enough and can even be abused by fundees in some setups.&#xA;&#xA;Thanks,&#xA;Bastien&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20201005/521584fe/attachment.html&gt;</html></oembed>