<p>In theory, it isn't clear to me yet if finding a min-cost flow is any harder when there are minimum flows. In practice, it's not at all a problem as long as the min HTLC size is small. That's because we calculate the optimum flows with a global minimum flow size (resolution) anyway, and typical values for that are 10k-100ksat. At the moment, the maximum observed min-HTLC-size in the network is 50ksat, and even that isn't a problem. For smaller sizes, the optimal flow will always be a single path anyway.</p>
<p>With regards to effects on the network, that's more speculative, but obviously, if everybody used min-HTLC-size, very small payments wouldn't work anymore.</p>

CC BY-SA 4.0
2021-07-27T18:44:33.147Z
Note: The resolution that we use finds a flow that is slightly away from the optimal solution. This was sufficient to deliver 0.3679 BTC on mainnet. In edge cases the actual liquidity on the network might be distributed in a way such that the used resolution (stepsize) might prevent us from finding all of the existing liquidity. Imagine 2 channels: The first one has a liquidity of 517k sats the other one has a liquidity of 415k sats. With a step size of 10k sats we could find a flow that delivers 920k sats but we wouldn't be able to find the flow for 932k sats even though it clearly exists.
Rene Pickhardt
CC BY-SA 4.0
2021-07-27T18:22:18.340Z
2021-07-27T18:22:18.340Z
stefanwouldgo
<p>I've read the paper &quot;<a href="https://arxiv.org/pdf/2107.05322.pdf" rel="nofollow noreferrer">Optimally Reliable &amp; Cheap Payment Flows on the Lightning Network</a>&quot; by Rene Pickhardt &amp; Stefan Richter and I'm tempted to assume the answer to my question, but I still have some nagging doubts.  So, I'll ask here.</p>
<p>It's clear that setting base fees to zero helps the pathfinding system because base fees don't scale linearly - they're zero when the value transferred is zero, and a fixed non-zero amount when the value transferred is non-zero.</p>
<p>What's not clear is whether setting a minimum HTLC will affect the pathfinding.   Some people have pointed out concerns that with a base fee of zero, the routing fee can be rounded down to zero on small payments.  That'd allow someone to spam a larger payment through as a series of tiny payments at no cost.  Setting a sufficiently sized min HTLC (sufficient for your fee rate so that all routes are at least 1 msat) can avoid this, but obviously at the expense of no longer being able to route arbitrarily small amounts.</p>
<p>My main question is therefore simply: does setting a minimum HTLC value influence the pathfinding in Pickhardt payments at all?</p>
<p>Related question: If yes, in what ways?  Is it scale related?  To get an idea of this: How harmful to the overall system would it be if everyone had small (e.g. 10sat) min HTLC settings?  How about larger (e.g. an unrealistic value like 10000sat)?</p>

CC BY-SA 4.0
2021-07-27T18:23:11.713Z
Hi Ben, thanks for this interesting question. I was wondering in this context whether Pickhardt Payments would be compatible with rounding the fees up. Perhaps that would satisfy both the needs for the routing algorithm but give a semblance of a base fee.
Murch
CC BY-SA 4.0
2021-07-27T18:28:21.127Z
I don't see a problem there, and I think rounding up fees could be an interesting approach anyway.
stefanwouldgo
<lightning-network><lightning-routing><lightning-fees>
What are the implications of min_htlc_size in "Pickhardt Payments" on the Lightning Network?
Ben de Waal
# What are the implications of min_htlc_size in "Pickhardt Payments" on the Lightning Network?

(Asked by: username_0 on 2021-07-27)

I've read the paper "[Optimally Reliable & Cheap Payment Flows on the Lightning Network](https://arxiv.org/pdf/2107.05322.pdf)" by username_3 username_3 & Stefan Richter and I'm tempted to assume the answer to my question, but I still have some nagging doubts. So, I'll ask here.

It's clear that setting base fees to zero helps the pathfinding system because base fees don't scale linearly - they're zero when the value transferred is zero, and a fixed non-zero amount when the value transferred is non-zero.

What's not clear is whether setting a minimum HTLC will affect the pathfinding. Some people have pointed out concerns that with a base fee of zero, the routing fee can be rounded down to zero on small payments. That'd allow someone to spam a larger payment through as a series of tiny payments at no cost. Setting a sufficiently sized min HTLC (sufficient for your fee rate so that all routes are at least 1 msat) can avoid this, but obviously at the expense of no longer being able to route arbitrarily small amounts.

My main question is therefore simply: does setting a minimum HTLC value influence the pathfinding in username_3 payments at all?

Related question: If yes, in what ways? Is it scale related? To get an idea of this: How harmful to the overall system would it be if everyone had small (e.g. 10sat) min HTLC settings? How about larger (e.g. an unrealistic value like 10000sat)?

**Tags:** lightning-network, lightning-routing, lightning-fees

> **Comments:**
> **username_1**: Hi Ben, thanks for this interesting question. I was wondering in this context whether username_3 Payments would be compatible with rounding the fees up. Perhaps that would satisfy both the needs for the routing algorithm but give a semblance of a base fee.  
> **username_2**: I don't see a problem there, and I think rounding up fees could be an interesting approach anyway.  

---

## 1 answers

### Answer by username_2 on 2021-07-27. Score: 3

In theory, it isn't clear to me yet if finding a min-cost flow is any harder when there are minimum flows. In practice, it's not at all a problem as long as the min HTLC size is small. That's because we calculate the optimum flows with a global minimum flow size (resolution) anyway, and typical values for that are 10k-100ksat. At the moment, the maximum observed min-HTLC-size in the network is 50ksat, and even that isn't a problem. For smaller sizes, the optimal flow will always be a single path anyway.

With regards to effects on the network, that's more speculative, but obviously, if everybody used min-HTLC-size, very small payments wouldn't work anymore.

> **Comments:**
> **username_3**: Note: The resolution that we use finds a flow that is slightly away from the optimal solution. This was sufficient to deliver 0.3679 BTC on mainnet. In edge cases the actual liquidity on the network might be distributed in a way such that the used resolution (stepsize) might prevent us from finding all of the existing liquidity. Imagine 2 channels: The first one has a liquidity of 517k sats the other one has a liquidity of 415k sats. With a step size of 10k sats we could find a flow that delivers 920k sats but we wouldn't be able to find the flow for 932k sats even though it clearly exists.  

---

