Author

Topic: Lightning Channel Closing Fee Range Issue (Read 78 times)

jr. member
Activity: 38
Merit: 3
May 29, 2023, 03:18:09 AM
#2
     fee ranges is usually in msat/kw rather than sat/vByte, I guess that's why your fee range argument didn't work as expected. in your command, you provided a fee range of 45,50 thinking it was in sat/vbyte. however, the lightning network uses a fee rate in msat/kw. so the range you specified was interpreted as 45msat/kw, 50msat/kw.

Quote
Here is the output from lightning-cli:
# Sending closing fee offer 171sat, with range 171sat-171sat

The output from lightning-cli indicated that it received your closing fee offer as 171 satoshis and interpreted your fee range as 171 msat/kw to 171 msat/kw and  this resulted in the warning message stating that the closing fee range must not be below 2683 satoshis.

Quote
seemed stuck there, then I restarted lightningd and I saw this:
 performing quickclose in range 1697sat-7564sat
 State changed from CLOSINGD_SIGEXCHANGE to CLOSINGD_COMPLETE

When you restarted lightning-cli  it performed a quick close with a fee range of 1697 satoshis to 7564 satoshis and the resulting fee rate off 20.98 sat/vByte was just insufficient.

Quote
what happened exactly and how should I specify the fee rate in the future to avoid this?

You can convert between sat/vByte and msat/kw using the formula
Code:
msat/kw = (sat/vByte * 1000) / (weight / 1000)
just make sure to specify the fee range in the correct unit, which is msat/kw and by doing this you should be able to close the channel with the desired fee range
member
Activity: 74
Merit: 21
Hi,

I tried closing a channel using the fee-range feature to set a fee range that makes sense, but the fee range argument is not well documented and I must have passed it using wrong units, resulting in a stuck transaction. I need to close another channel so I need to figure this out. Could someone help me?

Here is what I used. I thought I was specifying a fee rate argument in sat/vByte for the closing tx:
lightning-cli close (channel_ID) 345600 (output_address) null null null '[45,50]'

Here is the output from lightning-cli:
# Sending closing fee offer 171sat, with range 171sat-171sat

Here is what I saw in the logs:
State changed from CHANNELD_NORMAL to CHANNELD_SHUTTING_DOWN
State changed from CHANNELD_SHUTTING_DOWN to CLOSINGD_SIGEXCHANGE
Our ideal fee is 3395sat (5023 sats/perkw), but our maximum is 171sat: using that
Peer transient failure in CLOSINGD_SIGEXCHANGE: closingd WARNING: warning channel (channel hex id): closing fee range must not be below 2683 sat

It seemed stuck there, then I restarted lightningd and I saw this:
 performing quickclose in range 1697sat-7564sat
 State changed from CLOSINGD_SIGEXCHANGE to CLOSINGD_COMPLETE

And the tx was submitted to the mempool with an insufficient fee rate of 20.98 sat/vByte and a total fee of 0.00003544BTC.

So what happened exactly and how should I specify the fee rate in the future to avoid this?

Thanks!
Jump to: