Skip to main content

Blockchain & Web3 Knowledge Base

A blockchain is a replicated, append-only, hash-linked state machine whose replicas agree on the next state without trusting a coordinator. Everything else (mining, gas, wallets, NFTs, DeFi) is machinery built around that single sentence.


Core Mechanics at a Glance

Blockchain Core Mechanics

Block #100prevHash0000a1…merkleRoot Β· nonce Β· timestamp7c1d… Β· 48213 Β· t+12sblockHash0000c4…Block #101prevHash0000c4…merkleRoot Β· nonce Β· timestamp7c1d… Β· 48213 Β· t+12sblockHash0000d9…Block #102prevHash0000d9…merkleRoot Β· nonce Β· timestamp7c1d… Β· 48213 Β· t+12sblockHash0000e2…Each block commits to its parent hash β†’ history is tamper-evident

Every header embeds the hash of its parent. Changing any historic byte changes that block hash, which invalidates the parent pointer of every descendant, so an attacker must redo all subsequent work (PoW) or control a supermajority of stake (PoS).


Two Learning Paths

New Learner Path (start here)

StepPageYou will be able to...
1What Is a Blockchain?Explain blocks, hashes, nodes, wallets and why anyone cares
2Cryptography PrimitivesUnderstand hashing, digital signatures and Merkle trees
3Ledger ModelsCompare UTXO vs account ledgers and a normal database ledger
4Consensus MechanismsExplain PoW, PoS, BFT and finality
5Web3 ArchitectureConnect a wallet to a dApp and read/write the chain
6IPFS & Decentralized StorageKnow why NFTs and dApps keep files off-chain

Senior Engineer Path

StepPageFocus
1Bitcoin InternalsUTXO set, script, mempool, difficulty, reorgs
2Ethereum & the EVMState trie, gas, opcodes, storage layout, EIP-1559, EIP-4844
3Smart Contract SecurityReentrancy, oracle manipulation, upgrade proxies, access control
4Sharding, Rollups & ScalingTrilemma, data availability, ZK vs optimistic, cross-shard atomicity
5DeFi, AMMs & MEVConstant-product math, flash loans, sandwich attacks
6Permissioned LedgersFabric, Corda, when a database is the right answer
7Production EngineeringReorg handling, nonce management, key custody, idempotency, indexers
8Interview QuestionsJunior to staff-level Q&A

Mental Model: Where Blockchain Sits

Application layer dApps, wallets, NFTs marketplaces, DAOs (Web3)
Execution layer EVM / WASM / Move VM, smart contracts, rollups
Settlement layer L1 state transition + finality
Consensus layer PoW / PoS / BFT agreement on block order
Data availability Block bodies, blobs, IPFS / Arweave / Celestia
Network layer Gossip (libp2p / devp2p), peer discovery (Kademlia)
Crypto layer Hashes, ECDSA / EdDSA / BLS, ZK proofs

The Blockchain Trilemma (and why it is really a trade-off matrix)

PropertyMeaningTypical cost
DecentralizationAnyone can run a validating node on commodity hardwareLow throughput, high latency
SecurityCost to rewrite history exceeds attacker gainRedundant computation across all nodes
ScalabilityTransactions per second grows with demandLarger blocks or fewer verifiers

You can optimize two; the third degrades. Solana picks throughput with heavier hardware requirements; Bitcoin picks decentralization/security with ~7 TPS; Ethereum + rollups tries to push execution off L1 while keeping L1 verification cheap.


When NOT to Use a Blockchain

A blockchain is an expensive, slow, append-only database. Use it only when all are true:

  1. Multiple writers who do not trust each other.
  2. No acceptable trusted intermediary (or its fee/risk is unacceptable).
  3. You need a shared, tamper-evident history that outlives any participant.
  4. Throughput and latency needs are modest relative to the guarantees.

Otherwise PostgreSQL + audit log + signatures is cheaper, faster and GDPR-friendly (you cannot delete from a chain).

πŸ“–
Track Page Progress0 / 635 Read
Knowledge Base Completion0%