[Lightning-dev] Refilling a channel by sending a payment to yourself.

ZmnSCPxj ZmnSCPxj at protonmail.com
Thu Dec 21 06:12:37 UTC 2017


Good morning Lukehanson,

That is correct.  Indeed this "pay yourself" technique is a useful way to rebalance funds.  The main advantage is that it would work without modification of the protocol.

However, to my knowledge, no node software currently actually implements this technique of transferring your own funds between your own channels.

Note that this can work as a "almost-good-enough" solution to splice-in (i.e. adding more funds to an existing channel).  Rather than splice-in, simply create a new channel to another node, then route a payment from the new channel to the current channel you have.  Splice-in is still strictly more efficient, but requires new specs and new node software that is capable of coordinating with your own.

Regards,
ZmnSCPxj

Sent with [ProtonMail](https://protonmail.com) Secure Email.

> -------- Original Message --------
> Subject: [Lightning-dev] Refilling a channel by sending a payment to yourself.
> Local Time: December 21, 2017 12:01 AM
> UTC Time: December 20, 2017 4:01 PM
> From: lightning-dev at lists.linuxfoundation.org
> To: lightning-dev <lightning-dev at lists.linuxfoundation.org>
>
> New to LN, so forgive me if this is already implemented/planned to be.
>
> I’ve been trying out LN on testnet, treating it as if it was mainnet, as in how I would open channels, to whom and what amount.
>
> One main problem is that a channel gets exhausted. I could have created a larger channel in the first place but channels are meant to last for days, even months, no? So its hard to predict that amount beforehand.
>
> A = me
> B = say yalls.org
> C = some common channel
> A exhausts his channel with B - all balance are with B.
> A could open another channel with B but this would be costly.
> A could pay B through C now, but as most transactions are micro(few cents) and A pays B for hundreds of articles per month, the base fee would pile up (as LN fees = base fee + proportional fee).
> Balance before : https://imgur.com/a/L2JFA
>
> A - B (0,5)
> A - C (10, 8)
> C - B (10,10)
> A pays self : He sends 5mBTC to C, who sends it to B, who sends it back to A.
> Balance now : https://imgur.com/a/moNXY A - C(5,13)
> C - B(5,15)
> A - B(5,0)
> So, A does a one time refill of A-B channel with the help of C. The proportional fee would be same if A sent through C every time or did a one time refill, but A in this case pays base fee only once to C.
> I expect base fee to be around 1-2 cents by B, so this plot says the “refill method” could save a couple of dollars.
> Fees saved, for various base fees and subsequent articles read- https://imgur.com/a/FAu31 (gotta use the free campus matlab license for something).
> Is doing this the same as using the -r tag in payment invoice? (Bolt #11) In UI terms, a “refill” button could be near a channel name. Luke Hanson
> lukehanson at protonmail.com 
> Gradatim Ferociter!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20171221/51930025/attachment.html>


More information about the Lightning-dev mailing list