Ch 2 · 5.2 Digital Currency · O Level Computer Science 2210

Topic 2 of 3 in The Internet and Its Uses — O Level Computer Science 2210 — 29 lessons.

Introduction

Money no longer has to be coins and notes. A digital currency exists only as data, and some, like Bitcoin, are tracked not by a bank but by a shared, tamper-proof record called a blockchain. (Syllabus section 5.2.)

Key ideas — Digital currency

A digital currency is one that only exists electronically: it has no physical coins or notes.

🧑‍🏫 Teacher's explanation

Imagine a shared notebook kept in the middle of a town square. Every time someone buys a loaf of bread or a book, everyone in town watches the transaction and writes it down in their own copy of the notebook. Because everyone has a copy, no one can sneak in at night and erase a debt or add fake money to their account—the other notebooks wouldn't match. This 'shared notebook' is the blockchain.

📖 Definitions

🔍 Worked example — Easy

Identify three distinct uses for a digital currency in a modern economy.

🔍 Worked example — Standard

A user transfers 50 units of a cryptocurrency to another user. Explain why this transaction is recorded on a blockchain.

🔍 Worked example — Exam-style

Compare a traditional bank transfer to a decentralised cryptocurrency transaction.

⚠️ Common errors

🧠 Quick check 1

🧠 Quick check 2

🎯 Exam question

(a) State one way this digital currency can be used. [1] (b) Describe how a blockchain is used to ensure the transaction is secure and accurate. [3] [4 marks]

Key ideas — Blockchain

A blockchain, in its basic form, is a digital ledger: a time-stamped series of records that cannot be altered.

🧑‍🏫 Teacher's explanation

Imagine a shared notebook used by a group of friends to track who owes whom money. Instead of one person keeping the notebook (a central bank), everyone has an identical copy. Whenever someone spends money, everyone writes it down at the exact same time. Once a page is full, it is glued into the book with a unique seal that depends on everything written on that page. If you try to erase a name on page 1, the seal breaks, and because page 2's seal depends on page 1's seal, every single page after it becomes invalid too. This makes it impossible to cheat without everyone noticing immediately.

📖 Definitions

🔍 Worked example — Easy

A block contains three transactions: A arrow B ($10), B $\rightarrow$ C ($5), and C arrow A ($2). If the hash of this block is $H_1$, and the next block contains $H_1$ as its 'previous hash', what happens to the chain if the first transaction is changed to A $\rightarrow$ B ($50)?

🔍 Worked example — Standard

A blockchain uses a hash function. Block 1 has a hash of X. Block 2 contains the hash of Block 1. Block 3 contains the hash of Block 2. If an attacker successfully alters a transaction in Block 1 and recalculates its hash to be Y, how many blocks in the chain must be recalculated to make the chain appear valid again?

🔍 Worked example — Exam-style

A user sends 0.5 BTC to a recipient. The transaction is bundled into a block. The block is verified by the network. List the three specific pieces of information that must be included in the block to ensure it can be linked to the previous block and verified for time.

⚠️ Common errors

🧠 Quick check 1

🧠 Quick check 2

🎯 Exam question

(a) Define the term 'digital ledger' in the context of blockchain. [1] (b) Explain how the use of a 'hash' and a 'previous hash' makes the blockchain tamper-evident. [3] [4 marks]

Worked example

Each block stores the hash of the previous block. Altering a transaction changes its block's hash, so it no longer matches the hash stored in the next block, and the link is broken. The chain is also stored on many computers, which would all disagree with the altered copy, so the change would be detected and rejected.

🔍 Worked example — Easy

A blockchain consists of three blocks: Block A, Block B, and Block C. Block B contains the hash of Block A. Block C contains the hash of Block B. If a user successfully alters a transaction in Block A, describe the immediate effect on the connection between Block A and Block B.

🔍 Worked example — Standard

A distributed ledger is used by 1,000 computers. A hacker manages to recalculate all hashes in their local copy of the blockchain to make a fraudulent transaction appear valid. Why will this transaction still fail to be accepted by the network?

🔍 Worked example — Exam-style

A blockchain uses a hash function where the hash of a block is H = f( extdata, extprev\_hash). If the data in a block is changed from 'Pay \$10' to 'Pay \$100', explain why the chain is considered 'immutable'.

⚠️ Common errors

Common mistakes

Practice

Answers: (1) A currency that only exists electronically. (2) Any two: paying for goods and services; transferring money; investment. (3) A digital ledger: a time-stamped series of records that cannot be altered. (4) Each block contains the hash of the previous block.

Summary

All chapters in The Internet and Its Uses

  1. 5.1 The Internet and the World Wide Web
  2. 5.2 Digital Currency
  3. 5.3 Cyber Security