Blockchain is a distributed digital ledger technology that records transactions across multiple computers in a way that makes the data tamper-resistant and transparent. At its core, blockchain combines cryptography, consensus mechanisms, and peer-to-peer networks to create trustless systems where participants can transact without intermediaries. Understanding blockchain fundamentalsβfrom how blocks link through cryptographic hashes to how networks reach consensusβis essential for anyone working with cryptocurrencies, smart contracts, or decentralized applications. The key insight: blockchain achieves security not through central authority but through mathematical proofs and network-wide verification.
12 tables, 90 concepts. Select a concept node to jump to its table row.
Table 1: Core Components
The fundamental building blocks every blockchain shares β understanding how blocks, hashes, and transactions fit together gives you the mental model needed to reason about anything built on top.
| Component | Example | Description |
|---|---|---|
Header: prev_hash, merkle_root, timestamp, nonceBody: [tx1, tx2, tx3...] | Container for transaction data consisting of a header (metadata) and body (transactions), linked via hashes to form the chain. | |
from: addr1, to: addr2,amount: 0.5 BTC, signature: ... | Record of value transfer including sender, recipient, amount, and digital signature for authentication. | |
SHA-256("hello") =2cf24dba... (64 hex chars) | β’ Cryptographic fingerprint of data β one-way function producing fixed-size output β’ any input change produces a completely different hash | |
Every node stores full copy of blockchain | β’ Decentralized database replicated across all network nodes with no single point of control β’ all participants maintain identical records | |
merkle_root = hash(hash(tx1+tx2) + hash(tx3+tx4)) | β’ Binary tree of transaction hashes enabling efficient verification of transaction inclusion without downloading the entire block β’ root stored in header | |
nonce = 2847563091 | β’ Random 32-bit number miners adjust to find a valid block hash β’ essential for the Proof-of-Work puzzle ("number used once"). | |
Bitcoin Block 0: "Chancellor on brink..."Jan 3, 2009 | β’ First block in a blockchain with no previous block reference β’ hardcoded into the protocol and establishes the chain's origin and initial state |
Table 2: Consensus Mechanisms
Consensus mechanisms are how decentralized networks agree on the true state of the ledger without a central authority β the choice of mechanism directly determines the network's security, energy use, speed, and degree of decentralization.
| Mechanism | Example | Description |
|---|---|---|
Bitcoin mining: find hash < target | β’ Miners compete to solve a computational puzzle by finding a hash below the difficulty target β’ first to solve wins block reward β’ energy-intensive | |
Ethereum: validators stake 32 ETH | β’ Validators selected based on staked cryptocurrency β’ probability proportional to stake β’ energy-efficient alternative to PoW β’ dishonest validators risk slashing | |
EOS: 21 elected block producers | β’ Token holders vote for a small group of delegates to validate blocks β’ high throughput and fast block times at the cost of some decentralization | |
VeChain, private consortium chains | β’ Validators are pre-approved trusted nodes with known identities β’ very fast and low-overhead, suited for permissioned enterprise blockchains | |
Solana: cryptographic timestamps embedded in ledger | β’ Cryptographic clock that encodes the passage of time directly into the blockchain, enabling validators to agree on transaction order without waiting for consensus rounds β’ enables Solana's high throughput | |
Network functions with up to 33% malicious nodes | β’ System's ability to reach consensus despite faulty or malicious participants β’ ensures agreement even when nodes send conflicting information | |
Adjusts every 2,016 blocks (β2 weeks) | β’ Dynamic parameter controlling puzzle complexity β’ auto-adjusts to maintain target block time despite hashrate changes | |
1 conf = in block; 6 confs = highly secure | β’ Number of blocks added after a transaction's block β’ more confirmations = lower reversal risk β’ standard is 1β6 depending on value transferred | |
Stake 32 ETH β validate blocks β earn rewards | β’ PoS node that proposes and attests to blocks β’ selected based on stake β’ replaces miners in proof-of-stake systems | |
Transaction irreversible after 6 confirmations | β’ Point when a transaction becomes immutable and irreversible β’ varies by consensus type (instant in BFT, probabilistic in PoW, epoch-based in Ethereum PoS). | |
Attacker controls >50% hashrate β double-spend | β’ Occurs when an entity controls majority of network power, enabling transaction reversal and double-spending β’ economically infeasible on major chains |
Table 3: Cryptography Fundamentals
Blockchain security rests entirely on cryptographic primitives β public-key cryptography, hash functions, and digital signatures make trustless verification possible without any central authority.
| Technique | Example | Description |
|---|---|---|
e9873d79... (32 bytes, 256 bits)Never share! | β’ Secret key used to sign transactions and prove ownership β’ must be kept secure β losing it means permanent loss of access to funds | |
04a1b2c3... (65 bytes uncompressed) | β’ Cryptographic key shared publicly to receive funds β’ mathematically derived from private key β’ safe to distribute openly | |
ECDSA(privkey, tx_hash) β (r, s) | β’ Cryptographic proof that a transaction was authorized by the key owner β’ verifiable with public key β’ ensures authenticity and non-repudiation | |
Bitcoin: 1A1zP1eP... (Base58)Ethereum: 0x742d35... (hex) | β’ Shortened hash of public key used as a receiving identifier β’ human-shareable format β’ derived via HASH160(pubkey) or similar | |
Input β a591a6d4... (always 256 bits) | β’ Cryptographic hash function producing a fixed 256-bit output β’ collision-resistant β’ core of Bitcoin's Proof-of-Work and block linking | |
Elliptic Curve Digital Signature Algorithm | β’ Standard signature scheme using elliptic curve cryptography β’ provides same security as RSA with smaller keys β’ used in Bitcoin and Ethereum | |
Prover proves x satisfies a conditionwithout revealing x | β’ Method of proving the validity of a statement without revealing the statement itself β’ enables privacy and efficient verification β’ foundational to ZK rollups | |
Zcash shielded transactions; zkSync Era proofs | β’ Zero-Knowledge Succinct Non-interactive Argument of Knowledge β small proof size, fast verification, but requires a trusted setup ceremony β’ used in most ZK rollups | |
Starknet proofs (no trusted setup) | Zero-Knowledge Scalable Transparent Argument of Knowledge β no trusted setup required, post-quantum secure (hash-based), but produces larger proofs than SNARKs. |
Table 4: Network Architecture
The peer-to-peer network layer determines how resilient and decentralized a blockchain actually is β node type, propagation speed, and access model all shape what the network can withstand.
| Type | Example | Description |
|---|---|---|
Each node connects to 8β125 peers | β’ Decentralized network where nodes communicate directly without a central server β’ all participants are equal β’ enhances resilience | |
Downloads and validates entire blockchain (500+ GB) | β’ Stores complete blockchain history and validates all transactions and blocks β’ enforces consensus rules independently β’ most secure node type | |
Pending txs: [tx1: 50 sat/byte, tx2: 20 sat/byte...] | β’ Temporary storage for unconfirmed transactions awaiting inclusion in a block β’ each node maintains its own mempool β’ higher fees = faster inclusion | |
Downloads only block headers (~80 bytes each) | β’ Stores block headers only β’ verifies transactions via Merkle proofs β’ lower resource requirements but partially trusts full nodes | |
Full node + mining software (PoW) | β’ Full node that attempts to create new blocks by solving Proof-of-Work puzzle β’ earns block rewards plus transaction fees | |
New block β relay to peers β network-wide in seconds | β’ Process of broadcasting a new block across the network β’ propagation delay affects orphan block rate β’ optimized via compact block relay | |
Bitcoin, Ethereum: anyone can join | β’ Network where participation is open to all without approval β’ maximizes decentralization β’ characteristic of public blockchains | |
Hyperledger Fabric: invited members only | β’ Network requiring authorization to join and transact β’ controlled access suited for enterprises β’ trades decentralization for privacy and efficiency |
Table 5: Transaction Models
How a blockchain accounts for balances and tracks value fundamentally shapes smart contract design, privacy properties, and how fees are calculated.
| Model | Example | Description |
|---|---|---|
Bitcoin: inputs consumed β new outputs created | β’ Tracks discrete spendable outputs like digital cash β’ inputs are fully consumed to create new outputs β’ enhances parallelism and privacy | |
Ethereum: balance[addr] += amount | β’ Maintains a running balance per address like a bank account β’ simpler for smart contracts β’ easier to track total balance | |
Ethereum: (Base + Priority) Γ Gas Limit | β’ Transaction cost paid to compensate validators β’ measured in gwei β’ higher fee = faster processing β’ base fee is burned (EIP-1559). | |
Mempool with priority queue by fee | β’ Collection of broadcast but unconfirmed transactions β’ miners/validators select from pool for the next block using fee-based prioritization | |
Attempting to spend same BTC twice | β’ Attack where same funds are used in multiple transactions β’ prevented by consensus requiring acceptance of the longest/heaviest chain |
Table 6: Block Structure
Every block in a blockchain follows a precise binary structure β understanding the individual fields explains how blocks are verified, linked, and mined.
| Field | Example | Description |
|---|---|---|
Version, prev_hash, merkle_root, timestamp, bits, nonce (80 bytes) | β’ Compact 80-byte metadata section containing version, previous hash, Merkle root, timestamp, difficulty target, and nonce β’ the only part hashed in PoW | |
00000000000000000008a89... | β’ Hash of the prior block's header β’ creates immutable chain linkage β changing any past block invalidates all subsequent blocks | |
Bitcoin: 3.125 BTC (post-2024 halving) | β’ Newly minted cryptocurrency awarded to the block creator β’ combined with transaction fees β’ halves periodically to control supply | |
Compact bits: 0x1703a30c β target value | β’ Threshold that the block hash must fall below β’ lower target = higher difficulty β’ adjusts to maintain consistent block time | |
Unix time: 1704723600 | β’ Records approximate block creation time β’ used for difficulty adjustment β’ must be greater than the median of the last 11 blocks | |
List: [coinbase_tx, tx1, tx2...] | β’ Contains actual transaction data β’ variable size depending on block capacity β’ validated via Merkle root in header | |
Bitcoin: 1 MB limit; Ethereum: dynamic | β’ Maximum data capacity per block β’ affects throughput and decentralization β larger blocks reduce the number of nodes that can validate |
Table 7: Security and Immutability
Blockchain's security model is adversarial by design β these concepts define how the system resists tampering, manipulation, and centralization pressure from both external attackers and insiders.
| Concept | Example | Description |
|---|---|---|
Altering Block 100 invalidates Blocks 101β200,000 | β’ Property where recorded data cannot be changed without detection β’ achieved through cryptographic hashing and chain linkage | |
No need to trust counterparty or intermediary | β’ System where participants transact without trusting each other β’ trust is replaced by cryptographic proofs and consensus β’ math-based security | |
No single entity controls the network | β’ Distribution of authority across many independent nodes β’ eliminates single points of failure and censorship β’ core blockchain principle | |
Validator reorders txs to front-run a DEX trade | β’ Maximum value extractable from block production by reordering, including, or excluding transactions β’ source of front-running and sandwich attacks in DeFi | |
Ethereum: validator double-signs β 1+ ETH burned | β’ Penalty mechanism that destroys part of a validator's staked funds for provably malicious behavior such as double-signing β’ aligns economic incentives with honesty | |
All transactions publicly viewable on block explorer | β’ Property where all network activity is visible to participants β’ public blockchains allow anyone to audit β’ privacy preserved through pseudonymous addresses | |
Modify tx β hash changes β chain breaks | β’ Design making unauthorized alterations immediately detectable β’ hash functions and consensus ensure any modification is evident to all nodes |
Table 8: Wallets and Key Management
A wallet is really a key manager, not a coin container β the funds live on-chain while the wallet holds the cryptographic secrets that prove ownership and authorize spending.
| Type | Example | Description |
|---|---|---|
MetaMask, hardware wallet: user controls keys | β’ User fully controls private keys β’ maximum sovereignty and full responsibility for security β’ hardware or software options available | |
Exchange wallet: Coinbase holds your keys | β’ Third party controls private keys on your behalf β’ convenient but "not your keys, not your coins" β’ easier for beginners | |
Ledger, Trezor (offline hardware) | β’ Wallet stored offline (hardware or paper) β’ maximum security for long-term storage β’ immune to online attacks β’ requires physical access to sign | |
MetaMask, Trust Wallet (online) | β’ Wallet connected to the internet β’ convenient for frequent transactions β’ higher security risk β’ suitable for small daily amounts | |
12β24 words: witch collapse practice... | β’ Mnemonic backup for recovering a wallet β’ generates all private keys deterministically (BIP-39 standard) β’ must be stored securely offline | |
Single seed β unlimited child keys via derivation path | β’ Hierarchical Deterministic wallet that derives an entire tree of key pairs from one seed β’ enables address reuse avoidance and easy backup with a single phrase | |
2-of-3: requires 2 signatures from 3 keyholders | β’ Wallet requiring multiple private-key signatures to authorize a transaction β’ eliminates single point of failure β’ used for treasuries and joint accounts |
Table 9: Smart Contracts & Protocols
Smart contracts are the programmable layer of blockchain β they eliminate intermediaries by encoding business logic directly in tamper-proof code. Understanding the standards, governance patterns, and upgrade mechanisms is essential for any practical blockchain work.
| Concept | Example | Description |
|---|---|---|
if (condition) { transfer(amount); } on Ethereum | β’ Self-executing code deployed on blockchain β’ automatically enforces rules when conditions are met β’ immutable once deployed β’ no intermediaries required | |
USDC, DAI, UNI β transfer(), balanceOf() | β’ Ethereum standard for fungible tokens β’ defines a common API (transfer, approve, allowance) enabling interoperability across wallets and DeFi protocols | |
CryptoPunks, Bored Apes: unique token IDs | β’ Ethereum standard for non-fungible tokens (NFTs) β’ each token has a unique ID and cannot be divided β’ used for digital art, collectibles, and real-world asset tokenization | |
Web3 game: swords (fungible) + unique skins (NFTs) | β’ Multi-token standard supporting both fungible and non-fungible tokens in a single contract β’ enables batch transfers and reduces gas costs for gaming assets | |
Chainlink feeds real-world price data on-chain | β’ Service that brings external data onto blockchain β’ solves the oracle problem (blockchains cannot access off-chain data natively) β’ critical infrastructure for DeFi | |
MakerDAO: MKR holders vote on protocol parameters | β’ Smart-contract-governed organization with no central authority β’ rules encoded in code β’ decisions made via token-holder voting β’ treasury controlled by the group | |
Unique digital artwork or in-game item with provable ownership | β’ Blockchain token that is one-of-a-kind and non-divisible β’ ownership and provenance are publicly verifiable on-chain β’ implemented via ERC-721 or ERC-1155. | |
Bitcoin β Bitcoin Cash (2017) | β’ Non-backward-compatible protocol change β’ creates a permanent chain split β’ all nodes must upgrade β’ can result in two separate cryptocurrencies | |
SegWit activation (2017) | β’ Backward-compatible upgrade β’ old nodes still function β’ tightens rather than loosens rules β’ no chain split required | |
Bitcoin reward: 50 β 25 β 12.5 β 6.25 β 3.125 BTC | β’ Periodic reduction of block reward by 50% β’ occurs every 210,000 blocks (β4 years) β’ controls supply inflation β’ next Bitcoin halving β2028. |
Table 10: Scaling Solutions
Blockchains face a trilemma between security, decentralization, and throughput β scaling solutions attack the throughput constraint by moving computation off the base layer while inheriting its security guarantees.
| Solution | Example | Description |
|---|---|---|
Bitcoin, Ethereum base blockchain | β’ The base blockchain protocol itself β’ handles consensus and final settlement β’ security foundation β’ limited throughput by design | |
Lightning Network, Arbitrum, zkSync Era | β’ Secondary protocol built atop L1 β’ processes transactions off-chain then settles on L1 β’ increases throughput without sacrificing L1 security | |
zkSync Era, Starknet, Polygon zkEVM | β’ L2 that batches thousands of transactions off-chain and posts a cryptographic validity proof (zk-SNARK/zk-STARK) to L1 β’ enables instant finality and fast withdrawals | |
Arbitrum, Optimism, Base | β’ L2 that assumes transactions are valid and relies on fraud proofs during a ~7-day challenge window to catch invalid batches β’ simpler to build, wider EVM compatibility | |
Ethereum roadmap: parallel execution shards | β’ Horizontal partitioning of the blockchain into parallel shards that process transactions simultaneously β’ multiplies base-layer throughput without L2 dependence | |
Lightning Network payment channels | β’ Off-chain communication channel between parties where only opening and closing transactions are settled on-chain β’ enables near-instant, fee-free repeated interactions | |
OMG Network (legacy) | β’ Early L2 framework using a child chain anchored to Ethereum via Merkle roots β’ largely superseded by rollups due to data availability challenges and slow withdrawals |
Table 11: DeFi Primitives
Decentralized finance (DeFi) recreates financial services β trading, lending, earning yield β directly in smart contracts, eliminating custodians; knowing the core primitives is prerequisite for building or auditing any DeFi protocol.
| Primitive | Example | Description |
|---|---|---|
Aave, Uniswap, Compound on Ethereum | β’ Umbrella term for financial services built on public blockchains with no intermediaries β’ includes lending, trading, derivatives, and insurance powered by smart contracts | |
Uniswap: x * y = k constant product formula | β’ DEX mechanism that prices assets algorithmically using a liquidity pool rather than an order book β’ anyone can trade 24/7 against pooled assets | |
ETH/USDC pool on Uniswap | β’ Smart contract holding pairs of tokens deposited by liquidity providers β’ enables AMM trading β’ LPs earn a share of swap fees but face impermanent loss risk | |
Ethereum: deposit 32 ETH β earn ~2.9% APR | β’ Locking tokens in a PoS protocol to participate in consensus and earn rewards β’ staked capital acts as a bond that can be slashed for misbehavior | |
Deposit LP tokens β earn governance token rewards | β’ Strategy of providing liquidity to earn additional protocol tokens on top of swap fees β’ rewards can come from token inflation and protocol incentives | |
Borrow 1M USDC β arbitrage β repay β all in one tx | β’ Uncollateralized loan that must be borrowed and repaid within a single transaction β’ unique to DeFi β’ used for arbitrage, liquidations, and collateral swaps | |
EigenLayer: restake stETH to secure AVS protocols | β’ Reusing already-staked assets to secure additional services (AVSs) and earn extra rewards β’ introduces additional slashing conditions and systemic risk |
Table 12: Cross-chain & Interoperability
With thousands of isolated blockchains, interoperability protocols are the connective tissue of Web3 β they allow assets and data to move between networks, but every bridge also introduces new trust assumptions and attack surface.
| Concept | Example | Description |
|---|---|---|
Wormhole, Chainlink CCIP, Polygon Portal | β’ Protocol that locks assets on a source chain and mints equivalent tokens on a destination chain β’ most blockchain hacks involve bridges due to their concentrated value and complexity | |
BTC β LTC swap using HTLC | β’ Trustless cross-chain exchange using Hash Time-Locked Contracts (HTLCs) β’ funds are locked until a secret is revealed, ensuring the swap either completes fully or reverts | |
Polygon PoS, RSK (Bitcoin sidechain) | β’ Independent blockchain connected to a parent chain via a two-way peg β’ uses its own consensus rules β’ assets locked on the main chain are represented equivalently on the sidechain | |
WBTC: Bitcoin locked β ERC-20 token on Ethereum | β’ Token that represents an asset from another chain β’ the original is locked in a custodian or smart contract while a 1:1 pegged token is minted on the destination chain | |
Cosmos chains trading assets via IBC protocol | β’ Standardized protocol for trustless messaging and token transfers between independent blockchains β’ core interoperability layer of the Cosmos ecosystem β’ maintained as a formal spec |