itsneski / lightning-jet

Lightning Jet is a fully automated rebalancer for Lightning nodes. Jet optimizes channel liquidity allocation based on routing volume, missed routing opportunities (htlcs), and other variables.
MIT License
44 stars 11 forks source link

Changing fees 'jet update-channel' #72

Open maxrantil opened 2 years ago

maxrantil commented 2 years ago

I just had a little problem when changing the channel fees, wanted to change the basefee on all my channels so I did that, 'jet update-channel xxxx --base xxxx', thought only the basefee would change - but the ppm got 0'ed on all channels. My point is, wouldn't it be better if only the basefee would changed and the old ppm would stay the same? I thought it would be more intuitive that way. I heard it's the same when changing --ppm and not --base. But now I know from my mistake :) just some friendly feedback 🙌

itsneski commented 2 years ago

jet calls the lnd api to update channel fees; the call is supposed to keep ppm intact, but it doesn't. The same issue is when setting ppm, it resets the base fee.

one option is for jet to loop through all the channels and set fees individually based on the channel's current base and ppm.

itsneski commented 2 years ago

i think it makes sense to add an explicit option to change fees on all channels, as in `jet update-channel --all --base 10' to update the base fee to 10 msat on all channels.

maxrantil commented 2 years ago

That sounds like a perfect solution to me!