Crypto & Fintech

What Is Blockchain? A Plain Guide to How the Ledger Works

A blockchain is a shared digital ledger, copied across many computers, in which records are chained together so that changing the past is hard and easy to spot. Here is how it works and where it falls short.

A close-up of a dark blue circuit board

A blockchain is a shared digital ledger that many computers keep in sync, with records grouped into blocks and linked together using cryptography so that past entries are very hard to change without being noticed. It is the record-keeping technology underneath bitcoin and many other digital assets, and it is often described in bigger terms than it deserves.

The National Institute of Standards and Technology (NIST), the US standards agency, defines blockchains in its 2018 overview report as “tamper evident and tamper resistant” digital ledgers, implemented in a distributed fashion and usually without a central authority. Each part of that definition does real work, and the sections below take them one at a time.

What is blockchain in plain terms?

Start with an ordinary ledger: a list of who owns what, or who paid whom. A bank keeps one, and everyone relies on the bank to keep it honestly. A blockchain replaces that single keeper with a network. The Bank for International Settlements (BIS), the central banks’ coordinating body, describes the basic design in its 2018 Annual Economic Report: a ledger starts with an initial allocation of coins and records every later transfer, and each user holds a current copy, so anyone can check a transfer against their own copy.

That is what “distributed” means. There is no master version in one building. The copies are kept consistent by a set of shared rules, and the aim is to let strangers agree on a record without having to trust one intermediary.

How does a blockchain work, step by step?

The mechanics can be followed as a short sequence, using a payment as the example.

  1. A transaction is created. A user signs a transfer with a private cryptographic key. NIST lists asymmetric-key cryptography, in which a public key can verify what only the matching private key could have signed, among the building blocks of the technology.
  2. The network checks it. Computers in the network, called nodes, test whether the transaction is valid. According to the BIS, everyone verifies updates, and if a block includes an invalid transaction the network rejects it.
  3. Transactions are bundled into a block. Updates are grouped into blocks, and cryptography chains the blocks in sequence, the BIS explains.
  4. The block is linked to the one before. Each block carries a fingerprint of its predecessor (explained below), which is what makes it a chain.
  5. The network agrees. A consensus rule decides whose block is accepted, and every node updates its copy.

The role of the hash

A hash function turns any input into a fixed-length string of characters. The BIS notes that hash functions give unpredictable outputs, so finding a particular result can only be done by trial and error, and it names SHA-256 as the function Bitcoin uses. Change one character of the input and the output changes completely.

Because each block includes the hash of the block before it, altering an old record changes that block’s fingerprint, which no longer matches what the next block recorded. To make the change stick, an attacker would have to redo every later block as well, and do it faster than the honest network adds new ones. That is the sense in which a blockchain is tamper evident and tamper resistant, not tamper proof.

How do all the computers agree?

Agreement is the hard problem. If two valid blocks appear at nearly the same time, the network needs a rule for choosing. Rules of this kind are called consensus mechanisms. NIST’s report covers several: proof of work, proof of stake, proof of authority and round robin.

Proof of work

In proof of work, the model used by Bitcoin, participants called miners act as bookkeepers. According to the BIS, they must show that a certain amount of computation was done, which takes costly equipment and electricity. They earn transaction fees and, if the protocol allows, newly created coins. The BIS adds that the difficulty adjusts so that the combined computing power updates the ledger at the protocol’s pre-set speed.

Conflicting updates can still arise because of communication delays. The BIS says the protocol rewards miners for following the majority of computing power, and that the rule does not uniquely fix the majority’s path, so forks can occur. Forks are splits in the chain, and the BIS cites “thousands” of blocks that were later voided.

Other models

Proof of stake chooses validators based on cryptocurrency they have committed as a deposit. Proof of authority relies on approved validators. These are named in NIST’s report, and they trade the electricity cost of proof of work for different assumptions about who can be trusted.

What is the difference between public and permissioned blockchains?

The key distinction is who may write to the ledger.

Feature Permissionless (public) Permissioned
Who can update the ledger Anyone who follows the protocol Only designated, vetted participants
Where trust sits In the protocol and in honest nodes holding most of the computing power In “trusted nodes” chosen and overseen by a central authority
Typical example Bitcoin Private networks run by a company or consortium

The BIS describes the permissioned case as one where the ledger can only be updated by trusted participants, often called trusted nodes. That arrangement can be faster and easier to govern, but it gives up much of the “no central authority” idea. The BIS gives one example of the trade-off: the World Food Programme’s Building Blocks system moved from permissionless Ethereum to a permissioned version and, according to the BIS, achieved a reduction of transaction costs of about 98% relative to bank-based alternatives.

A worked example: why rewriting history is costly

Consider a ledger with five blocks, numbered 1 to 5. Suppose someone wants to alter a payment in block 2.

  • Changing block 2 changes its hash.
  • Block 3 stored the old hash of block 2, so block 3 no longer matches, and the same mismatch ripples through blocks 4 and 5.
  • To hide the edit, the attacker must recompute blocks 2 through 5, and then keep outpacing the honest network as it adds block 6, 7 and beyond.

The BIS makes the same point about double-spending, which means spending one digital coin twice: a successful attempt requires a forged chain longer than the honest chain, which takes a substantial share of the network’s computing power. The cost of attack grows with the size and honesty of the network, which is why small blockchains are generally considered easier to attack than large ones.

Common misconceptions and real limits

“Blockchain data is always true.” The ledger can reliably show that a transaction was recorded and has not been altered since. It cannot show that the information entered was accurate in the first place. NIST’s list of topics includes data oracles, the services that feed outside information to a blockchain, because that link to the real world is a point of trust.

“Blockchain is anonymous.” Many public chains show transactions openly, linked to addresses rather than names. Whether an address can be tied to a person depends on the circumstances, so privacy is not automatic.

“Immutable means final.” The BIS notes that forks can roll back payments, pointing to 11 March 2013, when it says the bitcoin price tumbled by almost a third during a fork.

“It scales easily.” The BIS argued in 2018 that every user must download and verify the full history, and that throughput is capped to keep the ledger manageable. At the time of writing, it said, the Bitcoin blockchain was growing at around 50 GB per year and stood at roughly 170 GB. These are 2018 figures, so they are far out of date, but the underlying constraint is the point. The BIS also said that when blocks hit their size limit, transactions queue, fees rise and some payments waited several hours.

“The energy cost is a myth.” For proof of work the cost is built in. The BIS stated in 2018 that the total electricity use of bitcoin mining equalled that of mid-sized economies such as Switzerland. That was a 2018 estimate and not a current measurement, and designs that do not rely on proof of work are a response to the concern.

“Blockchain replaces trust.” The BIS argues that trust is relocated, not removed: permissionless systems rely on the protocol and on honest nodes holding most of the computing power, while permissioned ones rely on a central authority’s chosen participants.

What varies by use, place and date

Several things change from one blockchain to another and over time:

  • Consensus rule. Proof of work, proof of stake and other models have different costs, speeds and security assumptions.
  • Access rules. Public and permissioned networks differ in who can participate.
  • Supply rules. For Bitcoin the protocol fixes supply in advance; the BIS notes that no more than 21 million bitcoins can exist. Other networks set their own policies.
  • Legal treatment. Regulators treat tokens differently by country and by what the token represents. Our explainers on tokenized assets and on US rules for crypto exchanges show how the law looks at what is recorded, rather than at the technology.
  • Risk from the edges. Most consumer losses occur around the ledger, in scams and lost keys, not in the chain itself; see our guide to Bitcoin ATM scams. For tokens designed to hold a steady value, see stablecoins explained.

Is blockchain useful beyond cryptocurrency?

Opinions differ. The BIS concluded in 2018 that while cryptocurrencies do not work as money, the underlying technology may have promise in other fields, and it pointed to the World Food Programme example. NIST describes the technology more neutrally, as a tool for applying shared, tamper-evident records to problems where several parties need a common history and no one wants to hand control to a single keeper. The tool is a poor fit when one trusted party already keeps the record well, because a conventional database is simpler and faster.

The short version

A blockchain is a ledger copied across many computers, with blocks locked together by hashes and updated by a consensus rule. Its strength is that rewriting history is expensive and visible. Its limits are that it does not verify real-world facts, can be slow and costly at scale, depends on who controls the network, and sits inside legal and security risks that the technology itself does not remove.

This is general information, not financial, investment, tax or legal advice.

Sources: National Institute of Standards and Technology; Bank for International Settlements