Author

Topic: why BTC fee is variable? (Read 172 times)

legendary
Activity: 2268
Merit: 18711
May 20, 2020, 06:14:45 AM
#3
In addition to macacinno's answer above:

Electrum has multiple methods of suggesting a fee for you. These are "static", "ETA", and "mempool". If you choose static, the fee slider has static values - 1 sat/byte, 2 sat/byte, 5, 10, 20, 30, 50, 70, 100, 150, 200, 300. If you select the minimum fee on the static slider, it will always be 1 sat/byte.

The ETA and mempool sliders are different. The ETA slider estimates how many blocks it will take for your transaction to confirm. The minimum value on this slider is a target of "Within 25 blocks". Note that this is an estimate, and not a guarantee. The fee rate that you have to pay to aim for this target will vary depending on how full or empty the mempool is, as mocacinno has explained above. The mempool slider allows you to choose how close to the tip of the mempool in terms of megabytes you want to be. The minimum value on this slider is "10.0 MB from the tip". The closer to the tip the faster your transaction will confirm, but again, this is not precise. As with the ETA slider, the fee rate that you have to pay to be within 10 MB of the tip depends on how full or empty the mempool is, and the fee rate of other unconfirmed transactions.

If you don't care about the time a transaction will take, and just want to pay the minimum fee, then in Electrum click on Tools -> Preferences, and then check the box "Edit fees manually". You could also change the "Fee estimation" to "static". This will let you select the minimum fee of 1 sat/byte for every transaction. Be aware, however, that given how full the mempool is at the moment, 1 sat/byte transactions could take a week or more to confirm.
legendary
Activity: 3514
Merit: 5123
https://merel.mobi => buy facemasks with BTC/LTC
May 20, 2020, 03:10:36 AM
#2
I have an electrum wallet. I did two transactions and set fee as minimum in both cases. In first cases the fee was 0.00008686 BTC (61.8 sat/vB) while in second it is 0.00012295 BTC (87.5 sat/vB).
I want to know why FEE is different in both cases? In both transaction I set fee to minimum.
On what principle these fee are calculated?

The total block weight is limited... Basically, this means that in a block there's only place for 1 Mb of transactions, but witness data of segwit transactions doesn't count for this 1 Mb limit (it has a higher limit).
This means that if the mempool contains 50 Mb of unconfirmed transactions, they won't fit into one block... Because the miner can add the fees of the sum of the transactions he puts into a block to the coinbase reward, it makes sense he picks the transactions with the highest fee (in sat/vbyte) to fill the block he's trying to solve. It also means that all other transactions won't be put into the block he's trying to solve, so they'll stay unconfirmed if he actually solves said block. Everybody getting payed in BTC wants their transaction to end up in a block (get confirmed), so they outbid other people that already have unconfirmed transactions in the mempool.

This boils down to a fee that changes depending on how much unconfirmed transactions are waiting, and which fee is payed by these unconfirmed transactions. If you want your transaction to have a high chance of getting into the next couple of blocks, you have to make sure you have a fee (in sat/vbyte) that makes your unconfirmed transaction be in the top 1Mb of the mempool (excluding the witness data).

An other thing to keep in mind is that the fee isn't fixed to the dollar (or euro, or whatever fiat money you're using), nor is it fixed for one transaction.. You pay a fee in sat/vbyte. Usually, the more inputs are used for your transaction, and the more outputs are created, the bigger your transaction is, so the more fee you'll have to pay. Bigger does not mean higher value... If you use 4 unspent outputs with a value of 0.00001 BTC as input and create 3 new unspent outputs of 0.00001 BTC, you'll usually end up with a bigger transaction than if you use 1 unspent output with a value of 100 BTC as input creating 1 new unspent output of 99,9999 BTC as output (eventough the second transaction transmits a much higher value).
jr. member
Activity: 52
Merit: 32
May 20, 2020, 03:07:09 AM
#1
I have an electrum wallet. I did two transactions and set fee as minimum in both cases. In first cases the fee was 0.00008686 BTC (61.8 sat/vB) while in second it is 0.00012295 BTC (87.5 sat/vB).
I want to know why FEE is different in both cases? In both transaction I set fee to minimum.
On what principle these fee are calculated?
Jump to: