Key takeaways
- A blockchain is a shared ledger that many computers keep copies of and that no single party controls.
- Transactions are grouped into blocks, and each block stores a digital fingerprint of the block before it. That is how the blocks link into a chain.
- If someone changes an old transaction, the fingerprints no longer match and every other computer sees it at once.
- Blockchains work well for cryptocurrency, but they are slower and more complex than an ordinary database, and mistakes can't be undone.
Contents
A blockchain is a shared ledger that many computers keep copies of and that no single party controls. Transactions are grouped into blocks that are linked together in time order, so once something has been recorded it is practically impossible to change it without everyone noticing.
The blockchain is the technology behind bitcoin and other cryptocurrenciesCryptocurrencyA digital currency secured by cryptography and recorded on a shared ledger, with no bank or government issuing or controlling it.. This article explains how it works, why it is so hard to tamper with and where its limits lie.
The idea: books that everyone has a copy of
Think of a housing association in a block of flats (a húsfélag). Normally the treasurer keeps the books and the other residents trust that they are correct.
Now imagine that every resident has their own copy of the books. When someone pays into the building fund, the payment is announced to everyone. Each resident checks it and writes it into their own book. If anyone tried to fiddle the numbers in their favour, the others would see at once that the book didn't match their copies.
That is the basic idea behind a blockchain. It is a distributed ledgerDistributed ledgerA ledger that many computers hold at the same time and keep in sync under shared rules, with no single party holding the master copy.: a set of books kept in many places at once. Instead of residents there are computers around the world, and instead of the building fund there is, for example, bitcoin.
Blocks and hashes
TransactionsTransactionA record of crypto moving from one wallet address to another, signed with the sender's private key and stored permanently on the blockchain. aren't recorded one at a time but in groups called blocksBlockA batch of transactions added to a blockchain in one go, together with a reference to the block before it.. Each block is like a page in a ledger. On the Bitcoin network, a new block is added roughly every ten minutes on average.
Each block gets a HashHashA short fingerprint calculated from data, which changes completely if the data is altered by even a single character., a kind of digital fingerprint. The hash is calculated from the entire contents of the block using a mathematical formula called a hash functionHash functionA mathematical function that turns data of any size into a short fingerprint of fixed length, called a hash.. Change a single character and the fingerprint is completely different:
Anna pays Björn ISK 5,000gives73bed1a3fad211c2c42865495b281a1ea480d2878fb51c7fc72d631e2a9c4b47Anna pays Björn ISK 6,000givesb0e68aa749ed7a366047e445b25e50afd13348012074cdcd5b954d5dcecc8ff4
These hashes are calculated with SHA-256, the hash function Bitcoin is built on. There is no way to work out the text from the fingerprint, but anyone can calculate the fingerprint from the text and check that it matches.
What makes the chain a chain is that each block also stores the hash of the block before it. The blocks are linked to each other, one after another, all the way back to the very first block. On the Bitcoin blockchain, that block was created on 3 January 2009.
Nodes: who maintains the chain?
The computers that keep a copy of the blockchain are called nodesNodeA computer that runs a crypto network's software, keeps a copy of the blockchain and checks that new transactions and blocks follow the rules.. A node is an ordinary computer running the network's software. Nodes receive new transactions, check that they follow the rules and pass them on to other nodes.
Nodes check, for example, that a transaction is correctly signed and that the funds actually exist. A transaction that breaks the rules is rejected, no matter who sent it. On open blockchains like Bitcoin and Ethereum, anyone can run a node without asking permission.
Why is a blockchain hard to tamper with?
Say someone wants to change an old transaction, for example to erase a payment they made. As soon as the transaction is changed, the block's hash changes. The next block still points to the old hash, so the chain breaks at that point.
The cheat would therefore have to recalculate every block that came after, and do it faster than everyone else on the network, who keep adding new blocks. This is called a 51% attack51% attackAn attack where one party controls more than half of a network's computing power or stake and can then rewrite recent transactions., because it takes a majority of the network's total capacity. On large networks it is enormously expensive.
That is why blockchains are often described as immutable. It is more accurate to say that changes are immediately visible and extremely costly. The more blocks are added on top of a transaction, the safer it becomes. Each new block counts as one ConfirmationConfirmationA sign that a transaction has been included in a block; each new block added on top counts as one more confirmation and makes it more secure..
How do the computers agree?
When thousands of computers keep the same books, there needs to be a clear rule about who gets to add the next block and which version of the chain counts. This rule is called a consensus mechanismConsensus mechanismThe rules that let thousands of computers agree on a single version of a blockchain without trusting any one party.. Two are most common:
- Proof of workProof of workA consensus method where the right to add the next block to a blockchain goes to whoever first solves a hard computing puzzle.. Computers compete to solve a hard mathematical puzzle. The first to solve it gets to add the next block and is rewarded with new coins. This is called mining, and it uses a lot of electricity. Bitcoin uses proof of work. Read more about mining.
- Proof of stakeProof of stakeA consensus method where crypto is locked up as a stake for the right to create blocks, and anyone who cheats can lose part of that stake.. Instead of computing power, participants put up their own crypto as a stake. The system picks at random who proposes the next block, and others confirm it. Anyone who tries to cheat can lose their stake. Ethereum switched to proof of stake on 15 September 2022, which cut the network's energy use by an estimated 99.95%.
Either way, a cheat would need to control a majority of the network, either of the computing power or of what has been staked.
Public and private blockchains
Public blockchains are open to everyone. Anyone can read the transactions, send transactions and help maintain the chain. Bitcoin and Ethereum are public blockchains.
Private blockchains are run by one company or a group of companies that decides who may take part. They are often faster, but you have to trust the owner, because the owner can change the rules. A private blockchain is closer to a database shared by a few companies than to a cryptocurrency.
What can blockchains be used for?
- Cryptocurrency and payments. This is by far the most widespread use so far. Read more about Bitcoin.
- Programs that run on their own. Ethereum and similar networks run smart contractsSmart contractA program that runs on a blockchain and automatically carries out what it was written to do once certain conditions are met., programs that carry out what was agreed without a middleman. Read more about Ethereum.
- Digital versions of assets. Stablecoins are digital dollars and euros on a blockchain. Financial firms have also experimented with issuing bonds and funds on blockchains.
- Traceability. Companies have tried recording the journey of goods, such as food, from producer to shop.
Many of these ideas have not gone beyond the pilot stage, though. If one party is responsible for the data anyway, an ordinary database usually does the job better.
The limits of blockchains
- Speed and cost. Every computer has to check everything. That is why public blockchains handle fewer transactions than traditional payment systems, and fees rise when the network is busy.
- Energy use. Proof of work uses a lot of electricity. Proof of stake uses a tiny fraction of that.
- Garbage in, garbage out. A blockchain only guarantees what happens inside it. It can't check whether information from the outside world is true. That requires an OracleOracleA service that brings outside information, such as prices or weather data, into smart contracts on a blockchain., a service that brings data onto the chain, and then you have to trust the oracle.
- Mistakes can't be fixed. If you send to the wrong wallet address, nobody can reverse the transaction.
- Everything is public. On public blockchains, anyone can look at every transaction.
- Rule changes need broad agreement. Developers propose changes, but they only take effect if node operators adopt them. When groups disagree, the chain can split in two. This is called a ForkForkA change to a blockchain's rules; if not every node follows the change, the chain can split into two separate chains, each with its own coin.. In 2016 Ethereum split this way, and Ethereum Classic was the result.
Frequently asked questions
Is a blockchain the same as Bitcoin?
No. Bitcoin uses a blockchain, but the blockchain is the technology itself. The Bitcoin network was the first blockchain to be widely used, and many others have followed. Read more about cryptocurrency.
Can anyone delete a transaction from a blockchain?
On large public blockchains it is effectively impossible once the transaction has a few confirmations. That is why you can't ask for a transfer to be reversed, the way you sometimes can with a bank.
Is a blockchain anonymous?
Not entirely. Every transaction on a public blockchain is visible to anyone, for example in a block explorerBlock explorerA website where anyone can look up transactions, wallet addresses and blocks on a blockchain.. Wallet addresses appear there, but names don't. If an address is linked to a name, the transactions can be traced.
Who invented the blockchain?
The idea of a chain of time-stamped documents, each pointing to the one before, was described in 1991. Satoshi Nakamoto applied it to electronic cash in the Bitcoin whitepaper in 2008, and the network went live in January 2009.
Closing thoughts
A blockchain is a set of books kept by many people together, where each page carries the fingerprint of the page before. That makes the record transparent and extremely hard to forge, without having to trust a single middleman.
The technology suits cryptocurrency well, because it lets people agree on who owns what without a middleman. It doesn't solve every problem, though: it is slower than an ordinary database, mistakes can't be undone, and it only guarantees what happens inside the chain.



