Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Avoid channels below fee #62

Open
dekdynamics opened this issue Jan 5, 2024 · 3 comments
Open

Feature request: Avoid channels below fee #62

dekdynamics opened this issue Jan 5, 2024 · 3 comments

Comments

@dekdynamics
Copy link

Hello,

Is it possible to add a flag called --exclude-below-fee that takes an argument in msat?

Usage:

--exclude-below-fee 1000

Using this flag and value would cause regolancer to avoid any channel with a fee lower than 1000 msat.

The problem that this aims to solve is that there are many channels charging very low fees that also have no available liquidity. There is a lot of time spent trying these routes, and the likelihood of success is very low in my experience.

This is an enhancement request that I think will prove to be useful.

Thanks,
The Wall

@rkfg
Copy link
Owner

rkfg commented Jan 7, 2024

Fees are expressed as base_fee (in msat) + fee_ppm (multiplied by the payment amount), I'm not sure which one you're referring to. I'm also not sure why you need to exclude those channels by the fee if the problem is the lack of liquidity. In this case you can use --pfrom to limit the minimum local balance available on your side, and by default channels with less than 50% liquidity are excluded.

@dekdynamics
Copy link
Author

dekdynamics commented Jan 8, 2024

Hi @rkfg - for this enhancement, I am talking about channels in pathfinding. To accomplish what I explained in the original post, I think regolancer would have to get routes from mission control, and then do an additional check (maybe to an exported graph.json) to detect if any of the edges have less than the specified min fee. Then regolancer would not try that route.

@rkfg
Copy link
Owner

rkfg commented Jan 8, 2024

MC is only populated after an attempt, not before. I don't think it's a good idea, channels can have zero fee for several reasons. For example, on my node I set it for the channels where liquidity is almost always on my side, exactly to incentivize using them. The goal of the program is to snipe cheap liquidity and pull it to you so excluding cheap channels works against the goal kinda. I understand it'd require more tries but you can quickly skip empty channels if you set your amount to something low (like 100 sats) and allow rapid rebalance.

Effectively, what you're proposing isn't possible without loading the full graph first, then filtering the edges for min fee (btw you didn't explain what that min fee means exactly since it's calculated for every amount), then populating a huge exclude list for path finding. Exporting the graph usually takes a lot of time so it probably needs to be cached anyway. And in this case you can write an external script that does all that and adds the edges you don't like to the config.

However, as I understand it, it's not a channel problem but rather a node problem. Nodes with too much inbound liquidity usually have low inbound fees and vice versa. So maybe it's more effective to find such imbalanced nodes and simply populate your node exclusion list?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants