Progress pill
The Technical Aspects of Bitcoin.

Bitcoin Transactions

The Bitcoin Journey

Bitcoin Transactions

  • Step 1 - Creating the transaction via the wallet
  • Step 2: Propagation of the transaction through nodes
  • Step 3: The transaction is mined in a block by a miner.
  • Step 4: The block is valid and verified by Alice's referent node.
  • What is the importance of this process?
A Bitcoin transaction is simply a transfer of ownership of bitcoins through the use of a Bitcoin address. In order to describe this process, let's introduce two protagonists: Alice and Bob. Alice wishes to acquire bitcoins, while Bob already owns some.

Step 1 - Creating the transaction via the wallet

For Bob to transfer bitcoins to Alice, she must provide him with one of her Bitcoin addresses, which are unique to her Bitcoin wallet. Just like the private key is used to generate the public key, the latter is then used to generate addresses.
In concrete terms, when Alice opens her wallet and presses "receive", a QR code or an address (like this bc1q7957hh3nj47efn8t2r6xdzs2cy3wjcyp8pch6hfkggy7jwrzj93sv4uykr) will be displayed. This serves as her 'Bitcoin IBAN' of sorts, which she then provides to Bob.
Afterwards, Bob makes the transaction by opening his Bitcoin wallet and pressing "send". He then copies and pastes Alice's address into the required field, adds the amount he wishes to send, and decides on the transaction fees, which serve as an incentive for miners to include the transaction in the next block. In fact, the higher the fees Bob pays, the better his chances are of having the transaction included in the next block added to the blockchain, i.e. a public and immutable ledger recording all Bitcoin transactions.
To finalize the transaction, Bob must sign it with his private key to verify that he is the owner of the bitcoins he wants to transfer. This step is usually automatic on mobile wallets, or it takes the form of a confirmation on your physical wallet: "Are you sure you want to send X to Y? Yes or no".
Why do we pay fees? Fees are essential to create a free market for including transactions in blocks. In fact, a block has a size of 1 MB (which was expanded to 4MB after the Segwit update), so the number of transactions that can be "inserted" in a block is limited to a few thousand transactions per block. The size of a transaction depends on its complexity. Therefore, more complex transactions typically incur higher fees.

Step 2: Propagation of the transaction through nodes

At this stage, the transaction has been created and Bob's wallet will share it with the Bitcoin network. To do this, his wallet will communicate with a node of the Bitcoin network, which will propagate this information to other nodes. This kind of process allows the entire network to see this new transaction and take it into account.
At this point, even though this transaction is known to everyone (via a tool called Mempool), it cannot be considered confirmed until it gets inserted in a block by a miner, who is the only one who validates transactions by including them in the blockchain.
In fact, miners have the role of gathering valid and unconfirmed transactions to compile them into a block. In a nutshell, they must solve a cryptographic puzzle in a process called "proof of work" in order for their block to be the next one in the Bitcoin blockchain.

Step 3: The transaction is mined in a block by a miner.

The Proof of work system requires finding a valid "hash" for the block in question: think of it as a unique fingerprint associated with the block, composed of 256 characters. The validity of this hash depends on the difficulty rate of the Bitcoin network (we will go into more details later). For now, consider that a miner has found a valid block, and that Bob's transaction to Alice is included in it. Then, the new valid block is added to the blockchain, the common ledger for all Bitcoin users.

Step 4: The block is valid and verified by Alice's referent node.

At this stage, the transaction is considered valid: the miner will then propagate the new block to the network through their node, and Alice's wallet will be updated.
Note: Even if Alice is notified that she has received bitcoins at one of her addresses, it is advisable to consider the transaction immutable only after it has received six confirmations. This means that six additional blocks have to be mined on top of the block containing Bob's transaction. In other words, the older a transaction is in the blockchain, the more immutable it becomes.

What is the importance of this process?

The Bitcoin transaction system is decentralized and works peer-to-peer, without any trusted intermediaries.
Bob sends his transaction to the Bitcoin network, and when a miner publishes a valid block containing Bob's transaction, Alice can start considering that the bitcoins belong to her. Trust is not required at any step of the bitcoin ownership transfer: the protocol rules and economic incentives alone make it prohibitively costly to act maliciously within the Bitcoin system.
In fact, users transfer ownership of their funds by digitally signing transactions with their own private keys. On the other hand, miners hold limited power, and users maintain significant control by using Bitcoin nodes to validate the new blocks and the included transactions. Every node has either a full or a partial copy of the ledger, so the network formed by the Bitcoin nodes makes the system truly decentralized.
As a consequence, for the Bitcoin network to be completely destroyed, every copy of the blockchain on all Bitcoin nodes would need to be eliminated, which is a practically impossible task due to the geographical distribution of these nodes and the difficulty of physically seizing them.
Let's take a closer look at how a Bitcoin node works.
Quiz
Quiz1/5
Why is the number of confirmations in a Bitcoin transaction important?