5.2 Digital Currency

Question Bank · 12 Questions

Objectives: Students should be able to —

  • 1 Explain the concept of digital currency and how digital currencies are used.
  • 2 Distinguish between Central Bank Digital Currency (CBDC) and cryptocurrency.
  • 3 Describe blockchain and its three main components — blocks, nodes, miners.
  • 4 Explain how cryptocurrency transactions are recorded in the blockchain using hashes.
  • 5 Explain proof-of-work (PoW) and how blockchain protects against hacking and double spending.
  • 6 Describe digital ledger / public ledger and the role of cryptography in securing transactions.

Digital Currency and its Types

Digital currency is any currency available in digital or electronic form, which could be exchanged using computer systems, over the internet.

★ It has no physical form unlike conventional fiat currency, like — dollar ($), pound (£), euro (€) and yen (¥).

★ The lack of physical form removes the cost associated with printing and distributing notes and coins.

★ It has made possible to bank online, transfer money between various accounts.

★ Digital currency is an accepted form of payment to pay for goods and services using technologies like credit/debit card and online payments like GooglePay, PayPal, Paytm, etc.

★ It allows instant transfer of money to any corner of the world at any time.

★ Digital currency could be converted into physical cash through the use of ATM.

★ It is also called digital money, electronic money/cash or cyber cash.

(a) Central Bank Digital Currency (CBDC):

Central Bank Digital Currency (CBDC) is regulated by central bank and the state government, which determines its interest rates and exchange rates.

⇒ It is based on the country's fiat currency value.

⇒ All transaction details of CBDC remain private, only available to the sender, receiver and the bank.

Example:

The following diagram shows how digital currency relies on a central banking system, when Nick wishes to send Irina some money; Nick uses bank 'X' and Irina uses bank 'Y'.

Nick Bank 'X' Central Bank Bank 'Y' Irina

(b) Cryptocurrency:

Cryptocurrency is a decentralised tradable digital asset that uses cryptography or encryption to safeguard transactions.

⇒ Cryptocurrency does not have any central issuing or regulating authority.

⇒ All the rules are set by the cryptocurrency community itself.

⇒ Cryptocurrency uses blockchain technology to authenticate and record transactions in a public ledger available to all parties in the blockchain network.

⇒ Cryptocurrency transactions are publicly available and therefore all transactions can be tracked and the amount of money in the system is monitored.

In short: Cryptocurrency is a decentralised digital asset, a medium of exchange, created and stored electronically in the blockchain, using encryption techniques to control the creation of monetary units to verify the transfer of funds. e.g. Bitcoin.

Example:

The following diagram shows how decentralised cryptocurrency transaction takes place, when Nick wishes to send Irina some cryptocurrency — the value is transferred from Nick's wallet to Irina's wallet.

Nick Nick's wallet Irina's wallet Irina

(c) Main difference between traditional digital currency and cryptocurrency:

Digital currency Cryptocurrency
Digital currency is a centralised currency regulated by a central bank.Cryptocurrency is decentralised and unregulated digital asset, managed by the members of a public blockchain network.
Digital currency is the electronic form of fiat money.Cryptocurrency is a store of value which is secured by encryption.
Digital currency transactions are only known to the sender, receiver and the bank.Cryptocurrency transactions are known to all the members of blockchain available on a public ledger.
The identity of the users of digital currency is tied up to an existing bank account stored in a centralised database.The identity of the users of cryptocurrency is encrypted and stored on a decentralised blockchain.
Digital currency rates are stable because they are widely accepted in the global market.Cryptocurrencies are highly volatile with rates rising and falling almost regularly because they are not widely accepted yet.
Digital currency needs a strong password to protect digital wallets, banking apps, credit/debit cards.Cryptocurrency needs a private encryption key to secure their wallets.

Blockchain — Concept, Components & Digital Ledger

(a) Blockchain:

Blockchain is a decentralised public ledger, made up of a sequence of linked blocks that stores data.

⇒ Each "block" of transaction is time-stamped and linked together in a chain using cryptographic algorithm in a permanent and unalterable way.

⇒ Whenever a new transaction takes place, every participant of the blockchain network gets a copy of the public ledger.

⇒ Each transaction in the blockchain must be verified by multiple participants of the network.

⇒ This verification process ensures that the transaction is legitimate and prevents any fraudulent activity.

(b) Four applications of blockchain:

Blockchain technology is being used in many different areas, such as —

  1. Cryptocurrency exchanges.
  2. Smart contracts — a self-executing contract between buyer and seller written into lines of code that runs when predetermined conditions are met.
  3. Research — allows to enforce the level of transparency, traceability and control over clinical trial sequences.
  4. Politics — to play a critical role in combating government corruption.
  5. Education — to provide a time-stamped and tamper-proof record of attendance, student evaluations, research output and publications.

(c) Four benefits of blockchain:

  1. Increased transparency.
  2. Accurate tracking.
  3. Permanent ledger.
  4. Automation.
  5. Cost reduction.

(a) Digital ledger in monetary transaction:

Digital ledger serves the purpose of recording various transactions digitally in computers.

⇒ When a new transaction takes place it is stored centrally in the bank server.

⇒ The sender, receiver and the bank can only view each transaction.

(b) Public ledger used by the blockchain network:

⇒ Blockchain network uses the Public ledger.

⇒ It is a bundle of transactions recorded in blocks, chained together and then broadcasted to each node of the blockchain network.

⇒ All transactions are recorded publicly, but the user's identities remain private.

⇒ All can view any wallet address with its balance and transaction records, but cannot gain access to the identity of the wallet owner.

⇒ It is designed to store data permanently in an unalterable, secured way.

1. Blocks:

Blocks are the list of records stored in a blockchain. Each block has three basic elements —

  • Data (like name of sender and recipient, amount of money and so on).
  • Hash value generated automatically when a new transaction takes place, which is used to identify the block.
  • Hash of the previous block to identify and establish link with the previous block.
Block
From : Sam
To : Peter
Amount : 200
HASH : 6AB1
Previous HASH : A4BF

2. Nodes:

Nodes are the computers connected to each other in a blockchain network which continuously gets updated with the new transaction when a new block is generated.

3. Miners:

Miners are special network users who verify each transaction and add the new block to the chain through a process called mining.

⇒ He gets a commission for each new block created.

Blockchain is a decentralised public ledger made up of a sequence of linked blocks that stores data.

⇒ Every block of a blockchain contains Data, Hash value to identify the block, and Hash of the previous block to be linked in a chain using cryptographic algorithm.

⇒ The first block in the chain is called the Genesis block since it does not point to any previous block.

⇒ Whenever a transaction takes place, a new block is created, time-stamped, linked together in a chain, and gets distributed to all members of the blockchain network which should be verified by them to ensure its legitimacy and authenticity.

Cryptocurrency Transactions in the Blockchain

⇒ When a transaction takes place, a new block is created to record the transaction.

⇒ A unique hash value is generated automatically for the new block, time-stamped and linked to the previous block using cryptographic algorithm in a permanent and unalterable way.

⇒ Every participant of the blockchain network gets a copy of the public ledger and can verify the transactions independently.

⇒ This verification process ensures that the transaction is legitimate and prevents any fraudulent activity.

Diagram — sequence of 5 connected blocks forming a blockchain:

Block 1
HASH : A4BF
Prev HASH : 0000
Genesis Block
Block 2
HASH : 6AB1
Prev HASH : A4BF
Block 3
HASH : 34EE
Prev HASH : 6AB1
Block 4
HASH : FF12
Prev HASH : 34EE
Block 5
HASH : AA00
Prev HASH : FF12
Block 1
HASH : 6AB1
Prev : 0000
Block 2
HASH : F4C9
Prev : 6AB1
Block 3
HASH : D127
Prev : F4C9
Block 4
HASH : ???
Prev : D127
HACKED!
Block 5
HASH : 3B42
Prev : 5EA2 ✗
Chain broken
Block 6
HASH : 4ABF
Prev : 3B42
Invalid

⇒ Any changes to the data within block 4 will cause the hash value of the block to change (it will no longer have the hash value 5EA2).

⇒ This means that block 5 and beyond will now be invalid since the chain was broken between block 4 and block 5 (the previous hash 5EA2 stored in block 5 is no longer valid).

⇒ Hence, the change to block 4 of the chain will be rejected by all the nodes of the network and effectively prevents the tampering by the hackers.

Proof-of-Work & Security (Double Spending)

Proof of work (PoW) is a decentralised consensus mechanism to choose which of the network participants is allowed to handle the task of verifying the new transaction and add it to the blockchain.

⇒ PoW requires to spend at least 10 minutes to solve an arbitrary mathematical puzzle first, get the result verified by other members of blockchain and get a reward of new cryptocurrency for their work.

⇒ PoW is intended to prevent users from double spending; prevent hackers from altering any data of the blockchain.

⇒ When a new transaction takes place, a new block is created to store the transaction data with timestamp and broadcasted to all nodes of the blockchain network which has to be accepted and verified by the network of miners.

⇒ The miner who gets the approval to add new transaction by proof-of-work consensus mechanism verifies the transaction and adds the block to the blockchain in a permanent and unalterable way.

⇒ An attempt to spend the same crypto again, requires to alter the block already linked to the blockchain, which is not possible because it would break the chain and not be acceptable by the members of blockchain.

Proof-of-work requires miners to spend at least ten minutes solving an arbitrary mathematical puzzle to get the approval for adding a new block to the blockchain.

⇒ If a hacker attempts to make any change to a block, then its hash will also change and the chain will break; the hacker needs to re-mine all the consequent blocks of the chain.

⇒ When a new block is created, it is sent to each node of the blockchain network to be checked for correctness (validation) and get approved.

⇒ PoW is intended to prevent users from double spending.

Application Scenario — Cybercriminals & Blockchain Defence

(a) Digital currency vs traditional fiat currency:

Digital currencies only exist in digital form. Digital currencies can be centralised or decentralised.

Fiat currency, which exists in physical form, is a centralised system of production and distribution by a central bank and government agencies.

(b) How blockchain could protect company & customers from hackers:

Blockchain is a distributed network; it doesn't have any centralised database for hackers to attack.

⇒ Each node of the blockchain has a copy of the distributed ledger to record, share and synchronise transactions; which cannot be changed from a single computer.

⇒ All data is secured through cryptography. Each member of the blockchain has their own private key for their transactions that acts as a digital signature to protect against data tampering.

Note: Bigger blockchain networks with more users have a very low risk of getting attacked by hackers because of the complexity required to penetrate such a big, complex distributed network.

(c) Who are Miners and why does Cryptocurrency need Miners:

⇒ Members of blockchain who validate new transactions and record them in the global ledger of a blockchain are called Miners and this activity is called Mining.

We need people to mine cryptocurrency for two reasons —

  1. To secure the cryptocurrency blockchain network.
  2. To create new cryptocurrency.

Revision: Statements and Key Computing Terms

Key Term Statement / Definition
Digital currencyA system of money that exists in electronic form only; it has no physical form and is essentially data on a database.
CryptocurrencyA form of digital currency that uses a chain of decentralised computers to control and monitor transactions.
CryptographyThe protection of data/information by use of coding; it usually involves encryption and decryption.
BlockchainA decentralised database where all transactions are stored; it consists of a number of interconnected computers but not a central server.
Proof-of-workThe algorithm used in blockchain networks to confirm a transaction and to produce new blocks to add to the chain; special users called miners complete and monitor transactions on the network for a reward.