โ† Home
Foundations of Blockchain
Unit 1 โ€ข Introduction

Blockchain & DLT Foundations

1.1 Introduction to Blockchain and DLT

Distributed Ledger Technology (DLT) is a technological infrastructure and set of protocols that allows simultaneous access, validation, and record updating in an immutable manner across a network spread across multiple entities or locations.

Distributed vs Centralized

In a centralized system, one entity holds the database. In DLT, every node holds a copy, ensuring no single point of failure.

Immutability

Once data is recorded, it cannot be changed without altering all subsequent blocks, which requires network consensus.

1.3 Cryptography in Blockchain

Cryptography provides the "Trust" in a trustless environment using complex mathematical algorithms.

Hashing (SHA-256)

Takes any input and produces a fixed 256-bit output. It's deterministic, fast, and irreversible. Essential for connecting blocks.

Asymmetric Encryption

Uses Public Keys (like an email address) for receiving and Private Keys (like a password) for signing transactions.

Digital Signatures

Validates that a transaction was indeed created by the owner of the private key without exposing the key itself.

ECC (Elliptic Curve)

Used in Bitcoin (secp256k1) to provide high security with smaller key sizes compared to RSA.

1.4 CAP Theorem in Distributed Systems

๐Ÿงช

The CAP Tradeoff

According to the Brewer's Theorem, a distributed system can only provide two of the following simultaneously:

  • Consistency (C): Every read contains the latest write.
  • Availability (A): Every request gets a response (error or not).
  • Partition Tolerance (P): System works despite network failure between nodes.

Blockchain chooses AP (Eventual Consistency) to ensure the network never stops.

Unit 2 โ€ข Architecture

Structure of Blockchain

2.1-2.2 Types & Features

TypeExampleAccess
Public (Permissionless)Bitcoin, EthereumAnyone can join
Private (Permissioned)Hyperledger, RippleRestricted access
ConsortiumEnergy/Bank groupsGroup controlled
HybridDragonchainMixed public/private

Sidechain: A secondary blockchain that runs in parallel to a main chain, used for offloading transactions or testing new features.

2.3 - 2.5 Core Infrastructure

2.3 Components

  • P2P Network: No central server.
  • Nodes: Computers maintaining the ledger.
  • Transactions: State changes in the ledger.

2.4 Identity & Wallets

  • Hot Wallets: Software based, internet connected.
  • Cold Wallets: Paper/Hardware, offline (Highly secure).
  • Deterministic: Generates keys from one "Seed Phrase".

2.6 Blockchain Data Structure

A blockchain is a Linked List on steroids. Each block contains:

  • Block Header: Contains Hash of previous block, Timestamp, Nonce, and Merkle Root.
  • Block Body: List of all transactions included in that block.
  • Merkle Tree: Binary hash tree used to summarize transactions in a block for efficient verification.
Unit 3 โ€ข Essentials

Consensus Mechanisms

3.1 Consensus Protocols

Proof of Work (PoW)

Miners compete to solve puzzles. High energy, high security (e.g., Bitcoin).

Proof of Stake (PoS)

Validators chosen based on coins held. Low energy, faster (e.g., Ethereum 2.0).

DPoS

Users vote for delegates to validate. Extremely fast (e.g., EOS, Steem).

PBFT

Practical Byzantine Fault Tolerance. Used in permissioned chains.

3.2 - 3.4 Mining, Rewards & Forks

Block Reward: The incentive given to miners (new coins + fees) for securing the network.

Hard Fork

Radical change making previous versions invalid. Splits the chain (e.g., Bitcoin vs Bitcoin Cash).

Soft Fork

Backward compatible upgrade. Old nodes can still see new blocks as valid.

3.5 Network Attacks

51% Attack

An attacker controls >50% hash rate, allowing them to rewrite the chain or double-spend.

Sybil Attack

Attacker creates thousands of fake identities to flood the network and influence outcomes.

Unit 4 โ€ข Cryptocurrency

Bitcoin and Ecosystems

4.1-4.4 Bitcoin Mechanics

Bitcoin is the first implementation of blockchain by Satoshi Nakamoto.

  • Bitcoin Script: A stack-based language for processing payments.
  • BFT: Capability of network to bypass 'Byzantine Generals Problem'.
  • Merkle Tree: Summarizes transactions to save disk space for "SPV" (Simplified Payment Verification) nodes.

4.5 Collaborative Implementations

Hyperledger

An open-source effort to create enterprise-grade blockchain frameworks (Fabric, Sawtooth).

Corda (R3)

Specifically for finance. Not all nodes see all transactions (Privacy focused).

ERC-20

The standard for technical tokens on Ethereum. Allows interoperability between apps.

Unit 5 โ€ข Future

Decentralization Mastery

5.1 Smart Contracts

Code that is stored on a blockchain and executes automatically when certain conditions are met. "Code is Law".

Pioneered by Vitalik Buterin (Ethereum). They eliminate the need for third-party intermediaries in agreements.

5.2 - 5.3 DAO & DApps

DAO

Decentralized Autonomous Organization. An org with no head, rules set in code, and decisions made by token holder votes.

DApps

Decentralized Applications. Frontend like a regular app, but backend runs on a P2P blockchain network instead of a server.

Hands-on โ€ข Analysis

Feasibility Analysis Samples

Vote Chain

Analysis on tamper-proof electronic voting. How to map Voter ID to public keys without exposing identity.

Charity Tracking

Tracking donation flow from Donor โ†’ Org โ†’ End User. Ensuring 100% transparency using public ledgers.

Fake Product Detector

Barcode + Blockchain. Consumers scan a code to see the entire manufacturing journey (Provenance).

Land Registry

Replacing corruptible physical records with immutable on-chain ownership tokens (NFTs for Land).