Bitcoin Forum

Bitcoin => Mining => Topic started by: refaelsh on March 07, 2013, 01:18:27 PM



Title: Transaction fees and minig
Post by: refaelsh on March 07, 2013, 01:18:27 PM
In general, I cant find anywhere the answer to the question why the concept of transactions fees even exists.
The closest thing to an answer was "to support the miners".
Can somebody please elaborate on the subject?


Title: Re: Transaction fees and minig
Post by: Stephen Gornick on March 07, 2013, 01:59:33 PM
In general, I cant find anywhere the answer to the question why the concept of transactions fees even exists.
The closest thing to an answer was "to support the miners".
Can somebody please elaborate on the subject?

Currently mining is receiving a huge subsidy at 25 BTC per-block.  But eventually the currency issuance will slow, in under four years that rate will drop to 12.5 BTC per-block.  And four years after that just 6.25 per-block, etc.   

So with a declining subsidy (in terms of BTCs), mining fees will need to start making up for the revenue decline.

Bitcoin transaction fees exclusively are what will eventually need to support mining.

Mining needs to exist as bitcoin is a decentralized digital currency.  It's value comes from it being resistant to corruption.    It protects from this by not having an authority.  Instead this functions by making the authority be the consensus of the network.  Because of this, it is vulnerable to a 51% attack.  So the mining subsidy makes it economical to try to perform a 51% attack.

So transaction fees are to support the mechanism that provides protection.


Title: Re: Transaction fees and minig
Post by: Blazr on March 07, 2013, 02:01:53 PM
Without fee's somebody could send the same BTC back and forth between two addresses over and over again and fill up the Blockchain with tons of spam, thus filling up the hard drives of every node and using up all their bandwidth.


Title: Re: Transaction fees and minig
Post by: refaelsh on March 07, 2013, 02:34:57 PM
Thank You Stephen Gornick and Blazr for Your answers.
So, is the transactions fee is something mandatory? Who enforces it (the client)?


Title: Re: Transaction fees and minig
Post by: Blazr on March 07, 2013, 02:54:47 PM
Thank You Stephen Gornick and Blazr for Your answers.
So, is the transactions fee is something mandatory? Who enforces it (the client)?

The fee is mandatory for certain transactions only, usually ones that are considered "spammy" or wasteful of network resources.

The client has a rule built in that requires a fee for these transactions, but obviously somebody can remove this, so in case somebody does, most Bitcoin nodes won't relay transactions that don't have the correct fee and most miner's won't include them in blocks (notice the use of the word most).

There are some nodes and some miners that do relay them/include them in blocks, so at the moment, it is sometimes possible to get away without paying a fee when it is required by using a modified client, but the transaction could take hours, days, weeks or even months to get included into a block by a miner, and may never at all.


Title: Re: Transaction fees and minig
Post by: refaelsh on March 07, 2013, 03:16:44 PM
Quote
The fee is mandatory for certain transactions only
What is the definition. Who defines it?
Quote
most Bitcoin nodes won't relay transactions that don't have the correct fee
Why?
Quote
Why the protocol is built in such a way? To not allow certain transactions?
Quote
most miner's won't include them in blocks
If I make a transaction, what it has to do with the miners? My client needs to transmit to the network that I performed a transactions. Where the miners involved here?



Title: Re: Transaction fees and minig
Post by: crazyates on March 07, 2013, 04:17:52 PM
Quote
The fee is mandatory for certain transactions only
What is the definition. Who defines it?
The creators of Bitcoin.

Quote
Quote
most Bitcoin nodes won't relay transactions that don't have the correct fee
Why?
IIRC, most pools will not include a TX with zero fees. It's set up like that on a user-defined basis, but most choose to do it the same way.

Quote
Quote
Why the protocol is built in such a way? To not allow certain transactions?
Quote
most miner's won't include them in blocks
If I make a transaction, what it has to do with the miners? My client needs to transmit to the network that I performed a transactions. Where the miners involved here?
You need to read up on how Bitcoin works in more detail if you don't understand the relationship between sending transactions and mining blocks. A very simple explanation is that a block is found by verifying all current transactions, building them together into a block, and passing the block reward and TX fees to the miner (or pool) that solved the block.


Title: Re: Transaction fees and mining
Post by: deepceleron on March 07, 2013, 04:24:40 PM
You can view my "how bitcoin works" link in my signature.

It's intended for noobs, so it won't answer your questions in extreme depth. Others have said it's too much reading for a noob, but I'm sure you are literate...


Title: Re: Transaction fees and mining
Post by: refaelsh on March 07, 2013, 06:37:49 PM
You can test-drive my page "how it works": http://we.lovebitco.in/how_it_works.html (it's a draft, other links in the page don't work).

It's intended for noobs, so it won't answer your questions in extreme depth. Others have said it's too much reading for a noob, but I'm sure you are literate...
Thank You deepceleron. I now have at least partial answer.


Title: Re: Transaction fees and minig
Post by: miter_myles on March 07, 2013, 06:38:08 PM
^ very nice.. like the background bar on the left


Title: Re: Transaction fees and minig
Post by: Blazr on March 08, 2013, 02:15:18 AM
What is the definition. Who defines it?

I don't know the exact definition, Google's your friend. It was defined by the development team.

Quote
most Bitcoin nodes won't relay transactions that don't have the correct fee
Why?

Why the protocol is built in such a way? To not allow certain transactions?

To make people pay their fees. Nodes won't relay transactions that are trying to get away without paying the fee when it is required.

If I make a transaction, what it has to do with the miners? My client needs to transmit to the network that I performed a transactions. Where the miners involved here?

When you make a transaction, it gets broadcasted to every node on the network, at this point it is an "unconfirmed transaction" and the receiver can't be sure that he has the BTC as the transaction may be a double-spend. After a while it'll make its way to a miner's node, this miner then gets all unconfirmed transactions it has received that have valid fees and puts them into a block. Once the miner finds the solution to the block it then broadcasts the block + solution to the network and every transaction in the block will now have 1 confirmation. Once the next miner solves a block, it goes "on top" of the last one, adding another confirmation to those transactions thus making them more secure and making it much more difficult for a malicious miner to try and reverse those transactions.


Title: Re: Transaction fees and minig
Post by: Jaw3bmasters on March 08, 2013, 02:40:37 AM
You guys must be bored......


Title: Re: Transaction fees and minig
Post by: refaelsh on March 08, 2013, 04:26:10 AM
What is the definition. Who defines it?

I don't know the exact definition, Google's your friend. It was defined by the development team.

Quote
most Bitcoin nodes won't relay transactions that don't have the correct fee
Why?

Why the protocol is built in such a way? To not allow certain transactions?

To make people pay their fees. Nodes won't relay transactions that are trying to get away without paying the fee when it is required.

If I make a transaction, what it has to do with the miners? My client needs to transmit to the network that I performed a transactions. Where the miners involved here?

When you make a transaction, it gets broadcasted to every node on the network, at this point it is an "unconfirmed transaction" and the receiver can't be sure that he has the BTC as the transaction may be a double-spend. After a while it'll make its way to a miner's node, this miner then gets all unconfirmed transactions it has received that have valid fees and puts them into a block. Once the miner finds the solution to the block it then broadcasts the block + solution to the network and every transaction in the block will now have 1 confirmation. Once the next miner solves a block, it goes "on top" of the last one, adding another confirmation to those transactions thus making them more secure and making it much more difficult for a malicious miner to try and reverse those transactions.
Thank You. I think I understand now.


Title: Re: Transaction fees and minig
Post by: eleuthria on March 09, 2013, 12:30:38 AM
IIRC, most pools will not include a TX with zero fees. It's set up like that on a user-defined basis, but most choose to do it the same way.

This bit is not entirely true.  MOST pools run default bitcoind rules, which set aside a small portion of each block specifically for no-fee transactions with a high priority.  Only a few in the past have run custom rules which blocked free transactions.  I know Deepbit at one point ran special rules that required above-average fees (more than what the standard client would include) once blocks were above 50KB, but I believe they've changed that.

Just as an example, recently BTC Guild upgraded from the default rules, which set aside 27 KB in the block for high priority/no-fee (or high priority/low-fee) transactions.  The new rules running at BTC Guild set aside a full 100 KB for this purpose.

In less than 24 hours, there has been a noticeable improvement in low/no fee transaction confirmation times.  By just a few pools (although BTC Guild is ~30% of the network, so I guess that counts as a lot) running larger blocks, the backlog gets cleared out extremely fast.  It's not uncommon for a BTC Guild block to confirm 95-99% of transactions currently in its the memory pool.


Title: Re: Transaction fees and minig
Post by: JoelKatz on March 09, 2013, 12:39:08 AM
In general, I cant find anywhere the answer to the question why the concept of transactions fees even exists.
The closest thing to an answer was "to support the miners".
Can somebody please elaborate on the subject?
Let's say the network is busy with transactions. Say it's so busy that there isn't room to accommodate every transaction that a person might want to do. Now, say you need to do a very important transaction while most of those transactions are relatively unimportant. You can simply pay a larger transaction fee and that gives miners an incentive to include your transaction rather than the less important ones.

Essentially, because transaction slots and bandwidth to relay transactions are scarce resources at times, some means of rationing them is needed. When those resources are not scarce, transactions can be included with no fees.

But also, it's to support the miners when the block reward drops. Miners are *required* to secure the blockchain. This is how Bitcoin solves the double spend problem. If there weren't sufficient mining activity, that would be a serious security problem.


Title: Re: Transaction fees and minig
Post by: hathmill on March 09, 2013, 05:19:19 PM
I have read that there is an arms race in mining equipment, because you need a fast computer to get the 25 coin reward. When the reward goes away and the miners only get fees, I presume that there still will be an arms race because only the fastest mining equipment will be able to secure the fees. An arms race costs money, so the fees have to be high enough to sustain this arms race. Do you think that the fees will remain low enough to keep Bitcoin competitive to other digital cash such as VISA and so forth and so on? Will it be so profitable to mine, that the network can stay decentralized or will we end up with only one pool? Anyone who "knows" what will happen?


Title: Re: Transaction fees and minig
Post by: refaelsh on March 09, 2013, 06:21:58 PM
Quote

But also, it's to support the miners when the block reward drops. Miners are *required* to secure the blockchain. This is how Bitcoin solves the double spend problem. If there weren't sufficient mining activity, that would be a serious security problem.
Oh thank You. This is the missing piece of information I did not know about. Now I understand.
Follow up questions:
1. What is keeping the miners to jack up the fee to very high levels?
2. What is the fee now?
3. Who enforces it?
4. What is the fee in the official client?
5. What is the fee in blockchain.info wallets?


Title: Re: Transaction fees and minig
Post by: JoelKatz on March 09, 2013, 09:34:54 PM
1. What is keeping the miners to jack up the fee to very high levels?
The miners face a "take it or leave it" proposition. They can either include a transaction or not. If they don't include a transaction because they'd prefer a higher fee, they just don't get any fee at all. A miner who insisted on higher fees would likely just wind up getting less because he'd be including fewer transactions in his blocks.

Quote
2. What is the fee now?
It's basically zero, or nearly zero. Enough miners will include any valid transaction that you can pay basically no fee and still get a transaction in.

Quote
3. Who enforces it?
Each miner decides for themselves which valid transactions they will or won't include in blocks that they mine.


Title: Re: Transaction fees and minig
Post by: crazyates on March 10, 2013, 01:05:56 AM
IIRC, most pools will not include a TX with zero fees. It's set up like that on a user-defined basis, but most choose to do it the same way.

This bit is not entirely true.  MOST pools run default bitcoind rules, which set aside a small portion of each block specifically for no-fee transactions with a high priority.  Only a few in the past have run custom rules which blocked free transactions.  I know Deepbit at one point ran special rules that required above-average fees (more than what the standard client would include) once blocks were above 50KB, but I believe they've changed that.

Just as an example, recently BTC Guild upgraded from the default rules, which set aside 27 KB in the block for high priority/no-fee (or high priority/low-fee) transactions.  The new rules running at BTC Guild set aside a full 100 KB for this purpose.

In less than 24 hours, there has been a noticeable improvement in low/no fee transaction confirmation times.  By just a few pools (although BTC Guild is ~30% of the network, so I guess that counts as a lot) running larger blocks, the backlog gets cleared out extremely fast.  It's not uncommon for a BTC Guild block to confirm 95-99% of transactions currently in its the memory pool.

TY for clearing that up for me.  ;D


Title: Re: Transaction fees and minig
Post by: porcupine87 on March 10, 2013, 11:18:26 PM
I have read that there is an arms race in mining equipment, because you need a fast computer to get the 25 coin reward. When the reward goes away and the miners only get fees, I presume that there still will be an arms race because only the fastest mining equipment will be able to secure the fees. An arms race costs money, so the fees have to be high enough to sustain this arms race. Do you think that the fees will remain low enough to keep Bitcoin competitive to other digital cash such as VISA and so forth and so on? Will it be so profitable to mine, that the network can stay decentralized or will we end up with only one pool? Anyone who "knows" what will happen?

That depends. Let's assume every miner has costs of 1000$ to solve one riddle first. Then he will be rewarded with 25BTC = 1000$. This is an equilibrium. Now let's assume the price per bitcoin doubles (reward = 2000$). So the market becomes highly profitable. Either already working miners now will invest up to 2000$ to solve a riddle first or the amount of miners will double (or between). It's just a matter of costs and revenue. Wheter there will be few highly equiped miners or many less euiped miners can no one say.