Learning Objectives
By the end of this lesson, you will be able to:
- Understand the concept of adigital currencyand how digital currencies are used
- Understand the process ofblockchainand how it is used to track digital currency transactions
- Describe howhashingandencryptionare used to secure blockchain networks
- Explain the role ofminersandproof-of-workin validating transactions
- Understand the difference betweencentralisedanddecentraliseddigital currency systems
Key Terms
Digital Currency
Money that only exists in electronic form, exchanged for goods and services without physical banknotes or coins.
Cryptocurrency
A type of digital currency that uses cryptography for security. It is decentralised and not controlled by a central authority.
Blockchain
A digital ledger that records every transaction made with a particular digital currency. It is decentralised and immutable.
Block
A record of transactions that is linked to other blocks in a chain. Each block contains data, a hash value, and a previous hash value.
Hash Value
A unique value generated by an algorithm that acts as a fingerprint for a block of data.
Previous Hash Value
A value that points back to a previous block in the chain, linking the blocks together.
Genesis Block
The first block in a blockchain. It does not point to any previous block.
Mining
The process used to generate new coins and verify new transactions by solving complex mathematical problems.
Miners
Special network users who verify transactions and receive a commission for each new block created.
Proof-of-Work
A system that makes it take time (about 10 minutes) to determine the necessary proof-of-work for each block before it can be added to the chain.
Timestamp
Small data stored in each block that determines the exact moment the block was mined and validated.
Ledger
A book or collection of accounts in which account transactions are recorded.
Distributed Ledger Technology (DLT)
A digital system for recording transactions where the transactions and their details are recorded in multiple places at the same time.
Decentralised
Not controlled by a single entity or authority. Every participant in the network has a copy of the ledger.
Bitcoin
The original cryptocurrency, privately developed as a means of exchange on the internet.
Ethereum
A cryptocurrency that supports smart contracts. Founded by Vitalik Buterin.
Fiat Currency
Money issued and backed by a government, such as the US dollar or the euro.
Immutable
Unchanging over time or unable to be changed.
Smart Contracts
Self-executing contracts with the terms written into code, stored on a blockchain.
Encryption
The process of encoding data so it can only be read by authorised parties.
Hashing
The process of converting data into a unique fixed-length value that acts as a fingerprint.
Digital Wallet
A software application that stores the keys needed to access and manage digital currency.
1. What is Digital Currency?
Digital currencyis money that only exists in electronic form. It is exchanged for goods and services without the use of physical money such as paper bills or coins.
Key Features of Digital Currency
- Exists purely in a digital format
- Not available in physical form (unlike fiat currency)
- Can be generated, stored and transferred electronically
- Can be transferred between parties using computers, smartphones, and the internet
- Accepted as a form of payment for goods or services
- Can be transferred between accounts when carrying out transactions
- Money only exists as data on a computer system
- Can be transferred into physical cash if needed
Centralised vs Decentralised
Digital currencies can be either centralised or decentralised.
- Regulated by central banks and governments
- All transactions and exchange rates determined by these bodies
- Relies on a central banking system
- Uses a system of serial numbers to make sure each note is unique
- No state control
- All rules set by the cryptocurrency community itself
- Transactions are publicly available and can be tracked
- Works within a blockchain network
Centralised Transaction Example
Suppose Nick wishes to send Irina some money. Nick uses Bank X and Irina uses Bank Y:
Problem with centralisation:Maintaining confidentiality and security have always been issues with centralised digital currency systems.
Decentralised Transaction Example (Cryptocurrency)
Cryptocurrency has overcome the problem with centralisation by introducing decentralisation:
Cryptocurrency uses cryptography to track transactions and has no state control.
Activity 1: Digital Currency
- What is digital currency? [2]
- Give two differences between centralised and decentralised digital currency. [2]
- Explain what is meant by cryptocurrency. [2]
Solution:
- Digital currency is money that only exists in electronic form [1]. It is exchanged for goods and services without physical banknotes or coins [1].
- Centralised: regulated by central banks and governments [1]. Decentralised: no state control, rules set by the community [1].
- Cryptocurrency is a type of digital currency that uses cryptography to track transactions [1]. It is decentralised and not controlled by a central authority [1].
Check Your Understanding: Digital Currency
1. What is digital currency? [2 marks]
- [1]Money that only exists in electronic form
- [1]Exchanged for goods and services without the use of physical money
2. What is cryptocurrency? [2 marks]
- [1]A type of digital currency that uses cryptography for security
- [1]Decentralised / not controlled by a central authority
3. Give two examples of cryptocurrency. [2 marks]
- [1]Bitcoin
- [1]Ethereum
4. What is the main problem with centralised digital currency? [2 marks]
- [1]Maintaining confidentiality
- [1]Maintaining security
5. Why can digital currency investment be risky? [1 mark]
- [1]Due to volatility / value can fluctuate rapidly in a short period of time
6. How does cryptocurrency overcome the problems of centralisation? [2 marks]
- [1]By introducing decentralisation / no central authority
- [1]All transactions are publicly available and can be tracked
2. What is Blockchain?
Ablockchainis a digital ledger that records every transaction made with a particular digital currency. Transactions are time-stamped and added to the blockchain in a permanent and unalterable way.
Key Features of Blockchain
- Decentralised:Not controlled by a single entity or authority
- Every participant in the network has a copy of the ledger
- Participants can verify transactions independently
- Made up of "blocks" of transactions linked together in a "chain"
- Uses cryptographic algorithms to create a secure and tamper-proof record
- Each transaction must be verified by multiple participants
- Verification prevents fraudulent activity
- Immutable:Unchanging over time or unable to be changed
Why Blockchain is Important
- Provides immediate, shared and completely transparent information
- Stored on an immutable ledger accessible only by permissioned network members
- Can track orders, payments, accounts, production and much more
- Members share a single view of the truth
- See all details of a transaction end to end
- Reduces risk and cuts costs for all involved
- Virtually anything of value can be tracked and traded
The Structure of a Block
What is in a Block?
Whenever a new transaction takes place, a new block is created which has the following attributes:
Timestamp
Atimestampis small data stored in each block as a unique serial that determines the exact moment the block was mined and validated by the network.
In the context of verifying authenticity, Nakamoto developed timestamps based on the use ofhash-based proof of work. A Timestamp Server takes the hash of a block containing transactions to be timestamped and published on the network. This ensures that the transactions have existed at this point in time.
This system is chronologically enforced as each transaction hash contains the timestamp of the previous block of transactions, forming a chain of blocks.
Types of Blockchains
Public
Anyone can join and participate
Consortium
Controlled by a group of organisations
Private
Controlled by a single organisation
Activity 2: Blockchain Basics
- What is a blockchain? [2]
- Name three values that would be created for a new block. [3]
- What are the three types of blockchain? [3]
Solution:
- A blockchain is a digital ledger [1] that records every transaction made with a particular digital currency [1].
- Data (name of sender and recipient, amount) [1]. Hash value (unique value generated by an algorithm) [1]. Previous hash value (points back to previous block) [1].
- Public [1]. Consortium [1]. Private [1].
Check Your Understanding: Blockchain
1. What is a blockchain? [2 marks]
- [1]A digital ledger that records every transaction
- [1]Transactions are time-stamped and added in a permanent, unalterable way
2. What three things does a block contain? [3 marks]
- [1]Data (e.g. name of sender and recipient, amount of money)
- [1]Hash value (unique value generated by an algorithm)
- [1]Previous hash value (points back to a previous block in the chain)
3. What is the genesis block? [1 mark]
- [1]The first block in a blockchain — it does not point to any previous block
4. What is a timestamp? [2 marks]
- [1]Small data stored in each block as a unique serial
- [1]Determines the exact moment the block was mined and validated by the network
5. Why is blockchain described as immutable? [1 mark]
- [1]Because it is unchanging over time / unable to be changed
6. What is a ledger? [1 mark]
- [1]A book or collection of accounts in which account transactions are recorded
3. How Blockchain Works
A new hash value is created each time a new block is created. This hash value is unique to each block and includes a timestamp, which identifies when an event actually takes place.
What Happens if a Block is Hacked?
SupposeBlock 2is changed in some way. Any changes to the data within Block 2 will cause the value of the hash to change (it will no longer have the value 6AB1).
This means thatBlock 3 and beyond will now be invalidsince the chain was broken between Block 2 and Block 3 (previous hash 6AB1 in Block 3 is no longer valid).
This will prevent tampering (for example, by a hacker).
Proof-of-Work and Mining
Proof-of-Work
- Computers are so fast that it should be possible to quickly create a whole new string of blocks
- Proof-of-workmakes sure it takes about 10 minutes to determine the necessary proof-of-work for each block before it can be added to the chain
- This slows down the whole process of creating new blocks
- This foils hackers and means the currency is regulated by all the network computers
- Makes it almost impossible to hack into the blockchain
- It would be necessary to attack every single block in the chain at the same time
- It only takes one block to break the link for any transaction to be terminated
Miners
- Special network users that get a commission for each new block created
- They 'police' the proof-of-work process
- Mining is the process that Bitcoin and several other cryptocurrencies use to generate new coins
- They verify new transactions
- When a new block is created, it is sent to each computer in the blockchain
- It is checked for correctness before being added to the blockchain
- If a new network user is created, they get a copy of everything in the whole blockchain system
The Six-Step Process of a Blockchain Transaction
- A transaction is requested— A wants to send money to B.
- A block is created— The transaction is represented online as a 'block'.
- The block is sent to every node in the network.
- Nodes validate the transaction— Those in the network approve the transaction is valid.
- The block is added to the existing blockchain— The block can be added to the chain, which provides an indelible and transparent record of transactions.
- The transaction is complete— The money moves from A to B.
| Feature | Centralised | Decentralised (Blockchain) |
|---|---|---|
| Control | ||
| Security | ||
| Transparency | ||
| Speed |
Activity 3: How Blockchain Works
- Describe what would happen if block 3 was hacked to change the sum of money in the transaction. [3]
- What is proof-of-work and why is it important? [3]
- What are miners and what do they do? [2]
Solution:
- Changing block 3 would cause its hash value to change [1]. Block 4 and beyond would become invalid since the previous hash value no longer matches [1]. This prevents tampering [1].
- Proof-of-work makes it take about 10 minutes to determine the necessary proof for each block before it can be added to the chain [1]. It slows down the process of creating new blocks [1]. This foils hackers and makes it almost impossible to hack into the blockchain [1].
- Miners are special network users that get a commission for each new block created [1]. They 'police' the proof-of-work process and verify new transactions [1].
Check Your Understanding: How Blockchain Works
1. What happens if a block is changed in the blockchain? [3 marks]
- [1]The hash value of that block changes
- [1]All blocks after it become invalid since the chain is broken
- [1]This prevents tampering by a hacker
2. Why does proof-of-work take about 10 minutes? [1 mark]
- [1]To slow down the process of creating new blocks and foil hackers
3. What is mining? [2 marks]
- [1]The process that Bitcoin and other cryptocurrencies use to generate new coins
- [1]Also verifies new transactions
4. Who polices the proof-of-work process? [1 mark]
- [1]Miners (special network users)
5. Why is it almost impossible to hack into a blockchain? [2 marks]
- [1]It would be necessary to attack every single block in the chain at the same time
- [1]It only takes one block to break the link for any transaction to be terminated
6. What happens when a new network user is created? [1 mark]
- [1]They get a copy of everything in the whole blockchain system
4. Encryption and Hashing
Data security always matters.Encryptionis an approach that helps organisations keep their data secure. In blockchain, encryption adds to the overall security and authenticity of blocks and helps keep them secure.
Encryption
- An approach that helps organisations keep their data secure
- Data is encoded or changed before it is sent out of a network
- Only authorized parties can access that information
- In Blockchain, encryption adds to the security and authenticity of blocks
- Uses asymmetric algorithms with private and public keys
Hashing
- A hash function is a one-way function that converts data into a unique fixed-length value
- The hash acts as a fingerprint for the data
- A new hash value is created each time a new block is created
- Any change to the data will change the hash value
- Each block has a unique hash pointer
- This ensures the security of the block
Security of a Block
A block — or the entire blockchain — is protected by a strong cryptographic hash algorithm. Each block has a unique hash pointer. Any modification in the block constituents will result in a change in the hash identifier of the block. Therefore, it offers an excellent level of security. One need not worry about the safety and security of data present in a block.
Activity 4: Encryption & Hashing
- What is encryption and what is its role in blockchain? [3]
- How is hashing used to secure a block? [2]
- What is a block identifier? [2]
Solution:
- Encryption is an approach that helps organisations keep their data secure [1]. Data is encoded or changed before it is sent out of a network [1]. In blockchain, it adds to the overall security and authenticity of blocks [1].
- Each block has a unique hash pointer [1]. Any modification to the block will change the hash identifier [1].
- Blocks can be identified by the block header hash [1] and the block height [1].
Check Your Understanding: Encryption & Hashing
1. What is encryption? [2 marks]
- [1]An approach that helps organisations keep their data secure
- [1]Data is encoded or changed before it is sent out of a network
2. What is a hash value? [2 marks]
- [1]A unique value generated by an algorithm
- [1]It acts as a fingerprint for a block of data
3. Why does changing data in a block cause the chain to break? [2 marks]
- [1]The hash value of the block changes
- [1]Subsequent blocks have a previous hash that no longer matches
4. Is it possible to modify data once it is written in a block? [1 mark]
- [1]No — it's not possible to do so without erasing the information from all other blocks too
5. How does a block link to the previous block? [1 mark]
- [1]Through the previous hash value, which points back to the previous block
6. Why is blockchain considered a trusted approach? [2 marks]
- [1]Its compatibility with other business applications due to its open-source nature
- [1]Its security — developers paid special attention to security for online transactions
Key Takeaways
- Digital currencyis money that only exists in electronic form. It can be centralised or decentralised.
- Cryptocurrencyis a type of digital currency that uses cryptography for security. It is decentralised.
- Blockchainis a digital ledger that records every transaction. It is decentralised and immutable.
- Ablockcontains data, a hash value, and a previous hash value.
- Thegenesis blockis the first block in a blockchain.
- Proof-of-workmakes it take about 10 minutes to add a new block, preventing hacking.
- Minersare network users who verify transactions and receive a commission.
- Hashingcreates a unique fingerprint for each block. Any change to the data changes the hash.
- Encryptionkeeps data secure by encoding it before transmission.
- Blockchain is used in cryptocurrency exchanges, smart contracts, research, politics, and education.
Question Bank
1. What are the main differences between digital currency and cryptocurrency? [3 marks]
- [1]Digital currency can be centralised or decentralised; cryptocurrency is always decentralised
- [1]Digital currency is regulated by central banks and governments; cryptocurrency has no state control
- [1]Cryptocurrency uses cryptography to track transactions / works within a blockchain network
2. (a) A blockchain has 5 blocks. Draw a diagram to show how they are all connected to form a blockchain network. [4 marks]
- [1]Five blocks shown in a chain
- [1]Each block contains a hash value
- [1]Each block (except the first) contains a previous hash value pointing to the previous block
- [1]The first block is the genesis block with previous hash = 0000
2. (b) Describe what would happen if block 3 was hacked to change the sum of money in the transaction. [3 marks]
- [1]The hash value of block 3 would change
- [1]Block 4 and beyond would become invalid since the previous hash no longer matches
- [1]The hacker would need to change all subsequent blocks at the same time, which is almost impossible
3. Indicate whether the following statements about blockchaining are true or false. [6 marks]
- All digital currency systems use blockchaining →False
- Blockchaining uses a decentralised database →True
- The last block in a blockchain is known as the 'genesis block' →False
- New hash values are only generated when data in a block is altered →False
- Tampering of data in a block by a hacker would cause the hash value to change →True
- Blocks are 'policed' by network users called 'miners' →True
4. When a new transaction in cryptocurrency takes place, a new block is created. Name three values that would be created for this new block. [3 marks]
- [1]Data (e.g. name of sender and recipient, amount of money)
- [1]Hash value (unique value generated by an algorithm)
- [1]Previous hash value (points back to previous block)
5. What is the principle on which blockchain technology is based? [1 mark]
- [1]It enables information to be distributed among users without being copied
6. What are the four key properties of blockchain? [4 marks]
- [1]Decentralised systems
- [1]Distributed ledger
- [1]Safer & secure ecosystem
- [1]Minting
7. What do you mean by blocks in blockchain technology? [2 marks]
- [1]Blockchain consists of a list of records
- [1]Such records are stored in blocks which are linked with other blocks to form a chain
8. What are block identifiers? [2 marks]
- [1]Blocks can be identified by the block header hash
- [1]And the block height
9. Is it possible to modify the data once it is written in a block? [1 mark]
- [1]No — it's not possible to do so without erasing the information from all other blocks too
10. How is a block recognized in the blockchain approach? [2 marks]
- [1]Every block consists of a hash pointer which acts as a link to the prior block
- [1]Transaction data and a timestamp
11. What is the difference between Bitcoin and Ethereum? [4 marks]
- [1]Bitcoin is a digital currency; Ethereum supports smart contracts
- [1]Bitcoin was founded by Satoshi Nakamoto; Ethereum by Vitalik Buterin
- [1]Bitcoin uses SHA-256; Ethereum uses its own algorithm
- [1]Bitcoin block time is 10 minutes; Ethereum block time is 12–14 seconds