The Distributed Ledger

At its core, a blockchain is a ledger — a record of all transactions. But unlike a bank's ledger (which only the bank controls), a blockchain's ledger is distributed across thousands of computers (nodes) worldwide. Every node has a complete copy of every transaction ever made.

This distribution is what provides censorship resistance and removes the need to trust any single party.

Blocks and Chains

Transactions are grouped into blocks. Each block contains:

  • A batch of validated transactions
  • A timestamp
  • The cryptographic hash of the previous block (the "chain" link)
  • A nonce (a number used in the mining process)

Because each block contains the hash of the previous one, changing any historical block would invalidate every subsequent block — making the entire history tamper-evident.

Consensus Mechanisms

How do thousands of independent nodes agree on the valid state of the ledger? Through consensus mechanisms:

  • Proof of Work (PoW) — Used by Bitcoin. Miners compete to solve a computationally difficult puzzle. The winner adds the next block and earns newly minted crypto. Extremely energy-intensive but battle-tested over 15 years.
  • Proof of Stake (PoS) — Used by Ethereum (post-Merge). Validators lock up ("stake") crypto as collateral. Selected based on stake size to propose blocks. Much more energy-efficient.
  • Delegated Proof of Stake (DPoS) — Token holders vote for a limited set of block producers (e.g., EOS, TRON).

Transaction Lifecycle

  1. You create and sign a transaction with your private key.
  2. Your wallet broadcasts it to the peer-to-peer network.
  3. Nodes validate the transaction (correct signature, sufficient balance, valid format).
  4. It enters the mempool (memory pool) — a waiting area for unconfirmed transactions.
  5. A miner/validator includes it in a block and broadcasts the block.
  6. Other nodes verify the block and add it to their copy of the chain.
  7. After several more blocks are added on top (confirmations), the transaction is considered irreversible.

Immutability

Once a transaction is buried under several blocks, reversing it would require redoing the work for all subsequent blocks — a feat that would require controlling more than 50% of the network's total computing power (a "51% attack"). For major chains like Bitcoin and Ethereum, this is economically infeasible.

Confirmations: Bitcoin requires 6 confirmations (~60 minutes) for most purposes. Ethereum's finality is faster — typically 2 epochs (~13 minutes).

Smart Contracts

Ethereum introduced smart contracts — self-executing programs stored on the blockchain. They automatically enforce the terms of an agreement when predefined conditions are met, without any intermediary. Smart contracts are the foundation of DeFi, NFTs, DAOs, and most of Web3.