Bitcoin Forum

Other => Beginners & Help => Topic started by: game-protect on February 05, 2020, 11:23:53 PM



Title: Who receives the Bitcoin transaction fee and how does it technically work?
Post by: game-protect on February 05, 2020, 11:23:53 PM
When I send BTC from one address to another address I have to pay a fee.

Who receives this fee and how does it technically work?


Transaction fee: https://bitcoin.org/en/glossary/transaction-fee

Definition

The amount remaining when the value of all outputs in a transaction are subtracted from all inputs in a transaction; the fee is paid to the miner who includes that transaction in a block.

Minimum relay fee: https://bitcoin.org/en/glossary/minimum-relay-fee

Definition

The minimum transaction fee a transaction must pay (if it isn’t a high-priority transaction) for a full node to relay that transaction to other nodes. There is no one minimum relay fee—each node chooses its own policy.


Title: Re: Who receives the Bitcoin transfer fee and how does it technically worK?
Post by: squatter on February 05, 2020, 11:49:50 PM
Who receives the Bitcoin transfer fee and how does it technically worK?

Transaction fees are usually collected by the miner who produces the block. Any uncollected fees are permanently destroyed. From the Bitcoin Wiki (https://en.bitcoin.it/wiki/Miner_fees):

Quote
When a miner creates a block proposal, the miner is entitled to specify where all the fees paid by the transactions in that block proposal should be sent. If the proposal results in a valid block that becomes a part of the best block chain, the fee income will be sent to the specified recipient. If a valid block does not collect all available fees, the amount not collected are permanently destroyed; this has happened on more than 1,000 occasions from 2011 to 2017,[1][2] with decreasing frequency over time.

This thread might be better off in Beginners & Help (https://bitcointalk.org/index.php?board=39.0).


Title: Re: Who receives the Bitcoin transfer fee and how does it technically work?
Post by: TwitchySeal on February 06, 2020, 04:05:35 AM
Transaction fees are usually collected by the miner who produces the block. Any uncollected fees are permanently destroyed. https://en.bitcoin.it/wiki/Miner_fees
The Bitcoin transaction fee is a miner fee?

What is the difference between node and miner?





A node verifies transactions on the blockchain.

A miner solves (creates) blocks, which are then verified by nodes.

You should ask any more questions like this here: Beginners & Help (https://bitcointalk.org/index.php?board=39.0).


Title: Re: Who receives the Bitcoin transfer fee and how does it technically work?
Post by: HeRetiK on February 06, 2020, 09:38:59 AM
Who receives the Bitcoin transaction fee and how does it technically work?

In terms of how it looks in the protocol:

The transaction fee is the difference between the inputs of a transaction (ie. the amount that leaves the sending addresses) and the outputs of a transaction (ie. the amount that arrives at the receiving addresses).

They can be claimed by a miner by adding the transaction fees amount to the block subsidy amount and sending the whole sum as output to their receiving address.



What is the difference between node and miner?

A node verifies transactions on the blockchain.

A miner solves (creates) blocks, which are then verified by nodes.

You should ask any more questions like this here: Beginners & Help (https://bitcointalk.org/index.php?board=39.0).

It's worth noting that there's no distinction between miners and nodes on the protocol level (at least if I recall correctly). While the people running mining hardware do not necessarily run their own node, the mining pool that they are directing their hashpower at will. It is this node (or nodes) that will then broadcast the blocks as built by the miners.

So from a protocol point of view they are all just nodes -- it's just that some find new blocks (miners) and some don't.


Title: Re: Who receives the Bitcoin transaction fee and how does it technically work?
Post by: game-protect on February 06, 2020, 11:57:36 AM
A node verifies transactions on the blockchain.
A node verifies the transactions but do not get the relay fee?


A miner solves (creates) blocks, which are then verified by nodes.
A miner creates blocks to process BTC transactions to BTC addresses?


Title: Re: Who receives the Bitcoin transaction fee and how does it technically work?
Post by: figmentofmyass on February 06, 2020, 12:03:09 PM
Can I see on the blockchain to what BTC address the transaction fee went?

yes, just check the coinbase transaction of any given block.

for example: https://www.blockchain.com/btc/tx/b1e12ab3f33e71e7fff9859334e5b146290a1daa4bc7a462cceb90a17f9fa5c1

the block reward (12.5 BTC subsidy + 0.25934459 BTC fees) was sent to 1C81BGyi8SJ919UxnHm2iwNmaN2RHfU4us

What has a miner technically to do to claim the transaction fee?

1. create a coinbase transaction that claims the block reward (subsidy, fees, both) and sends it to an address under his control
2. mine a valid block on the longest chain which includes that coinbase transaction

https://bitcoin.org/en/glossary/coinbase
https://bitcoin.org/en/glossary/coinbase-transaction


Title: Re: Who receives the Bitcoin transaction fee and how does it technically work?
Post by: figmentofmyass on February 06, 2020, 12:36:42 PM
"COINBASE (Newly generated coins)"

What have newly generated coins to do with sending BTC from one address to another?

forget about "addresses" for a moment. that's just a human abstraction.

there are inputs and outputs. the coinbase (which claims the block reward, which includes newly generated coins) is an input. the coinbase transaction spends that input to an output (or "address") under the miner's control.

blockchain.com's explorer is oversimplifying things. only the 12.5 BTC subsidy = "newly generated coins". the rest of the block reward = fees collected from the other transactions in the block.


Title: Re: Who receives the Bitcoin transaction fee and how does it technically work?
Post by: Kakmakr on February 06, 2020, 01:43:26 PM
It is also worth mentioning that the miners fees in most cases do not end up going to a single miner. A lot of smaller miners are mining within a mining Pool and the rewards <Block reward & miners fees> are distributed according to the hashing power that was contributed by the miners in that Pool.  ;)  - https://en.wikipedia.org/wiki/Mining_pool  <Hope I understand it correctly>  ::)

Also, when the Block reward are diminished over time with all the Halvings, the Miners fees will have to increase in value or transactions will have to increase dramatically to make it profitable for miners to continue mining in the future.

Just to give you an idea of what kind of money we are talking about.  --> https://www.blockchain.com/charts/transaction-fees-usd

Luckily for us it looks like the transactions are gradually increasing over time. See this chart for more details :
https://www.blockchain.com/charts/n-transactions-total?timespan=all


Title: Re: Who receives the Bitcoin transaction fee and how does it technically work?
Post by: joniboini on February 06, 2020, 02:32:27 PM
I suggest you read 'Mastering Bitcoin' by Andreas if you're serious about learning Bitcoin. Or spend 6 hours on the wiki page.


Title: Re: Who receives the Bitcoin transfer fee and how does it technically worK?
Post by: gentlemand on February 06, 2020, 04:16:53 PM
Transaction fees are usually collected by the miner who produces the block. Any uncollected fees are permanently destroyed. From the Bitcoin Wiki (https://en.bitcoin.it/wiki/Miner_fees):

I was under the impression that in many cases it's the pool operator who keeps the transaction fees. Only a certain number of pools share the transaction fees with the people mining with them. Funnily enough the ones that don't coincided with that fee explosion back in the day. Even more mysteriously they were trying to push BCH and most had links to Bitmain.


Title: Re: Who receives the Bitcoin transaction fee and how does it technically work?
Post by: royalfestus on February 06, 2020, 05:27:44 PM
What of the transaction fee paid with exchange coin on exchanges? That reward doesnt go to the so called miners' are exchanges can also serving the role of miners with reduced fund?


Title: Re: Who receives the Bitcoin transaction fee and how does it technically work?
Post by: Sohyun Park on February 06, 2020, 05:57:46 PM
When I send BTC from one address to another address I have to pay a fee.

Who receives the transaction fee and how does it technically work?

The miner who verifies your transaction will get the fee. In simple word it can be explained as, this fee is the salary paid to the miner for the job of mining. The fee of all the transactions user verified and helped entering correct data to the blockchain will be honored with a mining fee.

Mining fee = Mined coins + Fee sent in the transactions that were confirmed.

Miners usually pick the transactions with higher fee. But there is a factor called priority based on which the transactions are mined. The formula is as follows:
priority = sum(input_value_in_base_units * input_age)/size_in_bytes



Title: Re: Who receives the Bitcoin transfer fee and how does it technically worK?
Post by: squatter on February 06, 2020, 08:34:29 PM
Transaction fees are usually collected by the miner who produces the block. Any uncollected fees are permanently destroyed. From the Bitcoin Wiki (https://en.bitcoin.it/wiki/Miner_fees):
I was under the impression that in many cases it's the pool operator who keeps the transaction fees.

In the above example, the "miner" could be a pool operator, sure. It could also be a solo miner. The distinction doesn't really matter to the OP's question.

Only a certain number of pools share the transaction fees with the people mining with them.

This situation won't last forever. I expect miners to increasingly demand shared fee revenue from pools. It's only rational because the block subsidy drops and transaction fees rise over time. Miners who contribute hash rate without demanding their full share of the block reward are just being irrational.


Title: Re: Who receives the Bitcoin transaction fee and how does it technically work?
Post by: game-protect on February 06, 2020, 08:35:58 PM
The miner who verifies your transaction will get the fee.
The miner who verifies my transaction to another BTC address will get the relay fee?

How does this technically work?

To what BTC address will the miner get the relay fee?

The blockchain states the fee that was reduced from the amount I sent, but does not state the receiver address to where the fee went?


Title: Re: Who receives the Bitcoin transaction fee and how does it technically work?
Post by: squatter on February 06, 2020, 08:49:14 PM
The miner who verifies your transaction will get the fee.
The miner who verifies my transaction to another BTC address will get the relay fee?

More specifically, the miner who includes your transaction in a valid block may collect the transaction fee.

How does this technically work?

The Bitcoin Wiki article I linked in this post (https://bitcointalk.org/index.php?topic=5223528.msg53780552#msg53780552) explains it.

To what BTC address will the miner get the relay fee?

An address the miner specifies in the coinbase transaction of a block. Usually, the entire block reward -- which includes all transaction fees -- will be sent to this address. Any portion of the block reward not claimed this way is permanently destroyed.

The blockchain states that a fee for the BTC transaction was reduced from the amount I sent, but does not state the fee BTC receiver address?

A transaction fee does not constitute a discrete bitcoin transaction paid to the miner. The miner collects the transaction fees from every transaction in the block and pays them to himself in a single coinbase transaction.

Look at the coinbase transaction of any block. The output address is the bitcoin address that received all the transaction fees.


Title: Re: Who receives the Bitcoin transaction fee and how does it technically work?
Post by: ranochigo on February 06, 2020, 10:45:52 PM
Miners usually pick the transactions with higher fee. But there is a factor called priority based on which the transactions are mined. The formula is as follows:
priority = sum(input_value_in_base_units * input_age)/size_in_bytes
Miner usually don't actually look at the priority nowadays. There is no reason for them to look at the priority when the mempool is always filled and that fees are the determining factor as to which transaction gets included in the block. In addition, the priority system is irrelevant with the mempool being filled all the time and has already been deprecated.

For OP, there is a difference between relay fee and transaction fee. For the relay fee, it is termed as such for the nodes as a parameter. This is the minimum fee for which the nodes are willing to relay the transaction. Nodes do not take a cut from this. For transaction fees, the miners take the entire transaction fee.


Title: Re: Who receives the Bitcoin transaction fee and how does it technically work?
Post by: game-protect on February 07, 2020, 12:29:10 AM
The miner who verifies your transaction will get the fee.
The miner who verifies my transaction to another BTC address will get the relay fee?

More specifically, the miner who includes your transaction in a valid block may collect the transaction fee.
Where is the fee I pay (when sending BTC) stored until the miner possibly gets it?


For OP, there is a difference between relay fee and transaction fee.
Both, my wallet and the blockchain states fee and does not diversify between relay fee and transaction fee.

If the fee is split in relay and transaction fee, who receives the relay fee and technically how and who receives the transaction fee and technically how?


For the relay fee, it is termed as such for the nodes as a parameter. This is the minimum fee for which the nodes are willing to relay the transaction. Nodes do not take a cut from this. For transaction fees, the miners take the entire transaction fee.
The nodes say for how much they are willing to relay the transaction, but do not receive the relay fee?

If yes, who receives the relay fee and technically how?


Title: Re: Who receives the Bitcoin transaction fee and how does it technically work?
Post by: ranochigo on February 07, 2020, 01:24:40 AM
Both, my wallet and the blockchain states fee and does not diversify between relay fee and transaction fee.

If the fee is split in relay and transaction fee, who receives the relay fee and technically how and who receives the transaction fee and technically how?

The reference client take the transaction fee as a metric to see what is the minimum transaction fee for the client to include the transaction into their mempool. They term that as a minimum 'relay' fee. The node does not take a cut from the transaction fee.

The nodes say for how much they are willing to relay the transaction, but do not receive the relay fee?

If yes, who receives the relay fee and technically how?
Relay fee = transaction fee. Its just that the reference client choose to call it a 'relay' fee. The miner will still take the full transaction fee.


Title: Re: Who receives the Bitcoin transaction fee and how does it technically work?
Post by: squatter on February 07, 2020, 01:51:31 AM
The miner who verifies my transaction to another BTC address will get the relay fee?
More specifically, the miner who includes your transaction in a valid block may collect the transaction fee.
Where is the fee I pay (when sending BTC) stored until the miner possibly gets it?

You might say it's stored within your unconfirmed transaction, which is probably sitting in the mempool (https://bitcoin.org/en/developer-reference#mempool) of various miners. Until the transaction is actually confirmed on the blockchain, the fee hasn't really been paid.


Title: Re: Who receives the Bitcoin transaction fee and how does it technically work?
Post by: game-protect on February 07, 2020, 02:05:52 PM
Where is the fee I pay (when sending BTC) stored until the miner possibly gets it?

You might say it's stored within your unconfirmed transaction, which is probably sitting in the mempool (https://bitcoin.org/en/developer-reference#mempool) of various miners. Until the transaction is actually confirmed on the blockchain, the fee hasn't really been paid.
Even after my BTC transaction is confirmed by miners the blockchain does not show to what BTC address the fee went!


Title: Re: Who receives the Bitcoin transaction fee and how does it technically work?
Post by: TwitchySeal on February 07, 2020, 02:30:03 PM
Where is the fee I pay (when sending BTC) stored until the miner possibly gets it?

You might say it's stored within your unconfirmed transaction, which is probably sitting in the mempool (https://bitcoin.org/en/developer-reference#mempool) of various miners. Until the transaction is actually confirmed on the blockchain, the fee hasn't really been paid.
Even after my BTC transaction is confirmed by miners the blockchain does not show to what BTC address the fee went!

Find the block number that the transaction was included in => Find who mined that block => Find their address (it will receive the block reward of BTC12.5 + fees.

For example:

Here's the tx that h4ns sent the $210 you scammed  (https://bitcointalk.org/index.php?topic=5183189.0): https://www.blockchain.com/btc/tx/88cea5e9935103e173e25483c1db298ab8ae7d9fa12e5572788134bb2cdb3c3f

It was included in block 573956: https://www.blockchain.com/btc/block/573956

Which was mined by BTCTOP (they don't always have a name), and they received BTC13.09600094 (BTC12.5 block reward + BTC0.596000939 in fees) which was sent to 1Hz96kJKF2HLPGY15JWLB5m9qGNxvt8tHJ in this tx: https://www.blockchain.com/btc/tx/c0d4ecea9d3005a2cb27e139c940624a9e583661e94a75a3ba5b336f5c4e4a74


Title: Re: Who receives the Bitcoin transaction fee and how does it technically work?
Post by: game-protect on February 07, 2020, 04:19:59 PM
Great explanation Twitchy!

Now the only unclear thing is the relay fees / nodes?

If the miners confirm the transactions in blocks, for what are the nodes necessary?


Title: Re: Who receives the Bitcoin transaction fee and how does it technically work?
Post by: HeRetiK on February 07, 2020, 11:27:50 PM
Great explanation Twitchy!

Now the only unclear thing is the relay fees / nodes?

If the miners confirm the transactions in blocks, for what are the nodes necessary?

Connectivity, resilience and verification.

If only mining pools where to run nodes they could be relatively easily isolated from the rest of the network, be it by accident (e.g. large to mid-scale network outages) or by malicious intent (e.g. DDoS attacks, governmental interference). One effect of this would be a higher orphan rate (ie. miners forking of the main chain by accident), leading to (1) decreased security due to less effective usage of hashing power and (2) decreased reliability of confirmations due to higher risk of chain splits and reorgs. Especially the latter has significant practical implications since low confirmation transactions would be prone to "disappear". Also, bluntly speaking, it's easier to block a few dozen servers rather than a few thousands.

Apart from why the network profits from having as many nodes as possible it's more secure to run a node of your own if you process a lot of transactions (eg. as a merchant, payment provider or currency exchange). Rather than having to trust a third party on what they say what the blockchain looks like, look for yourself. Or as the old adage goes: Don't trust, verify.


Title: Re: Who receives the Bitcoin transaction fee and how does it technically work?
Post by: game-protect on February 09, 2020, 03:20:27 PM
What is the minimum relay fee and who receives it and how?

What is the difference between miners and nodes?


Title: Re: Who receives the Bitcoin transaction fee and how does it technically work?
Post by: Lafu on February 09, 2020, 05:41:41 PM
Maybe you should try to do some research by yourself , Google will help you on that !  :D

Miner fees :

Quote
Every Bitcoin transaction spends zero or more bitcoins to zero or more recipients. The difference between the amount being spent and the amount being received is the transaction fee (which must be zero or more).

Bitcoin's design makes it easy and efficient for the spender to specify how much fee to pay, whereas it would be harder and less efficient for the recipient to specify the fee, so by custom the spender is almost always solely responsible for paying all necessary Bitcoin transaction fees.

When a miner creates a block proposal, the miner is entitled to specify where all the fees paid by the transactions in that block proposal should be sent. If the proposal results in a valid block that becomes a part of the best block chain, the fee income will be sent to the specified recipient

Source : https://en.bitcoin.it/wiki/Miner_fees (https://en.bitcoin.it/wiki/Miner_fees)

What is the difference between miners and nodes?

There is already a thread about that:
https://bitcointalk.org/index.php?topic=1734235.0 (https://bitcointalk.org/index.php?topic=1734235.0)

Also you can read that here :

Quote
A full node is a complete copy of the blockchain and is able to verify all transactions since the beginning. This requires about 140GB of drive space (currently).

A pruning node is one that has verified all prior transactions; however, it has deleted all blocks below a certain space requirement, but still has a copy of the UXTO set. It's almost useless to the community, but takes less resources on the computer (can be under 1GB of drive space).

A miner on the other hand creates blocks in the blockchain which the nodes keep. Basically, the miner works on transactions by coming up with the best combination (hash) to store that information. Miners spend about 10 minutes working on a problem, but nodes keep that result forever after in the database and verify it with others. Miners don't need to know about prior blocks (except for the prior one) with very few exceptions.
Source : https://bitcoin.stackexchange.com/questions/59220/what-is-the-difference-between-a-miner-and-a-full-node (https://bitcoin.stackexchange.com/questions/59220/what-is-the-difference-between-a-miner-and-a-full-node)

Just google it and maybe you should do more research on the Basics for Bitcoin and related things to it !


Title: Re: Who receives the Bitcoin transaction fee and how does it technically work?
Post by: mu_enrico on February 09, 2020, 07:27:36 PM
Oh come on guys! You got jebaited by game-protect. She was just trolling to get her signature and avatar displayed in this section.

@GP before you ask, kindly open and read this faq https://bitcoin.org/en/faq

It should save everyone's time.


Title: Re: Who receives the Bitcoin transaction fee and how does it technically work?
Post by: bugsbuds on February 11, 2020, 03:13:52 AM
I have a question about this mining thing. All bitcoin generated from mining goes to coinbase exchange and from there are distributed to pools and miners?


Title: Re: Who receives the Bitcoin transaction fee and how does it technically work?
Post by: akirasendo17 on February 11, 2020, 06:17:49 AM
fee's are given to miners in the network, as payment they are given to them by the number of hashing power they have so the more miners you have you recieved more payment than those who have less miner,
to understand more here is the link below hope this helps
https://www.bitcoinmining.com/bitcoin-mining-fees/


Title: Re: Who receives the Bitcoin transaction fee and how does it technically work?
Post by: DdmrDdmr on February 11, 2020, 07:28:28 AM
I have a question about this mining thing. All bitcoin generated from mining goes to coinbase exchange and from there are distributed to pools and miners?
Coinbase Exchange has nothing to do with it (the exchange’s name is probably based on what follows, but that’s all).

Each Bitcoin block contains a first transaction that is used to claim the block reward from mining and transaction fees. That TX is called the Coinbase Transaction, where the input is a sole blank input known as Coinbase.


Title: Re: Who receives the Bitcoin transaction fee and how does it technically work?
Post by: Henri Cartier on February 11, 2020, 08:30:58 AM
Who receives this fee and how does it technically work?

I think this thread gives you a better idea about how a Bitcoin transaction fee technically works - Bitcoin Transaction Fees - Everything in one (https://bitcointalk.org/index.php?topic=5153031.msg51424773#msg51424773) by @hd49728. You can refer to this article to understand better.