leather-io / extension

Leather browser extension
https://leather.io
MIT License
293 stars 140 forks source link

Replace blockcypher with another fees API #5364

Open 314159265359879 opened 3 months ago

314159265359879 commented 3 months ago

image

image

Mempool space says recent blocks have been confirmed with 11-12 sats/vB average fees (this has been the same for about 24 hours) yet the low option in Leather is 15 sats/vB. I would expect Leather to suggest a medium fee of 12-13 sats/vB in that case.

kyranjamie commented 3 months ago

We take the average of Mempool space and Blockcypher's API, which currently returns much higher estimates https://api.blockcypher.com/v1/btc/main

314159265359879 commented 3 months ago

I tried this with a software wallet and hardware device connected to Leather. I also tried clearing cache and reinstalling Leather to exclude any issues with caching old fee data. It remains the same, the fees served look to be on the high side compared to recent market fees.

In my case the suggested fee rate (sats/vB) looks like it is twice as much as needed to get included.

The workaround is straight forward though, users can always set a custom fee if they disagree with the fees served by the wallet.

markmhendrickson commented 3 months ago

@314159265359879 is your sense that the fee recommendation is too high given just what Mempool.space is indicating, or based on other sources as well?

I.e. do we have reason to think that Blockcypher is inappropriately returning much higher estimates, or that there's just a reasonable disagreement between it and Mempool.space and the averaging mechanism is working as desired?

314159265359879 commented 3 months ago

The fee estimates are high compared to historic data from a Bitcoin node from the past 26 hours, I believe that is more generalized than just compared to mempool.space.

In absolute terms the fees are still relatively low and there can be a good reason to set fees a bit higher to better deal with short term fluctuations. But we have low, medium, high options for that in the wallet. In this case all three options offered in Leather are essentially high priority fees, that is not what users expect.

markmhendrickson commented 3 months ago

@kyranjamie might we want to integrate an alternative to Blockcypher if that's the case?

kyranjamie commented 3 months ago

Doesn't appear to be the most widely used blockexplorer, so happy to do so, yeah

markmhendrickson commented 3 months ago

Do we have a sense of other options already, or do we need to investigate?