bitkit icon indicating copy to clipboard operation
bitkit copied to clipboard

[Bug]: Can't open second LN channel

Open limpbrains opened this issue 2 years ago • 7 comments

Describe the bug

Custom LN setup is broken. I have 300 USD confirmed onchain balance, but I get "Unable to increase the fee any further. Otherwise, it will exceed half the current sending/output amount." notification

Reproduce

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Screenshots / Recording

No response

Operating system

iOS

Bitkit version

Current master

Log output

No response

limpbrains avatar Feb 02 '24 12:02 limpbrains

This is something that will happen when the on-chain transaction fee required by Blocktank is 50% or greater than the cost for the channel open sent to Blocktank.

This is tricky. If we wanted to handle this in Bitkit we would need to spam the api to find the lowest channel cost that is greater than 50% of the fee. We could also move the fee safety check up to 80% or 100%, but that makes me feel uncomfortable. If we wanted to handle this on Blocktank's side, Blocktank will only create channel orders where the on-chain transaction fee will never exceed the channel cost by 50%.

coreyphillips avatar Feb 02 '24 17:02 coreyphillips

Actually, we don't have to spam the api anymore. We can call getInfo and set the result of min0ConfTxFee plus a few sats as the minimum client side balance.

coreyphillips avatar Feb 02 '24 17:02 coreyphillips

I think we should disable this warning for amounts smaller than 10 USD or even at all. What we can do is show additional warning on confirmation screen.

limpbrains avatar Feb 02 '24 23:02 limpbrains

And I had this error on regtest, with 1 sat/vbyte fees.

limpbrains avatar Feb 02 '24 23:02 limpbrains

Unfortunately, the issue isn't limited to Bitkit/Beignet so disabling the warning or bypassing the check will not fully resolve it. Many Electrum servers with defaults set will also refuse to create and/or broadcast transactions with similarly high fee to output ratios. We could implement a minimum client balance amount when creating a channel that helps ensure the user will always send more than 50% of the transaction to Blocktank than fees.

coreyphillips avatar Feb 05 '24 13:02 coreyphillips

I also having this issue when doing basic, not BT ochain transaction. I'm trying to send 547 sats on regtest. I errors in logs

 LOG  [Error: New total amount exceeds the available balance. Unable to update the transaction fee.]
 LOG  New total amount exceeds the available balance. Unable to update the transaction fee.
 LOG  [Error: New total amount exceeds the available balance. Unable to update the transaction fee.]
 LOG  [Error: Unable to increase the fee any further. Otherwise, it will exceed half the current sending/output amount.]
 LOG  Unable to increase the fee any further. Otherwise, it will exceed half the current sending/output amount.
 LOG  [Error: Unable to increase the fee any further. Otherwise, it will exceed half the current sending/output amount.]

Also it doesn't show me fee estimate

image

limpbrains avatar Feb 09 '24 16:02 limpbrains

Enable to reproduce this issue on my side wit Beignet.

JeanlChristophe avatar Feb 12 '24 08:02 JeanlChristophe