Skip to content

Script to make your LND node pefectly balanced as all things should be

License

Notifications You must be signed in to change notification settings

pickywicky/perfectly-balanced

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 

Repository files navigation

Perfectly Balanced ⚖️

image

Script to make your LND node pefectly balanced as all things should be. Inspired by Igniter, rebalance-lnd and Balance Of Satoshi

Requirements:

Almost all included by default in most linux distros:

  • bash
  • python3
  • pip
  • bc
  • wget
  • unzip

Make sure your LND path is located or linked to $HOME/.lnd

Usage

Not need to edit anything, just run it! 🚀

Usage: ./perfectlybalanced.sh {-v|-h|-m=VALUE|-t=VALUE|list|rebalance}

Optional:
        -v, --version
                Shows the version for this script

        -h, --help
                Shows this help

        -i=CHANNEL_ID, --ignore=CHANNEL_ID
                Ignores a specific channel id useful only if passed before 'list' or 'rebalance'
                It can be used many times and should match a number of 18 digits

        -m=MAX_FEE, --max-fee=MAX_FEE
                (Default: 50) Changes max fees useful only if passed before 'list' or 'rebalance'

        -t=TOLERANCE, --tolerance=TOLERANCE
                (Default: 0.95) Changes tolerance useful only if passed before 'rebalance'

list:
        Shows a list of all channels in compacted mode using 'rebalance.py -c -l'
        for example to: './perfectlybalanced.sh --tolerance=0.99 list'

rebalance:
        Tries to rebalance unbalanced channels with default max fee of 50 and tolerance 0.95
        for example to: './perfectlybalanced.sh --max-fee=10 --tolerance=0.98 rebalance'

Examples

List all channels within tolerance 0.92:

./perfectlybalanced.sh --tolerance=0.92 list

or

./perfectlybalanced.sh -t=0.92 list

Default list within tolerance 0.95:

./perfectlybalanced.sh list

Unbalanced channels being rebalanced max fee 10 sats and tolerance 0.97:

./perfectlybalanced.sh --max-fee=10 --tolerance=0.97 rebalance

or

./perfectlybalanced.sh -m=10 -t=0.97 rebalance

Default max fee 50 sats and tolerance 0.95:

./perfectlybalanced.sh rebalance

Rebalance with max fee 10 sats and tolerance 0.98, ignoring channel id '761128128258703361':

./perfectlybalanced.sh --ignore=761128128258703361 -t=0.98 -m=10 rebalance

image

Contribute

Feel free to collaborate with code or donate a few Satoshi using your LND node ⚡ 😄

lncli sendpayment --keysend 03e7299ced214b19b87ed87979462d9aee3ec07a42fe6e2211854bfa4cb32b0bb8 100 # sats

About

Script to make your LND node pefectly balanced as all things should be

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages