Blockchain Technolgy in Finance: Intro

Instructor:           Katya Malinova
Course :                 F741 Winter 2021

 

Agenda for the Next two classes

  • Where this is coming from, why, and why should you care.
  • How does it work?
  • What can it do for finance, and what are obstacles?
  • Applications:
    • Issuing and transferring money 
    • Asset trading
    • Innovative lending
    • Innovative financing tools
  • Related developments:
    • Libra
    • Central-bank issued digital currencies

Where this is coming from, why, and why should you care.

What's wrong with the traditional world of finance?

cheap tech, high prices?

Illustration of Infrastructure Frictions: money transfers

Version 1: They use the same bank

Change ledger entry locally

Version 2: They use different banks but the banks have a direct relationship

Alice's bank transfers from Alice's account to Bob's bank's account

Bob's bank transfers from its account to Bob's account

Version 3: They use different banks that have no direct relationship

Alice's bank transfers from Alice's account to its own account

Bob's bank transfers from its account to Bob's account

Central Bank

Central bank transfers from Alice's bank's account to Bob's bank's account

International transfers

Alice's bank transfers from Alice's account to its own account

Bob's bank transfers from its account to Bob's account

use the Swift network of correspondent banks

Source: Wendy Rotenberg via Andreas Park's slides

Bottom Line

very complex

many parties

lots of frictions and points of failure

very expensive

Would we design market this way if we were to start "from scratch" today?

Where this is coming from, why, and why should you care.

Start from scratch. Crazy thought: a single ledger?

"silos" &

painful

transaction 

reconciliation

"joint ,single system"

Why should you care? Isn't this too distant of a world?

The world of finance is evolving as we speak!

Existing solutions

Problems?

  • Risky side effects of "Tech First" solutions 

  • POWER CONCENTRATION/MONOPOLY 

why should you care?  Because The world is changing!

old days: silos

today: cloud computing

cloud data centers are a worldwide affair

why should you care?  Because The world is changing!

January 04, 2021 

 

The U.S. Office of the Comptroller of the Currency (“OCC”) published an interpretive letter that permits them to custody cryptocurrencies.

 

Quoting from Forbes: "A bank may use stablecoins (cryptocurrencies designed to minimize the price volatility) to facilitate payment transactions for customers.

In doing so, a bank may issue stablecoins, exchange stablecoins for fiat currency, as well as validate, store, and record payments transactions by serving as a node on a blockchain."

why should you care?  Because The world is changing!

Nokia's market shares for devices:

  • 2007: 49.4%
  • 2012: 3%

why should you care?  Because ... History!

Paid-for vs. valued 

  • Keyboard
  • Security
  • Being businessy
  • Cool and cutting edge
  • Being Canadian
  • Independence from desk

What did they pay for?

What do people value?

  • Mobile email
  • Brand name
  • Easy access to branch
  • Great product range
  • Fair prices
  • Great advice
  • Latest tech
  • Friendly tellers
  • Safe-keeping of assets

As banks move data into "the cloud," do we need the banks?

Generic Bank

Why should you care? Blackberry vs generic bank

Key Insight: Open Platforms provide value

What took place of blackberry?

decentralized finance

provision of financial services without the necessary involvement of a traditional financial intermediary 

(bank, broker-dealer, insurance corporation)

Why should you care?

\(\Rightarrow\) it's growing and it's coming

disclaimer: compared to existing markets this is still a tiny amount

disclaimer: compared to existing markets this is still a tiny amount

disclaimer: compared to existing markets this is still a tiny amount

How does it all work and why?

Distributed Ledger/Blockchain Technology

  • "joint, single system" "shared resource" "common infrastructure"
  • Features:
    • secure storage of information and transfer of value
    • guaranteed execution of code
  • Promise
    • open platform
    • global reach
    • frictionless finance

From our PollEv: why opt for traditional FIs?

How do we establish trust in commerce?

trustworthy People

long-term Relationships

reputation

contract law

institutions

How do we get trust in an open system with anonymity?

What's needed for trust in  anonymous deals?

Authority

Authority

Do you have the item?

Do you have power over it?

Tool: "key" cryptography

What's needed for trust in  anonymous deals?

Authority

Execution

Execution

Can we agree that it happened?

Tool:
consensus algorithm

What's needed for trust in  anonymous deals?

Authority

Execution

Continuity

Immutability and Continuity

Are the records immutable?

restricted permissions

really difficult to hack

Authority

Authority

Tool: "key" cryptography

Simplest case: symmetric encryption:
public key P = private key S

Small detour: sending a encrypted message

Pb

Sb

Pb

Sb

Small detour: sending a encrypted message

Modern encryption: asymmetric encryption
public key \(P_b\), private key \(S_b\)

Alice sends Bob a message and the signature provides proof that this message is from her

What we really need: digital signatures

Sa

Pa

Pa

Execution

Security

Demo [optional]

Anders Brownworth has an excellent interactive web demo that illustrates the concepts discussed above in a bit less abstract way. He also explains the relation between "hashing" and "mining", and  a few other tech terms (e.g., a "nonce") in plain English.

 

You can watch his YouTube of the demo here:

https://www.youtube.com/watch?v=_160oMzblY8

 

Once you have seen the video, you can try hashing and mining yourself here:

https://andersbrownworth.com/blockchain/hash

 

He also has a demo on digital signatures. Everything is accessible from here:

https://andersbrownworth.com/blockchain/

Security

Potential problem: double-spending

Cryptography
\(\Rightarrow\) signature cannot be hacked

B3

B1

B2

B4

B5

Contains transaction from Alice to Bob

Can Alice rewrite history?

Immutability

B3

B1

B2

B4

B5

B6

Where to add a new block \(B_7\)?

  • What if you add it to \(B_3\)?
    • future block \(B_8\) more likely to be added to \(B_6\)
    • \(\to\) lose "coinbase" reward
  • \(\to\) add to \(B_6\)

Detour: Longest chain rule

Equilibrium for "the longest chain"? - Yes!

  • "Blockchain Mining Games" by Kiayias,Koutsoupias, Kyropoulouz, and Tselekounis, Proceedings of the 2016 ACM Conference on Economics and Computation, 2016
  • "The blockchain folk theorem" by Biais, Bisière, Bouvard, and Casamatta, RFS 2018

Note: 

  • accidental "forks" can happen, in particular in fast chains (because of system latencies)
  • \(\to\) need several block confirmations to accept as transaction as settled

B7

B3

B1

B2

B4

B5

  1. be faster
  2. or: be able to block confirmations

B8

B7

B9

B10

B6

Contains transaction from Alice to Bob

Alice  wants to undo the transaction by rewriting history with B6

Selfish Mining Attack

How?

\(\to\)
create predictability of mining

\(\to\)
have 51% of mining
(= confirmation) power

Back of the envelope calculation (based on 2018)

  • hashrate: 25,000,000 TH/s
  • best GPUs have 2.5GH/s per card=0.0025 TH/s
  • => need 25,000,000 x 400 x 0.5 = 5,000,000,000 GPUs
  • 1 GPU costs around $200
  • =>Cost = $1,000,000,000,000
  • Note from 2020: this cost has only gone up

NB: there is a slightly more subtle view of  selfish mining in which the miner creates a block but holds it back to keep mining exclusively on a part of the chain. Sapirshtein,  Sompolinsky, and Zohar (2015) show that 23.21% of mining power is sufficient for such an attack

Selfish Mining Attack

Brief Detour: (hard) forks

Alice owns 1BTC pre-fork

Alice owns 1BTC and 1BCH post-fork

Block size limit ("old rules", original crypto: BTC)

Block size limit

("new rules", forked crypto: BCH)

What can it for finance, what are problems and obstacles?

One more application:
a stock trade

Alice wants to sell ABX

Bob wants to buy ABX

sell order

buy order

Clearing House

Stock Exchange

Broker

Broker

3rd party tech

custodian

custodian

record beneficial ownership

central bank for payment

With Blockchain: single ledger for money and securities

0xA69958C146C18C1A015FDFdC85DF20Ee1BB312Bc

0x91C44E74EbF75bAA81A45dC589443194d2EBa84B

0xA65D00Eda4eEB020754C18e021b1bF4E66C9Ed90

Detour: Ethereum

  • blockchain 1.0
  • first solution to double spending
  • clunky, slow, expensive
  • huge following and computing power

vs

  • blockchain 2.0
  • smart contract platform
  • highly flexible
  • foundation for many private initiatives
     

"Let me just say how impressed I am with Ethereum...If Bitcoin is email ––a one-trick pony, so to speak, but obviously revolutionary–– Ethereum goes far beyond that; it's more like the Internet...The whole idea of DeFi really is, number one, it’s obviously revolutionary, and I think at the end of the day could lead to a massive disintermediation of the financial system and the traditional players."

Heath P. Tarbert, CFTC Chairman, October 2020

blockchain Use cases 

Think of (or at least google) blockchain use cases and Let's chat about these in Lecture!

Usage of blockchain in financial industry

Areas of applications

moving value (remittances)

digital money: real-time settlement, reduced reserves

tokenization of assets

automization of contract payments

securitization

systems and infrastructure reorganization

digital identity

new forms of financial contracts, assets, and forms of financing

Obstacles?

Business Challenges

What Changes in Business Models can Blockchain Technology bring?

What does blockchain do?

peer to peer value transfers

self-powered platforms

contract execution

disintermediation

Who do you dis-intermediate, and then who is your customer?

issuer

investor

broker-dealer

The Business challenge of dis-intermediation

investment advisor

(Tech) Obstacles?

  • July 2019: Nakamoto consensus consumes energy on par with Switzerland 
  • No connection between energy burned and economic value created

Proof of work uses unsustainable amount of energy

Reality Check: Capacity

transactions per second T per 12 hours (business day)
Bitcoin 7 302,400
Ethereum 30 1,296,000
Algorand 2000 86,400,000
Conflux 4000 172,800,000
Athereum 5000 216,000,000
Payments Canada ACSS 648 28,000,000
US retail 7639 330,000,000
Canada number of equity trades 46 2,000,000
Orders on Canadian equity markets 3588 155,000,000
  • Tweaks: lighting network (BTC) or side chains, larger block size possible, but there are limits

  • microtransactions, IoT, and other smart contract use cases place very high demands

Scalability projects for Ethereum

  • Ethereum blocks have no size limit
     
  • but: gas limit imposes computation  limit and thus transaction limit
     
  • note: in contrast to Bitcoin, Ethererum always announced that it would eliminate proof-of-work eventually

     

Root Problem

  • Side Channels:
    • Keep two-party interactions off the main chain and use chain only for terminal settlement
  • Sharding
    • instead of storing all info on all nodes, break up the blockchain into shards
    • \(\to\) hard problem!

Solutions

https://blog.stephantual.com/what-are-state-channels-32a81f7accab

Many Other Solutions in the works

  • Bitcoin blockchain: "proof-of work" \(+\) only the longest chain is viable (lots of energy wasted!)
  • Different consensus protocols (loosely: to obtain agreement)
    • Conflux blockchain: "proof-of-work" \(+\) a directed acyclic graph (DAG)
      • think "parallel processing"
      • \(\to\) 4,000 transaction per second
    • Avalanche consensus (loosely: repeated voting by random subsamples of "validators")
    • Other ways to compete for the "right to add the block"
      • "proof-of-stake": prob of winning \(\propto\) staked wealth
        • issues remain ....

From Snowflake to Avalanche - Emin Gün Sirer

a better consensus mechanism: avalanche

now in operation in Athereum (fork of Ethereum)

Proof-of-Stake: Key issues

B3

B1

B2

B4

B5

B6

B7

Key problem of Proof-of-Stake (PoS):

How to incentivize support of longest chain?

Where to add a new block B7?

  • PoW: only longest chain
  • PoS: could add both at B3 and  B6 (nothing-at-stake)
    • solution: punish deviations!

B3

B1

B2

B4

B5

have a sufficiently large stake

B8

B7

B9

B10

B6

Contains transaction from Alice to Bob

Alice  wants to undo the transaction by rewriting history with B6

Selfish Mining Attack revisited

How?

\(\to\)
create predictability of mining

\(\to\) concern about
"long-range attacks" 

(if Alice & Co. had lots of money early on, they may start a new branch from far back & control it ...)

Bottom line: Proof-of-Stake (PoS) still has issues

Economic result: Fahad Saleh (2021) Review of Financial Studies, "Blockchain Without Waste: Proof-of-Stake" shows that PoS is an equilibrium

current state: 

  • promised since 2014
  • still in discussion

Personal problem: I am yet to see a fully convincing economic paper that describes an equilibrium in a PoS blockchain

Security & Continuity revisited

Security & Continuity revisited

securing the ledger

restricted permissions

really difficult (or costly) to change it

Private vs. public

some key questions

Who gets to update?

Can a higher body prevent
transactions?

Can the past be altered?

consensus

immutability

censorship resistence

Public Blockchains 

Main private blockchain systems

Features of Private vs. public blockchains

Think of (or google):

  • features of public vs. private blockchain

  • whether these features are pros or cons

Let's talk about these in class! 

Features of Private vs. public blockchains

open to anyone

past cannot be changed

Public Blockchains

private Blockchains

high visibility of transactions

open-access eco-system

slow governance

privacy only at a cost

joint control and governance

straightforward KYC and AML

tech support

transaction secrecy simpler

rely on corporate development

compliance with law (reversion)

control who can access it

censorship-resistance

Application: Issuing and transferring money

A short history of Money

A short history of Money

A short history of Money

A short history of Money

Cryptocurrencies vs USD

why do cryptocurrencies have value? (or do they?)

Looking forward to hearing your views on this in our live lecture!

 

Cryptocurrency = money?

Can bitcoin or ether replace "fiat" MONEY?

store of value?

unit of account?

method of exchange?

\(\to\) does not require "double coincidence of wants"

\(\to\) don't have to price everything relative to each other

\(\to\) don't have to spend money immediately upon receiving it

@katyamalinova

malinovk@mcmaster.ca

slides.com/kmalinova

https://sites.google.com/site/katyamalinova/

L2 F741 Blockchain in Finance

By Katya Malinova

L2 F741 Blockchain in Finance

This is the first set of slides on intro to blockchain for F741 in Winter 2021. Once again, the slides are organized as a 2x2 matrix. If using your keyboard, go "down" first and then "right"

  • 737