1

I created a bitcoin wallet https://github.com/Grantrocks/bitcoingadgets. After 2 days of constant errors, I got it to send btc. But I can't seem to get it to send btc somewhat fast at a low fee. I use the module bit for transactions so I hope that there is nothing wrong with it, but if there is, I will gladly swap it out for a new module so the fees are lower. So does anyone have a better method?

2
  • 1
    By "fast" do you mean receive confirmations quickly?
    – Andrew Chow
    Mar 25 at 1:51
  • just realitvely. I dont want them to take around 2-3 hours to get 1 confirmation
    – Grant
    Mar 25 at 10:41

2 Answers 2

3

A transaction paying a low feerate is equivalent to signaling low urgency.

Miners select transactions in a way that maximizes the revenue for their block. This results in the queue of unconfirmed transactions generally being processed in order of the feerate of the transactions. Therefore, the way to get quick confirmations is to pay an appropriate feerate.

You may however be able reduce the overall fees paid by using more inputs when sending at lower feerates, and using fewer inputs when sending at higher feerates.

If your question was about how to figure out the lowest feerate to get confirmed in a time-frame, you could perhaps still improve your feerate estimates. Alternatively, you could consider investigating and implement your sending procedure such that you increase your transaction's feerate automatically over time if the transaction hasn't confirmed yet. To do this in the most thrifty way possible, you'd need to have a live view of the current mempool, though, but you could perhaps just revisit every 15 minutes and increase it by 1 sat/vB while it's not confirmed yet. If you start at the minRelayTxFeeRate of 1 sat/vB, that would get you to 13 sat/vB in three hours, which should get you confirmed usually in the current mempool weather. Note that frequent RBF'ing has privacy implications.

2

Confirming quickly, and low fees, are kind of mutually exclusive concepts. Miners will prioritize transactions that pay them a high feerate. If the feerate on your transactions is too low, then miners will prefer transactions that pay more than yours. If there are more than one block's worth of the transactions that pay a feerate higher than yours, then your transaction will not be included in the next block.

As such, you need to pay a higher feerate if you want your transaction to be confirmed quickly.

2
  • Yes i know that the faster its confirmed the more it costs but i need to find a way to make it so this module has lower fees and the same confirm rate. Is there a free api or module that you know of that allows this?
    – Grant
    Mar 25 at 16:52
  • 3
    As I said in my answer, you can't have both fast confirmations and low feerate. It is how the Bitcoin network works, not anything that you can do from a wallet. You cannot guarantee that your wallet will make transactions that confirm quickly and also pay low fees.
    – Andrew Chow
    Mar 25 at 17:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.