It has been five days since the mass closure of channels based on the principle that if there were no payments, neither outgoing nor incoming, in a channel within the last 14 days, I would close that channel.

I accomplished this by retrieving the ForwardingHistory list from the LND server, which returns a structure from which you can determine the channel to which a payment was sent and from which it was received. We take these fields and the timestamp available in the same returned structure and create our own virtual structure with lists of channels, the time of the last payment, and a counter of how many payments occurred over the past set number of days within that time window.

Experience has shown that despite closing approximately one-sixth of the channels by capacity, the number and amounts of daily transactions did not decrease—in fact, they may have even slightly increased. However, I believe this could simply be due to daily fluctuations. As a result, I am satisfied with the channel closures; the focus has shifted from quantity to quality.

nostr:nevent1qqsyazwagh5c2zmppz6g0gj5pjv3jmw24wtdg8euhsamqawq4s8rwsgpz4mhxue69uhkummnw3ezummcw3ezuer9wchsygy68xlcxlyx34s7mrxwdfx85r4eda09hnqg9tt2lh25jm9kzj3rlvpsgqqqqqqs6d8v9n

nostr:nevent1qqsgnysgsu6p4gzekmq9rnsa6ry9cvy9p7jmeg6yh2dexgengyyghhspz4mhxue69uhkummnw3ezummcw3ezuer9wchsygy68xlcxlyx34s7mrxwdfx85r4eda09hnqg9tt2lh25jm9kzj3rlvpsgqqqqqqsrws7ay

Reply to this note

Please Login to reply.

Discussion

Great post agreed 💪

I would add one exception to this clean-up: channels with all funds on their side. This does not lock up your capital and since probably they opened the channel, your risk and cost is almost zero. Think of the plebs that open their one or two channels until they find an excuse to spend.

Thank you, that's a good point. I hadn't taken that into account.

I just remembered that when closing a channel, I verify that the local balance or the remote balance isn't below a certain dust limit, roughly 600 satoshis. I think the situation you described falls under this exception. I'll review the code later, but I believe such channels aren't being closed on my end. Also, channels with active pending HTLCs don't get closed either.