r/lightningnetwork • • Jan 16 '24

Should I force close channels with peers that are offline for too long?

A certain peer in my list of channels is offline for weeks already. I heard that there is a risk of loosing our funds if both nodes of a channel go offline at the same time because it is difficult to recover access to that channel and send the closing transaction to the mempool.

So, should I force close this channel now? Or is it safe to keep waiting for that peer to go online, even if it might take months to do so?
Due to how stuffed the mempool is lately, the force close might take months to process anyway.

9 Upvotes

19 comments sorted by

View all comments

3

u/null-count Jan 16 '24 edited Jan 16 '24

The risk of loss happens in the event that you also lose access to your node. Normally, you could recover funds with a SCB, however, if the peer is offline when you deploy the SCB, they will not be able to respond so that channel is basically burned unless the peer comes back and you re-deploy the SCB or they initiate a force close.

If you're pretty confident that the peer won't come back online (and they don't have watchtower) you could try to cheat them when you force close by publishing a previous channel commitment where you had more funds on your side.

Also, the one who opened the channel pays the fee to close it. So if they opened it, you have less to lose by force closing

3

u/[deleted] Jan 16 '24

[removed] — view removed comment

2

u/null-count Jan 16 '24

Yes it's impossible to know for sure. But depending on the situation, OP could make a calculated risk here. Maybe OP only has 1% of channel funds owed to him. They could take a risk losing 1% to get 100% if there exists a previous commitment where OP had 100% of funds.

You can use this tool to cherrypick and broadcast old commitments: https://github.com/TonyGiorgio/LNsploit

3

u/G0DL33 Jan 18 '24

Jesus... how is a normie like me meant to use LN?

2

u/Boriz0 Jan 16 '24

lose access to your node

What does this mean? Because my node can theoretically break at any moment due to some kind of random hardware failure. I would still have the backup seed and theoretically even the channel backups though, but it would take some time to rebuild the node on a new hardware.

Also, I have no interest in trying to cheat. Besides, the peer could fake their offline state for this reason to punish me for cheating.

Also, what's SCB, and why do I need the peer to be online to successfully deploy that? I thought that force closing a channel would be a 100% sure way to get funds back on-chain, as long as there is at least 1 peer online executing it.

5

u/null-count Jan 16 '24 edited Jan 16 '24

Yes there is always possibility for unforseen disaster to cause your node to go offline with the inability to bring it back online safely.

This is what the SCB (static channel backup) is for. Its a file that changes every time you open or close a channel. It is encrypted with your seed phrase. When you deploy the latest SCB, it sends a request to each channel peer. Upon receiving the request, the peer will instantly and automatically initiate a force close.

Its a way to recover funds if your node is corrupted. But it depends on your peers being online.

If you run Umbrel, it will automatically backup your SCB in umbrel's cloud servers. When you restore an umbrel node with seed phrase, you will be given the option to restore from a cloud saved SCB.

If you run LN in some other way, you may be responsible for backing up your SCB. If you deploy an outdated SCB, it will only attempt to recover the channels that were included in that SCB.

https://docs.lightning.engineering/lightning-network-tools/lnd/disaster-recovery

1

u/Correct-Respect2425 Jan 19 '24

Alternative to force closing zombies right away is cloning your channel.db (ie during reboots). If your node crashes, you can use scb to get funds from active channels (minus stucked htlcs for which you lost the preimage) and then use lnd or chantools to broadcast local force closure of your zombies using previously cloned channel.db. For zombies it doesn't matter if you don't have latest db, because zombie was never updated, so no risk of penalty closure (unless you try to cheat deliberately)..

3

u/Miadas20 Jan 17 '24

The future of finance

1

u/brianddk Jan 17 '24

Also, the one who opened the channel pays the fee to close it

Do any LN wallets allow the opener to adjust the fee-rate on force-close? I know it's risky to force-close if the reserve was negotiated in October when fees were low.