Introduction to Decentralized Trust in the Bitcoin System
The bitcoin system, unlike traditional banking and payment systems, is based on decentralized trust. Instead of a central trusted authority, in bitcoin, trust is achieved as an emergent property from the interactions of different participants in the bitcoin system. In this chapter, we will examine How bitcoin works from a high level by tracking a single transaction through the bitcoin system and watch as it becomes “trusted” and accepted by the bitcoin mechanism of distributed consensus and is finally recorded on the blockchain, the distributed ledger of all transactions.

Simulating Real Transactions
Each example below is based upon an actual transaction made on the bitcoin network, simulating the interactions between the users (Joe, Alice, and Bob) by sending funds from one wallet to another. While tracking a transaction through the bitcoin network and blockchain, we will use a blockchain explorer site to visualize each step. A blockchain explorer is a web application that operates as a bitcoin search engine, in that it allows you to search for addresses, transactions, and blocks and see the relationships and flows between them.
Popular Blockchain Explorers
Popular blockchain explorers include:
Each of these has a search function that can take an address, transaction hash, or block number and find the equivalent data on the bitcoin network and blockchain. With each example, we will provide a URL that takes you directly to the relevant entry, so you can study it in detail.
What are people actually using Bitcoin for?
Why do people want to use Bitcoin?
Bitcoin System Overview
In the overview diagram below, we see that the bitcoin system consists of users with wallets containing keys, transactions which are propagated across the network, and miners who produce (through competitive computation) the consensus blockchain, the authoritative ledger of all transactions. In this chapter, we will trace a single transaction as it travels across the network and examine the interactions between each part of the bitcoin system at a high level. Subsequent chapters will delve into the technology behind wallets, mining, and merchant systems.
Buying a Cup of Coffee
Alice, introduced in the previous chapter, is a new user who has just acquired her first bitcoin. In the section “Getting your first bitcoins” on page 9, Alice met with her friend Joe to exchange some cash for bitcoin. The transaction created by Joe funded Alice’s wallet with 0.10 BTC. Now, Alice will make her first retail transaction by buying a cup of coffee at Bob’s coffee shop in Palo Alto, California. Bob’s coffee shop recently started accepting bitcoin payments by adding a bitcoin option to his point-of-sale system. The prices at Bob’s Cafe are listed in the local currency (US dollars), but at the register, customers have the option of paying in either dollars or bitcoin. Alice places her order for a cup of coffee, and Bob enters the transaction at the register. The point-of-sale system will convert the total price from US dollars to bitcoins at the prevailing market rate and display the prices in both currencies, as well as showing a QR code containing a payment request for this transaction:
Payment Request QR Code
Displayed on Bob’s cash register:
- Total:
- $1.50 USD
- 0.015 BTC

The payment request QR code above encodes the following URL, defined in BIP0021:
bitcoin:1GdK9UzpHBzqzX2A9JFP3Di4weBwqgmoQA?\
amount=0.015&\
label=Bob%27s%20Cafe&\
message=Purchase%20at%20Bob%27s%20Cafe
Components of the URL
- A bitcoin address: “1GdK9UzpHBzqzX2A9JFP3Di4weBwqgmoQA”
- The payment amount: “0.015”
- A label for the recipient address: “Bob’s Cafe”
- A description for the payment: “Purchase at Bob’s Cafe”
Understanding the Payment Request QR Code
Unlike a QR code that simply contains a destination bitcoin address, a “payment request” is a QR-encoded URL that contains a destination address, a payment amount, and a generic description such as “Bob’s Cafe.” This allows a bitcoin wallet application to pre-fill the information used to send the payment while showing a human-readable description to the user. You can scan the QR code above with a bitcoin wallet application to see what Alice would see.
Bob says, “That’s one-dollar-fifty, or fifteen milliBits.”
Alice’s First Bitcoin Payment
Alice uses her smartphone to scan the barcode on display. Her smartphone shows a payment of 0.0150 BTC to Bob’s Cafe, and she selects “Send” to authorize the payment. Within a few seconds (about the same time as a credit card authorization), Bob would see the transaction on the register, completing the transaction.
Examining the Transaction
In the following sections, we will examine this transaction in more detail, see how Alice’s wallet constructed it, how it was propagated across the network, how it was verified, and finally how Bob, the owner of the cafe, can spend that amount in subsequent transactions.
Fractional Bitcoin Transactions
The bitcoin network can transact in fractional values, e.g., from millibitcoins (1/1000th of a bitcoin) down to 1/100,000,000th of a bitcoin, which is known as a Satoshi. Throughout this book, we’ll use the term “bitcoins” to refer to any quantity of bitcoin currency, from the smallest unit (1 Satoshi) to the total number (21,000,000) of all bitcoins that will ever be mined.