What is this?
This is an interactive playground covering every core concept in the
Blockchain, Cryptocurrencies, and Fintech course — from cryptographic primitives
to mining, the UTXO model, Ethereum accounts, the EVM, gas, and smart contracts in Solidity.
Each module is a live, in-browser demo. Nothing is faked: hashing uses the browser's
SubtleCrypto.SHA-256; signatures use real ECDSA; the chain visualizer mines
real nonces against a real difficulty target.
1 · Cryptographic hashing — SHA-256
A hash function takes any input and returns a fixed-size fingerprint. Even a one-bit change in the input completely changes the output — this is the avalanche effect. Type below and watch the digest update live.
Try flipping a single letter and watch ~50% of the output bits flip — that's why hashes work for fingerprinting blocks and detecting tampering.
2 · Digital signatures — ECDSA
Crypto-wallets don't store coins — they store a private key that can sign messages. Anyone with your public key can verify the signature, but only you could have made it. This demo uses real ECDSA on the P-256 curve via the browser's WebCrypto.
3 · Merkle trees
Each block commits to its transactions through a Merkle root — a single hash that summarises hundreds of transactions. Change any leaf and the root changes, which lets light clients verify membership cheaply.
4 · The block chain
Each block stores the hash of the previous block, forming a chain. Edit any block's data and every block downstream is invalidated — the chain turns red. Re-mine to repair it (and notice how expensive an attacker's job becomes).
5 · Proof of work — mining a single block
Miners try nonces until SHA-256(block) < target. Watch the search live.
Doubling the leading-zero count makes the work ~16× harder.
—
0
6 · The UTXO model (Bitcoin)
Bitcoin doesn't track balances — it tracks unspent transaction outputs. To pay, you consume whole UTXOs as inputs and create new UTXOs as outputs (one to the recipient, one back to yourself as change).
7 · Bitcoin forks & upgrades
Forks happen when the rules change. Soft forks tighten rules and stay backward-compatible; hard forks are incompatible and split the chain. Click each event to learn what happened.
8 · Wallets & Ethereum addresses
An Ethereum address is derived from a private key by:
privKey → secp256k1 pubKey → keccak256(pubKey)[12:] → 0x....
This demo uses a P-256 stand-in for browser-native crypto, but the pipeline is identical.
In a real wallet (Metamask, Ledger…), the same 12/24-word seed phrase deterministically generates millions of keypairs via BIP-32/44 derivation paths.
9 · The Ethereum account model
Unlike Bitcoin's UTXO model, Ethereum has two kinds of accounts:
- EOA — Externally Owned Account, controlled by a private key. Has balance & nonce.
- Contract — code lives at the address. Has balance, nonce, code, and storage.
10 · Gas & fees (EIP-1559)
Every EVM operation costs gas. Post-EIP-1559, the user pays
(baseFee + priorityFee) × gasUsed; the baseFee is burned, the priority fee
("tip") goes to the validator.
Cost
11 · The EVM — opcode walker
The Ethereum Virtual Machine is a stack machine. Step through a tiny program
that computes (3 + 4) × 2 and watch the stack.
0
0
12 · Solidity — deploy & call a contract
This is a JavaScript-backed simulation of the Counter contract you'd write
in Remix. Deploy it, call the functions, watch the state and gas cost.
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
contract Counter {
uint256 public count;
address public owner;
constructor() { owner = msg.sender; }
function increment() external { count += 1; }
function decrement() external {
require(count > 0, "underflow");
count -= 1;
}
function reset() external {
require(msg.sender == owner, "not owner");
count = 0;
}
}
— not deployed ——13 · ERC-20 fungible tokens
The ERC-20 standard defines six functions every fungible token must support.
The two killer features that enable DEXes & DeFi are approve and
transferFrom — they let a contract pull tokens from you only up to a
pre-approved allowance.
Try: 1) Alice approve(DEX, 200), then
2) Set From=Alice, To=Bob, Amount=50 and click
DEX.transferFrom(). The DEX pulls 50 CRS from Alice to Bob without
Alice signing the actual transfer — this is how Uniswap takes your tokens.
14 · NFTs — ERC-721
Each tokenId is unique and points to off-chain metadata (image, traits) usually pinned on IPFS. Ownership is on-chain; the art lives elsewhere.
15 · Automated Market Maker (Uniswap V2)
A constant-product market maker holds two assets and enforces
x × y = k. Big trades move the price more — that's
slippage. The 0.3% fee is added to the pool, paying the LPs.
16 · Layer-2 rollups
Rollups execute transactions off-chain and post only a compressed state-root to L1, amortising one expensive L1 tx over hundreds of L2 txs. Optimistic rollups assume validity and allow a 7-day fraud-proof window. ZK rollups attach a zero-knowledge validity proof — finality is instant.
17 · Bitcoin halving & supply schedule
Every 210 000 blocks (~4 years) the coinbase reward halves. The geometric series converges to the famous 21 million BTC cap.
13 · Consensus — Proof of Work vs Proof of Stake
Proof of Work
- Security via wasted energy (hashing).
- Bitcoin, pre-Merge Ethereum.
- 51% attack ≈ buy ½ the global hashrate.
- Probabilistic finality (wait N confirmations).
Proof of Stake
- Security via economic stake (slashing).
- Ethereum (post-Merge, Sep 2022), Solana, Cardano.
- Attack cost ≈ acquire ⅓–½ of staked ETH.
- Near-instant finality (~12 min on ETH).
Ethereum's "Merge" cut energy use by ~99.95% by swapping PoW for PoS in 2022.