Skip to content

Instantly share code, notes, and snippets.

@zerofeerouting
Last active June 13, 2024 11:12
Show Gist options
  • Save zerofeerouting/48082266eb05a183c8eeb22b3d9f983d to your computer and use it in GitHub Desktop.
Save zerofeerouting/48082266eb05a183c8eeb22b3d9f983d to your computer and use it in GitHub Desktop.
my charge-lnd config file
[default]
strategy = static
base_fee_msat = 0
fee_ppm = 0
max_htlc_msat_ratio = 1
[private]
# the channel is private - i assume you're not a routing node
# I will not limit the transaction size
chan.private = true
max_htlc_msat_ratio = 1
strategy = static
base_fee_msat = 0
fee_ppm = 0
[public-lt-10k]
# there is basically *no* liquidity on my end.
# Maximum size of 1 sat per transaction allowed
chan.max_local_balance = 10_000
max_htlc_msat = 1_000
strategy = static
base_fee_msat = 0
fee_ppm = 0
[public-lt-100k]
# there is less than 100K sats on my end.
# Maximum size of 2.500 sat per transaction allowed
chan.min_local_balance = 10_000
chan.max_local_balance = 100_000
max_htlc_msat = 2_500_000
strategy = static
base_fee_msat = 0
fee_ppm = 0
[public-lt-200k]
# there is less than 200K sats on my end.
# Maximum size of 25.000 sat per transaction allowed
chan.min_local_balance = 100_000
chan.max_local_balance = 200_000
max_htlc_msat = 25_000_000
strategy = static
base_fee_msat = 0
fee_ppm = 0
[public-lt-400k]
# there is less than 400K sats on my end.
# Maximum size of 50.000 sat per transaction allowed
chan.min_local_balance = 200_000
chan.max_local_balance = 400_000
max_htlc_msat = 50_000_000
strategy = static
base_fee_msat = 0
fee_ppm = 0
[public-lt-800k]
# there is less than 800K sats on my end.
# Maximum size of 100.000 sat per transaction allowed
chan.min_local_balance = 400_000
chan.max_local_balance = 800_000
max_htlc_msat = 100_000_000
strategy = static
base_fee_msat = 0
fee_ppm = 0
[public-lt-1600k]
# there is less than 1.6M sats on my end.
# Maximum size of 800K sat per transaction allowed
chan.min_local_balance = 800_000
chan.max_local_balance = 1_600_000
max_htlc_msat = 400_000_000
strategy = static
base_fee_msat = 0
fee_ppm = 0
[public-lt-3200k]
# there is less than 3.2M sats on my end.
# Maximum size of 1.6M sat per transaction allowed
chan.min_local_balance = 1_600_000
chan.max_local_balance = 3_200_000
max_htlc_msat = 1_600_000_000
strategy = static
base_fee_msat = 0
fee_ppm = 0
[public-gt-3200k]
# there is more than 3.2M sats on my end.
# anything goes
chan.min_local_balance = 3_200_000
max_htlc_msat_ratio = 1
strategy = static
base_fee_msat = 0
fee_ppm = 0
@ralf-br
Copy link

ralf-br commented Feb 17, 2022

Thanks for sharing! 2 things I added for myself:

If you define a mydefault block after the default one (without strategy) those settings will be applied to all configs. So no need to repeat the 0/0 Fee part over and over.

[mydefaults]
# no strategy, so this only sets some defaults
base_fee_msat = 0
fee_ppm = 0

Another cool thing is to "block" specific node.id by public key when you don't want traffic before rebalancing when opening a ring of fire.

[high-fee-blockade]
#block specific channels with high fee (opening a ring of fire)
node.id = comma-seperated-public-keys-of-nodes-to-block
strategy = static
base_fee_msat = 10_000_000

And the chan.min_local_balance is redundant in combination with chan.max_local_balance as the first found strategy wins anyways searching top down...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment