Blockchain and Web3 course Β· Module 1: Blockchain Fundamentals

Welcome to the Crypt - The Underground City of Blockchain!

6 min read Β·
In this lesson9

Welcome to the Crypt! I am Atlas, the Cartographer of the Depths and your guide through this underground world. I'm glad you've decided to descend into our city built on the foundations of blockchain!

What Awaits You in the Crypt?

On this journey through underground tunnels and chambers, you'll learn to build decentralized applications (dApps) and understand the technology that's revolutionizing the world of finance and beyond:

  • Blockchain - a network of tunnels connecting our underground chambers
  • Cryptography - cipher locks protecting our vaults
  • Ethereum - the main tunnel network of our city
  • Ethers.js - tools for navigating the underground
  • Smart Contracts - automated mechanisms in our chambers
  • Tokens and NFTs - underground coins and unique crystals
  • DeFi - a decentralized marketplace in the catacombs

What is Blockchain?

Imagine that the Crypt is a vast underground city with thousands of tunnels and chambers. Each chamber (block) is connected to the previous one, forming an unbroken network (chain). This is exactly what blockchain is - a chain of blocks!

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    BLOCKCHAIN = TUNNEL NETWORK                    β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                                  β”‚
β”‚   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”‚
β”‚   β”‚ Block 1 │───▢│ Block 2 │───▢│ Block 3 │───▢│ Block 4 β”‚     β”‚
β”‚   β”‚(Chamber)β”‚    β”‚(Chamber)β”‚    β”‚(Chamber)β”‚    β”‚(Chamber)β”‚     β”‚
β”‚   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β”‚
β”‚        β”‚              β”‚              β”‚              β”‚           β”‚
β”‚   Transactions  Transactions  Transactions  Transactions       β”‚
β”‚   stored        stored        stored        stored             β”‚
β”‚   in block      in block      in block      in block           β”‚
β”‚                                                                  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Key characteristics of blockchain:

  1. Immutability - once carved in stone, a transaction cannot be changed
  2. Decentralization - there is no single ruler, all guardians (nodes) have a copy
  3. Transparency - anyone can see all tunnels and chambers
  4. Security - cryptographic locks protect every chamber

History of Blockchain - From Satoshi to Today

2008 - The Birth of an Idea

The mysterious Satoshi Nakamoto (the first Cartographer of the Depths) published a whitepaper describing Bitcoin - the first underground blockchain city.

2009 - Bitcoin Genesis Block

The first block (chamber) of Bitcoin was created - the Genesis Block. The era of cryptocurrencies began.

2015 - Ethereum

Vitalik Buterin created Ethereum - an expanded city with automated mechanisms (smart contracts).

2020+ - DeFi and NFT Explosion

Underground marketplaces (DeFi) and crystal galleries (NFTs) revolutionized the possibilities of blockchain.

Decentralization vs Centralization

In the traditional world (on the surface) we have banks - central vaults controlled by a single institution:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    CENTRALIZATION (Bank)                          β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                                  β”‚
β”‚                      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                          β”‚
β”‚                      β”‚   BANK        β”‚                          β”‚
β”‚                      β”‚   (Center)    β”‚                          β”‚
β”‚                      β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜                          β”‚
β”‚                              β”‚                                   β”‚
β”‚              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                  β”‚
β”‚              β”‚               β”‚               β”‚                   β”‚
β”‚              β–Ό               β–Ό               β–Ό                   β”‚
β”‚         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”               β”‚
β”‚         β”‚ Client β”‚     β”‚ Client β”‚     β”‚ Client β”‚               β”‚
β”‚         β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜               β”‚
β”‚                                                                  β”‚
β”‚   Single point of failure    Censorship possible           β”‚
β”‚   Requires trust             Intermediary fees             β”‚
β”‚                                                                  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

In the Crypt (blockchain) every guardian (node) has a full copy of the entire city:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    DECENTRALIZATION (Blockchain)                  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                                  β”‚
β”‚         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”           β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”                         β”‚
β”‚         β”‚ Node 1 │◀─────────▢│ Node 2 β”‚                         β”‚
β”‚         β””β”€β”€β”€β”€β”¬β”€β”€β”€β”˜           β””β”€β”€β”€β”¬β”€β”€β”€β”€β”˜                         β”‚
β”‚              β”‚                   β”‚                               β”‚
β”‚              β”‚    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚                               β”‚
β”‚              └───▢│ Node 3 β”‚β—€β”€β”€β”€β”˜                               β”‚
β”‚                   β””β”€β”€β”€β”€β”¬β”€β”€β”€β”˜                                     β”‚
β”‚                        β”‚                                         β”‚
β”‚              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                              β”‚
β”‚              β”‚                   β”‚                               β”‚
β”‚              β–Ό                   β–Ό                               β”‚
β”‚         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”                          β”‚
β”‚         β”‚ Node 4 │◀────────▢│ Node 5 β”‚                          β”‚
β”‚         β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜          β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜                          β”‚
β”‚                                                                  β”‚
β”‚   No single point of failure                                  β”‚
β”‚   Censorship resistant                                        β”‚
β”‚   Trustless (no trust required)                               β”‚
β”‚   Peer-to-peer                                                β”‚
β”‚                                                                  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Basic Concepts

Block (Chamber)

A container for transactions. Each block contains:

  • Hash - a unique identifier (cipher lock)
  • Previous Hash - connection to the previous block (tunnel)
  • Transactions - list of operations
  • Timestamp - time of creation
  • Nonce - number used in mining

Hash (Cipher Lock)

A cryptographic function that converts data into a unique string of characters:

// Example: SHA-256 hash
"Hello" β†’ "185f8db32271fe25f561a6fc938b2e264306ec304eda518007d1764826381969"
"hello" β†’ "2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824"

// Even a small change produces a completely different hash!

Mining (Extraction)

The process of creating new blocks. Miners solve mathematical puzzles to add a new chamber to the tunnel network.

Node (Guardian)

A computer storing a copy of the entire blockchain. Guardians verify transactions and maintain the network.

Bitcoin vs Ethereum

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    BITCOIN vs ETHEREUM                           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚          BITCOIN            β”‚           ETHEREUM                 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 2009                     β”‚ 2015                           β”‚
β”‚ Satoshi Nakamoto         β”‚ Vitalik Buterin                β”‚
β”‚ Digital gold             β”‚ World computer                 β”‚
β”‚ Store of value           β”‚ Smart contracts, dApps         β”‚
β”‚ Proof of Work            β”‚ Proof of Stake                 β”‚
β”‚ ~7 tx/s                  β”‚ ~30 tx/s (more with L2)       β”‚
β”‚ Simple script            β”‚ Turing-complete (Solidity)     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

In the Crypt, we'll mainly explore Ethereum - because it allows creating smart contracts and dApps!

Testnets vs Mainnet

In the Crypt, we have two types of tunnels:

Mainnet (The Main City)

  • Real ETH, real value
  • Transactions cost real money
  • Production applications run here

Testnet (Abandoned Tunnels - training ground)

  • Test ETH (no value)
  • Free experimentation
  • Perfect for learning!

Popular testnets:

  • Sepolia - the main testnet for developers
  • Hoodi - a testnet for validator and staking tests (replaced Holesky in 2025)

Goerli and Holesky are shut down, so do not use them in new projects.

Summary

In this lesson you learned:

  • What blockchain is (a network of tunnels connecting chambers)
  • History from Bitcoin to Ethereum
  • The difference between centralization and decentralization
  • Basic concepts: block, hash, mining, node
  • Bitcoin vs Ethereum
  • Mainnet vs Testnet

What's Next?

In the next lesson, Atlas will take you to the Hall of Ciphers, where you'll learn the secrets of cryptography - the foundation of security for the entire underground city!

Get ready to discover the secrets of public and private keys!

Code for this lesson: index.js
// Simulation of a simple block in blockchain
const block = {
  index: 0,
  timestamp: Date.now(),
  data: "Genesis Block - First block in the chain",
  previousHash: "0000000000000000000000000000000000000000",
  hash: ""
};

// Simple hash function (in real blockchain we use SHA-256)
function simpleHash(data) {
  let hash = 0;
  const str = JSON.stringify(data);
  for (let i = 0; i < str.length; i++) {
    const char = str.charCodeAt(i);
    hash = ((hash << 5) - hash) + char;
    hash = hash & hash;
  }
  return Math.abs(hash).toString(16).padStart(8, '0');
}

block.hash = simpleHash(block);
console.log("=== GENESIS BLOCK ===");
console.log(JSON.stringify(block, null, 2));

Spotted a mistake in this lesson?

Check yourself

Answer the questions from this lesson. Pick an answer to see right away whether it is correct.

  1. 1. Blockchain is:

  2. 2. Who published the Bitcoin whitepaper in 2008?

  3. 3. The main advantage of decentralization is:

Hands-on tasks in the game

  • Vertical ordering

    Arrange the block elements from header to transactions:

  • Code editor

    Create a block object with fields: index, timestamp, data, previousHash, hash

  • Horizontal ordering

    Arrange the components that go into the block hashing function:

  • Click in order

    Click, in order, the features characteristic of a public blockchain:

  • Code editor

    Complete the addBlock function that adds a block to the chain array

  • Vertical ordering

    Arrange the events in chronological order:

  1. QuestionQuiz: What Is Blockchain?
  2. Put in orderArrange the Block Structure
  3. Coding taskCreate a Simple Block
  4. QuestionQuiz: Who Created Bitcoin?
  5. Put in orderBuilding a Block Hash
  6. QuestionQuiz: Decentralization
  7. Click in orderClick the Blockchain Features
  8. Coding taskBlockchain Simulation
  9. Put in orderSorting: Blockchain History