Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: thecodebear on June 04, 2018, 02:26:14 PM



Title: LN question about refunding channels
Post by: thecodebear on June 04, 2018, 02:26:14 PM
Obviously in the LN you can close your channels and then open up a new set of channels with additional funding. But that requires two onchain txs.

You can do it with one tx by either splicing in funds which I guess is not yet available but eventually will be and I'm not sure exactly how it works but it seems to involve the other user in your channel signing off on it as well.

I would think you can also do it by just doing one onchain tx to open up a new channel from your node so now you have one more channel of connectivity to the rest of the network (which is good!) and route the funds evenly over the rest of your node's channels. Is this possible? Can you identify specific channels of a node that you want to send a payment to, so that you can send money to yourself in order to add funds to your channels or even just to rebalance your node's supply of funds in all your channels?

I guess i don't have enough technical details about how LN payments work to know the answer to this. Anyone know?


Title: Re: LN question about refunding channels
Post by: jaybird777 on June 04, 2018, 03:12:02 PM
Yes, a "channel" is really just a multisig lockup between parties. So if you wanted to deposit to your channel(s) with a single on-chain funding TX, you could specify an input with multiple destination outputs, just like in any normal BTC transaction.

With that in mind, as liquidity grows, the need to spread money across numerous channels should theoretically decrease. Multi-hop transfers are a way in which two people can pay each other w/out needing an existing channel open. If Bob wants to pay Alice w/out opening a channel with her, and they both have a mutual channel with Steve, they can still route the transaction with full guarantee of trustless settlement. This works by Bob paying Steve, who in turn pays Alice. If the relationships between participants are extremely isolated, you can keep introducing more intermediaries to form a lineage robust enough to facilitate payments.


Title: Re: LN question about refunding channels
Post by: thecodebear on June 04, 2018, 06:05:23 PM
Yes, a "channel" is really just a multisig lockup between parties. So if you wanted to deposit to your channel(s) with a single on-chain funding TX, you could specify an input with multiple destination outputs, just like in any normal BTC transaction.

With that in mind, as liquidity grows, the need to spread money across numerous channels should theoretically decrease. Multi-hop transfers are a way in which two people can pay each other w/out needing an existing channel open. If Bob wants to pay Alice w/out opening a channel with her, and they both have a mutual channel with Steve, they can still route the transaction with full guarantee of trustless settlement. This works by Bob paying Steve, who in turn pays Alice. If the relationships between participants are extremely isolated, you can keep introducing more intermediaries to form a lineage robust enough to facilitate payments.

Yeah I understand how multi-hop routing payments works. I just wasn't sure about I guess what channels actually are and how you could specify a channel instead of just a node. But yeah i think your first paragraph makes sense to me now. Thanks!


Title: Re: LN question about refunding channels
Post by: fmirg21 on June 07, 2018, 10:24:45 AM
I think refunding channels is not available. One thing that is going to be available in LND, or at least I think someone asked for it, if Alice endpoint channel to pay Bob is empty, you can pay through all your other channels using a "mean" amount for each one.