0% found this document useful (0 votes)
16 views29 pages

Lecture Notes 7b Blockchain and Its Application in Finance

Uploaded by

pranav.garg1006
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views29 pages

Lecture Notes 7b Blockchain and Its Application in Finance

Uploaded by

pranav.garg1006
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

CC0002 Navigating the Digital World

Latest Technology Trends –


Blockchain and its Application
in Finance
Presented by Assoc Prof Cindy Xin DENG

© 2022 Nanyang Technological University, Singapore. All Rights Reserved.

Today, let’s talk about blockchain. At the mention of


blockchain, the first thing that comes to your mind would
probably be bitcoin. Bitcoin is a type of cryptocurrency
that is an example of blockchain application. For this class,
we will use bitcoin as the focus for you to better
understand how a blockchain works and its application in
finance as one alternative way to make payment. But
before we get into that, let’s discuss the history and
evolution of money and payment.

1
© 2022 Nanyang Technological University, Singapore. All Rights Reserved.

Goods Trading
While money is something that we use almost every day,
the exact meaning of money can be quite abstract.

Let’s use this as an example. Imagine you make shoes for a


living and you need to buy bread for your family. You
would like to trade your shoes for bread with a baker, but
he does not need that many pairs of shoes. Unless you find
another baker, who needs that many pairs of shoes, this
trade cannot be carried out. This is an example of a barter
economy.

2
© 2022 Nanyang Technological University, Singapore. All Rights Reserved.

In the early days, people use commodities as a mode of


payment. One example is the Aztecs, People in central
Mexico, they used cocoa beans for trading. However, using
such commodities for trading has its disadvantages as their
size and shelf-life matter.

3
© 2022 Nanyang Technological University, Singapore. All Rights Reserved.

Currency (or Money) as a Solution


Hence, we use currency (or money) as a solution.

According to mainstream economics, money relieves the


issues arising from commodity trading as it is a universal
store of value that can be readily used by anyone.

This allows faster transactions as sellers have an easier


time finding a buyer with whom they want to do business
with. By transacting with currency, a seller can simply sell
his or her goods and in turn pay their trading partners with
the money earned.

There are other important benefits of currency too. For

4
instance, it is much easier to bring currency around as
compared to bringing bags of cocoa beans each time you
need to buy something. Furthermore, coins and papers last
longer than most commodities used for trading. For
example, if a farmer relies on direct trade using corn, he
will only have a few weeks to trade before his corn become
rotten. Currency, on the other hand, can be accumulated
and stored.

4
© 2022 Nanyang Technological University, Singapore. All Rights Reserved.

Minted Currency
Now, you probably understand why minted currency was
such an important innovation. As far back as 2500 B.C.,
Egyptians created metal rings to use as money. Then,
actual coins made from precious metals such as gold,
silver, or copper appeared around 700 B.C.

However, the metallic coins were quite heavy to carry


around for daily transactions.

5
© 2022 Nanyang Technological University, Singapore. All Rights Reserved.

Paper Money as a Medium of Exchange


So, we have paper money. The first recorded use of paper
money was purported to be in China during the 7th
century A.D. It worked quite similar as modern-day
banking. Individuals would deposit their coins with a
trustworthy party and receive a note denoting how much
money they had deposited. The note could then be
redeemed for currency at a later date.

6
© 2022 Nanyang Technological University, Singapore. All Rights Reserved.

When we talk about paper money, we have to also discuss a


modern money related key concept—the Central Bank. As we
know, paper money is a country's official paper currency that is
circulated and accepted for the transactions of goods and
services. The country’s central bank authorises and regulates the
printing of paper money, ensuring that the flow of funds aligns
with the monetary policy.

Paper money used to be backed by a certain amount of gold and


later, government-issued currency became purely based on a
country's government, known as fiat currency. The relationship
between supply and demand of the fiat money, and the stability of
the issuing government, defines the value of fiat money.

7
Cheque
Person 1 Person 2

2 Check that the cheque


is valid, Person 1 has
enough money in his
account, etc.
3
4
5

Person 2’s Bank Person 1’s Bank

© 2022 Nanyang Technological University, Singapore. All Rights Reserved.

Cheque
Cheques became a very popular non-cash method for making
payments in the 20th century. A cheque is a document that orders
a bank to pay a specific amount of money from a person's account
to the person in whose name the cheque has been issued.

Let’s use Alex and Ben as an example. For Alex to issue a cheque
to Ben, Alex must have a transaction banking account where the
money is held. When Ben receives the cheque and drops it at the
bank’s deposit box, his bank will send the relevant information to
Alex's bank. After Alex's bank has checked and confirmed that the
cheque is valid and that there is sufficient money in his account,
Alex's bank will transfer the money to Ben's bank account.

8
© 2022 Nanyang Technological University, Singapore. All Rights Reserved.

ATM / Debit and Credit Card


A more recent innovation for payment is the credit card. The card
issuer creates a bank account for the cardholder, from which the
cardholder can borrow a limited amount of money for payment to
a merchant or as a cash advance.

How about debit cards? A debit card is similar in usage to a credit


card, but it requires the value to be stored upfront instead of
linking to a bank account and allowing advanced payment.

More recently, contactless payment or mobile payment has


become the main tool to transact in our everyday life. We
generally do not carry cash, cheques or credit cards around
nowadays. We simply use our mobile phones to make a payment.

9
© 2022 Nanyang Technological University, Singapore. All Rights Reserved.

Bitcoin
As we have learnt earlier, Bitcoin is the most popular
cryptocurrency and can be accepted as payments by some
shops. But how exactly do we get bitcoins? One way to do
so is through mining.

10
Bitcoin mining

© 2022 Nanyang Technological University, Singapore. All Rights Reserved.

Bitcoin Mining 1
Imagine that you have been tasked to search for a long-
lost treasure. Reputed to be the largest diamond in history,
its whereabouts has been unknown for centuries… until
now. It seems that a certain someone has hidden it and
locked it away in a highly secure safe. After hunting around
the world for it, you have finally found it. Alas, just when
you thought your mission’s accomplished, you realise that
you would also need a fingerprint to open the safe. What
would you do next?

Your best option would be to take the fingerprint of each


and every person on Earth to try and open the safe. If luck
is on your side, you might find the person in your first few

11
attempts. But if you are unlucky, the right fingerprint might
be the last one. Assuming you check one person per
minute and the Earth’s population is about 7.125 billion
people, this means that you would be on this search for the
next 13,555 years!

11
Bitcoin Hash Puzzle
Keep trying

Mysterious Bitcoin Machine

924,591,752

© 2022 Nanyang Technological University, Singapore. All Rights Reserved.

Bitcoin Mining 2
This process is similar to the bitcoin mining process.
Miners will need to solve an extremely complicated
computational hash puzzle through trial and error and only
the first miner to solve the hash puzzle will be rewarded
with newly minted bitcoins. If we think of the hash puzzle
as the safe, we will know that certain inputs, such as the
fingerprint, need to be present to open the safe or solve
the puzzle. What inputs are required for the hash puzzle
then? And what exactly are we looking for by solving the
puzzle?

12
Blockchain: Digital Ledger
Block 10 Block 11 Block 12
Prev_Hash Timestamp Prev_Hash Timestamp Prev_Hash Timestamp

Tx_Root Nonce Tx_Root Nonce Tx_Root Nonce

Hash01 Hash23

Hash0 Hash1 Hash2 Hash3

Tx0 Tx1 Tx2 Tx3

© 2022 Nanyang Technological University, Singapore. All Rights Reserved.

The Connection to Blockchain


Before we can answer these questions, we need to take a
step back and think about blockchain first. We know that
Bitcoin is based on blockchain. But what precisely is
blockchain?

As suggested by its name, blockchain technology is a chain


of blocks of transactional records. This virtual record of
transactions, also known as a ‘digital ledger’, is then
distributed throughout the blockchain's complete network
of computer systems.

Thus, each data block can be thought of as a page in the


ledger. Whenever new transactions occur, a new block that

13
consists of these new transactions is added to the chain
after authentication.

To illustrate, you can imagine blockchain as an online


document shared among numerous people in a group,
where the transactional records are stored based on actual
purchases. Anybody in the group can see the data, but they
cannot alter it. Essentially, blockchain is an immutable
public ledger.

13
Hash Function
• The mathematical algorithm that transforms any kind of
message into a bit array of a fixed size (the "hash value"),
regardless of the size of the input message. It is a one-way
function and infeasible to invert.
• Example:
⁃ SHA256(Blockchain) =
625da44e4eaf58d61cf048d168aa6f5e492dea166d8bb54
ec06c30de07db57e1
⁃ SHA256(blockchain) =
ef7797e13d3a75526946a3bcf00daec9fc9c9c4d51ddc7cc
5df888f74dd434d1

© 2022 Nanyang Technological University, Singapore. All Rights Reserved.

Hash Puzzle
This brings us back to the mining process where miners
solve the hash puzzle. You see, each block in the
blockchain contains a bunch of transactions and header
components. The records on the common ledger are
usually listed one by one. However, the transaction records
are stored using a data structure, known as Merkle tree, in
each block.

First, transaction information is hashed. Hash is a


mathematical algorithm that transforms any kind of
message into a bit array of fixed size (that is, the "hash
value"), regardless of the size of the input message. It is a
one-way function and is infeasible to invert.

14
There are different hash functions. Bitcoin uses hash
function SHA256 to convert the information into hash
values. It generates unique, fixed length of 64-digit
hexadecimal numbers. A tiny change of the input
information, say changing uppercase H to lowercase h in
the word “Hi”, leads to a completely different output from
this value, to this value.

14
Merkle Tree

© 2022 Nanyang Technological University, Singapore. All Rights Reserved.

Merkle Tree
After converting individual transaction messages into hash
values, a pair of hash values can be hashed again. We
keep doing so until we have one single hash value at the
top. By doing so, we bundle up transactions in a tree-like
manner, deriving a single hash value at the top, which is
called the Merkle tree root.

As we have just seen, a small change in the input will lead


to a different hash value. And when we do hash on the
changed hash value, we will get a different Merkle root. In
other words, any tiny change in the information of original
transactions leads to a completely different Merkle root.
As you can see now, a bunch of transaction information is

15
converted into a 64-digit hexadecimal number, Merkle root.
The beauty of this data structure of Merkle tree is that first
it takes up little disk space , and second it can efficiently
verify the data changes since the Merkle root changes even
with the slightest modification of the original transactions.

This Merkle root is one of the fields in the header part of


the block. You may notice that other than Merkle root,
there is another field in the header components called the
‘previous block hash’. It is the hash of the block header of
the previous block and reflects the history of all previous
transactions. As each block refers to its predecessor, one
can go back in history till the first block. This is how blocks
are chained together! If any early transaction in a block is
tampered with , the Merkle root in the header of that block
will change, consequently the hash of that block will
change, and then the hash of all the following blocks will
change.

15
Block 277316

Here is the Nonce


https://www.blockchain.com/btc/blo
ck/277316

© 2022 Nanyang Technological University, Singapore. All Rights Reserved.

As we discuss the block hash , you may notice that this 64-
digit hexadecimal number starts with many zeros. It’s
actually related to the pre-defined condition for the hash
puzzle that miners need to solve. Particularly, to solve the
puzzle, miners will have to first identify all the fields in the
header components and use them as inputs of the hash
puzzle. Similar to the idea of using a fingerprint to unlock
the safe, the inputs of the header components solve the
hash puzzle.

Fortunately, all the fields in the block header can be found


or generated easily. Other than what we have discussed
just now, Merkle root and previous block hash, version and
bits are public information, and timestamp is related to the

16
time when the block is generated. Well, all except for one.
Nonce, an abbreviation for "number only used once”, is a
unique randomly generated number . And nonce is the
number that blockchain miners are solving for to use as
one of the inputs together with all other fields to do hash.
The resulting hash value needs to meet the pre-defined
condition, for example, the pre-defined condition for block
1001 is that the hash value must have 8 leading zeros.

Do you still remember that the mathematical algorithm


hash is a one-way function and is infeasible to invert?
Therefore, even with the pre-defined condition, there is no
way for us to calculate the input. What miners can do is just
keep trying different random numbers together with other
fields to find a valid hash value that meets the pre-defined
condition. The miner who first finds the nonce that works
receives newly minted bitcoins as a reward for his time and
effort. This nonce is the so-called “golden nonce”. Now, you
probably understand why this process is called mining,
because it is just like mining gold. Gold miners do not know
whether there is gold beneath the ground before they dig.
Similarly, bitcoin miners would not be able to know what
the golden nonce is. What both the gold miners and bitcoin
miners can do is to keep trying!

But do not be intimidated by the mining process if you are


interested in Bitcoin! You need not start mining to own
bitcoins. You can simply buy cryptocurrencies using fiat
currency in cryptocurrency exchanges. Coinbase, Binance,
and Kraken are examples of popular cryptocurrency
exchanges.

16
© 2022 Nanyang Technological University, Singapore. All Rights Reserved.

How Much Does a Miner Earn?


We looked at how much work bitcoin mining is earlier on.
With such a mammoth job to complete, these miners sure
do deserve some bitcoins as a reward. But do you know
how much they are being paid?

The reward for bitcoin mining is halved roughly every four


years. From this graph, we can see that when bitcoins
were first mined in 2009, the reward for mining one block
was 50 BTC. This amount was halved in 2012, and again in
2016 and 2020. The reward is now 6.25 BTC instead of the
initial 50 BTC.

Even then, the earning is still considerably high given that

17
the price of Bitcoin was about USD42,500 per bitcoin in
January 2022, which means the miner would have earned
USD265,625 (6.25  42,500) for completing a block.

Miners can refer to the Bitcoin Clock for real-time


information to track when reward halving occurs. One
interesting observation made over the years is that the
market price of bitcoin tends to correspond closely to the
reduction of new coins entering circulation. This decrease
in newly minted coins increased scarcity and historically the
price has risen with it.

More importantly, the mining is related to the creation of


new bitcoins. You will probably realise by now that unlike
the creation of typical or fiat currencies, there is no
government or centralised party involved in the creation of
cryptocurrency.

17
© 2022 Nanyang Technological University, Singapore. All Rights Reserved.

Application of Bitcoin
So, what’s the big deal about Bitcoin? I don’t mean the
price. I mean how does that help society ? If you want to
trade bitcoins, the lowest unit you can trade is called
Satoshi, which is the name of its founder, Satoshi
Nakamoto. 1 unit of bitcoin is equivalent to 100 million
Satoshi. Assuming a bitcoin is worth $42,500 now, a unit of
Satoshi will be worth USD 0.000425. USD1 will give you
about 2353 units of Satoshi.

If you go and buy a cup of coffee that costs USD1 today,


you can use cash, credit card or one of the most popular
instant payment systems, PayNow. PayNow is easy to use,
and you just need to have your phone and not have to

18
worry about carrying your wallet around. Imagine paying it
with 2353 units of Satoshi using a PayNow equivalent
system. As of the current moment, we don’t have such a
system. For the sake of convenience, let’s imagine a term
and call it SatoshiNow. So, you go and buy a cup of coffee
using SatoshiNow. You might think, erm, why do I bother
since I already have PayNow?

You are correct. You don’t have to bother. But if you are
travelling overseas for a holiday, for example, visiting Seoul
and checking out its iconic observation tower, or
Switzerland for its famous and beautiful Chapel Bridge, and
you wanted to buy a cup of coffee. What do you do? You’d
either have gone to a money changer to get the local
currency with the risk of under or overspending before the
trip; or you can solve that issue by paying with a credit card
which usually has highly unfavourable exchange rates as
compared to a traditional money changer. Either way puts
you at a losing end.

Now, imagine the whole world is accepting Bitcoin and its


equivalent subunits Satoshi and you have the SatoshiNow
app on your phone. You want to go for holiday tomorrow?
You’ll just need to book a ticket, pack your luggage, and off
you go!

18
Decentralised commodity system

© 2022 Nanyang Technological University, Singapore. All Rights Reserved.

We’ve learnt quite a number of things in this lesson. Now,


let’s put them together.

Remember the example of how the Aztecs people in


Central Mexico use cocoa beans to make payment, or how
Egyptians created metal rings to use as money, or gold,
silver and copper coins appeared around in old history?
The money and payment system are a decentralised
commodity system. For example, when gold was the
primary medium of commerce, a gram of gold was simply
worth a gram of gold. It was named the gold-standard. The
silver-standard and double-standard were later
established. It was a simple system in which you could buy
anything with another item that have equal value. Gold

19
was valued because everyone knew how rare it was.

Then, the system eventually evolved into a centralised


commodity-backed system in recent history, in which the
buyer pays for his or her commodity with a bank-signed
note or certificate. This transferable note claims to be
backed by a specified amount of gold in the bank. The gold
can then be redeemed at the bank by whoever owns the
note. The bank, in this sense, is the system's centralised
point because it holds gold for its clients and authorizes the
notes. More importantly, in this system, one must have
faith in the bank and be able to determine whether or not
a note is valid for use.

In modern times, centralised fiat money is the money we


are familiar with from our everyday life. "Fiat" is a Latin
word that means "let it be done" or "it shall be", and it is
used to refer to an order or rule. Fiat money, unlike
commodity-based money, is not backed by any gold or
silver. Instead, the government of the country supports it.
For example, if you sell shoes in a New York shopping
centre, you must take the US dollar as a means of trade
since the government has declared it as the legal currency.
Despite the fact that these notes are little more than scraps
of papers, they are worth their face values because they
were issued by the government.

Now, cryptocurrencies such as bitcoins are considered the


future of money, and this can potentially disrupt the
current centralised fiat money. In the decentralised
blockchain system, there is no trusted central bank or

19
government to control the money system. The money is
minted through mining. In addition, the transactions ledger
is kept by miners rather than banks. There may come a day
when cryptocurrencies become a more widely accepted
means of payment such that the ordinary crypto investor
might even consider buying groceries with cryptocurrency.
Having said that, you should also remember that there is
long way for bitcoin or other cryptocurrency to become
wifely accepted. There are serious associated problems as
well, such as extremely high volatility, large consumption of
electricity to maintain proof of work. We will leave that
part of discussion for you to explore in advanced courses.

We have come to the end of this module. In this module,


we reviewed the evolution of money and payment system
and discussed how blockchain technology can potentially
disrupt the current centralised fiat money system.

Hope you enjoyed what we have covered and thank you!

19

You might also like