Suppose Chris runs an online shopping mall that supports Bitcoin as a payment method. Felix ordered an iPhone from Chris’s website. Felix chooses Bitcoin as a payment method, and Chris will wait for the payment to be confirmed before sending the iPhone to Felix.
When Chris confirms the transaction message that he will send the money to him, Chris will send the product to Felix. However, if the transaction that Felix sent money to him is added to the blockchain before that, Felix will have an iPhone for free.
At this time, Chris may think that this problem will be solved if she waits for the transaction sent to her to be added to the blockchain without sending the iPhone after the transaction is announced.
However, this method is still not a sufficient solution.
This is because sometimes one or more transactions are added simultaneously, creating a fork in the chain. In this situation, after completing the block, the miner can choose the transaction he wants to add. In this case, the branch formed by one specific transaction becomes longer than the other. When this happens, the short branches are abandoned and all transactions added to them are returned to Mempool.
For this reason, it is recommended to wait for at least six blocks to be added to the chain before determining that the transaction has been completed. Transactions recently added to the blockchain are sometimes referred to as popular transactions.