What Is a Blockchain? How the Shared Ledger Works
What a blockchain is, how blocks, hashes and consensus keep a shared ledger honest, proof of work vs proof of stake, and what chains can't do.
A blockchain is a shared record of transactions that many computers keep in sync without a central owner. It is the technology that lets cryptocurrencies work: it answers the question "who owns what right now?" without a bank. The name describes the structure: records are bundled into blocks, and each block is cryptographically linked to the one before it, forming a chain.
The problem blockchains solve
Digital files are easy to copy. If a digital coin were just a file, you could copy it and spend it twice, which is called the double-spend problem. Traditionally a trusted party, such as a bank, prevents this by keeping the only authoritative ledger. A blockchain removes that single trusted party by having many participants (called nodes) hold copies of the ledger and follow agreed rules about which new entries are valid.
Blocks, hashes and the chain
Blocks
A block is a batch of transactions plus some metadata, such as a timestamp. Nodes check each transaction in a block against the rules: does the sender actually have the funds, is the signature valid, has this coin already been spent?
Hashes
A hash function turns any input into a fixed-length fingerprint. Change one character of the input and the fingerprint changes completely, and you cannot work backwards from the fingerprint to the input. Each block includes the hash of the previous block. If someone altered an old transaction, that block's hash would change, which would break the link to the next block, and the next, all the way to the latest block. Tampering becomes obvious.
Why it is hard to rewrite history
To make a changed history accepted, an attacker would need to redo the work of producing all the later blocks and convince the network to adopt their version. On large networks this is extremely expensive, which is why older confirmed transactions are considered very safe. It is not magic: smaller blockchains with less security have been successfully attacked.
Consensus: how strangers agree
If thousands of computers hold copies, how do they agree on the next block? They use a consensus mechanism. The two best known are:
- Proof of work (PoW): used by Bitcoin. Participants called miners compete to find a number that makes a block's hash meet a difficulty target. This takes a lot of computing power and electricity, and the winner earns the right to add the next block and receives newly issued coins plus fees. Cheating would require out-computing the honest majority.
- Proof of stake (PoS): used by Ethereum since 2022. Validators lock up (stake) coins as a deposit and are chosen to propose and attest to blocks. Dishonest behaviour can lead to part of the stake being destroyed ("slashing"). It uses far less energy than proof of work.
Both aim for the same result: a cheap-to-verify, expensive-to-fake agreement about the ledger.
Public, private and permissioned chains
Bitcoin and Ethereum are public and permissionless: anyone can read the ledger, send transactions and, with the right setup, help run the network. Companies also build private or permissioned blockchains where only approved participants can write to the ledger. These can be useful inside a business, but they give up much of what makes public crypto distinctive.
What is actually on a blockchain?
On Bitcoin, the ledger records transfers of bitcoin between addresses. On Ethereum, it records transfers of ether and also the code and state of smart contracts, which are programs that run on the network. Most blockchains do not store personal names. They store addresses, strings of characters derived from keys. This is often called pseudonymous rather than anonymous: if an address is ever linked to your identity, such as through an exchange account, its history can be traced by anyone using a block explorer.
How a transaction reaches the chain
- You create a transaction and sign it with your private key.
- Your wallet broadcasts it to nodes, which check it and pass it on.
- It waits in a pool of pending transactions, called the mempool.
- A miner or validator includes it in a block.
- Further blocks are added on top, increasing confidence it is final.
We walk through each step in how crypto transactions work.
Common misconceptions
"Blockchains are anonymous."
Most public blockchains are transparent. Anyone can follow funds between addresses. Privacy depends on keeping your identity separate from your addresses, which is hard.
"Blockchains are unhackable."
The core protocols of large chains have a strong record, but the things built on them (exchanges, wallets, smart contracts, bridges) are regularly hacked because of bugs or poor security.
"Blockchain data is always true."
A blockchain proves that a transaction happened and in what order. It cannot prove that the real-world information put into it is correct. A token can claim to represent a house, but the chain cannot check the house exists.
"Everything needs a blockchain."
For most business tasks, an ordinary database is faster and cheaper. Blockchains make sense where participants do not trust one another and no single party should control the record.
Trade-offs to understand
- Speed and cost: replicating data across many nodes is slower and costlier than one database. Networks manage this with limits on block size or gas, which is why fees rise when demand is high.
- Immutability cuts both ways: you cannot easily fix a mistake or reverse theft.
- Governance: changing the rules requires broad agreement, which can be slow and sometimes leads to splits ("forks").
Where to go next
Now that you know what the ledger is, learn how you interact with it: crypto wallets explained and public and private keys.