Blockchain & Web3 Fundamentals
What it is & where it is used
Blockchain is a distributed, append-only ledger replicated across many computers (nodes). Records are grouped into blocks, each linked to the previous one by a cryptographic hash, so altering history is practically impossible without redoing the work/stake of the whole network. Nodes agree on the state with a consensus mechanism — no central authority.
Web3 is the idea of an internet where users own their data, identity and assets via blockchains, wallets and smart contracts:
| Web1 (1990s–2004) | Web2 (2004–) | Web3 | |
|---|---|---|---|
| Model | Read | Read + write | Read + write + own |
| Content | Static pages | User-generated, platforms | User-owned assets & data |
| Identity | None | Platform accounts (email/password, OAuth) | Wallet (public key) |
| Money | — | Payment gateways | Native crypto, tokens |
| Control | Site owners | Big platforms | Protocols, smart contracts, DAOs |
Main uses: cryptocurrencies and payments, stablecoins, decentralised finance (DeFi), NFTs and digital ownership, tokenisation of real-world assets (RWA), supply-chain traceability, decentralised identity, DAOs, gaming.
Honest perspective for interviews: blockchains trade performance and simplicity for decentralisation and trustlessness. Good answers mention when a normal database is the better choice, regulation (e.g. India's 30% tax on virtual digital asset gains and 1% TDS; Taiwan's VASP registration regime) and security risks (scams, hacks, key loss).
Versions & history
| Year | Milestone |
|---|---|
| 1991 | Haber & Stornetta — cryptographically secured chain of timestamped documents |
| 2008 | Bitcoin whitepaper by the pseudonymous Satoshi Nakamoto |
| Jan 2009 | Bitcoin genesis block mined; network launched |
| 2013 | Vitalik Buterin publishes the Ethereum whitepaper |
| Jul 2015 | Ethereum mainnet (Frontier) — programmable smart contracts, EVM |
| 2015 | Hyperledger (Linux Foundation) for enterprise/permissioned chains |
| 2017 | ICO boom; ERC-20 standardised; CryptoKitties (early NFTs, ERC-721 finalised 2018) |
| 2020 | "DeFi summer" (Uniswap, Aave, Compound); Ethereum Beacon Chain launched (PoS) |
| 2021 | NFT boom; EIP-1559 fee market (London upgrade); El Salvador makes BTC legal tender |
| Sep 2022 | The Merge — Ethereum switches from Proof of Work to Proof of Stake (~99.95% less energy) |
| 2023 | Shanghai/Capella (staking withdrawals); ERC-4337 account abstraction deployed |
| 2024 | Dencun (EIP-4844 "blobs" → much cheaper layer-2 fees); US spot Bitcoin ETFs (Jan) and Ether ETFs (Jul); Bitcoin's 4th halving (Apr) |
| 2025 | Pectra upgrade (May — EIP-7702 smart accounts for regular wallets, higher validator stake limit); Fusaka (Dec 2025 — PeerDAS for more blob capacity) |
Programming-language and tooling versions: Solidity 0.4 (2016) → 0.8 (2020, checked arithmetic) → 0.8.x current; ethers.js v6 (2023); viem 2 (2024); Nethereum 4.x/5.x for .NET.
Lifecycle
Transaction lifecycle on Ethereum:
- User builds a transaction in a wallet (to, value, data, gas limit, max fee, nonce).
- The wallet signs it with the private key (ECDSA secp256k1).
- Broadcast to a node via JSON-RPC (
eth_sendRawTransaction) → enters the mempool. - A block proposer (validator in PoS) selects transactions (usually by fee/priority tip) and builds a block (about every 12 seconds — one slot).
- Transactions execute in the EVM; state changes (balances, contract storage); gas is charged; events/logs emitted; a receipt records status.
- The block is attested by validators → added to the chain → confirmations accumulate.
- Finality — under Ethereum PoS a block is finalised after two epochs (~12.8 minutes); then reverting it would require destroying at least 1/3 of staked ETH.
Smart contract lifecycle: design → write (Solidity) → test (unit + fuzz) → audit → deploy (a transaction creating the contract; code is immutable unless an upgrade pattern is used) → verify source on a block explorer → interact → upgrade via proxy (if designed) or migrate → pause/deprecate.
Block lifecycle (Bitcoin PoW): transactions in mempool → miners assemble a block → find a nonce so the block hash is below the difficulty target (~10 minutes average) → broadcast → nodes validate → longest valid (most-work) chain wins; 6 confirmations is the common safety threshold.
Tools used to develop
| Area | Tools |
|---|---|
| Wallets | MetaMask, Coinbase Wallet, Rabby, Trust Wallet; hardware: Ledger, Trezor; Safe (multisig) |
| Node access (RPC) | Infura, Alchemy, QuickNode, own node (Geth, Nethermind (written in .NET/C#), Reth, Erigon + consensus client) |
| Development frameworks | Hardhat, Foundry (forge/cast/anvil), Remix IDE (browser) |
| Libraries (JS/TS) | ethers.js, viem, wagmi (React hooks), web3.js (legacy, sunset 2025) |
| Libraries (.NET) | Nethereum |
| Contract libraries | OpenZeppelin Contracts (ERC-20/721/1155, access control, upgradeable proxies) |
| Explorers | Etherscan, Blockscout, Polygonscan, BscScan |
| Test networks | Sepolia, Holesky/Hoodi (Ethereum testnets), local Anvil/Hardhat Network |
| Indexing & data | The Graph, Dune, Etherscan APIs |
| Oracles | Chainlink, Pyth |
| Storage | IPFS, Filecoin, Arweave |
| Security | Slither, Mythril, Echidna, Foundry fuzzing, audits (OpenZeppelin, Trail of Bits, Certora) |