40

Whenever I send bitcoins from one wallet or one exchange to the next there is always a fee. This makes sense with the exchange sites, they are just collecting the fee so they can make a living. What about the open source wallets that I've installed on my computer? Surely, nobody is collecting my bitcoins because my transactions are too long! So, is the "fee" part of the Bitcoin algorithm? Do the coins that are confiscated in the fee go to Bitcoin miners?

Also, when does the fee start? I noticed, if I send like 0.05 bitcoins there is no fee, but if I send 0.1 bitcoins there is a fee. What if I just sent 0.05 bit coins twice? Or is it if they are in the same block I will get a fee, so I'd have to send them twice (and 10 minutes apart)?

1
  • Reading this now is a hoot, back in 2013 you could actually do no-fee transactions when transacting small enough amounts... miners were just generous I suppose? Lol (Was probably in reality the GUI of the wallet I was using just truncating to 0, no way to really 'go back' and check now though...) Dec 9, 2021 at 0:24

3 Answers 3

34

The fee goes to the miner who mines the block that includes your transaction. The fee is based on the size (in bytes) of the transaction and the age of its inputs (how long ago the coins spent were received).

Transactions get big if they have to "pull in" a lot of outputs from previous transactions and that raises the fee. So if you got a lot of small payments and then try to make a large payment, the transaction will be expensive because it needs to gather all those small payments.

6
  • 2
    Ah! Cool! Makes a lot of sense now! Now as for the "blocks" I heard that it's like x bit coins are given every 10 minutes, and then it will be a halved every 4 years until it runs out... I'm assuming that's talking about new bit coins being created? Once fit runs out in 2038 or whatever the date is will miners still be mining the fees that transactioners are charged? Apr 17, 2013 at 16:03
  • 2
    @AlbertRenshaw: Assuming nothing changes between now and then, miners will continue to mine after 2038 for the transaction fees. There's a chance this will be changed by then, but it's very small. (Basically, pretty much everyone would have to agree to change it, and that would only happen if things were somehow very broken in ways we don't expect.) Apr 17, 2013 at 16:25
  • 2
    So does mining actually accomplish something other than distributing the currency while it's still being created? What exactly is the purpose of mining after 2038? I like I know that you can mine for the transaction fee coins but why would bit coins be programmed to do that? Why not just make mining obsolete by then and get rid of transaction fees? Or does mining have a greater hidden purpose than just getting people to collect coins in a fair manner? Apr 18, 2013 at 1:13
  • 3
    @AlbertRenshaw: Without mining, there would be no way to know which transactions were valid. There would be nothing to stop someone from spending the same bitcoins more than once. Apr 18, 2013 at 19:15
  • I'm a bit confused by this answer. Plz help me understand :) So if I'm not mistaken current block reward is 12 BTC per block. Transactions are not required for mining. So if there were no transactions miner would still get his 12 BTC. Does the miner get 12 BTC + transactions?
    – AlexVPerl
    May 26, 2017 at 5:12
13

From the Bitcoin.it wiki:

Transaction fees are voluntary on the part of the person making the bitcoin transaction, as the person attempting to make a transaction can include any fee or none at all in the transaction. On the other hand, nobody mining new bitcoins necessarily needs to accept the transactions and include them in the new block being created. The transaction fee is therefore an incentive on the part of the bitcoin user to make sure that a particular transaction will get included into the next block which is generated.

The client might send one transaction for free but then for the next transaction (even if it is for a smaller amount) the client might show that a fee is required. This is likely due to the makeup of the remaining coins in the wallet. After your first transaction, any change that was made gets sent back to you but that becomes a "newly received" coin.

To the network, if that second transaction includes this newly received coin that would look the same as a transaction made by someone trying to harm the network. That type of harmful action tries to re-spend the same funds over and over but without paying a fee.

So just like how there might be a candy dish on a receptionists desk and you are free to take one doesn't mean you are free to take all the candy from the dish.

That's the same approach here. The client will let you spend coins that have some time passed (i.e., were not just received) without having to pay a fee.

If your coins are instead being re-spent within a short amount of time (i.e,. same day), then the presumption is that you could be harming the network therefore a fee is required to prevent that activity. If it was a transaction being made without the intent to harm the network, then requiring a small fee shouldn't be that much of a restriction.

3
  • 3
    I do think, however, that the above quote can be confusing to users. Yes, the protocol says that fees are entirely optional. However, the standard client does enforce minimum fees on transactions that are unlikely to confirmed otherwise. (For all of the characteristics you point out: small amounts, many inputs, new inputs, low priority.) Apr 17, 2013 at 17:31
  • However, the longer the transaction waited to be confirmed, the higher its priority will get, right?
    – Murch
    Aug 27, 2013 at 13:51
  • But the client will eventually drop a transaction that doesn't confirm and a certain amount of time has passed, regardless of its priority. So if a transaction hasn't confirmed within a day, for example, it will likely get dropped. That's why the client will re-broadcast a transaction if it sees that it isn't getting a confirmation. Aug 31, 2013 at 3:06
-1

It is also important to note that if the inputs you are sending in your transaction are older then there is a greater chance they won’t require a fee. Old coins means coins that haven’t been moved for a long time.

Additionally, most times you won’t have that much control over whether your transaction requires fees or not. Your Bitcoin wallet will usually make the optimization of inputs for you so you will avoid fees when possible.

3
  • Hey, sorry to be the one to disagree again, but selection by priority had been losing ground to selection by fee for a while, and has practically been discontinued since Bitcoin Core v0.12.0 turned it off by default in February this year.
    – Murch
    Oct 26, 2016 at 16:24
  • No worries. I welcome corrections so that the community if not given incorrect information. I thought that this selection by priority is still in existence, and is rumored to be defunk in Bitcoin Core 0.13? Oct 26, 2016 at 16:31
  • As far as I remember 0.12.1 and 0.13.0 didn't change anything in the default behavior of the miner's transaction selection, except for adding the Child-pays-for-parent policy. While the code wasn't completely removed in 0.12.0, I'm almost certain that miners have stopped using priority by now. I've asked a follow-up question here though: Are any miners still considering priority in their transaction selection?
    – Murch
    Oct 26, 2016 at 16:46

Not the answer you're looking for? Browse other questions tagged or ask your own question.