Blockchain & Web3

Overview

The largest single technical domain in the source vault. Notes cover both public blockchain (Ethereum, Bitcoin) and enterprise blockchain (Hyperledger Fabric), with significant depth in smart contract development using Solidity.


Core Areas

Ethereum & Smart Contracts

  • EVM (Ethereum Virtual Machine) architecture
  • Smart contracts written in Solidity
  • ABI encoding, event logs, error handling
  • Gas optimisation patterns
  • ERC standards: ERC-20 (tokens), ERC-721 (NFTs), ERC-1155

Solidity Development

  • Data types, structs, mappings, arrays
  • Visibility modifiers: public, private, internal, external
  • Inheritance, interfaces, abstract contracts
  • Security patterns: re-entrancy guards, access control (OpenZeppelin)
  • Testing with Hardhat and Truffle
  • Deployment and verification (Etherscan)

Hyperledger Fabric

  • Permissioned (private) blockchain for enterprise use cases
  • Components: peers, orderers, channel, chaincode
  • Hyperledger Composer (now deprecated) — high-level business network definition
  • Use cases: supply chain, trade finance, identity management

Bitcoin & Protocol Fundamentals

  • UTXO model vs account model
  • Mining, proof-of-work, difficulty adjustment
  • Transaction structure: inputs, outputs, scripts
  • Layer 2: Lightning Network basics

DeFi Concepts

  • Automated Market Makers (AMMs): Uniswap, Curve
  • Liquidity pools and impermanent loss
  • Yield farming and staking mechanics
  • Oracles: Chainlink data feeds

Cryptography Fundamentals

  • Hash functions: SHA-256, Keccak-256
  • Public-key cryptography: ECDSA, secp256k1
  • Merkle trees for efficient proof of inclusion
  • Zero-knowledge proofs: SMPC, zk-SNARKs (referenced in SMPC - Secure multi-party computation.md)

Relationships


References

  • Hyperledger Fabric documentation notes
  • Ethereum Solidity development tutorials