📖 Learning Modules

Learn the essentials of blockchain here! Could you be the next Vitalik?

5.1 Blockchain Builder

Purpose: Understand how blocks are created, linked, and validated.

Features

Transaction Creation

  • Add Transaction button: Opens a form to create transactions

  • Fields:

    • From: Sender's address

    • To: Receiver's address

    • Amount: Number of tokens

  • Transactions enter the pending pool until mined

Mining Simulation

  • Difficulty slider: Adjust from 1 to 5

    • 1 = Very easy (fast mining)

    • 5 = Very hard (slow mining, high security)

  • Mine Block button: Starts the mining process

  • Mining visualization: Watch nonce attempts in real-time

  • Success/Failure: See if the hash meets difficulty requirements

Blockchain Visualization

  • View all blocks in a vertical timeline

  • Each block shows:

    • Index number

    • Timestamp

    • List of transactions included

    • Previous hash (links to parent block)

    • Nonce (the winning number)

    • Block hash (unique identifier)

Validation

  • Validate Chain button: Checks blockchain integrity

  • Verification process:

    • Confirms each block's hash is correct

    • Ensures previous hashes match

    • Detects any tampering

  • Results: Green checkmark or red error icon

Reset Function

  • Reset button: Clears blockchain back to genesis block

  • Use to start experiments fresh

Learning Objectives

  • Understand how transactions batch into blocks

  • See how mining difficulty affects time and security

  • Grasp the concept of chain validation

  • Recognize why tampering is detectable

5.2 Cryptography Workshop

Purpose: Explore the cryptographic foundations of blockchain.

Tab 1: Hash Functions

What are hash functions? Cryptographic hash functions take any input and produce a fixed-size, unique output called a hash. Even tiny changes in input drastically change the output.

Interactive Hash Lab:

  • Input field: Type any text

  • Real-time hashing: See hashes update instantly

  • Multiple algorithms:

    • SHA-256: Most common in blockchain (256 bits)

    • SHA-512: Longer, more secure variant

    • MD5: Older, educational purposes only (not secure)

    • RIPEMD-160: Used in Bitcoin addresses

Copy buttons: Copy any hash to clipboard

Experiments to try:

  1. Hash "Hello" then "hello" - see how case matters

  2. Hash a long paragraph - hash stays the same length

  3. Change one character - entire hash changes (avalanche effect)

Why this matters: Hashes are used to:

  • Create block identifiers

  • Link blocks together

  • Detect any data tampering

  • Generate wallet addresses

Tab 2: Keys & Signatures

What are cryptographic keys? Public-key cryptography uses pairs of keys: a public key (shareable) and a private key (secret). This enables secure transactions without revealing secrets.

Interactive Key Lab:

  • Generate Key Pair button: Creates a new random key pair

  • View Public Key: Safe to share, like an email address

  • View Private Key: Must keep secret, like a password

  • Security note: Private keys are shown for education; real blockchains never expose them

Signing Messages:

  • Enter a message

  • Click Sign Message with your private key

  • Result: A unique digital signature

  • Verification: Anyone can verify the signature with your public key

Why this matters: Keys enable:

  • Wallet ownership proof

  • Transaction authorization

  • Identity verification without revealing secrets

Tab 3: Merkle Trees

What is a Merkle tree? A data structure that efficiently verifies if data belongs to a large set. Bitcoin and Ethereum use Merkle trees to organize transactions in blocks.

Interactive Visualizer:

  • Add Data button: Add transactions or data items

  • Tree visualization: Shows how data combines

  • Hash levels:

    • Bottom: Individual transaction hashes

    • Middle: Paired hashes combined

    • Top: Merkle root (single hash representing all data)

Verification Demo:

  • Select any transaction

  • See the proof path (hashes needed to verify)

  • Understand why this is more efficient than checking every transaction

Why this matters: Merkle trees enable:

  • Efficient verification (log n operations)

  • Light clients (mobile wallets) without full blockchain

  • Proof of inclusion/exclusion

5.3 Consensus Simulator

Purpose: Understand how blockchain networks reach agreement.

Consensus Mechanisms

Proof of Work (PoW)

  • How it works: Miners compete to solve cryptographic puzzles

  • Simulator controls:

    • Number of miners (1-10)

    • Mining difficulty (1-5)

    • Start/stop simulation

  • Visualization: Watch miners attempt to find valid hashes

  • Winner: First to find valid hash mines the block

  • Metrics: See attempts, time, and energy used

Proof of Stake (PoS) - Informational

  • How it works: Validators chosen based on token holdings

  • Advantages: Energy efficient, environmentally friendly

  • Comparison: Contrast with PoW on energy usage

Byzantine Fault Tolerance (BFT) - Informational

  • How it works: Validators vote on blocks

  • Use cases: Permissioned blockchains, enterprise solutions

  • Requirements: 2/3 majority needed

Interactive Elements

Network Configuration:

  • Adjust number of nodes

  • Set honest vs. malicious nodes

  • Change network delay

Run Simulation:

  • Watch nodes communicate

  • See consensus reached

  • Observe failure scenarios (if malicious nodes present)

Metrics Display:

  • Time to consensus

  • Messages exchanged

  • Energy consumed (PoW vs. PoS comparison)

Learning Objectives

  • Understand why consensus is needed in distributed systems

  • Compare different consensus mechanisms

  • See how networks handle dishonest participants

  • Recognize trade-offs: security vs. speed vs. energy

5.4 Smart Contract Playground

Purpose: Learn how smart contracts execute on the blockchain.

Code Editor

Features:

  • Syntax highlighting for Solidity-like language

  • Line numbers

  • Auto-indentation

  • Error highlighting

Sample Contracts:

  • Simple Storage: Store and retrieve a number

  • Token Contract: Create a basic token with transfers

  • Voting Contract: Implement a simple voting system

  • Escrow Contract: Hold funds until conditions met

Compiler

  • Compile button: Checks syntax and simulates deployment

  • Error messages: Clear explanation of any issues

  • Bytecode view: See compiled contract code

  • Gas estimation: How much the contract would cost to deploy

Contract Interaction

After deploying a contract:

  • Available functions: Buttons for each public function

  • Input fields: Enter parameters

  • Execute: Run the function

  • Results: View return values and state changes

  • Events: See emitted events from contract

Learning Objectives

  • Write basic smart contract logic

  • Understand contract state and functions

  • See how contracts interact with blockchain

  • Learn about gas costs and optimization

5.5 Token Economics

Purpose: Understand the economic principles behind blockchain tokens.

Token Supply Management

Visualization:

  • Total supply: All tokens ever created

  • Circulating supply: Tokens available to public

  • Burned tokens: Permanently removed from circulation

  • Locked tokens: Temporarily unavailable

Interactive Controls:

  • Mint new tokens: Add to supply

  • Burn tokens: Remove permanently

  • Lock tokens: Time-lock release

  • Chart: See supply changes over time

Token Distribution

Pie chart showing:

  • Mining rewards: % given to miners

  • Treasury: % held for development

  • Community: % distributed to users

  • Team: % allocated to creators

Sliders: Adjust distribution percentages

Economic Simulations

Inflation/Deflation:

  • Set emission rate

  • Configure burn rate

  • Simulation: Run over time to see effects

  • Graph: Price and supply curves

Staking Rewards:

  • Set APY (annual percentage yield)

  • Configure lock-up periods

  • Calculate returns

Transaction Economics

Gas Fee Model:

  • Base fee: Minimum per transaction

  • Priority fee: Extra to speed up

  • Simulation: See how fees affect network congestion

Fee Distribution:

  • % burned

  • % to miners

  • % to treasury

Learning Objectives

  • Understand token supply dynamics

  • Learn about inflation and deflation

  • See how fees affect network behavior

  • Design balanced token economics

Last updated