πŸ”‘ Hash Functions

A hash function takes any input and produces a fixed-length fingerprint. Even a tiny change completely alters the output.

How it works: SHA-256 always produces a 64-character hex string, no matter how long or short the input. It's a one-way function β€” you can't reverse-engineer the input from the hash.
SHA-256 Hash Generator
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
Try it: Type "hello" then change it to "Hello" β€” notice how completely different the hashes are? This is called the avalanche effect.

πŸ” Symmetric Encryption

Both parties share the same secret key. The same key encrypts and decrypts the message.

AES (Advanced Encryption Standard) is the most widely used symmetric encryption algorithm. Think of it as a lockbox where both sender and receiver have the same key.
AES Encryption
The problem: How do you securely share the key with the other party? This is the fundamental weakness of symmetric encryption, and why we need asymmetric encryption.

πŸ—οΈ Asymmetric Encryption

Two mathematically linked keys: a public key (share freely) and a private key (keep secret).

Public key = a mailbox anyone can drop letters into. Private key = only you have the key to open it. Anyone can encrypt with your public key, but only you can decrypt with your private key.
1. Generate Key Pair (RSA-2048)
2. Encrypt with Public Key
3. Decrypt with Private Key
β€”

✍️ Digital Signatures

Prove you authored a message without revealing your private key. Anyone with your public key can verify it.

Signing β‰  Encryption. Signing doesn't hide the message. It proves who sent it and that it wasn't tampered with. This is how blockchain transactions work.
1. Generate Signing Keys (ECDSA)
β€”
β€”
2. Sign a Message
β€”
3. Verify a Signature
Try it: Sign a message, then try verifying it with even one character changed. The verification will fail β€” proving the message is tamper-proof.

βš–οΈ Consensus Mechanisms

How does a decentralized network agree on the truth without a central authority? Explore the game theory and algorithms that keep blockchains secure.

The Goal: Ensure all honest participants have the same data, even if some participants are malicious or disconnected.
1. Proof of Work (PoW) β€” Seal the Order

The King's Messenger has an order, but he could be an impostor! To prove the order is real, we must attach a Proof of Work. We will guess random numbers (Nonce) until the resulting hash starts with "0000". This takes time and energy, proving we are serious.

Nonce (Guessed Number): 0
Generated Hash:
waiting...
2. Proof of Stake (PoS) β€” Troop Deployment

Instead of wasting energy solving math puzzles, we use Proof of Stake. Generals lock up their own troops (stake) to vote on the plan. A leader is randomly chosen to make the final call, but the more troops you pledge, the higher your chance of being selected.

3. Proof of Authority (PoA) β€” The Emperor's Decree

In some private networks, neither puzzles nor troops are needed. A predefined set of trusted Authorities (The Emperor's Council) takes turns validating the plan. It is extremely fast, but highly centralized.

πŸ“¦ Block

A block holds data and a nonce. Mining finds a nonce that makes the hash start with leading zeros.

Proof of Work: The miner must find a number (nonce) such that the hash of [Block# + Nonce + Data] starts with "0000". This takes computational effort β€” that's the "work" in Proof of Work.
Block #1 ⚠ Invalid

⛓️ Blockchain

Blocks are chained together: each block's hash includes the previous block's hash. Tampering with any block breaks the entire chain.

Immutability: Try changing data in Block 2. Notice how Block 2 and all blocks after it turn red? You'd have to re-mine every subsequent block β€” that's why blockchains are tamper-resistant.

🌐 Distributed Blockchain

See how multiple nodes maintain their own copy of the blockchain, and how forks are resolved using the longest-chain rule.

Longest Chain Wins: In a distributed network, each node independently mines blocks. When two nodes mine at the same time, a fork occurs. The network resolves forks by adopting the longest valid chain β€” shorter branches are discarded.
Network Controls
βœ” All nodes in consensus
Network Log

No events yet.

Try it: Click "Simulate Fork" to see two nodes mine conflicting blocks. Then click "Resolve Fork" to see the longest chain overwrite the others. You can also manually mine and propagate between nodes.

πŸ‘› Wallet

A wallet is not a bank account β€” it's a key pair. Your mnemonic phrase is the master backup for everything.

BIP39 Standard: A mnemonic is 12 (or 24) words selected from a 2048-word dictionary. These words encode your entropy and can regenerate your entire wallet.
Step 1 β€” Random Entropy (128 bits)
Click "Generate New Wallet" to begin...
Step 2 β€” Mnemonic Words (BIP39)
Step 3 β€” Seed (SHA-256 of mnemonic)
β€”
Step 4 β€” Private Key
β€”
Step 5 β€” Public Key
β€”
Step 6 β€” Address
β€”
⚠️ Remember: Lose your mnemonic = lose your funds forever. There's no "forgot password" in blockchain. Your keys, your coins. Not your keys, not your coins.

πŸ’Έ Transaction

A transaction is a signed message that transfers value. The signature proves ownership without revealing the private key.

Flow: Create a transaction β†’ Sign it with your private key β†’ Broadcast to the network β†’ Miners/validators include it in a block.
Create Transaction

πŸ“œ Smart Contracts

Self-executing programs on the blockchain. Deploy, interact, and verify contracts directly from your browser using MetaMask.

What is a Smart Contract? It's code stored on the blockchain that runs automatically when conditions are met. Once deployed, nobody can change it β€” the code is law.
πŸ”— Wallet Connection
Select Contract Example

Store & retrieve a single uint256 value. The simplest smart contract.

Solidity Source Code
Deploy to Blockchain
Try it: Start with Storage (simplest), then work up to Counter β†’ Owner β†’ Voting β†’ Token β†’ NFT. Use Simulated mode for practice, or MetaMask on a testnet for real deployment!

πŸͺ™ Tokenomics

Simulate a token economy: create tokens, mint, burn, transfer, stake for rewards, and manage vesting schedules.

What is Tokenomics? Token economics studies how a cryptocurrency's supply, distribution, and incentives work together. It covers minting (creating new tokens), burning (destroying tokens), staking (locking tokens for rewards), and vesting (time-locked releases).
Create Your Token

πŸ–ΌοΈ NFT & Real World Assets

Create unique digital assets, tokenize real-world property, trade on a marketplace, and explore fractional ownership.

NFT (Non-Fungible Token): A unique, indivisible digital certificate of ownership stored on the blockchain. Each NFT has distinct metadata and cannot be exchanged 1:1 with another. RWA extends this to represent real-world assets like property, art, or documents.
Mint NFT
Tokenize Real World Asset
RWA Tokenization: Convert physical assets (property, art, patents) into NFTs with legal metadata.
Collection Stats
Total NFTs
0
For Sale
0
Unique Owners
0
Volume
0 ETH
Gallery
Transfer NFT
Marketplace

No NFTs listed for sale.

Fractional Ownership
Fractionalization: Split an NFT into fungible shares. Multiple people can co-own a single high-value asset.
Event Log

No events yet.

🏦 Decentralized Finance (DeFi)

Experience core DeFi primitives: swap tokens through an AMM, provide liquidity, lend & borrow, and farm yield.

Automated Market Maker (AMM): Instead of an order book, prices are determined by a mathematical formula: x Γ— y = k (constant product). Swapping one token automatically adjusts the price of the other.
Pool Overview
Price
β€”
TVL
β€”
Volume
β€”
Fees
β€”
Pool: β€” / β€” Total LP: β€”
Your Balances
ETH
β€”
DAI
β€”
LP Tokens
β€”
Token Swap
β€”
Liquidity Pool
Liquidity Providers deposit token pairs and earn fees from every swap. You receive LP tokens representing your share of the pool.
Lending & Borrowing
Collateralized Lending: Deposit DAI as collateral, then borrow against it. If your health ratio drops below 100%, you risk liquidation. Collateral ratio: 150%.
Deposited
β€”
Borrowed
β€”
Health
∞%
Max Borrow
β€”
Yield Farming
Yield Farming: Stake your LP tokens to earn additional reward tokens (FARM). 1 second = 1 day for reward calculation.
Staked LP
0 LP
Pending Reward
0 FARM
Farm APY
50%
Event Log

No events yet.

πŸ›οΈ DAO (Decentralized Autonomous Organization)

Create a governance system, craft proposals, vote with token-weighted power, and manage a shared treasury β€” all decentralized.

DAO: An organization governed by smart contracts and token holders. Decisions are made through proposals and voting. Token holders have voting power proportional to their holdings. Proposals pass when they reach quorum and have majority support.
Create DAO