bithyve / bitcointribe-classic

Bitcoin Tribe. A simple bitcoin wallet made to be used with Friends and Family. Lightning. Gifts and more.
https://bitcointribe.app/
MIT License
124 stars 62 forks source link

Minimum Custom Fee #1972

Open antuz123 opened 4 years ago

antuz123 commented 4 years ago

The minimum fee in sats per byte depends on how low the mempool can go. If the space is getting filled, it drops the lowest fee transactions there it self. We may have to use that to suggest the minimum custom fee. For example so that the user does not put 1 sat/ byte fee if those transactions are getting dropped from the mempool.

We need to find this min fee possible and use that as the lowest possible when using custom fee. This 'min custom fee' should also be used when calculating available to spend check where ATS >= (min custom fee x size of transaction) + amount to be sent.

Parsh commented 3 years ago

We might be able to use the fee histogram from Esplora to estimate the minimum relay custom fee for our node.

[Update]: Esplora's fee histogram isn't sufficient for dynamically evaluating the minimum relay fee. BTC core as well doesn't seem to have a clearly defined API endpoint for the same.