Blockchain, Cryptocurrency, Tokens, Smart Contracts, NFTs, dApps, and Web3: An Easy Guide

Dewmal Handapangoda

Dewmal Handapangoda

Software Architect | AI Specialist | Senior Lecturer at iCET

July 7th, 2025

Blockchain Network Visualization

The interconnected world of blockchain technology

Blockchain technology has revolutionized how we think about digital transactions, ownership, and decentralized systems. From Bitcoin's inception to today's Web3 ecosystem, this comprehensive guide will walk you through everything you need to know.

A Brief History of Blockchain and Why It Was Needed

Before Blockchain

Digital records relied on central authorities (banks, governments) to stop fraud. There was no way to create decentralized, trustless digital money. Every digital transaction required a middleman, creating single points of failure and limiting global accessibility.

The Breakthrough (2008)

Satoshi Nakamoto's Bitcoin white paper introduced blockchain: a secure, decentralized ledger that solved the double-spending problem without requiring trusted intermediaries. This breakthrough laid the foundation for an entirely new digital economy.

Why Was Blockchain Needed?

  • Remove single points of failure
  • Enable tamper-proof records
  • Allow peer-to-peer money without banks

Beyond Money

  • Run programs (smart contracts)
  • Create tokens and NFTs
  • Enable decentralized applications (dApps)
  • Power Web3 economies

What is Blockchain?

Blockchain Technology Concept

Blockchain: A distributed ledger technology

Definition

A special database that stores data in linked blocks. Think of it as a digital ledger that's duplicated across thousands of computers worldwide, making it virtually impossible to hack or manipulate.

Key Properties

🔒

Immutable

Data can't easily be changed or deleted

🌐

Decentralized

No single authority controls it

👁️

Transparent

Anyone can view records

Analogy

Like a public ledger anyone can read but no one can erase. Every page (block) is connected to the previous page with a unique fingerprint (hash), making it impossible to alter past records without detection.

Step-by-Step Example

  1. 1 Alice wants to send Bitcoin to Bob
  2. 2 Transaction is broadcast to the network
  3. 3 Nodes validate Alice's balance
  4. 4 Valid transactions are bundled into a block
  5. 5 Miners/validators confirm the block using consensus
  6. 6 Block is added to the blockchain
  7. 7 Bob sees the confirmed transaction

How Blockchain Became Cryptocurrency

Bitcoin and Cryptocurrency

Bitcoin: The first successful cryptocurrency

Before Bitcoin

Digital cash experiments failed because of central servers. Previous attempts like DigiCash and e-gold collapsed when their central authorities were compromised or shut down.

Bitcoin's Solution

Decentralized ledger with no single authority. Bitcoin solved the double-spending problem through distributed consensus, creating the first truly peer-to-peer digital currency.

Example: Bitcoin

  • Launched in 2009
  • Uses blockchain to track ownership
  • No central bank
  • Transactions validated by Proof-of-Work

Why Cryptocurrency?

  • Immune to censorship
  • Removes middlemen (banks)
  • Enables global, peer-to-peer payments

Algorithms, Nodes, and Mining

Nodes

  • Store the blockchain
  • Validate transactions
  • Full nodes verify all rules; light nodes rely on others

Consensus Algorithms

Let the network agree on a single truth. Different blockchains use different consensus mechanisms to validate transactions and secure the network.

Algorithm How It Works Pros Cons
Proof-of-Work Solve cryptographic puzzles Highly secure Energy-intensive, slower
Proof-of-Stake Validators lock coins as collateral Energy-efficient, scalable Potential centralization
Delegated PoS Token holders vote for validators Fast, democratic Centralization risk
Proof-of-Authority Trusted validators sign blocks Very fast, low cost Requires trust in validators

Mining

  • Adding new blocks by solving cryptographic puzzles
  • Rewards miners
  • Secures the network and prevents double-spending

How Cryptocurrency Became Crypto Tokens

Beyond Money

Developers wanted programmable apps. Ethereum (2015) introduced smart contracts, enabling developers to build decentralized applications and create custom tokens without building their own blockchain.

Feature Cryptocurrency Crypto Token
Blockchain Has its own blockchain Built on another blockchain (e.g., Ethereum)
Examples BTC, ETH, LTC USDT, Chainlink (ERC-20), DAI
Consensus Native mechanisms (PoW/PoS) Relies on host blockchain's consensus
Creation Native to blockchain Created by smart contracts

Why Tokens?

  • Represent value/utility without new blockchains
  • Enable stablecoins, voting, in-app currencies

How Tokens Use Blockchain

  • Rely on blockchain's security
  • Smart contracts define: Supply, Ownership, Transfer rules

Smart Contracts

Smart Contract Code

Smart contracts: Self-executing code on blockchain

Definition

Self-executing code with conditions. Transparent and immutable. Smart contracts are programs that automatically execute when predetermined conditions are met, without requiring intermediaries.

Why Smart Contracts?

  • Replace lawyers/courts with code
  • Ensure automated, trustless rules
Feature Standard Contracts Smart Contracts
Type Legal documents Blockchain programs
Enforcement Lawyers/courts Automated by code
Trust People/institutions Code and blockchain transparency
Example Traditional lease Automatic payment release in escrow

Examples in Action

  • Loan collateral returned after payment
  • Ticket sales only if seats are available
  • Escrow payments released on delivery
  • DeFi lending, borrowing, trading

How NFTs Work

Definition

NFT = Non-Fungible Token (unique, not 1:1 interchangeable). Unlike cryptocurrencies where each coin is identical, NFTs are unique digital assets that represent ownership of specific items.

How They Work

  • Created with smart contracts
  • Store metadata (image, description, ownership)
  • Record ownership on-chain

Why NFTs?

  • Represent unique digital items
  • Enable ownership and trading of:
  • Digital art
  • Collectibles
  • In-game items
  • Certificates of authenticity

Analogy

Like a digital certificate of authenticity on blockchain. Just as a certificate proves you own an original painting, an NFT proves you own a unique digital asset.

dApps (Decentralized Applications)

Definition

Programs running on a blockchain instead of central servers. These applications are distributed across a network of computers, making them resistant to censorship and single points of failure.

Key Features

  • Use smart contracts for automation
  • No central authority

Why dApps?

  • Avoid single points of failure
  • Enable permissionless applications
  • Ensure censorship-resistance

Examples

  • Decentralized exchanges (DEXs)
  • Blockchain games
  • Lending platforms
  • NFT marketplaces

Web3: The Next Internet

What is Web3?

  • Blockchain-powered internet
  • Decentralized apps (dApps)
  • User-owned data and assets

Why Web3?

  • Web 1.0: Static, read-only pages
  • Web 2.0: Interactive but centralized (big tech controls data)
  • Web 3.0: Decentralized, user-owned

Examples

  • Crypto wallets
  • DeFi platforms
  • NFT marketplaces
  • DAOs (Decentralized Autonomous Organizations)

What Should You Know as a Blockchain App Developer?

Understand Basics

Blocks, consensus, immutability. Master the fundamental concepts before diving into development.

Learn Smart Contract Languages

  • Solidity (Ethereum)
  • Vyper

Deploy and Test Contracts

  • Remix IDE
  • Hardhat
  • Truffle

Know Security Risks

  • Reentrancy attacks
  • Gas limits
  • Front-running

Familiarity with Token Standards

  • ERC-20 (fungible tokens)
  • ERC-721 (NFTs)

Stay Updated

  • Ethereum 2.0
  • Layer 2 scaling
  • Best practices and new tools

The Future is Decentralized

Blockchain technology is transforming how we think about digital ownership, trust, and value exchange. From simple peer-to-peer transactions to complex decentralized applications, the possibilities are endless.

Whether you're a developer, investor, or simply curious about the technology, understanding these fundamental concepts will help you navigate the exciting world of blockchain and Web3.