Skip to content

The Process of Buying a Pizza with Bitcoin

A customer named Kia wants to buy a pizza from a shop owner named Jeo using Bitcoin.

At this moment, Kia picks up her phone and sends a Bitcoin transfer request.

So what happens within the system? Let’s break it down step by step!

  1. Kia writes the Bitcoin transfer message ("Kia sends 1 coin to Jeo") and broadcasts this information.

  2. The transaction information ("Kia sends 1 coin to Jeo") is flying into the transaction memory pools of the three computers.
    Note: The transaction memory pool is where transactions are temporarily stored before being written into a block.

  3. The transaction ("Kia sends 1 coin to Jeo") is now stored in the transaction memory pools of all three computers.

  4. The three computers begin using electricity to search for a new block—this is the mining process.

  5. The top-left computer is the first to find a new block. It adds the transaction from the memory pool ("Kia sends 1 coin to Jeo") into the new block (Block 5),
    and also receives a reward for successfully finding the block.

  6. The top-left computer begins broadcasting Block 5.

The other computers, unaware that a new block has been found, are still mining and still have the transaction ("Kia sends 1 coin to Jeo") in their memory pools.

  1. Once the top-right and bottom computers receive Block 5,
    they see that the transaction ("Kia sends 1 coin to Jeo") has already been included in the block,
    so they remove that transaction from their memory pools.

And that's how buying a pizza with Bitcoin works.
Once the shop owner Jeo sees the transaction written into a block, it means he has successfully received the Bitcoin.
He can confidently hand the pizza over to the customer.

Summary

Mining in the Bitcoin system also serves the function of processing transactions.

As long as people continue to mine, the currency system can keep running.