bitkit icon indicating copy to clipboard operation
bitkit copied to clipboard

Fee estimation in Bitkit is incorrect (we are potentially overpaying x3 the current market rate)

Open thisispav opened this issue 4 months ago • 4 comments

Describe the bug

when we try and send funds (20,000 sats) to each other via contact payment feature - we get either $0.14 to $0.18 cents potentially overpaying up to x3 ($11 or 18,000) the current market rate (currently below $6) - please see video below.

JC and Pav experience this issue.

Reproduce

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

Screenshots / Recording

fee estimation currently in mempool

https://github.com/synonymdev/bitkit/assets/119061223/4b5f2950-1e28-458e-b13f-a1f905ebf150

Operating system

Graphene OS Pixel 6A

Bitkit version

v114

Log output

No response

thisispav avatar Apr 19 '24 09:04 thisispav

I overpaid x3 when closing a channel https://mempool.space/tx/808520f7ecf2ccd9d46c3d0011fcd04eea6aaa691592cc4752cf0619ce9ffb34

JeanlChristophe avatar Apr 19 '24 09:04 JeanlChristophe

we get either $0.14 to $0.18 cents

This issue is separate and covered by https://github.com/synonymdev/bitkit/issues/1619

catch-21 avatar Apr 19 '24 09:04 catch-21

I try and send 20k sats back to JC - current fee rate is around 47 sats / vbyte, I tried setting up a custom amount of 50 sats /vbyte but instead of $4.40 I get almsot $13 bucks (20k sats or so)

https://github.com/synonymdev/bitkit/assets/119061223/72756fce-44ed-423f-bde5-21676b5301e8

thisispav avatar Apr 19 '24 09:04 thisispav

Same for boosting a transaction, the fee estimation is wrong.

Image

JeanlChristophe avatar Apr 19 '24 11:04 JeanlChristophe

Pav and I just experienced BT overpaying by x8 for closing LN channel. We are both using V115 https://github.com/synonymdev/bitkit/commit/9ff423802faacd24a2e5f8fac7e31edd381c5ba6.

Screenshot 2024-04-26 at 15 54 00 Screenshot 2024-04-26 at 15 54 31

catch-21 avatar Apr 26 '24 14:04 catch-21

Can you please check and relay what your fee estimates are in Settings?

coreyphillips avatar Apr 26 '24 15:04 coreyphillips

@coreyphillips my Default Transaction Speed is set to Normal. The values in "Override Fees" are: Minimum 6 Slow 33 Normal 37 Fast 41 Override is disabled.

catch-21 avatar Apr 26 '24 15:04 catch-21

Thanks! That looks about right. I'm going to look into how we pass these fees off to LDK to ensure we're doing it correctly. It is possible that LDK determines this regardless of what we provide. If that's the case we'll need to look into if there's a way to override that behavior in order to bring these channel close fees down.

coreyphillips avatar Apr 26 '24 16:04 coreyphillips

@Jasonvdb, think we could be overpaying due to this setting? If I remember correctly, don't we have that one configured quite a bit higher to ensure it doesn't cause a force close?

coreyphillips avatar Apr 26 '24 18:04 coreyphillips

@coreyphillips no that setting is for regular channels which we don't use anymore. The setting below is for the anchor channels. Maybe the tx there is the sweeping which is the fast fee that might have been briefly very high?

Jasonvdb avatar Apr 27 '24 02:04 Jasonvdb

Why should the client be allowed to determine the price the LSP has to pay for a channel closure?

catch-21 avatar Apr 29 '24 12:04 catch-21