C-Otto / rebalance-lnd

A script that can be used to balance lightning channels of a lnd node
MIT License
343 stars 82 forks source link

Daemon mode #5

Open wamde opened 5 years ago

wamde commented 5 years ago

Add a daemon mode where the tool auto rebalances every x hours or whenever an imbalance worth correcting presents itself (what this exactly means TBD)

C-Otto commented 5 years ago

A cron job might be easier to do

wamde commented 5 years ago

Definitely easier at first, but a built in daemon mode could provide more reactivity. Worth looking into anyway I think, if not just now then a tad later.

ZapUser77 commented 5 years ago

A time based auto-rebalance will be insufficient for even small hubs. Large hubs will likely see 1000's of transactions per second... small hubs will probably see 1-10 per second.
Is there a way to be more interactive with LND? Ideally, whenever channel balance changes, it needs to trigger a "Is this still balanced" and "If not, then rebalance".
I've never worked with RPC nor Python, so I have no idea what is/is not possible.

wamde commented 5 years ago

Yes, scheduled rebalance won't cut it long term when the network matures. My node is nowhere near that though, but yours may be since you operate a big node. Would you mind sharing stats on tx/s you process, frequency of rebalancing etc? We can then look into using triggers to make that more reactive, but that is like P2, we need a manually triggered auto mode first I reckon (and that is #4 for now).

xanoni commented 2 years ago

@wamde maybe this helps: https://github.com/C-Otto/rebalance-lnd/issues/184