Skip to content

How a blockchain works

Transactions, blocks, hashes and how they link together.

It starts with a transaction, such as sending tokens from one account to another. The sender signs it with a secret key, which proves they’re allowed to move those tokens, and sends it to the computers that run the network. These computers are called nodes. Each transaction gets a transaction hash: a unique ID, like a receipt number, that anyone can use to look it up later.

Nodes gather waiting transactions and bundle them into a block. Each block gets a hash, a short digital fingerprint made from everything inside it, and each block also stores the fingerprint of the block before it. If someone changed even one detail in an old block, its fingerprint would change and would no longer match the next block, so the tampering would show. That’s what makes a blockchain’s history so hard to rewrite.

Before a new block joins the chain, the network has to agree that it’s valid: that each sender really owns what they’re sending, and that nothing is spent twice. The rules for reaching that agreement are called the consensus mechanism. Later, when you learn to assess risk step by step, each of these steps, from signing a transaction to adding a block, is a place to ask what could go wrong.