Pages:
Author

Topic: How do we calculate the correct transaction fee to send? - page 2. (Read 515 times)

legendary
Activity: 2044
Merit: 1018
Not your keys, not your coins!
OP can take a look at my topic: Bitcoin Transaction Fees - Everything in one
You can check the estimated fees on https://coinb.in/#fees to see good fees you can set for your transaction at each time. For example, if the suggested fee is 1 satoshis, I advice you to set your fees at 2 or 3 satoshis in order to make sure that your transactions will be confirmed faster whilst there is not much more additional fee between 1 and 3 satoshis/ byte.

This one: https://whatthefee.io/ gives you the table with the probability to get confirmations with each level of transaction fees.

In order to make sure that you choose the right time to move your coins, take a look at mempool: https://www.blockchain.com/charts/mempool-count?timespan=60days. Don't move your coins when mempool shows spikes.
legendary
Activity: 3472
Merit: 10611
How do we calculate the correct transaction fee to send?
is it possible to know how many bytes the transaction is likely to take?

you search for a wallet that is developed by a competent developer so that it can calculate the correct transaction size and then sets the appropriate fee based on your selection of "priority level" not fee itself.
seriously though, you shouldn't try to calculate transaction size and fees on your own. there is a very good chance you will mess it up and stay away from website such as bitcoinfees.earn.com they are horrible at suggesting fees.

my suggestion is Electrum. it is doing a pretty good job and it is user friendly. all you have to do is to enable the fee slider and the more to the left is less priority and the more you pull it to the right you get higher priority.

if you want to know the technical details of how size (or rather weight) is calculated then it is a different question. for that you'll need some prior knowledge of transaction structure, scripts, signature hash types, and serialization of transactions for signing with each different script type. and depending on each script type you'll get a different size and weight and depending on what crypto library is being used you may get fixed length signatures or with 1-2 byte difference which you need to account for when setting the minimum fee.
i can explain each details of it if you want but it will be tedious and may not be what you are looking for.
copper member
Activity: 1652
Merit: 1901
Amazon Prime Member #7
This site is only useful if you look at the charts yourself. Their suggested fee at the bottom is usually way too much unless you absolutely need to get in to the next block. At the moment their suggest fee is 22 sats/byte, which would put you around 0.05 MB from the tip of the mempool.
Agreed, and edited my post.

To answer your other question, yes you can include a very small fee and it might take a long to for your transaction to confirm if it ever does. After several days, most nodes will ‘forget’ your transaction if it doesn’t confirm but it will remain valid as long as all the inputs remain unspent. This means someone may broadcast your transaction long into the future if it is still valid. This means you should keep your private keys, including backups if you ever even try unsuccessfully to send coin between wallets.

Wow, so there is no way to cancel an unconfirmed transaction even after say 2 weeks of it being unconfirmed? What happens then? How to get it on the blockchain later?
If you spend one or more of the inputs from the original transaction, the entire original transaction will become invalid. If the original transaction does not confirm after a couple of days, most nodes will 'forget' about your original transaction and will accept a new transaction with the same inputs, but if you do not spend one or more of the inputs, the transaction will forever remain valid.

This really only matters if you send coin to a new wallet, the transaction doesn't confirm and you lose the private keys to your new wallet.
legendary
Activity: 3374
Merit: 3095
Playbet.io - Crypto Casino and Sportsbook
To answer your other question, yes you can include a very small fee and it might take a long to for your transaction to confirm if it ever does. After several days, most nodes will ‘forget’ your transaction if it doesn’t confirm but it will remain valid as long as all the inputs remain unspent. This means someone may broadcast your transaction long into the future if it is still valid. This means you should keep your private keys, including backups if you ever even try unsuccessfully to send coin between wallets.

Wow, so there is no way to cancel an unconfirmed transaction even after say 2 weeks of it being unconfirmed? What happens then? How to get it on the blockchain later?

No there's no way to cancel unconfirmed transaction it will just be rejected by the nodes it is not likely the same as you make a transaction offline where you can just delete the transaction and make a new signed transaction.
Based on my experience before with Electrum my unconfirmed transaction for almost a week it gets rejected and the transaction will be gone in the transaction history. So if you don't have the raw transaction you can't rebroadcast them again but if you have a copy of raw transaction you can rebroadcast it.

Anyway, If your transaction gets rejected you can make a new transaction again as normal as sending. If you don't want the transaction gets rejected always check the recommended fee from coinb.in or bitcoinfees.earn.com Because if the recommended fee increases and you pay 1sat/byte there is a big chance that your transaction will be rejected again. That is why it's recommended to use the recommended fee from Electrum.
newbie
Activity: 25
Merit: 27
To answer your other question, yes you can include a very small fee and it might take a long to for your transaction to confirm if it ever does. After several days, most nodes will ‘forget’ your transaction if it doesn’t confirm but it will remain valid as long as all the inputs remain unspent. This means someone may broadcast your transaction long into the future if it is still valid. This means you should keep your private keys, including backups if you ever even try unsuccessfully to send coin between wallets.

Wow, so there is no way to cancel an unconfirmed transaction even after say 2 weeks of it being unconfirmed? What happens then? How to get it on the blockchain later?
legendary
Activity: 3472
Merit: 1722
I've tried Earn.com and the ones you mentioned before, and I found all of them to be overestimating fees. I suggest this one, it's far more accurate: https://coinb.in/#fees

That's because some of these sites will only show estimations for transactions involving legacy Bitcoin addresses.
legendary
Activity: 1624
Merit: 4417
Websites to calculate the optimal Bitcoin transaction fees are e.g.:
https://Estimatefee.com "is a simple website that calculates the cost (in satoshis and USD) for a bitcoin transaction based on how much of hurry you are to move your coins from A to B."

https://Bitcoinfees.info "displays slow/medium/fast fees in USD with no muss and no fuss."

I've tried Earn.com and the ones you mentioned before, and I found all of them to be overestimating fees. I suggest this one, it's far more accurate: https://coinb.in/#fees


Oh thanks a lot for that advise! I will check it out. Learning every day!  Wink
legendary
Activity: 2268
Merit: 18711
my preference is for Jochen Hoenicke's fee estimator.
+1 for Johoe's site. It's the only site I use for deciding what fee I want to pay. There is a great guide on how to understand and interpret the graphs on 1miau's post here: https://bitcointalksearch.org/topic/make-sure-to-avoid-wasting-btc-for-too-high-fees-step-by-step-guide-electrum-5182906 (scroll down to item 5).

Every site which tells you a fee is using some sort of automatic algorithm. Sometimes they are quite accurate, other times they are not. Only you know how urgent or not your transaction is, and it's far easier to see if the mempool is filling up or emptying if you eyeball it yourself. If you really just want a site to tell you a fee to pay, then pick https://www.coinb.in/#fees.

What's the worse that can happen - will the transcation get cancelled/not go through on the blockchain?
The transaction will almost always confirm eventually, you might just be waiting a couple of days. In the event that the mempool becomes very full and your transaction has a very low fee, it will eventually be dropped from all nodes and you can simply try to spend the coins again. If you use a wallet like Electrum, you can enable a feature called RBF or Replace By Fee - with this enabled, if your transaction is taking too long to confirm, you can boost the fee to have it confirm faster.

This site is only useful if you look at the charts yourself. Their suggested fee at the bottom is usually way too much unless you absolutely need to get in to the next block. At the moment their suggest fee is 22 sats/byte, which would put you around 0.05 MB from the tip of the mempool.
legendary
Activity: 1652
Merit: 1483
What's the simplest way of calculating the optimum fee? For 'Satoshi per byte', is it possible to know how many bytes the transaction is likely to take?

yes, here is an in-depth breakdown of how transaction size is calculated: https://bitcoin.stackexchange.com/a/92700

this definitely isn't the simplest way though. a good wallet like electrum will show you the actual transaction size in bytes and allow you to choose the fee rate in satoshi/byte. https://bitcoin.org/en/wallets/desktop/windows/electrum/

I've tried Earn.com and the ones you mentioned before, and I found all of them to be overestimating fees. I suggest this one, it's far more accurate: https://coinb.in/#fees

i didn't know coinb.in had a fee estimator. it's a tad frustrating that they include bech32 as an option for inputs but not outputs. it makes a difference due to the segwit discount. the lowest possible recommended fee on coinb.in is 0.00000144 BTC but it should be closer to 0.00000110 BTC.

my preference is for Jochen Hoenicke's fee estimator. great visualization for estimating different priority times, ie next block vs within 8 hours, etc: https://jochen-hoenicke.de/queue/#0,24h
copper member
Activity: 1652
Merit: 1901
Amazon Prime Member #7
There are various sites that use various algorithms to estimate the required fee to get your transaction included in a block. I would suggest https://bitcoinfees.earn.com/ that is both simple and gives you enough information to estimate how large a fee to include depending on how quickly you want your transaction to confirm. /edit - you should review the chart to decide how much to pay for your transaction fee

To answer your other question, yes you can include a very small fee and it might take a long to for your transaction to confirm if it ever does. After several days, most nodes will ‘forget’ your transaction if it doesn’t confirm but it will remain valid as long as all the inputs remain unspent. This means someone may broadcast your transaction long into the future if it is still valid. This means you should keep your private keys, including backups if you ever even try unsuccessfully to send coin between wallets.
staff
Activity: 3500
Merit: 6152
Websites to calculate the optimal Bitcoin transaction fees are e.g.:
https://Estimatefee.com "is a simple website that calculates the cost (in satoshis and USD) for a bitcoin transaction based on how much of hurry you are to move your coins from A to B."

https://Bitcoinfees.info "displays slow/medium/fast fees in USD with no muss and no fuss."

I've tried Earn.com and the ones you mentioned before, and I found all of them to be overestimating fees. I suggest this one, it's far more accurate: https://coinb.in/#fees
legendary
Activity: 1624
Merit: 4417
A very interesting article concerning Bitcoin transaction fees can be found here: Bitcoin Transaction Fees Explained [Complete Guide]

Websites to calculate the optimal Bitcoin transaction fees are e.g.:

https://Estimatefee.com "is a simple website that calculates the cost (in satoshis and USD) for a bitcoin transaction based on how much of hurry you are to move your coins from A to B."

https://Bitcoinfees.info "displays slow/medium/fast fees in USD with no muss and no fuss."

Source: https://bitnewsbot.com/how-to-calculate-bitcoin-transaction-fees-when-youre-in-a-hurry/
legendary
Activity: 2352
Merit: 6089
bitcoindata.science
If you are not in a hurry, just set 1 sat/byte and it will be confirmed in a few hours
 Last week a sent a transaction like this that was confirmed in about 8 hours.

To see how much your transaction will cost, take a loop here:
https://www.buybitcoinworldwide.com/fee-calculator/

It will depend on:
Number of inputs
Number of outputs
Type of address (segtwit or legacy)



Before you ask:
Inputs are generated each time you receive btc. For every btc transaction you receive,  you have a new input. The more inputs, the more expensive the transaction.
Outputs are how many destination addresses.  Usually you will need 2 (one for destination and one for the change, back to you)

If you have a input of 0.5 and want to transfer 0.1 btC, you will receive 0.4 back in a change address.

You can consolidate your inputs when fees are low, at 1 sat byte. Take a look here
https://bitcointalksearch.org/topic/aug-2022-mempool-empty-use-this-opportunity-to-consolidate-your-small-inputs-2848987
newbie
Activity: 25
Merit: 27
What's the simplest way of calculating the optimum fee? For 'Satoshi per byte', is it possible to know how many bytes the transaction is likely to take?

Also, suppose the transaction is not urgent (say changing BTC between own wallets or sending to a relative), can it be sent with very low fee? What's the worse that can happen - will the transcation get cancelled/not go through on the blockchain?

Thanks!
Pages:
Jump to: