Author

Topic: Lightning network force close (Read 105 times)

hero member
Activity: 714
Merit: 1010
Crypto Swap Exchange
July 02, 2023, 05:20:39 AM
#8
The OP stated that his LN node acted as a routing node for a transaction that apparently someone else has initiated. This can only work if the routing node has two channels at minimum, one incomming and one outgoing from perspective of routing a transaction. When 5k sats are moved through your routing node, you receive 5k plus some routing fees in one channel and you send 5k sats further to the destination node or some next routing node on the path to the destination node (incl. some additional transfer fees possibly required in case it's another routing node).

Yes, if you force close that particular channel, you don't get the 5k sat that are on the remote side of the channel. But you got 5k sat (plus possibly some routing sats) on the local side of your other incomming channel.
hero member
Activity: 1274
Merit: 681
I rather die on my feet than to live on my knees
July 02, 2023, 05:05:36 AM
#7
I think what the OP is asking is after he sent 5k sats to the other peer and if he force-close this channel, if he will also get back the 5k sats he sent to the other peer. If this is the case, no, because you sent them to the other peer, so they are owned by the other peer. If this was just for testing purposes, the only way is to ask the other peer to send them back to you and then you can close the channel. But in that case, you wouldn't either be in a non-responsive situation with the other peer, I guess.
newbie
Activity: 3
Merit: 0
July 01, 2023, 09:34:26 PM
#6
Thanks for response  Smiley It's just a simplified example! As you said, the balance is not that small.

Don't you think it is better to give more reasonable values as an example instead of the 10k sats you mentioned? It can be misleading as pointed out in some of the answers. If you're making up the numbers then why not choose a value in a more useful size range than a ridiculous small 10k channel. When I read your initial post my first thought was, who opens such a small channel and why did your channel partner accepted that?

thanks for your advice !
hero member
Activity: 714
Merit: 1010
Crypto Swap Exchange
July 01, 2023, 05:56:12 PM
#5
Thanks for response  Smiley It's just a simplified example! As you said, the balance is not that small.

Don't you think it is better to give more reasonable values as an example instead of the 10k sats you mentioned? It can be misleading as pointed out in some of the answers. If you're making up the numbers then why not choose a value in a more useful size range than a ridiculous small 10k channel. When I read your initial post my first thought was, who opens such a small channel and why did your channel partner accepted that?
newbie
Activity: 3
Merit: 0
July 01, 2023, 12:02:10 PM
#4
How did you manage to open such a small channel? If I remember correctly, the default minimum value is 20,000 sats in c-lightning. I suppose the other node operator is some familiar of yours and you're doing tests?

Currently, if your local balance is 5000 sats, and you want to withdraw that on-chain, you're most likely going to lose half in fees, and all that to create a near dust UTXO (~2500 sats). Note that the force-closing transaction is already signed, and the fee depends on how congested the mempool was when you did a commitment transaction last time.

Thanks for response  Smiley It's just a simplified example! As you said, the balance is not that small.
And I ve realized that even if my balance is retrieved from my channel for a routing purpose, then I will get back the retrieved balance from another channel.
legendary
Activity: 2618
Merit: 6452
Self-proclaimed Genius
July 01, 2023, 11:26:48 AM
#3
I opened a channel with 10000 sats to node A.
My node has run as a router node so I sent 5000 sats to node A.
-snip-
When I close the channel by force, will I get back the total balance?
If not, do I have to communicate with the node operator and tell them to give me back the rest of sats?
What is the name of the lightning wallet that you've used?
Because based from the information provided, it looks like some feature of a custodial lightning wallet.

If we're talking about the standard lightning implementation,
force-closing it with 5000 sat local balance will result with 5000sat on-chain fund minus the fee, you'll loose the remote balance since it's the other party's funds.
Broadcasting an old state when the local balance is 10000sat is dangerous since it could lead to a penalty of losing all of your balance.
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
July 01, 2023, 10:26:05 AM
#2
How did you manage to open such a small channel? If I remember correctly, the default minimum value is 20,000 sats in c-lightning. I suppose the other node operator is some familiar of yours and you're doing tests?

Currently, if your local balance is 5000 sats, and you want to withdraw that on-chain, you're most likely going to lose half in fees, and all that to create a near dust UTXO (~2500 sats). Note that the force-closing transaction is already signed, and the fee depends on how congested the mempool was when you did a commitment transaction last time.
newbie
Activity: 3
Merit: 0
July 01, 2023, 08:25:46 AM
#1
Hi, lightning node operators

I opened a channel with 10000 sats to node A.
My node has run as a router node so I sent 5000 sats to node A.
Therefore, the current local and remote balance is 5000 sats respectively.
When the node A is offline for a few months so I want to close the channel.
In fact, as I opened the channel only with my balance - 10000 sats, I want to give them all back.
When I close the channel by force, will I get back the total balance?
If not, do I have to communicate with the node operator and tell them to give me back the rest of sats?

Thanks
Jump to: