Open wamde opened 5 years ago
A cron job might be easier to do
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.
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.
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).
@wamde maybe this helps: https://github.com/C-Otto/rebalance-lnd/issues/184
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)