Open antuz123 opened 4 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.
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.