From 94774c6ad22916026b7183736960abe2f33e3142 Mon Sep 17 00:00:00 2001 From: SomberNight Date: Sun, 4 Apr 2021 19:53:10 +0200 Subject: [PATCH] lnutil: add rationale for MIN_FUNDING_SAT related: https://github.com/spesmilo/electrum/issues/7169#issuecomment-812800652 --- electrum/lnutil.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/electrum/lnutil.py b/electrum/lnutil.py index df601e562..460ca708a 100644 --- a/electrum/lnutil.py +++ b/electrum/lnutil.py @@ -309,6 +309,12 @@ REDEEM_AFTER_DOUBLE_SPENT_DELAY = 30 CHANNEL_OPENING_TIMEOUT = 24*60*60 +# Small capacity channels are problematic for many reasons. As the onchain fees start to become +# significant compared to the capacity, things start to break down. e.g. the counterparty +# force-closing the channel costs much of the funds in the channel. +# Closing a channel uses ~200 vbytes onchain, feerates could spike to 100 sat/vbyte or even higher; +# that in itself is already 20_000 sats. This mining fee is reserved and cannot be used for payments. +# The value below is chosen arbitrarily to be one order of magnitude higher than that. MIN_FUNDING_SAT = 200_000 ##### CLTV-expiry-delta-related values