Bitcoin Forum
May 03, 2024, 06:50:31 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Lightning network force close  (Read 96 times)
0xdeadpork (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
July 01, 2023, 01:25:46 PM
 #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
Every time a block is mined, a certain amount of BTC (called the subsidy) is created out of thin air and given to the miner. The subsidy halves every four years and will reach 0 in about 130 years.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714762231
Hero Member
*
Offline Offline

Posts: 1714762231

View Profile Personal Message (Offline)

Ignore
1714762231
Reply with quote  #2

1714762231
Report to moderator
1714762231
Hero Member
*
Offline Offline

Posts: 1714762231

View Profile Personal Message (Offline)

Ignore
1714762231
Reply with quote  #2

1714762231
Report to moderator
1714762231
Hero Member
*
Offline Offline

Posts: 1714762231

View Profile Personal Message (Offline)

Ignore
1714762231
Reply with quote  #2

1714762231
Report to moderator
BlackHatCoiner
Legendary
*
Offline Offline

Activity: 1512
Merit: 7342


Farewell, Leo


View Profile
July 01, 2023, 03:26:05 PM
 #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.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
nc50lc
Legendary
*
Offline Offline

Activity: 2408
Merit: 5583


Self-proclaimed Genius


View Profile
July 01, 2023, 04:26:48 PM
 #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.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
0xdeadpork (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
July 01, 2023, 05: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.
Cricktor
Hero Member
*****
Offline Offline

Activity: 756
Merit: 1111


Crypto Swap Exchange


View Profile
July 01, 2023, 10: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?

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
0xdeadpork (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
July 02, 2023, 02:34:26 AM
 #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 !
darkv0rt3x
Hero Member
*****
Offline Offline

Activity: 1204
Merit: 658


I rather die on my feet than to live on my knees


View Profile
July 02, 2023, 10: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.

Bitcoin is energy. Bitcoin is freedom
I rather die on my feet than living on my knees!
Cricktor
Hero Member
*****
Offline Offline

Activity: 756
Merit: 1111


Crypto Swap Exchange


View Profile
July 02, 2023, 10: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.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!