Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: Chilwell on March 09, 2023, 07:14:17 AM



Title: How are transaction fees generated and disbursed?
Post by: Chilwell on March 09, 2023, 07:14:17 AM
This particular question is unclear to me: is it the wallet or the nodes that generate transaction fees? I understand that transaction fees are generated, but how? Please help me out.


Title: Re: How are transaction fees generated and disbursed?
Post by: NotATether on March 09, 2023, 07:19:09 AM
The wallets generate the transaction fees for you based on their estimation of mempool (unconfirmed transaction volume) congestion across the network. Higher numbers of unconfirmed transactions will cause most wallets to apply higher fees in order for your transaction to be confirmed within the next block, or the next 5, 10, and so on.


Title: Re: How are transaction fees generated and disbursed?
Post by: Charles-Tim on March 09, 2023, 07:19:41 AM
The transaction fee depends on how congested the mempool is and also the transaction weight or virtual size/byte of your transaction. If you want to estimate it in fiat, also depends on bitcoin price in that fiat.

Wallets have their own estimation algorithm, but you can as well also customize your transaction fee after checking the mempool to know how congested it is and also to know the fee rate needed for faster confirmation.

Minimizing bitcoin transaction fee (https://bitcointalk.org/index.php?topic=5320216.msg56441031#msg56441031)

For mempool: https://mempool.space/
                          https://jochen-hoenicke.de/queue/#BTC,24h,weight


Title: Re: How are transaction fees generated and disbursed?
Post by: hosseinimr93 on March 09, 2023, 08:11:04 AM
When you make a bitcoin transaction, you are the one who sets the transaction fee.
Since the block size is limited and miners can't include any number of transactions they want, they have to pick some transactions. To maximize their profit, they pick the transactions with higher fee rate.
Therefore, if you are in a hurry, you should use a high fee rate and if you are not in a hurry, you can set the fee rate as low as possible.


Title: Re: How are transaction fees generated and disbursed?
Post by: nc50lc on March 09, 2023, 08:12:05 AM
This particular question is unclear to me: is it the wallet or the nodes that generate transaction fees? I understand that transaction fees are generated, but how? Please help me out.
There's no particular entity that sets the transaction fee.
It's the wallet's estimation depending on different or unique factors; or what's set by the user.

For example, Electrum has 3 transaction fee sliders which work differently:
ETA which uses complex algorithm based from the newest blocks and mempool.
Mempool which is solely based from the size of your server's mempool.
Static which is a set pre-set values.

For generation of "fee", it's simply the difference between the inputs' and the output's amount.
The "fee rate" is the 'fee' divided by the transaction's virtual size.


Title: Re: How are transaction fees generated and disbursed?
Post by: BlackHatCoiner on March 09, 2023, 06:58:36 PM
This particular question is unclear to me: is it the wallet or the nodes that generate transaction fees? I understand that transaction fees are generated, but how? Please help me out.
Fees aren't "generated". They're set. And they are set by the user. If you subtract the total value of outputs from the total value of inputs, you get the transaction fee.

1. Minimum 1 sat/vbyte fee rate due to default node policy which doesn't broadcast transaction with fee rate lower than it.
That was the case, until recently, though. Now most nodes will not accept 1 sat/vb, due to the exceeded memory usage. From a quick search at mempool.space, most nodes will purge anything < 2.53 sat/vb.

Just in case I'm confusing OP: Just because some nodes decide to purge some transactions due to exceeded memory usage, it doesn't mean they're invalid. A miner can normally include them in a block if addressed.


Title: Re: How are transaction fees generated and disbursed?
Post by: seoincorporation on March 09, 2023, 07:46:38 PM
This particular question is unclear to me: is it the wallet or the nodes that generate transaction fees? I understand that transaction fees are generated, but how? Please help me out.

Each time a user sends a transaction he pays the fees from his own coins. Let's say you want to send 1 bitcoin to a friend, then you have to spend 1btc+0.0001btc of fees making this a total transaction of 1.0001BTC.

The fees go as a reward to the miner who finds the block with the block prize, that block prize gets halved from time to time, and in the future the only reward the miners will get will be only the transaction fees.


Title: Re: How are transaction fees generated and disbursed?
Post by: hosseinimr93 on March 09, 2023, 07:51:17 PM
Each time a user sends a transaction he pays the fees from his own coins. Let's say you want to send 1 bitcoin to a friend, then you have to spend 1btc+0.0001btc of fees making this a total transaction of 1.0001BTC.
Where did the 0.0001 BTC come from?
The fee rate is set the by the user and the required fee rate depends on how fast you want your transaction to be confirmed and how congested the network is.
Also, the transaction fee doesn't depend on the amount of bitcoin you send at all.


Title: Re: How are transaction fees generated and disbursed?
Post by: MIner1448 on March 15, 2023, 06:08:43 PM
Blockchain transaction fees are generated by users who send transactions across the network. When a user submits a transaction, they include a fee as an incentive for miners to include that transaction in a new block. The higher the fee, the more likely it is that the miner will include the transaction in the block.

In the Bitcoin blockchain, for example, the transaction fee is determined based on the size of the transaction and the current network load. The larger the transaction size and the busier the network, the higher the fee should be in order to attract the attention of miners and speed up transaction confirmation.

Transaction fee payments are made to miners who created a new block and included transactions in that block. On the bitcoin blockchain, for example, miners receive both a reward for creating a new block (which is currently 6.25 bitcoins) and for all fees collected from transactions included in that block.

Thus, transaction fees are the mechanism that provides the motivation for miners to confirm transactions and create new blocks on the blockchain.