Skip to content
IT-803 (A) · Blockchain Technology/Quick Revision Short Notes

Blockchain Technology (IT-803 (A)) - Unit 3 Short Notes

UNIT 3: BLOCKCHAIN TECHNOLOGY - COMPREHENSIVE SHORT NOTES


I. FOUNDATIONAL CRYPTOGRAPHIC & DATA STRUCTURES

Cryptographic Hash Functions

A deterministic function that maps input data of any size to a fixed-size output (hash/digest). Core Properties:

  • Deterministic: Same input → same output, always.

  • Pre-image resistant: Given hash h, it's computationally infeasible to find any input x such that hash(x) = h.

  • Second pre-image resistant: Given input x1, it's infeasible to find a different x2 where hash(x1) = hash(x2).

  • Collision resistant: Infeasible to find any two distinct inputs x1 and x2 such that hash(x1) = hash(x2).

  • Avalanche effect: A minor change in input (even 1 bit) causes a drastic, unpredictable change in the output hash (approx. 50% of bits flip).

Role in Blockchain:

  • Block Linking: Each block header contains the hash of the previous block, creating an immutable chain.

  • Data Integrity: Any tampering with a transaction or block changes its hash, breaking the chain.

  • Mining (PoW): Miners repeatedly hash the block header with different nonces to find a hash below the difficulty target.

[!TIP] Exam Focus: Be prepared to list and explain all 5 properties with examples. The avalanche effect is a common differentiator from simple checksums.

Merkle Trees (Binary Hash Trees)

A tree structure where every non-leaf node is the hash of its child nodes. Leaf nodes are hashes of individual transactions.

Construction:

  1. Hash each transaction in the block (e.g., H(Tx1), H(Tx2)...).

  2. Pair and hash them: H(H(Tx1) + H(Tx2)), H(H(Tx3) + H(Tx4))... (odd transaction handled by duplicating last).

  3. Repeat pairing and hashing up the tree until a single root hash is obtained: Merkle Root.

Critical Importance for Blockchain:

  • Efficient & Secure Verification (SPV): A light client can verify a transaction's inclusion by obtaining just the Merkle Path (hashes of sibling nodes) and the Merkle Root from a full node. It needs only O(log n) data instead of the entire block.

  • Data Consistency: Any single transaction alteration changes its leaf hash, which propagates up, altering the Merkle Root. This breaks the block's validity.

  • Scalability: Enables quick verification of large sets of transactions.

Simple Merkle Tree Diagram (4 transactions):


        Merkle Root = H(H12 + H34)

           /           \

      H12 = H(H1+H2)   H34 = H(H3+H4)

       /    \          /    \

    H(Tx1) H(Tx2)  H(Tx3) H(Tx4)

[!TIP] Very High Frequency: Expect a question on "importance" or "usage." Always connect Merkle Trees to SPV (Simplified Payment Verification) and lightweight clients.

Public Key Cryptography (Digital Signatures)

  • Key Pair: Each user has a private key (secret) and a mathematically linked public key (shared).

  • Signing: To sign a message M, the sender uses their private key SK to produce a signature Sig: Sig = Sign(SK, M).

  • Verification: Anyone with the sender's public key PK can verify the signature: Verify(PK, M, Sig) → True/False.

  • Role in Blockchain:

    • Ownership: Bitcoin addresses are derived from public keys. Control of the private key = control of funds.

    • Transaction Authorization: A transaction input must contain a signature (ScriptSig) that satisfies the locking script (ScriptPubKey) of the referenced UTXO.

    • Identity & Non-Repudiation: Proves a transaction was authorized by the holder of the private key without revealing it.


II. BLOCK & TRANSACTION ARCHITECTURE

Block Structure

A block consists of a Block Header (fixed ~80 bytes) and a Block Body (variable list of transactions).

Component Size (bits) Description
Version 4 Block version number.
Previous Block Hash 32 Hash of the previous block's header (links the chain).
Merkle Root 32 Hash of the root of the Merkle tree of all transactions in this block.
Timestamp 4 Block creation time (seconds since Unix epoch).
Difficulty Target 4 The current difficulty threshold for Proof-of-Work.
Nonce 4 "Number used once." Miners iterate this to find a valid PoW.
Transaction Counter Variable (1-9) Number of transactions in the block body (VarInt format).
Transactions Variable List of all transactions (first is usually the coinbase/mining reward tx).

[!TIP] Very High Frequency: "Draw and explain block structure" is a classic 7-mark question. Memorize the header fields and their purpose. The Nonce is only in the header, not the body.

Transaction Structure & UTXO Model

Transaction Components:

  • Version: Transaction format version.

  • Inputs (TxIn): List of references to previous UTXOs being spent. Each input contains:

    • Previous TXID: Hash of the transaction containing the UTXO.

    • VOUT: Index of the UTXO in that transaction.

    • ScriptSig: Script that fulfills the conditions of the referenced UTXO's ScriptPubKey (contains signature + public key).

  • Outputs (TxOut): List of new UTXOs created. Each output contains:

    • Value: Amount in satoshis (BTC).

    • ScriptPubKey: "Locking script" that defines the conditions to spend this output (e.g., OP_DUP OP_HASH160 <PubKeyHash> OP_EQUALVERIFY OP_CHECKSIG for P2PKH).

  • Lock Time: Optional; transaction invalid until this block height/timestamp.

UTXO (Unspent Transaction Output) Model:

  • The global state is the set of all unspent transaction outputs.

  • Ownership is defined by the ScriptPubKey lock.

  • Spending consumes a UTXO completely and creates new UTXOs as change or payment.

  • vs. Account-Based Model (Ethereum): Accounts have balances and a nonce. Transactions directly debit/credit accounts. UTXO is simpler for parallel validation and privacy.

Transaction Lifecycle:

  1. Creation: Sender constructs transaction with inputs (UTXOs they own) and outputs (recipient locks, change back to self).

  2. Signing: Sender signs each input with their private key.

  3. Broadcast: Sent to Bitcoin P2P network.

  4. Validation by Nodes: Checks:

    • All referenced UTXOs exist and are unspent.

    • Signatures are valid.

    • Sum of input values ≥ sum of output values (no inflation).

    • Scripts execute to True.

  5. Mempool: Valid transactions wait in the memory pool (mempool) to be included in a block.

  6. Inclusion in Block: A miner includes it in a candidate block and finds a valid PoW.

  7. Confirmation: Once the block is added to the chain, the transaction gets 1 confirmation. Each subsequent block adds another.

The Double-Spending Problem

Definition: A malicious actor spends the same digital asset (UTXO) twice by broadcasting two conflicting transactions to the network before the first is confirmed in a block.

Prevention in Blockchain:

  1. Consensus & Chain Selection: Nodes follow the longest valid chain rule. If two conflicting transactions are mined in competing blocks, the block that becomes part of the longest chain is accepted. The other transaction becomes invalid (its referenced UTXO is already spent).

  2. Confirmation Depth: A transaction buried under k blocks is exponentially harder to reverse. Merchants wait for 6 confirmations (~1 hour) for high-value transactions.

  3. Network Propagation: Transactions propagate quickly. A double-spend attempt must reach a majority of mining power before the legitimate transaction to succeed, which is difficult.

  4. Lock Time & Sequence: Can be used for more complex spending conditions but not primary defense.

[!TIP] High Frequency: Always explain why it's a problem (digital files are easy to copy) and the mechanism (consensus + longest chain). Mention the role of confirmations.


III. CONSENSUS MECHANISMS

A. Permissionless / Public Blockchain Consensus

Proof-of-Work (PoW)

Core Principle: Miners compete to solve a computationally difficult but easily verifiable puzzle. The puzzle: Find a nonce N such that Hash(BlockHeader || N) < Target, where Target is a dynamically adjusted difficulty value.

Process:

  1. Miners collect pending transactions from mempool.

  2. Build a candidate block (with coinbase tx to themselves).

  3. Iterate the nonce (and extra nonce in coinbase) and hash the block header repeatedly.

  4. First miner to find a hash below the Target broadcasts the block.

  5. Network validates the block (including all tx and PoW). If valid, it's added to the chain, and the miner gets the block reward + fees.

  6. Difficulty Adjustment: Every 2016 blocks (~2 weeks), Bitcoin recalculates Target so that the average time between blocks remains ~10 minutes, regardless of total network hash power.

Attacks on PoW:

  • 51% Attack: If an attacker controls >50% of the network's hash power, they can:

    • Double-spend: Consistently mine a longer chain that excludes a victim's transaction.

    • Censor transactions: Refuse to include specific transactions in blocks.

    • Rewrite recent history: The attacker can only alter the last few blocks (the "attack window").

  • Selfish Mining: A miner withholds a found block instead of broadcasting it. They continue mining on top of the secret block, creating a private lead. When the public chain catches up to within one block, they release their secret chain, causing the public chain's work to be wasted (oracle problem). Profitable with >33% hash power.

  • Block Withholding: A mining pool participant finds a valid block but discards it, harming the pool but gaining no personal reward (sabotage).

The "Monopoly Problem" / Centralization Pressures:

  • Economies of Scale: Large mining farms have lower costs per hash (cheaper electricity, bulk hardware).

  • ASIC Dominance: Specialized hardware (ASICs) for SHA-256 mining is vastly more efficient than GPUs/CPUs. Manufacturing is concentrated, leading to potential supply chain control.

  • Mining Pool Centralization: To reduce variance in income, miners join pools. Top 5 pools often control >50% of hash power, creating a de facto centralization point.

Historical Context:

  • HashCash (1997, Adam Back): Original PoW for email spam prevention. Required a small amount of computational work (partial hash inversion) to send an email.

  • Bitcoin PoW (2008, Satoshi): Adapted HashCash using SHA-256, added difficulty adjustment, and integrated it into a decentralized consensus for a currency.

Proof-of-Elapsed-Time (PoET)

Principle: Uses a trusted execution environment (TEE) like Intel SGX to randomly assign a wait time to each validator node. The node that "waits" the shortest time (verified via TEE) becomes the leader for the next block.

Process:

  1. Leader Election: All validators request a random wait time from their TEE. The TEE (a trusted third party in hardware) returns a signed wait time. The validator with the shortest wait time is elected leader.

  2. Block Creation: Leader creates and signs the block.

  3. Verification: Other validators can easily verify two things via the TEE's signature:

    • The leader's wait time was indeed the shortest.

    • The leader didn't cheat by shortening their wait time (TEE enforces real-time passage).

Advantages:

  • Energy Efficient: No wasteful computation race.

  • Random & Fair: Leader selection is random, proportional to stake/trust.

  • High Throughput: Fast block times possible.

Limitations:

  • Hardware Trust Dependency: Relies on the honesty and security of the TEE manufacturer (Intel). A compromised TEE breaks the system.

  • Not Fully Decentralized: Requires validators to use specific, approved hardware.

[!TIP] PoET is permissioned/enterprise-focused (Hyperledger Sawtooth). Contrast with PoW's "computational lottery" vs. PoET's "timed lottery" via hardware.

B. Permissioned / Private Blockchain Consensus

Definition & Need: Validators are known, identified, and vetted entities. Goals: higher throughput, lower latency, finality (no forks), and regulatory compliance. Trust is partial (some nodes may be Byzantine).

Raft Algorithm

A consensus algorithm for crash fault-tolerant (CFT) systems (nodes fail by stopping, not by acting maliciously). It's a simpler, more understandable alternative to Paxos.

Key Roles:

  • Leader: Handles all client requests, replicates log entries to followers.

  • Followers: Passive; receive log entries from leader, vote in elections.

  • Candidate: A follower that initiates an election.

Operation:

  1. Leader Election:

    • Timeout triggers follower → candidate.

    • Candidate votes for self, requests votes from others.

    • Wins if receives votes from majority (n/2 + 1). Becomes leader.

  2. Log Replication:

    • Client sends command to leader.

    • Leader appends command to its log, sends AppendEntries RPC to all followers.

    • Followers append and respond.

    • Leader commits entry once replicated on majority. Notifies followers to commit. Applies to state machine.

  3. Safety: Only one leader at a time. Logs are consistent (leader's log is authoritative).

  4. Liveness: Elections complete as long as majority of nodes are up and can communicate.

Comparison with Paxos: Raft is more modular (separates leader election, replication, safety), making it easier to understand and implement. Paxos is more general but complex.

Practical Byzantine Fault Tolerance (PBFT) & Lamport-Shostak-Pease Algorithm

The classic algorithm for Byzantine Fault Tolerance (BFT)—tolerates nodes that fail arbitrarily (crash, send wrong messages, be malicious).

Assumptions: Synchronous network (bounded delay), n total nodes, t Byzantine nodes. Safety condition: n > 3t (i.e., t < n/3).

Operation (in phases for each request):

  1. Pre-Prepare (Leader → All): Leader assigns a sequence number n to client request m, broadcasts <<PRE-PREPARE, v, n, m>> (view v, sequence n, message m).

  2. Prepare (All → All): Upon receiving valid PRE-PREPARE, each replica broadcasts <<PREPARE, v, n, d, i>> (digest d of m, replica ID i). Replicas collect 2t matching PREPARE messages (including their own) for the same (v, n, d).

  3. Commit (All → All): After 2t+1 matching PREPAREs (prepared state), each replica broadcasts <<COMMIT, v, n, d, i>>. They collect 2t+1 matching COMMITs.

  4. Reply (All → Client): After 2t+1 matching COMMITs (committed state), replica executes the request and sends reply to client. Client needs t+1 matching replies with same result to consider it final.

Communication Overhead: O(n²) messages per request (each of n nodes sends to n-1 others in Prepare/Commit phases). This limits scalability (~dozens of nodes).

Lamport-Shostak-Pease (The Original BFT Paper): The theoretical foundation proving n > 3t is necessary and sufficient. PBFT is its practical, optimized implementation.

Other Protocols:

  • Tendermint: Combines PBFT's BFT safety with a Proof-of-Stake (PoS) round-robin leader election. Used in Cosmos SDK. Has O(n²) communication but instant finality.

[!TIP] Very High Frequency: Be ready to differentiate Raft (CFT) vs PBFT (BFT). Key: Raft for trusted environments (no malicious nodes), PBFT for hostile ones. PBFT's t < n/3 rule and 3-phase commit are must-knows. Use the table below for comparison.

Feature Raft PBFT
Fault Model Crash Fault Tolerant (CFT) Byzantine Fault Tolerant (BFT)
Max Faults (n-1)/2 (majority up) t < n/3
Trust Assumption Nodes are honest but may crash Nodes may be malicious/arbitrary
Complexity Simpler, leader-based Complex, 3-phase all-to-all
Comm. Overhead O(n) (leader to followers) O(n²) per request
Use Case Permissioned, trusted consortium Permissioned, adversarial nodes
Finality Immediate (once committed) Immediate (once committed)

IV. BITCOIN NETWORK & MINING

Bitcoin P2P Network

  • Topology: Decentralized, unstructured gossip network. Nodes (peers) connect to a random set of other nodes (typically 8 outbound, many inbound).

  • Node Types:

    • Full Node: Validates all transactions and blocks, stores entire blockchain (~500+ GB). Enforces consensus rules.

    • SPV (Simple Payment Verification) / Light Client: Stores only block headers. Uses Merkle proofs to verify transactions without full blockchain. Queries full nodes.

    • Mining Node: Full node that also performs PoW. Often part of a mining pool.

  • Message Propagation:

    1. Transaction: A node broadcasts inv (inventory) message with tx hash. Peers request it with getdata if unknown.

    2. Block: Miner broadcasts new block with inv. Peers request with getdata. Block propagation is critical for miner revenue (oracle problem).

Block Mining Process

  1. Transaction Collection: Miner gathers high-fee transactions from mempool.

  2. Block Creation: Constructs a new block:

    • Sets version, previous block hash, current time.

    • Builds Merkle tree of transactions (includes coinbase transaction as first tx, which creates new BTC + fees to miner's address).

    • Sets initial nonce = 0.

  3. PoW Computation: Repeatedly hashes the block header (Version || PrevHash || MerkleRoot || Timestamp || Bits || Nonce) with SHA-256(SHA-256()). Increments nonce (and extra nonce in coinbase if nonce overflows) until hash(header) < Target.

  4. Block Propagation: Upon finding a valid nonce, miner broadcasts the full block to its peers via inv/getdata.

  5. Chain Selection (Longest Valid Chain Rule): Upon receiving a new block, each node:

    • Validates the block (PoW, transactions, timestamps).

    • If valid and its header links to the tip of the current best chain, it's accepted.

    • If it creates a longer valid chain, the node switches to that chain (reorganizes). All transactions in the old chain's blocks that aren't in the new chain return to the mempool.

Types of Mining:

  • Solo Mining: Miner works alone. Probability of finding a block is proportional to their hash rate vs. total network. High variance, near-zero expected return for small miners.

  • Pool Mining:

    • How Pools Work:

      1. Work Assignment: Pool operator creates a block template (with their coinbase address). Miners are given a "work" (a modified block header with different extra nonce) to hash.

      2. Share Submission: Miners submit shares—proofs of work that are easier than the network target (higher share target). A share is a valid block hash for the pool's internal difficulty.

      3. Reward Distribution: When the pool finds a block (a share that also meets the network target), the block reward is distributed among miners proportionally to the number of valid shares each submitted in the current "round" (since last block). Methods: PPS (Pay-Per-Share), PPLNS (Pay-Per-Last-N-Shares).

    • Purpose: Reduces payout variance for small miners. Pool operator bears the risk of block discovery.

Bitcoin Script (Stack-based, Forth-like)

A simple, non-Turing-complete, intentionally limited scripting language for locking/unlocking UTXOs.

Key Characteristics:

  • Stack-based: Operations pop arguments from stack, push result.

  • No Loops/Jumps: Prevents infinite loops (Denial-of-Service). Only conditional OP_IF/OP_ELSE/OP_ENDIF.

  • Limited Opcodes (~200): Arithmetic, crypto (hashes, signatures), stack manipulation, control flow.

  • Deterministic: Same inputs → same execution path & result.

Common Script Types:

Type Locking Script (ScriptPubKey) Unlocking Script (ScriptSig) Use Case
P2PK <PublicKey> OP_CHECKSIG <Signature> Early Bitcoin (rare)
P2PKH OP_DUP OP_HASH160 <PubKeyHash> OP_EQUALVERIFY OP_CHECKSIG <Signature> <PublicKey> Standard payment
P2SH OP_HASH160 <ScriptHash> OP_EQUAL <Sig...> <Serialized RedeemScript> Multi-sig, complex logic
Multi-sig (M-of-N) OP_M <PubKey1> ... <PubKeyN> OP_N OP_CHECKMULTISIG <Sig1> ... <SigM> OP_0 (bug workaround) Shared wallets (e.g., 2-of-3)
Time-locked OP_CHECKLOCKTIMEVERIFY OP_DROP <...rest...> Standard scriptSig + nLockTime set in tx Escrow, vesting schedules

Limitations & Purpose:

  • Not Turing-complete: No loops, limited memory. This is a feature, not a bug. It ensures:

    • Predictable execution cost: Fees can be estimated accurately.

    • No infinite loops: Prevents DoS attacks.

    • Simplicity & Security: Easier to formally verify, fewer attack vectors.

  • Purpose: Enable basic smart contracts (multi-sig, escrow, time-locks) without general-purpose computation.


V. SMART CONTRACTS

Essential Characteristics:

  1. Self-Executing: Automatically execute when predefined conditions are met.

  2. Immutable: Once deployed, code cannot be changed (unless upgrade patterns built-in).

  3. Deterministic: Same inputs → same outputs on all nodes.

  4. Decentralized: Runs on a distributed network, not a single server.

  5. Trust-Minimized: Reduces need for trusted intermediaries; code is the law.

  6. Event-Driven: Triggered by transactions or external oracles.

Platform-Specific Implementations

Ethereum Smart Contracts
  • Language: Solidity (JavaScript-like), Vyper (Python-like, security-focused).

  • Execution Model:

    • EVM (Ethereum Virtual Machine): Turing-complete, stack-based VM on each node.

    • Gas: Every operation (opcode) has a gas cost. Transactions include a gas limit and gas price (in ETH). Prevents infinite loops and pays for computation/storage.

    • State Changes: Contract code and storage live in Ethereum state. A transaction calling a contract function executes EVM bytecode, potentially modifying state. State changes are committed only if the transaction is included in a block.

  • Process:

    1. Write: Code in Solidity.

    2. Compile: Solidity compiler (solc) produces EVM bytecode and Application Binary Interface (ABI).

    3. Deploy: Send a special transaction with to address empty, data field = bytecode. Pay gas. Deployment creates a contract address (derived from sender & nonce). Bytecode is stored on-chain.

    4. Interact: Send transactions to the contract address with data field specifying function call & arguments (encoded per ABI). Read-only calls (call) don't change state and don't cost gas (if from eth_call).

Hyperledger Fabric Smart Contracts (Chaincode)
  • Writing: Chaincode is a program (not a transaction script) written in Go, Java, or JavaScript (Node.js). It implements a pre-defined interface: Init (initialization) and Invoke (transaction entry point).

  • Deployment Process:

    1. Packaging: Chaincode is packaged into a .tar.gz file (code + metadata).

    2. Installing: Package is installed on the peer's filesystem (endorsing peers).

    3. Instantiating/Approving: On a channel, an admin transaction (instantiate or approve + commit) is sent to define:

      • Chaincode name & version.

      • Endorsement Policy: Which peers must endorse a transaction (e.g., AND('Org1.peer','Org2.peer')).

      • Chaincode definition (including the Init function arguments).

  • Invocation Model:

    1. Client application sends a proposal (transaction proposal) to one or more endorsing peers as specified by the policy.

    2. Each endorsing peer:

      • Simulates the transaction (executes Invoke in a temporary world state).

      • Produces a read-write set: Keys read (R) and their versions, and keys to be written (W) with new values.

      • Signs the response (endorsement).

    3. Client collects sufficient endorsements, packages them into a transaction, and submits it to the ordering service.

    4. Ordering Service: Orders transactions (by time/sequence) into blocks and broadcasts blocks to all peers on the channel.

    5. Validation & Commit: Each committing peer (all peers on channel) validates the transaction:

      • Check endorsement policy is satisfied.

      • Check read-set versions match current world state (no concurrent modification).

      • If valid, apply write-set to world state (ledger).

    6. Event Notification: Peers can emit events that clients listen to.

[!TIP] Key Difference: Ethereum contracts are global state on a single chain. Fabric chaincode is channel-scoped; state is private to channel members. Fabric uses execute-order-validate (vs. Ethereum's order-execute), enabling parallel execution and private data.


VI. ENTERPRISE & PERMISSIONED PLATFORMS

Hyperledger Fabric (Very High Frequency)

A modular, enterprise-grade, permissioned DLT framework.

Architecture (Modular Components):

  1. Peers:

    • Endorsing Peer: Executes chaincode, produces endorsements.

    • Committing Peer: Maintains ledger, validates/commits transactions. (Often a peer is both).

    • Leader Peer: Elected per channel to receive blocks from ordering service and distribute to other peers in the org.

  2. Ordering Service (Orderer): The consensus service. Does not execute chaincode. Its sole job: order transactions into blocks and broadcast. Implements consensus (Raft, Kafka, Solo). Provides atomic broadcast—all peers on a channel receive the same sequence of blocks.

  3. Channel: A private blockchain subnet for a specific set of participants. Ledger data is isolated per channel. An organization can be on multiple channels, seeing only relevant data.

  4. Membership Service Provider (MSP): Manages identities (X.509 certificates) and defines which root CAs are trusted for a given organization or channel. The source of trust.

Key Concepts:

  • Identities & Policies (Very High Frequency):

    • MSP (Membership Service Provider): Defines an organization's identity (root CAs, admins, users, peers, orderers). Used for authentication.

    • Policies (ACL & Endorsement): Written in a declarative language (e.g., AND('Org1.peer','Org2.member')). Types:

      • Endorsement Policy: Who must sign a transaction proposal for it to be valid.

      • Validation Policy: (Usually same as endorsement) Checked during validation.

      • Channel Creation Policy: Who can create a channel.

      • Lifecycle/Instantiation Policy: Who can approve/commit chaincode definition.

      • ACL (Access Control Lists): Map resources (chaincode, channels) to policies for operations (read, write, invoke).

  • Channels: Provide data privacy & confidentiality. Only members of a channel see its ledger and chaincode. An asset can be shared on a need-to-know basis across multiple channels.

  • Private Data Collections: A feature to share data only among a subset of organizations on a channel, without making it public to all channel members. The data is stored in a private database on the endorsing peers, and only a hash is written to the shared ledger. Useful for sensitive attributes (e.g., price in a trade).

Industry Use Cases:

  • Supply Chain Provenance: Track goods from source to shelf. Each step (manufacturer, shipper, retailer) is a transaction on a channel. Immutable audit trail.

  • Trade Finance: Digitize Letters of Credit (LCs), Bills of Lading. Smart contracts automate payment upon verified delivery. Reduces fraud, speeds up process.

  • Healthcare Records: Patient consent management. Different providers (hospitals, labs) on a channel can access shared, immutable records with patient permission.

  • Identity Management: Decentralized Identity (DID) systems where users control their credentials.

Ripple (XRP Ledger)

  • Purpose: Real-time gross settlement system and currency exchange for cross-border payments. Targets banks and payment providers.

  • Consensus Protocol (RPCA - Ripple Protocol Consensus Algorithm):

    • Unique Node List (UNL): Each server maintains a list of other trusted servers (its UNL). Consensus is reached only among nodes in a server's UNL.

    • Process: In rounds, each server proposes a candidate set of transactions. Servers compare proposals with their UNL. Transactions that appear in >50% of UNL proposals are moved to the next round. After multiple rounds, a consensus is reached on the next ledger (block).

    • No Mining: Validators are known institutions (banks, market makers). No proof-of-work.

    • Finality: ~3-5 seconds. No forks.

  • Native Cryptocurrency (XRP): Used as a bridge currency to facilitate trades between fiat currencies (e.g., USD→XRP→EUR). Also used to pay transaction fees (destroyed, not given to anyone) to prevent spam.

Corda

  • Design Philosophy: Not a blockchain. It's a distributed ledger for regulated institutions (especially finance). Focus: privacy, scalability, interoperability with legacy systems.

  • Key Features:

    • Point-to-Point Communication: Transactions are shared only with necessary counterparties, not broadcast to all network participants. No global broadcast of all data.

    • Notary Pools: Provide consensus on transaction uniqueness (prevent double-spend) and timestamping. Notaries are specific nodes, not all nodes. Can be validating (see full tx) or non-validating (only see hash).

    • CorDapps (Corda Distributed Applications): Written in JVM languages (Kotlin, Java). Define States (data), Contracts (validation logic), and Flows (business processes for agreement).

    • States: Immutable, point-in-time facts (e.g., Cash.State, Iou.State). Represented as objects.

    • Contracts: Attach to states. Define verify function that checks transaction validity (inputs/outputs, signatures, constraints).

    • Flows: Encapsulate the protocol between parties to agree on a transaction (e.g., InitiatorFlow sends proposal, ResponderFlow reviews and countersigns).

  • Use in Finance: Syndicated loans (multiple banks lending to one borrower), Trade finance (LCs), Insurance (policies, claims), Post-trade (securities settlement).

[!TIP] Compare Fabric vs. Corda: Fabric has a shared ledger per channel, all peers validate all transactions. Corda has no shared ledger; states are shared pairwise. Fabric uses ordering service; Corda uses notary pools. Fabric chaincode is general; Corda CorDapps are JVM-based and flow-driven.


VII. APPLICATION & USE CASE DOMAINS

Supply Chain Finance & Management

Problems with Traditional Systems: Siloed data, paper-based records, lack of transparency, difficulty in provenance, slow invoice financing, fraud (counterfeit goods).

Blockchain Improvements:

  • Transparency & Traceability: Every step (raw material → manufacturing → shipping → retail) is an immutable transaction on a permissioned ledger. All authorized participants see the same data.

  • Provenance: Verify authenticity and origin of goods (e.g., organic, conflict-free diamonds).

  • Automated Payments via Smart Contracts: Trigger payment automatically upon verified delivery (IoT sensor data or document hash match). Reduces disputes, improves cash flow.

  • Reduced Fraud: Immutable audit trail makes it harder to alter records or create fake invoices.

  • Inventory & Asset Financing: Real-time, trusted view of inventory allows for better financing terms (e.g., dynamic discounting).

Mortgage Process

Traditional Process: Paper-heavy, multiple intermediaries (lender, title company, attorney, appraiser, insurer), slow (30-60 days), prone to fraud (identity theft, income misrepresentation), high closing costs.

Blockchain-Enabled Mortgage:

  1. Digitized Assets: Property title, borrower identity, income/employment records (from verified sources) are stored as verifiable credentials or on-ledger states.

  2. Smart Contracts for Escrow & Payment:

    • Escrow account is a smart contract. Funds are released automatically upon fulfillment of conditions (appraisal complete, title clear, inspection passed).

    • Payments to intermediaries (appraiser, title company) are automatic upon service verification.

  3. Immutable Audit Trail: Every document upload, signature, and condition check is recorded. Regulators and auditors have real-time, tamper-proof access.

  4. Faster Settlement: Automated verification and payment reduces manual processing. Potential for same-day or next-day closing.

  5. Reduced Fraud: Identity is cryptographically verified. Income/asset data comes directly from employers/banks (via oracles). Title history is immutable.

Cross-Border Payments

Problems with Traditional (SWIFT): Slow (2-5 days), expensive ($25-50 per transfer + FX spreads), opaque (tracking difficult), multiple intermediary banks, operates only during business hours.

Blockchain Solutions (Ripple, Stellar):

  • Speed: Settlements in seconds (3-5 sec for Ripple).

  • Cost: Significantly cheaper (fractions of a cent per transaction).

  • Transparency: Real-time tracking of payment status on the ledger.

  • 24/7 Operation: No banking hours limitation.

  • How it Works (Ripple example):

    1. Bank A (holds USD) wants to send to Bank B (holds EUR).

    2. Bank A sends USD to Ripple's gateway or holds XRP.

    3. Ripple network finds the best liquidity path (e.g., USD→XRP→EUR via market makers).

    4. Payment is atomic: Bank B receives EUR (or credit) almost instantly, Bank A's USD/XRP is debited.

    5. Uses IOUs (issued by gateways) or XRP as bridge currency. No need for nostro/vostro accounts.

Blockchain-Enabled Trade Finance

Problems: Paper-based Letters of Credit (LCs), Bills of Lading. Slow (weeks), requires manual document verification by multiple banks, high risk of fraud (fake documents), lack of trust between unknown trading partners.

Blockchain Solution:

  1. Digitization: LC, commercial invoice, packing list, Bill of Lading (B/L) become digital assets on a permissioned ledger (e.g., we.trade, Marco Polo).

  2. Single Source of Truth: All parties (importer/exporter, their banks, carrier) see the same, immutable documents.

  3. Smart Contracts Automate Payment:

    • LC terms are encoded in a smart contract.

    • When the exporter uploads the Bill of Lading and other documents, the smart contract verifies they match the LC terms (oracle from document hash).

    • Upon verification, payment is automatically released from importer's bank to exporter's bank.

  4. Benefits: Reduces processing time from weeks to days/hours, lowers costs, reduces fraud, increases trust among strangers.

Identity Management Systems

Problems with Centralized Systems: Single point of failure (data breaches), users don't control their data, repetitive KYC/AML, identity theft, siloed identities (Facebook, Google, government ID).

Self-Sovereign Identity (SSI) on Blockchain:

  • User Control: Individual holds their decentralized identifiers (DIDs) and verifiable credentials (VCs) in a digital wallet (e.g., on phone). No central database.

  • Verifiable Credentials: Issued by trusted authorities (government → passport VC, university → degree VC). Cryptographically signed. User can present a zero-knowledge proof (e.g., "I am over 21") without revealing birthdate.

  • Blockchain's Role:

    • DID Registry: A public ledger (or permissioned) stores DIDs and their associated public keys. Acts as a pointer or key lookup service. The actual identity data is off-chain.

    • Revocation Registry: Issuers can publish revocation status (e.g., lost passport).

    • Tamper-Proof History: All credential issuances and revocations are logged, creating an immutable audit trail.

  • Process:

    1. User creates a DID.

    2. Requests VC from Issuer (e.g., presents government ID). Issuer verifies, issues signed VC.

    3. User stores VC in wallet.

    4. To prove something to a Verifier (e.g., bar), user presents a verifiable presentation (VP) containing a zero-knowledge proof from the VC.

    5. Verifier checks the signature chain back to a trusted issuer via the DID registry on the blockchain.

  • Examples: uPort (Ethereum), Sovrin (permissioned), Microsoft ION (Bitcoin).

[!TIP] Application Questions: Always structure answer: 1) Traditional Problem, 2) How Blockchain Solves It (specific features), 3) Resulting Benefits. Use concrete examples (e.g., "Bill of Lading becomes a digital asset on a channel").

Go to where you left off?

Quick Add to Notes

Save questions, your own notes and screenshots into notes filed by unit. It takes a free account.

Create free account

Have an account? Log in