<p>I think David ilustrated very well how things works, but I feel your question was not fully answered since you asked about time. So I will try to complete the answer above.</p>

<p>As David said in the previous answer, when you send a payment (or transaction), somethings happen at first: the sending of the transactions to one or few nodes, the broadcast of that transaction to all nodes (including miners), the placing of that transaction on a block to be mined. </p>

<p>All this envolves many parties but it takes less then a second or, at most, a few seconds. At this moment, all the nodes (including mining nodes) must have your transaction in a pending state. In fact, the transaction is on what is called a mining pool. It is there, but it was not included in any block yet. As David said, only by including a transaction on a block, receiver of that transaction can be safe that you will not spend the money in other place. </p>

<p>SO, AT THIS MOMENT, EVERYBODY KNOWS ABOUT YOUR TRANSACTION, BUT IT IS NOT CONFIRME YET.</p>

<p>Then, mining takes place. Mining a block takes on average 10 minutes. If you paid a good fee for that transaction or if the mining pool does not have many transactions, your transaction should be included in the next block to be mined. And this will be done by all (or, at least, most) of the miners.  </p>

<p>As David said, mining consists of solving a puzzle. You take a set of transactions (which forms a block) and try to find a number that comply with a predetermined rule (the puzzle). The original block plus this found number is what is called a mined block. When one miner solves this puzzle, it will broadcast the block with the solution and all other nodes (including other  miners) will verify it and put the block in the chain. *  </p>

<p>NOW, RETURNING TO ANSWER ABOUT TIME. </p>

<p>We have two scenarios to explain how your transactions were received so fast. First, it is possible that the party that received value from you, asked the network (which means, asked one of the nodes of the network) if your transaction was received and is on the mining pool. For very small payments, it can be enough to trust you will not try to spend this money again. And this can be very fast, can take less then a second or at most few seconds.</p>

<p>The second scenario is when the receiving party only consider the payment done when it is confirmed, which means, a block with your transaction is included in the chain. How long does it take then? There is the time your block sits on the mining pool waiting to be include in a block. And there is the minig time. When is said that the block is mined on average in 10 minutes, it means, statistically, that it can take an hour or few seconds.
So, if you were very lucky, the block including your transaction started beeing mined soon after your transaction arrived at the mining pool. And was mined very fast. This could explain a fast confirmation. It can happen but it will be an exception.</p>

<p>(*) There are complications when two miners find the solution at the same time. Because of that, one transaction can really be categorized as confirmed only when six more blocks are put on the chain after the one that contains the transaction. But for transactions with value bellow $1000, it is safe enough to assume confirmation with just one block. For more on that see <a href="https://en.bitcoin.it/wiki/Confirmation" rel="nofollow noreferrer">https://en.bitcoin.it/wiki/Confirmation</a></p>

CC BY-SA 4.0
2018-05-09T16:12:47.550Z
2018-05-09T16:20:59.393Z
2018-05-09T16:20:59.393Z
Andre Luis IM
<p>Let us firstly divide the stages of the transaction into 2 major categories for better understanding.</p>
<h1>Stage 1: Initiation of the transaction (Mempool)</h1>
<p>In this stage, <strong>ALICE</strong> (sender) <em>broadcasts</em> a transaction she made to <strong>BOB</strong> (receiver). This transactional detail is sent in the Mempool along with the specified feed that <strong>ALICE</strong> (or some mediating platform) is ready to pay to get that transaction mined.</p>
<h1>Stage 2: Mining of the transaction (Blockchain)</h1>
<p>In this stage, your transaction gets appended in the block that was last mined. This block is then added to the longest chain in the existent blockchain hence confirming the transaction.</p>
<h2>Explaining the nuances further;</h2>
<p>In your use case, you make a transaction on a mediating platform which provides you with a wallet.
Now, this wallet is divided into two parts, the <em>hot wallet</em> and the <em>cold wallet</em>. The hot wallet is used to directly write data to the blockchain and the cold wallet is a de/centralized ledger that these mediators use to keep internal transaction records.
Any internal transaction is hence instantaneously realized.</p>
<h3>For external transactions, the complexity increases a bit.</h3>
<p>Now, say you have 2BTC and decide to make a transaction to ALICE worth 1.5BTC. You make the transaction and broadcast it in the network. This will update your balance to 0.5BTC and provide ALICE with 1.5BTC.
You both can see the updated transactional records in your wallets, yet are limited from withdrawing (re-spending) the stipulated amount until the transaction is realized, hence avoiding double spend.</p>
<p>From what I can understand, these websites often consider Mempool transactions as validation enough to confirm transactions at their level.</p>
<p><em>P.S. I'm still learning and this may not be the perfect answer to your question.</em></p>

CC BY-SA 4.0
2018-05-09T22:27:39.467Z
2018-05-09T22:27:39.467Z
2020-06-16T11:10:03.350Z
Junaid Shaikh
<p>When you create a transaction, your Bitcoin wallet broadcasts it to a few full nodes on the Bitcoin peer-to-peer network.  Those full nodes quickly relay it to other full nodes, and it eventually ends up at the full nodes run by the sites you linked to.  That's how those sites know the transaction exists.</p>

<p>The full nodes also relay the transaction to Bitcoin miners.  Each miner may choose to include your transaction in a block of transactions.  (Miners usually choose to include the transactions that pay the highest transaction fees per kilobyte of transaction data.)</p>

<p>Miners have to solve a sort-of random puzzle---whichever miner solves it first can include proof they solved the puzzle in their block of transactions and send that block to full nodes.  Those full nodes relay the block to other full nodes and eventually the block ends up at the full nodes run by the sites you linked to (and to the wallet of the person you paid).</p>

<p>The puzzles are very hard to solve, so a block with proof of a solved puzzle is hard to fake.  This means any transactions in that block are considered hard to undo.  Also, the next block has to point to the previous block, so it would then require solving two very hard puzzles to undo the transactions in the block containing your transactions.  And it keeps getting harder and harder each time a new block is created.</p>

<p>As you may have guessed, it takes an average of about 10 minutes of puzzle-solving by all miners before any particular miner solves a puzzle, so it takes about 10 minutes on average for a transaction to be protected.  Up until that point, you could create a duplicate transaction that steals back the money you spent---so nobody trusts high-value transactions until they appear in at least one block (and more blocks are better).</p>

<p>P.S. Newbie questions are always welcome!</p>

CC BY-SA 3.0
2015-01-18T02:58:46.347Z
thanks! i'm aware of the basics, so sorry for not making the question clear. how is that these sites can know the tx happened after a few seconds -- instead of ~10 min?
Crashalot
CC BY-SA 3.0
2015-01-18T03:09:59.533Z
That's explained in the first two sentences of the answer.
David A. Harding
CC BY-SA 3.0
2015-01-18T03:23:57.703Z
ok, thanks. and that initial propagation takes only a few seconds? is that lag time in any way dependent on the size of the blockchain (e.g., it will increase over time)? so basically those sites are monitoring the full nodes, as in those sites are scanning all new transactions for ones relevant to their sites? thanks again!
Crashalot
CC BY-SA 3.0
2015-01-18T03:25:00.517Z
to clarify, those sites are taking a risk by recognizing the transactions so quickly (i.e., before they are confirmed)? they are betting buyers do not reverse the transaction, but this could happen, right? thanks again for your help!
Crashalot
CC BY-SA 3.0
2015-01-18T03:40:02.950Z
Monitor sites aren't risking anything themselves.  Users who trust unconfirmed transactions are at greatly increased risk of a "reversal" (called a double spend in Bitcoin jargon). [This site](http://bitcoinstats.com/network/propagation/) has transaction propagation times. Propagation time is not correlative to the size of the block chain, but it likely does correlate to the size of individual transactions and blocks. Over time, we expect prop. time to decrease as people get better connections and the Bitcoin network protocol matures. Yes, those sites are scanning all new transactions.
David A. Harding
CC BY-SA 3.0
2015-01-18T02:32:33.117Z
2015-01-20T13:02:37.210Z
2015-01-20T13:02:37.210Z
David A. Harding
<p><a href="http://www.bitcoinmonitor.net/" rel="noreferrer">Bitcoin Monitor</a> offers to issue a notification moments after a payment is sent to a Bitcoin address. Yet if Bitcoin transactions require ~10 min to get written into the blockchain and confirmed as official, how can payments get recognized within moments?</p>

<p>On the other hand, <a href="http://bitcoin.network/" rel="noreferrer">Bitcoin.network</a> requires payment via Bitcoin before making the blockchain available for downloading. It publishes a download URL seconds after a payment is made. How can the site be sure the payment is legitimate. How does it know the payment has been made only a few seconds after payment is sent?</p>

CC BY-SA 3.0
2015-01-18T11:09:52.287Z
It's a good question, and well-phrased. More than welcome. :)
Murch
CC BY-SA 3.0
2015-01-18T11:35:44.520Z
Thanks @Murch! Do you know the answer to my other question: http://bitcoin.stackexchange.com/questions/35591/sites-for-searching-the-blockchain?
Crashalot
<transactions><transaction-verification><zero-confirmation>
If Bitcoin transactions require ~10 min to clear, how can payments get recognized within seconds?
Crashalot
# If Bitcoin transactions require ~10 min to clear, how can payments get recognized within seconds?

(Asked by: username_0 on 2015-01-18)

[Bitcoin Monitor](http://www.bitcoinmonitor.net/) offers to issue a notification moments after a payment is sent to a Bitcoin address. Yet if Bitcoin transactions require ~10 min to get written into the blockchain and confirmed as official, how can payments get recognized within moments?

On the other hand, [Bitcoin.network](http://bitcoin.network/) requires payment via Bitcoin before making the blockchain available for downloading. It publishes a download URL seconds after a payment is made. How can the site be sure the payment is legitimate. How does it know the payment has been made only a few seconds after payment is sent?

**Tags:** transactions, transaction-verification, zero-confirmation

> **Comments:**
> **username_1**: It's a good question, and well-phrased. More than welcome. :)  
> **username_0**: Thanks @username_1! Do you know the answer to my other question: http://bitcoin.stackexchange.com/questions/35591/sites-for-searching-the-blockchain?  

---

## 3 answers

### Answer by username_4 on 2015-01-18. Score: 9 | Accepted answer

When you create a transaction, your Bitcoin wallet broadcasts it to a few full nodes on the Bitcoin peer-to-peer network. Those full nodes quickly relay it to other full nodes, and it eventually ends up at the full nodes run by the sites you linked to. That's how those sites know the transaction exists.

The full nodes also relay the transaction to Bitcoin miners. Each miner may choose to include your transaction in a block of transactions. (Miners usually choose to include the transactions that pay the highest transaction fees per kilobyte of transaction data.)

Miners have to solve a sort-of random puzzle---whichever miner solves it first can include proof they solved the puzzle in their block of transactions and send that block to full nodes. Those full nodes relay the block to other full nodes and eventually the block ends up at the full nodes run by the sites you linked to (and to the wallet of the person you paid).

The puzzles are very hard to solve, so a block with proof of a solved puzzle is hard to fake. This means any transactions in that block are considered hard to undo. Also, the next block has to point to the previous block, so it would then require solving two very hard puzzles to undo the transactions in the block containing your transactions. And it keeps getting harder and harder each time a new block is created.

As you may have guessed, it takes an average of about 10 minutes of puzzle-solving by all miners before any particular miner solves a puzzle, so it takes about 10 minutes on average for a transaction to be protected. Up until that point, you could create a duplicate transaction that steals back the money you spent---so nobody trusts high-value transactions until they appear in at least one block (and more blocks are better).

P.S. Newbie questions are always welcome!

> **Comments:**
> **username_0**: thanks! i'm aware of the basics, so sorry for not making the question clear. how is that these sites can know the tx happened after a few seconds -- instead of ~10 min?  
> **username_4**: That's explained in the first two sentences of the answer.  
> **username_0**: ok, thanks. and that initial propagation takes only a few seconds? is that lag time in any way dependent on the size of the blockchain (e.g., it will increase over time)? so basically those sites are monitoring the full nodes, as in those sites are scanning all new transactions for ones relevant to their sites? thanks again!  
> **username_0**: to clarify, those sites are taking a risk by recognizing the transactions so quickly (i.e., before they are confirmed)? they are betting buyers do not reverse the transaction, but this could happen, right? thanks again for your help!  
> **username_4**: Monitor sites aren't risking anything themselves.  Users who trust unconfirmed transactions are at greatly increased risk of a "reversal" (called a double spend in Bitcoin jargon). [This site](http://bitcoinstats.com/network/propagation/) has transaction propagation times. Propagation time is not correlative to the size of the block chain, but it likely does correlate to the size of individual transactions and blocks. Over time, we expect prop. time to decrease as people get better connections and the Bitcoin network protocol matures. Yes, those sites are scanning all new transactions.  

---

### Answer by username_2 on 2018-05-09. Score: 3

I think username_4 ilustrated very well how things works, but I feel your question was not fully answered since you asked about time. So I will try to complete the answer above.

As username_4 said in the previous answer, when you send a payment (or transaction), somethings happen at first: the sending of the transactions to one or few nodes, the broadcast of that transaction to all nodes (including miners), the placing of that transaction on a block to be mined.

All this envolves many parties but it takes less then a second or, at most, a few seconds. At this moment, all the nodes (including mining nodes) must have your transaction in a pending state. In fact, the transaction is on what is called a mining pool. It is there, but it was not included in any block yet. As username_4 said, only by including a transaction on a block, receiver of that transaction can be safe that you will not spend the money in other place.

SO, AT THIS MOMENT, EVERYBODY KNOWS ABOUT YOUR TRANSACTION, BUT IT IS NOT CONFIRME YET.

Then, mining takes place. Mining a block takes on average 10 minutes. If you paid a good fee for that transaction or if the mining pool does not have many transactions, your transaction should be included in the next block to be mined. And this will be done by all (or, at least, most) of the miners.

As username_4 said, mining consists of solving a puzzle. You take a set of transactions (which forms a block) and try to find a number that comply with a predetermined rule (the puzzle). The original block plus this found number is what is called a mined block. When one miner solves this puzzle, it will broadcast the block with the solution and all other nodes (including other miners) will verify it and put the block in the chain. \*

NOW, RETURNING TO ANSWER ABOUT TIME.

We have two scenarios to explain how your transactions were received so fast. First, it is possible that the party that received value from you, asked the network (which means, asked one of the nodes of the network) if your transaction was received and is on the mining pool. For very small payments, it can be enough to trust you will not try to spend this money again. And this can be very fast, can take less then a second or at most few seconds.

The second scenario is when the receiving party only consider the payment done when it is confirmed, which means, a block with your transaction is included in the chain. How long does it take then? There is the time your block sits on the mining pool waiting to be include in a block. And there is the minig time. When is said that the block is mined on average in 10 minutes, it means, statistically, that it can take an hour or few seconds.
So, if you were very lucky, the block including your transaction started beeing mined soon after your transaction arrived at the mining pool. And was mined very fast. This could explain a fast confirmation. It can happen but it will be an exception.

(\*) There are complications when two miners find the solution at the same time. Because of that, one transaction can really be categorized as confirmed only when six more blocks are put on the chain after the one that contains the transaction. But for transactions with value bellow $1000, it is safe enough to assume confirmation with just one block. For more on that see <https://en.bitcoin.it/wiki/Confirmation>


---

### Answer by username_3 on 2018-05-09. Score: 2

Let us firstly divide the stages of the transaction into 2 major categories for better understanding.

# Stage 1: Initiation of the transaction (Mempool)

In this stage, **ALICE** (sender) *broadcasts* a transaction she made to **BOB** (receiver). This transactional detail is sent in the Mempool along with the specified feed that **ALICE** (or some mediating platform) is ready to pay to get that transaction mined.

# Stage 2: Mining of the transaction (Blockchain)

In this stage, your transaction gets appended in the block that was last mined. This block is then added to the longest chain in the existent blockchain hence confirming the transaction.

## Explaining the nuances further;

In your use case, you make a transaction on a mediating platform which provides you with a wallet.
Now, this wallet is divided into two parts, the *hot wallet* and the *cold wallet*. The hot wallet is used to directly write data to the blockchain and the cold wallet is a de/centralized ledger that these mediators use to keep internal transaction records.
Any internal transaction is hence instantaneously realized.

### For external transactions, the complexity increases a bit.

Now, say you have 2BTC and decide to make a transaction to ALICE worth 1.5BTC. You make the transaction and broadcast it in the network. This will update your balance to 0.5BTC and provide ALICE with 1.5BTC.
You both can see the updated transactional records in your wallets, yet are limited from withdrawing (re-spending) the stipulated amount until the transaction is realized, hence avoiding double spend.

From what I can understand, these websites often consider Mempool transactions as validation enough to confirm transactions at their level.

*P.S. I'm still learning and this may not be the perfect answer to your question.*


---

