Understanding Blockchain and Cryptocurrency

Oct 10, 2024

Blockchain Overview

Introduction to Blockchain

  • Blockchain allows easier transactions without online wallets, banks, or third-party applications.
  • Cryptocurrencies, a form of digital currency, operate on blockchain technology.

Example Scenario

  • Situation: Four friends (Jack, Ted, Sam, Phil) go out for dinner.
  • Jack pays the bill and later expects to receive money from his friends.
  • Transaction Issues: Phil's transaction goes through, but Ted and Sam's transactions fail due to potential bank issues (e.g., technical glitches, hacked accounts, transfer limits).

Emergence of Cryptocurrency

  • Solution: Cryptocurrency was created to overcome issues in traditional banking transactions.
  • Characteristics of Cryptocurrencies:
    • Digital/virtual currency.
    • Immune to counterfeiting.
    • Operate without a central authority.
    • Secure through complex encryption algorithms.
  • Bitcoin is the most popular cryptocurrency among thousands available (e.g., Litecoin, Ethereum).

Transaction Process in Blockchain

  • Phil sends 2 Bitcoins to Jack:
    • A block is created with transaction details.
    • The record permanently logs the amount each friend owns.
    • After Phil's transaction, ownership is updated (Jack has 7, Phil has 1).
  • Sam and Ted later send 2 Bitcoins each:
    • New blocks are created and linked to previous transactions.

Ledger and Validity

  • Public Distributed Ledger:
    • Shared among all users, making it transparent.
  • Invalid Transactions:
    • If Phil attempts to send 2 more Bitcoins when he only has 1, it won't go through.
    • All friends have ledger copies, ensuring accuracy.

Security Features of Blockchain

  • Immutability:
    • Data cannot be altered due to distribution of ledgers.
  • Encryption:
    • Data in blocks is encrypted using cryptographic algorithms.

Bitcoin Transaction Mechanics

  • Keys Used:
    • Public Key: Known address (like an email).
    • Private Key: Unique address known only to the user (like a password).
  • Transaction Process:
    1. Phil initiates transaction by passing Bitcoin amount and wallet addresses.
    2. Details are hashed and encrypted using Phil's private key.
    3. The encrypted transaction is transmitted using Jack's public key.
    4. Only Jack can decrypt it with his private key.
  • Different Algorithms:
    • Bitcoin uses SHA-256, while Ethereum uses ETHASH.

Mining and Validation

  • Miners validate transactions and add blocks to the blockchain.
  • Proof of Work:
    • Miners solve complex mathematical problems to validate blocks.
  • Reward:
    • Successful miners earn Bitcoin (12.5 Bitcoins per block).

Real-World Application: Walmart

  • Problem: Walmart faced high return rates due to product quality issues.
  • Solution: Implemented blockchain to track product quality throughout the supply chain.
  • Benefit:
    • Identify where products were damaged, improve quality control.

Conclusion

  • Blockchain provides a secure and efficient way to handle transactions.
  • Encourages students to think of other real-world applications.

Quiz Question

  • What ensures data cannot be altered by users in a blockchain network?
    • a) Public Distributed Ledger
    • b) Proof of Work
    • c) Proof of Stake
    • d) Hash Encryption
    • Encouragement for answers in comments with a chance to win prizes.