Balancing channels

From lightningwiki.net
Revision as of 06:17, 19 October 2020 by MiltonPusser (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

A channel always has two sides. A local and a remote side. It could be someone opened a channel TO you. That would mean from your perspective there is 0 local balance, and all the balance is remote. That remote balance is the amount the channel was opened with, paid by the peer. This channel can now be used to pay TO you. Because there is remote balance. Now, if you have local balance, this channel could also be used to pay FROM your node TO the peer. (re)Balancing a channel levels the local and remote balance.

Having more balanced channels will help routing payments which will earn you more fees.

Script

  • In newer versions (LND) you can do:
    read -p source-channel-with-local-balance:\  source; read -p peer-pubkey:\  peer; read -p sats: sats; lncli addinvoice --amt $sats; read -p invoice:\  invoice; lncli payinvoice --allow_self_payment --outgoing_chan_id $source --last_hop $peer $invoice
  • Bash script: [1]
  • There is a script to rebalance a LND channel: Rebalance-lnd
  • Testnet currently: lntoolkit
  • lndmanage (tool for advanced lnd node administration): https://github.com/bitromortac/lndmanage