<p>The lifecycle of a transaction is the following:</p>

<ol>
<li>Transaction creation:<br>
A sender creates a transaction, he includes a list of recipients, determines which previous transaction outputs to spend, and signs it. The difference between output total and input total determines the transaction fee.</li>
<li>Relay:<br>
The sender submits the transaction to the Bitcoin network. 
He simply sends it to his peers, which in turn relay it to theirs. Eventually the transaction will be seen by everyone as it spreads through the network.</li>
<li>Transaction selection:<br>
From all transactions that a miner is currently aware of (the "mempool"), each miner selects a subset that they want to include in a block. They usually select to include as many as are allowed (1MB), and select to create the most revenue for themselves (highest fee first). The miners are allowed to make any selection they want though, even to include no transactions at all (except the required coinbase transaction).</li>
<li>Block discovery:<br>
Approximately every ten minutes, one of the miners succeeds at authoring a block. This block confirms the transactions that he previously selected by writing them to the blockchain (as long as this block ends up being part of the chain with the most work). This block in turn is relayed through the network to update all nodes of the new state of the network. The payment is considered settled at this point (with a high degree of confidence, although a few extra confirmations don't hurt).</li>
</ol>

<p>There are multiple ways for a transaction to fail getting confirmed along the way:</p>

<ol>
<li>The transaction is invalid, e.g. by spending unavailable money, being malformatted, being in conflict with a confirmed transaction, or the signature being incorrect. Nodes will not relay invalid transactions and if they already have them, drop them from their mempool.</li>
<li>The transaction doesn't get relayed. This happens e.g. when the transaction fee is below the <code>minRelayTxFee</code> of the sender's peers. The senders will not add such a transaction to their mempool and will not relay it.</li>
<li>The transaction doesn't get selected for block templates. If a transaction doesn't belong to the top 1MB by transaction fee rate, it will usually be delayed significantly, until the feerate comes down to its own, it is made invalid by a competing transaction, or a miner is incentivized in another way to include it in a block. Such transactions may time out eventually (<a href="https://bitcoin.stackexchange.com/q/46152/5406">How do transactions leave the memory pool?</a>), but can remain valid indefinitely.</li>
</ol>

<hr>

<p>So, 1) there is a strict limit in the supply of blockspace with 1MB per ~ten minutes, and 2) Bitcoin transactions are useful in a number ways, it stands to reason that there will always be some sort of minimum bid to use blockspace (e.g. consolidation of low value unspent outputs, timestamping, colored coin applications, decentralized backups, poetry…). It follows that there will always be more demand for blockspace than supply and the price for blockspace will find some sort of balance at a fee rate where demand and supply match. Therefore, there will always be some unconfirmed transaction.</p>

CC BY-SA 3.0
2017-06-08T09:11:37.817Z
Like `minRelayTxFee`, is there also an upper bound for the fees?
Önder Gürcan
CC BY-SA 3.0
2017-06-08T15:10:03.360Z
I believe that some wallets will not relay a transaction with too high a fee in order to protect users from mistakes (e.g. it has happened that users have mixed up transaction fees and send amount and paid 300 BTC transaction fees),  but besides that there isn't really one.
Murch
CC BY-SA 3.0
2017-06-08T01:32:36.753Z
2017-06-08T01:32:36.753Z
Murch
<p>Transactions selected in mining blocks is not like a queue, where you wait your time and get to the front eventually.</p>

<p>Fees are not mandatory, but should be included in every transaction, if you have sent none, or low fees, you can still be selected (although it's highly unlikely), but the miner would be silly as they could just take the higher fee offered by someone else. Remember when you post a transaction you <em>offer</em> a fee.</p>

<p>If you owned a bakery and made 1000 loaves of bread a day, but had 1500 customers, would you sell them to someone offering $0.10 when other people are offering $1.00+.</p>

CC BY-SA 3.0
2017-06-07T12:23:43.287Z
If this is the case, it means that the system does not gurantee that my transaction will be confirmed. In addition, such a fee policy is creating a free market where fees always go up. In this case, what is the attraction for people to use BitCoin (unless he is not doing some illegal/hidden stuff)? What is the logic behind of such transaction fee policy?
Önder Gürcan
CC BY-SA 3.0
2017-06-07T13:54:45.697Z
*"What is the logic behind of such transaction fee policy?"* Miners have to get paid somehow; they buy and operate expensive, specialized computers, and use lots of electricity, which costs a lot of money.  How would you propose that miners get paid if not through fees?
abelenky
CC BY-SA 3.0
2017-06-07T15:01:58.660Z
@ÖnderGürcan You're assuming blocks are always full, on days when only 500 people walk into your shop, you can sell to the guy who wants it for $0.10, although you're under no obligation.  Once the Bitcoin scaling issue is resolved, fees should start to come down. But it's unlikely to change for the better in the short term, neither solution offers short term resolutions.
Daniel Morritt
CC BY-SA 3.0
2017-06-07T15:29:07.323Z
I do understand. But is there any statistics showing how much does it cost for a miner to create a block? We all know that it gets `at least` 25 BTC for the block generation (which is around 60000 dolars now). I am not againt that miner should earn money but, do they earn a reasonable money or they earn too much? 1 to 10 or 1 to 1 million?
Önder Gürcan
CC BY-SA 3.0
2017-06-08T11:42:22.360Z
After the last halvening, miners get 12.5 BTC per block.  Block creation is a bit of a hit topic, but usually results in several thousand dollars in fees, personally I think that's excessive, but they might have different opinions.  Miners can also mine empty blocks (no transactions), and it could actually be a good idea (if a bit evil from a user perspective) as nodes can relay that faster than a 1MB block.
Daniel Morritt
CC BY-SA 3.0
2017-06-07T12:13:11.793Z
2017-06-07T12:13:11.793Z
Daniel Morritt
<p>if you dont give enough fee, you can wait a loot of time for the transaction to be completet.</p>

<p>i did yesterday 1000€ transaktion and i gived the fee´s for 100€ - it was in 3-4 hours done and accepted.</p>

<p>.. it gives a queue - if your fee is 0.10 cent
and from another guys 1-2-3 euro or more.</p>

<p>they will be first placed befor you !..</p>

<p>so if you are unlucky will be all transaction befor you placed..</p>

<p>i think so becouse since 1 month i bought anythink for 200 euro and it was 2 months unconfirmed transaktion....</p>

<p>i hope i can help you--</p>

<p>do this trick like me - give everytime 3x more fee than normal.
and all is okay :)</p>

CC BY-SA 3.0
2017-06-07T09:56:59.503Z
2017-06-07T09:56:59.503Z
DerBringer
<p>As far as I know, a miner begins creating a new block as soon as it receives a valid block from another miner. It then begins to construct and hash the next block on top of the block it just received by using all the transactions it has in its memory pool.</p>

<p>However, <a href="https://bitcoin.stackexchange.com/search?q=unconfirmed%20transaction">there are still some transactions that are not easily confirmed (or not confirmed at all), in the BitCoin</a>.</p>

<p>Can anyone explain to me why this can happen? Is it because of some transaction selection mechanism that the miners use? or is it because of the unreliability of the connecitivity between the nodes? or something else?</p>

<unconfirmed-transactions><transaction-selection><blocksize><blockspace-market><transaction-capacity>
Why are there always some unconfirmed transactions?
Önder Gürcan
# Why are there always some unconfirmed transactions?

(Asked by: username_0 on 2017-06-07)

As far as I know, a miner begins creating a new block as soon as it receives a valid block from another miner. It then begins to construct and hash the next block on top of the block it just received by using all the transactions it has in its memory pool.

However, [there are still some transactions that are not easily confirmed (or not confirmed at all), in the BitCoin](https://bitcoin.stackexchange.com/search?q=unconfirmed%20transaction).

Can anyone explain to me why this can happen? Is it because of some transaction selection mechanism that the miners use? or is it because of the unreliability of the connecitivity between the nodes? or something else?

**Tags:** unconfirmed-transactions, transaction-selection, blocksize, blockspace-market, transaction-capacity


---

## 3 answers

### Answer by username_1 on 2017-06-08. Score: 1 | Accepted answer

The lifecycle of a transaction is the following:

1. Transaction creation:  
   A sender creates a transaction, he includes a list of recipients, determines which previous transaction outputs to spend, and signs it. The difference between output total and input total determines the transaction fee.
2. Relay:  
   The sender submits the transaction to the Bitcoin network.
   He simply sends it to his peers, which in turn relay it to theirs. Eventually the transaction will be seen by everyone as it spreads through the network.
3. Transaction selection:  
   From all transactions that a miner is currently aware of (the "mempool"), each miner selects a subset that they want to include in a block. They usually select to include as many as are allowed (1MB), and select to create the most revenue for themselves (highest fee first). The miners are allowed to make any selection they want though, even to include no transactions at all (except the required coinbase transaction).
4. Block discovery:  
   Approximately every ten minutes, one of the miners succeeds at authoring a block. This block confirms the transactions that he previously selected by writing them to the blockchain (as long as this block ends up being part of the chain with the most work). This block in turn is relayed through the network to update all nodes of the new state of the network. The payment is considered settled at this point (with a high degree of confidence, although a few extra confirmations don't hurt).

There are multiple ways for a transaction to fail getting confirmed along the way:

1. The transaction is invalid, e.g. by spending unavailable money, being malformatted, being in conflict with a confirmed transaction, or the signature being incorrect. Nodes will not relay invalid transactions and if they already have them, drop them from their mempool.
2. The transaction doesn't get relayed. This happens e.g. when the transaction fee is below the `minRelayTxFee` of the sender's peers. The senders will not add such a transaction to their mempool and will not relay it.
3. The transaction doesn't get selected for block templates. If a transaction doesn't belong to the top 1MB by transaction fee rate, it will usually be delayed significantly, until the feerate comes down to its own, it is made invalid by a competing transaction, or a miner is incentivized in another way to include it in a block. Such transactions may time out eventually ([How do transactions leave the memory pool?](https://bitcoin.stackexchange.com/q/46152/5406)), but can remain valid indefinitely.

---

So, 1) there is a strict limit in the supply of blockspace with 1MB per ~ten minutes, and 2) Bitcoin transactions are useful in a number ways, it stands to reason that there will always be some sort of minimum bid to use blockspace (e.g. consolidation of low value unspent outputs, timestamping, colored coin applications, decentralized backups, poetry…). It follows that there will always be more demand for blockspace than supply and the price for blockspace will find some sort of balance at a fee rate where demand and supply match. Therefore, there will always be some unconfirmed transaction.

> **Comments:**
> **username_0**: Like `minRelayTxFee`, is there also an upper bound for the fees?  
> **username_1**: I believe that some wallets will not relay a transaction with too high a fee in order to protect users from mistakes (e.g. it has happened that users have mixed up transaction fees and send amount and paid 300 BTC transaction fees),  but besides that there isn't really one.  

---

### Answer by username_2 on 2017-06-07. Score: 1

Transactions selected in mining blocks is not like a queue, where you wait your time and get to the front eventually.

Fees are not mandatory, but should be included in every transaction, if you have sent none, or low fees, you can still be selected (although it's highly unlikely), but the miner would be silly as they could just take the higher fee offered by someone else. Remember when you post a transaction you *offer* a fee.

If you owned a bakery and made 1000 loaves of bread a day, but had 1500 customers, would you sell them to someone offering $0.10 when other people are offering $1.00+.

> **Comments:**
> **username_0**: If this is the case, it means that the system does not gurantee that my transaction will be confirmed. In addition, such a fee policy is creating a free market where fees always go up. In this case, what is the attraction for people to use BitCoin (unless he is not doing some illegal/hidden stuff)? What is the logic behind of such transaction fee policy?  
> **username_3**: *"What is the logic behind of such transaction fee policy?"* Miners have to get paid somehow; they buy and operate expensive, specialized computers, and use lots of electricity, which costs a lot of money.  How would you propose that miners get paid if not through fees?  
> **username_2**: @username_0 You're assuming blocks are always full, on days when only 500 people walk into your shop, you can sell to the guy who wants it for $0.10, although you're under no obligation.  Once the Bitcoin scaling issue is resolved, fees should start to come down. But it's unlikely to change for the better in the short term, neither solution offers short term resolutions.  
> **username_0**: I do understand. But is there any statistics showing how much does it cost for a miner to create a block? We all know that it gets `at least` 25 BTC for the block generation (which is around 60000 dolars now). I am not againt that miner should earn money but, do they earn a reasonable money or they earn too much? 1 to 10 or 1 to 1 million?  
> **username_2**: After the last halvening, miners get 12.5 BTC per block.  Block creation is a bit of a hit topic, but usually results in several thousand dollars in fees, personally I think that's excessive, but they might have different opinions.  Miners can also mine empty blocks (no transactions), and it could actually be a good idea (if a bit evil from a user perspective) as nodes can relay that faster than a 1MB block.  

---

### Answer by username_4 on 2017-06-07. Score: -1

if you dont give enough fee, you can wait a loot of time for the transaction to be completet.

i did yesterday 1000€ transaktion and i gived the fee´s for 100€ - it was in 3-4 hours done and accepted.

.. it gives a queue - if your fee is 0.10 cent
and from another guys 1-2-3 euro or more.

they will be first placed befor you !..

so if you are unlucky will be all transaction befor you placed..

i think so becouse since 1 month i bought anythink for 200 euro and it was 2 months unconfirmed transaktion....

i hope i can help you--

do this trick like me - give everytime 3x more fee than normal.
and all is okay :)


---

