<oembed><type>rich</type><version>1.0</version><author_name>npub1e46n428mcyfwznl7nlsf6d3s7rhlwm9x3cmkuqzt3emmdpadmkaqqjxmcu</author_name><author_url>https://nostr.ae/npub1e46n428mcyfwznl7nlsf6d3s7rhlwm9x3cmkuqzt3emmdpadmkaqqjxmcu</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2021-08-15&#xA;📝 Original message:&#xA;Thanks, AJ, for kicking off the thread.&#xA;&#xA;I&#39;m frankly still very confused why we&#39;re having these conversations now. In one particular class of applicable routing &#xA;algorithms you could use for lightning routing having a base fee makes the algorithm intractably slow, but:&#xA;&#xA;a) to my knowledge, no one has (yet) done any follow-on work to investigate pulling many of the same heuristics Rene et &#xA;al use in a Dijkstras/A* algorithm with multiple passes or generating multiple routes in the same pass to see whether &#xA;you can emulate the results in a faster algorithm without the drawbacks here,&#xA;&#xA;b) to my knowledge, no one has (yet) done any follow-on work to investigate mapping the base fee to other, more &#xA;flow-based-routing-compatible numbers, eg you could convert the base fee to a minimum fee by increasing the &#34;effective&#34; &#xA;proportional fees. From what others have commented, this may largely &#34;solve&#34; the issue.&#xA;&#xA;c) to my knowledge, no one has (yet) done any follow-on work to analyze where the proposed algorithm may be most optimal &#xA;in the HTLC-value&lt;-&gt;channel liquidity ratio ranges. We may find that the proposed algorithm only provides materially &#xA;better routing when the HTLC value approaches X% of common network channel liquidity, allowing us to only use it for &#xA;large-value payments where we can almost ignore the base fees entirely.&#xA;&#xA;There&#39;s real cost to distorting the fee structures on the network away from the costs of node operators, especially as &#xA;we move towards requiring and using Real (tm) amounts of capital on routing nodes. If we&#39;re relying purely on hobbyists &#xA;forever who are operating out of goodwill, we should just remove all fees. If we think Lightning is going to involve &#xA;capital with real opportunity cost, matching fees to the costs is important, or at least important enough that we &#xA;shouldn&#39;t throw it away after one (pretty great) paper and limited further analysis.&#xA;&#xA;Imagine we find some great way to address HTLC slot flooding/DoS attacks (or just chose to do it in a not-great way) by &#xA;charging for HTLC slot usage, now we can&#39;t fix a critical DoS issue because the routing algorithms we deployed can&#39;t &#xA;handle the new costing. Instead, we should investigate how we can apply the ideas here with the more complicated fee &#xA;structures we have.&#xA;&#xA;Color me an optimist, but I&#39;m quite confident with sufficient elbow grease and heuristics we can get 95% of the way &#xA;there. We can and should revisit these conversations if such exploration is done and we find that its not possible, but &#xA;until then this all feels incredibly premature.&#xA;&#xA;Matt&#xA;&#xA;On 8/14/21 21:00, Anthony Towns wrote:&#xA;&gt; Hey *,&#xA;&gt; &#xA;&gt; There&#39;s been discussions on twitter and elsewhere advocating for&#xA;&gt; setting the BOLT#7 fee_base_msat value [0] to zero. I&#39;m just writing&#xA;&gt; this to summarise my understanding in a place that&#39;s able to easily be&#xA;&gt; referenced later.&#xA;&gt; &#xA;&gt; Setting the base fee to zero has a couple of benefits:&#xA;&gt; &#xA;&gt;   - it means you only have one value to optimise when trying to collect&#xA;&gt;     the most fees, and one-dimensional optimisation problems are&#xA;&gt;     obviously easier to write code for than two-dimensional optimisation&#xA;&gt;     problems&#xA;&gt; &#xA;&gt;   - when finding a route, if all the fees on all the channels are&#xA;&gt;     proportional only, you&#39;ll never have to worry about paying more fees&#xA;&gt;     just as a result of splitting a payment; that makes routing easier&#xA;&gt;     (see [1])&#xA;&gt; &#xA;&gt; So what&#39;s the cost? The cost is that there&#39;s no longer a fixed minimum&#xA;&gt; fee -- so if you try sending a 1sat payment you&#39;ll pay 0.1% of the fee&#xA;&gt; to send a 1000sat payment, and there may be fixed costs that you have&#xA;&gt; in routing payments that you&#39;d like to be compensated for (eg, the&#xA;&gt; computational work to update channel state, the bandwith to forward the&#xA;&gt; tx, or the opportunity cost for not being able to accept another htlc if&#xA;&gt; you&#39;ve hit your max htlcs per channel limit).&#xA;&gt; &#xA;&gt; But there&#39;s no need to explicitly separate those costs the way we do&#xA;&gt; now; instead of charging 1sat base fee and 0.02% proportional fee,&#xA;&gt; you can instead just set the 0.02% proportional fee and have a minimum&#xA;&gt; payment size of 5000 sats (htlc_minimum_msat=5e6, ~$2), since 0.02%&#xA;&gt; of that is 1sat. Nobody will be asking you to route without offering a&#xA;&gt; fee of at least 1sat, but all the optimisation steps are easier.&#xA;&gt; &#xA;&gt; You could go a step further, and have the node side accept smaller&#xA;&gt; payments despite the htlc minimum setting: eg, accept a 3000 sat payment&#xA;&gt; provided it pays the same fee that a 5000 sat payment would have. That is,&#xA;&gt; treat the setting as minimum_fee=1sat, rather than minimum_amount=5000sat;&#xA;&gt; so the advertised value is just calculated from the real settings,&#xA;&gt; and that nodes that want to send very small values despite having to&#xA;&gt; pay high rates can just invert the calculation.&#xA;&gt; &#xA;&gt; I think something like this approach also makes sense when your channel&#xA;&gt; becomes overloaded; eg if you have x HTLC slots available, and y channel&#xA;&gt; capacity available, setting a minimum payment size of something like&#xA;&gt; y/2/x**2 allows you to accept small payments (good for the network)&#xA;&gt; when you&#39;re channel is not busy, but reserves the last slots for larger&#xA;&gt; payments so that you don&#39;t end up missing out on profits because you&#xA;&gt; ran out of capacity due to low value spam.&#xA;&gt; &#xA;&gt; Two other aspects related to this:&#xA;&gt; &#xA;&gt; At present, I think all the fixed costs are also incurred even when&#xA;&gt; a htlc fails, so until we have some way of charging failing txs for&#xA;&gt; incurring those costs, it seems a bit backwards to penalise successful&#xA;&gt; txs who at least pay a proportional fee for the same thing. Until we&#39;ve&#xA;&gt; got a way of handling that, having zero base fee seems at least fair.&#xA;&gt; &#xA;&gt; Lower value HTLCs don&#39;t need to be included in the commitment transaction&#xA;&gt; (if they&#39;re below the dust level, they definitely shouldn&#39;t be included,&#xA;&gt; and if they&#39;re less than 1sat they can&#39;t be included), and as such don&#39;t&#xA;&gt; incur all the same fixed costs that HTLCs that are committed too do.&#xA;&gt; Having different base fees for microtransactions that incur fewer costs&#xA;&gt; would be annoying; so having that be &#34;amortised&#34; into the proportional&#xA;&gt; fee might help there too.&#xA;&gt; &#xA;&gt; I think eltoo can help in two ways by reducing the fixed costs: you no&#xA;&gt; longer need to keep HTLC information around permanently, and if you do&#xA;&gt; a multilevel channel factory setup, you can probably remove the ~400&#xA;&gt; HTLCs per channel at any one time limit. But there&#39;s still other fixed&#xA;&gt; costs, so I think that would just lower the fixed costs, not remove them&#xA;&gt; altogether and isn&#39;t a fundamental change.&#xA;&gt; &#xA;&gt; I think the fixed costs for forwarding a HTLC are very small; something&#xA;&gt; like:&#xA;&gt; &#xA;&gt;     0.02sats -- cost of permanently storing the HTLC info&#xA;&gt;                 (100 bytes, $500/TB/year, 1% discount rate)&#xA;&gt;     0.04sats -- compute and bandwidth cost for updating an HTLC ($40/month&#xA;&gt;                 at linode, 1 second of compute)&#xA;&gt; &#xA;&gt; The opportunity cost of having HTLC slots or Bitcoin locked up until&#xA;&gt; the HTLC succeeds/fails could be much more significant, though.&#xA;&gt; &#xA;&gt; Cheers,&#xA;&gt; aj&#xA;&gt; &#xA;&gt; [0] https://github.com/lightningnetwork/lightning-rfc/blob/master/07-routing-gossip.md#the-channel_update-message&#xA;&gt; [1] https://basefee.ln.rene-pickhardt.de/&#xA;&gt; &#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;</html></oembed>