Last updated: 2026-09-18

U
Undergraduate level

Blockchain Fundamentals

A blockchain solves a specific problem: how can a group of mutually distrusting parties agree on a single shared record of events, with no central authority any of them has to trust? Satoshi Nakamoto's original Bitcoin proposal combined several existing cryptographic ideas into a working answer, and almost every blockchain since has built on the same core structure1.

How a Block Is Structured

A block bundles a batch of transactions together with three things that make the chain tamper-evident: the cryptographic hash of the previous block, a timestamp, and a nonce (a number miners search for, covered below). Because each block contains the previous block's hash, changing anything in an old block — even a single transaction — changes that block's hash, which no longer matches what the next block recorded, which changes the next block's hash too, and so on all the way to the current tip of the chain. Altering history isn't just detectable; it requires recomputing every single block after the one being altered, which is exactly what proof-of-work is designed to make prohibitively expensive.

graph LR B1["Block 1
hash: 0000a3f...
prev: genesis"] --> B2["Block 2
hash: 0000c7d...
prev: 0000a3f..."] B2 --> B3["Block 3
hash: 00009e1...
prev: 0000c7d..."]

Proof-of-Work Mining

Anyone can propose a block; the network needs a way to agree on which one is "official" without a central referee. Proof-of-work's answer: a block is only valid if its hash starts with a required number of leading zero bits — and because a cryptographic hash function's output is unpredictable from its input, the only way to find a nonce that produces such a hash is brute-force trial and error, trying nonce after nonce until one happens to work. Toy-scale illustration: hashing "block-data-0", "block-data-1", "block-data-2"... until a hash beginning with, say, three zero bits turns up — with a real cryptographic hash function, roughly one in every eight attempts (2³) would satisfy that toy requirement, purely by chance, with no way to shortcut the search other than trying more candidates. Real Bitcoin mining requires vastly more leading zero bits than this toy example, which is exactly why it consumes enormous amounts of computing power — the difficulty is deliberately tuned so finding a valid nonce takes real, substantial work, which is the entire point: rewriting history would mean redoing that same expensive search for every block since the one being altered, faster than the rest of the network is adding new blocks on top.

Proof-of-Stake

Proof-of-work's expense is also its biggest criticism — enormous real-world energy consumption spent purely on winning the right to propose the next block. Proof-of-stake replaces computational work with an economic stake: validators lock up (stake) some of the cryptocurrency itself as collateral, and the right to propose the next block is allocated based on stake size (often with an element of randomness), rather than won by whoever solves a computational puzzle first. A validator caught proposing a fraudulent block loses part or all of their staked collateral — the security guarantee shifts from "attacking the network costs more computing power than anyone plausibly has" to "attacking the network costs more staked value than the attack could possibly be worth." Ethereum's 2022 transition from proof-of-work to proof-of-stake — "the Merge" — is a real, large-scale case of exactly this trade-off being made deliberately, primarily to cut the network's energy consumption by over 99% while keeping the same tamper-evidence property proof-of-work provided.

Smart Contracts

A smart contract is not a legal document made "smart" — it's ordinary code, stored on the blockchain and executed deterministically by every node that processes the transaction invoking it, with its execution and results themselves recorded immutably on the chain. Bitcoin's own scripting language deliberately keeps this to a narrow set of operations; Buterin's Ethereum whitepaper proposed generalising the same idea into a full programming environment running on-chain, specifically so contracts more complex than "pay to this address" could be expressed directly rather than bolted on as one-off extensions to Bitcoin's own protocol2. "Deterministic" is the operative word: every node in the network must independently compute the exact same result from the exact same inputs, or the network can't agree on the outcome, which is why smart-contract languages are deliberately restricted compared to general-purpose programming languages — no access to unpredictable external state like the current time or a random number, without a specific, agreed-upon mechanism for supplying it consistently to every node. A smart contract enforces whatever logic it was actually written with, exactly as written; it carries none of a human contract's capacity for judgement, context, or renegotiation — a bug in a smart contract's code is not a misunderstanding to be argued over, it's the literal, binding, and irreversible behaviour of the system once deployed.

References


  1. Nakamoto, S. (2008). Bitcoin: A Peer-to-Peer Electronic Cash System. https://bitcoin.org/bitcoin.pdf

  2. Buterin, V. (2014). Ethereum Whitepaper. https://ethereum.org/en/whitepaper/