Blockchain Technolgy in Finance

Instructor:           Andreas Park
Date:                       November 7, 2020

 

2020 Rotman – Master in Finance

Financial Innovation

Agenda for the class

  • Where this is coming from, why, and why should you care.
  • How does it work?
  • What can it 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 is 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

Total Funds used in/dedicated to Defi

Why should you care?

Verbal Overview: Origins of Financial Institutions

  1. Money
     
  2. Safekeeping
     
  3. Deposit certificates and lending
     
  4. Trade facilitation & finance
     

Why should you care?

What's new with Financial Institutions?

old days: silos

today: cloud computing

cloud data centers are a worldwide affair

Meanwhile, in 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

Sue's bank transfers from Sue'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

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

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

Central Bank

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

International transfers

Sue's bank transfers from Sue'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's Payments lecture

Bottom Line

very complex

many parties

lots of frictions and points of failure

very expensive

Crazy thought: Wouldn't it be nice if there was a single ledger/common resource?

Existing solutions

Problem:
power concentration/Monopoly

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

How can we reach consensus? The Byzantine Generals' problem

How can we reach consensus? The Byzantine Generals' problem

Blockchain proof of work establishes consensus

Byzantine Generals' Problem

\(t\)

\(t\)

\(t\)

\(t\)

\(t\)

\(t\)

\(t\)

\(t\)

\(t\)

\(t\)

\(t\)

\(x\)

\(t\)

\(t\)

\(t\)

\(t\)

\(t\)

\(x\)

\(t,t,x\)

\(t,t,x\)

\(t,t,t\)

consensus is reached!

Byzantine Generals' Problem

\(x\)

\(y\)

\(z\)

\(y\)

\(x\)

\(z\)

\(y\)

\(x\)

\(z\)

\(x,y.z\)

\(x,y,z\)

\(x,y,z\)

consensus is reached (no attack)

Byzantine Generals' Problem

Equilibrium

  • generals pick majority message
  • successful consensus as long as no more than 1/3 cheats

Blockchain requirement

  • reach Byzantine Fault Tolerant consensus
  • trick: messages are hard to forge

Byzantine Generals' Problem

Proof of Work Protocol

A Byzantine Fault Tolerant Algorithm

This Hash starts with a pre-specified number of zeros!

Blockchain BFT

= 00000xd4we...

= 00000xd4we...

= 00000xd4we...

consensus is reached if hash starts with right number of leading zeros

PoW does two things

- selects a leader

- makes messages hard to forge

Blockchain BFT

B3

B1

B2

B4

B5

Contains transaction from Bob to Alice

Question: Can Bob rewrite history?

Drilling down part 2b: immutability

No! Bcause: Economics!

Importance of Economics, Step 1: Incentive to support longest Chain

B3

B1

B2

B4

B5

B6

Where to add a new block B7?

  • Add to B3?
    • => people after still more likely to add to B6
    • lose "coinbase" reward

Importance of Economics, Step 2: Altering the past?

B3

B1

B2

B4

B5

  • needs to be faster than anyone after who adds to B5 and build a longer chain
  • or needs to be able to mine repeatedly

B8

B7

B9

B10

B6

Contains transaction from Bob to Alice

Bob wants to undo the transaction by rewriting history with B6

Bob's objective

  • Wants to undo this trade and cheat Alice by building alternative chain from B6

What does it take?

  1. needs to be predictably able to add several blocks to the chain without interference, or
  2. needs to be faster than anyone after who adds to B5 and build a longer chain, or
  3. needs to ability to reject new blocks that are added to B5 .

How does Proof of Work prevent this?

  • mining success is random subject to resources spend:
    • computers/GPUs
    • electricity
  • you need faster/more computers than 51% of the network
    • current network power: 25million tera-hashes per second (blockchain.info)

Back of the envelope calculation

  • 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

Economic Analysis, Part II

Double spend attack prevention

  • Validation rewards are taken as given, but they are crucial in
    • determining incentives to participate,
    • to support the chain, and
    • to expense electricity and computing power

Basic idea of competitive equilibrium

aggregate mining cost = aggregate reward

Double spending attack

  • expense resources but:
  • win N block rewards until "confirmation" block
  • ability to double-spend

condition that prevents it

(Chiu & Koeppl RFS 2018)

 

 

\text{mining reward} \times (N+1)N > \text{double spend amount}

How does it all work and why?

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

Execution

Continuity

Authority

Do you have the item?

Do you have power over it?

Tool: "key" cryptography

Execution

Can we agree that it happened?

Tool:
consensus algorithm

Security and Continuity

Are the records immutable?

restricted permissions

really difficult to hack

premise of blockchain

no trusted parties needed

everything
in code

open to
anyone

platform or network

commerce thrives

How?

Cryptography: only Sue can spend her money

Authority

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 wants to send Bob a message and provide proof that its her.

What we really need: digital signatures

Sa

Pa

Pa

Execution

Security

Immutability

Problem: double-spending

How can we trust that

  1. sale happened and
  2. $$ only spent once?

Cryptography
\(\Rightarrow\) signature cannot be hacked

B3

B1

B2

B4

B5

Contains transaction from Alice to Bob

Question: Can Alice rewrite history?

Immutability

B3

B1

B2

B4

B5

B6

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

  • Add 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

B3

B1

B2

B4

B5

  • be faster
  • be able to block confirmations

B8

B7

B9

B10

B6

Contains transaction from Bob to Alice

Bob 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 not gone down

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

related model: Budish (2018)

Selfish Mining Attack

  • cost of mining a block: \(c\)
  • number of miners: \(N\)
  • block reward: \(B\)

basic economics:

expected gain of mining \(\ge\) cost of mining

\(\Rightarrow\) probability of winning \(\times\) block reward \(\ge\) cost

\frac{1}{N}\times B\ge c

\(\to\) holds for all miners

\(\to\) in equilibrium: aggregate cost of mining \(=\) aggregate benefit

\Leftrightarrow~c\cdot N=B

related model: Budish (2018)

Selfish Mining Attack

  • value of attack: \(V\)
  • to gain 50% control, pay: \(c\cdot N\)
  • need to gain \(A>1\): (\(A/(A+1)>.5\)
  • block confirmation convention: \(t\)

\(\to\) cost of attack: \(t\cdot A\cdot c\cdot N\)

total benefit of attack

  • attack value \(V\)
  • block rewards \(t\cdot B\)

\(\to\) for unattractive attack: cost \(>\) benefit

t\cdot A\cdot \underbrace{c\cdot N}_{=B} >V+t\cdot B
t\cdot B(A-1)> V
\Rightarrow \exists \mathbb{V} \text{~s.t.~} \forall \tilde{V}>\mathbb{V}~~\tilde{V}>t\cdot B(A-1)

means amounts above \(\mathbb{V}\) cannot be secured

Double spend attack prevention

  • Validation rewards are taken as given, but they are crucial in
    • determining incentives to participate,
    • to support the chain, and
    • to expense electricity and computing power

Basic idea of competitive equilibrium

aggregate mining cost = aggregate reward

Double spend - selfish mining attack

  • win \(N\) block rewards until confirmation block
  • ability to double-spend
     

condition that prevents it
(Chiu & Koeppl RFS 2018)


 

\text{mining reward} \times (N+1)N > \text{double spend amount}

Selfish Mining Attack

HOWever! with attacking don't you
shoot yourself in the foot?

  • First attack in May 2018
  • double spent of $18 million worth of Bitcoin Gold
  • \(\to\) Loss of confidence in Bitcoin Gold and decline in exchange rate
  • Only 1/6 of pre-attack value
  • transactions \(\searrow\) one-third

G

  • models:  per period flow cost of mining
  • Prat & Walter (2019): 2/3 of mining cost are fixed costs.

    G

HOWever! with attacking don't you
shoot yourself in the foot?

Garrat & van Oordt (WP 2020)

HOWever! with attacking don't you
shoot yourself in the foot?

Garrat & van Oordt (WP 2020)

drop in exchange rate S

=loss

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

One more application:
a stock trade

Sue 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

  • 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

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

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

economics of Platforms are tricky

  • is it worth it for me to engage at all?

  • is the desired action of the platform the best for me?

Not everything that can be measured matters and not everything that matters can be measured

  • must be aligned with long-run goal of platform

  • must be under the control of platform participant

What does the platform need people to do?

Is there a suitable performance metric?

Utility tokens fail \(\Rightarrow\) not good platform tokens

Equity tokens fail too!

Observation: many Decentralized Apps = platform for  two-sided, dis-intermediated market

Question 3: Do you need to incentivize the establishment of trust?

Question 2: What kind of incentives can you provide?

Question 1: What role does the intermediary play, what service does it provide?
 

  • Trust

  • Matchmaking

  • Time/size intermediation

  • marketing
     

Proof of Work uses unsustainable amounts of energy

  • Nakamoto consensus consumes energy on par with (Jan 2019)
    • Austria
    • 2x Denmarks
    • 3x Irelands
    • 4x nuclear power plants
  • No connection between energy burned and economic value created

a better blockchain: Conflux

  • Current networks (Bitcoin, Ethereum, etc.) have limited throughput
  • Unclear long-term economic sustainability
    • Vulnerability to double spending attack once block rewards phase out
  • Inefficient use of storage space
    • Inactive smart contracts occupies state storage
  • Vulnerable to fairness attack
    • An attacker with more than 23.21% computation power can potentially obtain rewards disproportional to its computation power by selfish mining

Conflux: Consensus with TreeGraph

•Blocks are organized in a directed acyclic graph (DAG)

•No concurrent blocks are discarded, leading to higher throughput

a better blockchain: Conflux

Greedy Heaviest Adaptive SubTree (GHAST) algorithm

  • Blocks are assigned a weight according to the topologies
  • Exists a deterministically heaviest chain called pivot chain
  • An epoch contains one pivot chain block and its reachable blocks

Transaction Processing

  • Blocks are processed sequentially ordered by epoch, topological order and id
  • Only the first occurrence of the transaction is processed
  • up to 4,000 tps for simple payment transactions
  • Note: runs Solidity \(\to\) 100\% compatible with all Ethereum smart contracts

Disclaimer: token design strongly influenced by yours truly

Goes life on October 29, 8 a.m.

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

Key problem of Proof-of-Stake:

How to incentivize support of longest chain?

B3

B1

B2

B4

B5

B6

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!

My personal problem: I have not yet seen a convincing theoretical model of PoS

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
  • slashing controversial

From Snowflake to Avalanche - Emin Gün Sirer

a better consensus mechanism: avalanche

now in operation in Athereum (fork of Ethereum)

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, SegWit, blocksize possible, but there are limits

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

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 provide

Main private blockchain systems

Features of Private vs. public blockchains

open to anyone

no one can be excluded

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)

can keep competition out

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

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

Cryptocurrency = money

Can bitcoin or ether replace "fiat" MONEY?

store of value?

unit of account?

method of exchange?

Cryptocurrencies are (currently) useless as money

cryptocurrencies' volatility?

Cryptocurrencies are (currently) useless as
money

fiat money cannot be used in smart contracts on the blockchain

solutions:

 stablecoins
 

central bank digital currency

BTC, ETH

fiat: USD, EUR

asset (gold)

fee-backed

Seigniorage

Crypto

Traditional

Algorithmic

Collateral-Backed

Taxonomy of Stablecoins

$174M

$33M

$144M

funding figures from Nov 2018; source: blockchain.com

BTC, ETH

fiat: USD, EUR

asset (gold)

fee-backed

Seigniorage

Crypto

Traditional

Algorithmic

Collateral-Backed

Taxonomy of Stablecoins

The Impossible Trinity (macroeconomics)

free flow of capital

Control exchange rate

Control interest rate

Basic macroeconomics: you can have TWO out of THREE

Why? The inconvenience of markets ...

unified unit of account: dai

Money

Idea:

  • create fiat money on chain
  • mechanism
    • a collateralized loan with ETH in escrow
    • DAO-managed monetary policy (=creation or destruction of tokens)

Sidebar: what is a DAO?

  • DAO=decentralized autonomous organization
  • \(\to\) entity without management
  • governance decided by token holders essentially by vote

user perspective

Maker DAO

4 ETH
(1 ETH = $375)
(Oct 15, 2020)
\(\approx\) $1,500

\(\vdots\)

1,500 DAI
(1 DAI = $1)

formally: this smart contract is a collateralized debt position (CDP)

user perspective

Maker DAO

fractional collateral \(\to\) collateralization factor \(=\) 150%

\begin{array}{rcl} &&\textsf{maximal amount of DAI in \$}\\\\ &=&\frac{\textsf{\$ equivalent of ETH in escrow}}{\textsf{collateralization factor}}\\\\ &=&\frac{1,500}{150\%}=\$1,000 \end{array}

total collateral = $1,500

maximum loan = $1000

overcollateralization = $500

actual loan (example) = $500

buffer = $500

user perspective: what happens if the price of ETH rises?

Maker DAO

ETH \(\nearrow\) $500

value of ETH collateral = $2,000

maximum loan = $2,000/150%=$1,333

total collateral = $2,000

maximum loan = $1,333

overcollateralization = $667

actual loan (example) = $500

buffer = $500

overcollateralization = $667

new loan capacity= $333

user perspective: what happens if the price of ETH falls?

Maker DAO

ETH \(\searrow\) $187.5

value of ETH collateral = $750

maximum loan = $750/150%=$500

total collateral = $750

maximum loan = $500

overcollateralization = $250

actual loan (example) = $500

buffer = $0

for reference: former value of collateral

user perspective: what happens if the price falls & max loan is exceeded?

Maker DAO

ETH \(\searrow\) $150

value of ETH collateral = $600

maximum loan = $600/150%=$400

total collateral = $600

maximum loan = $400

required overcollateralization = $200

actual loan (example) = $500

buffer = -$100

for reference: former value of collateral

\(\Rightarrow\) liquidation possible by "keeper"

sell 3.33 ETH=$500=500 DAI

repay $500=500 DAI loan

retain incentive

return ETH remainder to pool

Maintaining the Peg: monetary policy

Maker DAO

  • Why works:
    • over-collateralization:
      • ETH expensive relative to DAI \(\to\) issue more DAI
      • supply (DAI) \(\nearrow\)
      • price (DAI) \(\searrow\)
    • market: if ETH \(\searrow\) then:
      • ​ETH cheap relative to DAI
      • demand (DAI) \(\nearrow\)
      • price (DAI) \(\nearrow\)

\(\Rightarrow\) all relies on behavioral assumptions

\(\Rightarrow\) But: there are also real incentives & mechanisms

Maintaining the Peg: monetary policy

Maker DAO

  1. stability fee
     
  2. DAI savings rate (DSR)
     
  3. debt ceiling

borrowers of DAI need to pay interest \(\to\) stability fee

  • if too much minting (=too much DAI) then
  • \(\to\) interest \(\nearrow\) \(\to\) cost of DAI \(\nearrow\)
  • \(\to\) minting \(\searrow\) \(\to\) supply DAI \(\searrow\)

DSR paid on "locked" DAI

  • DAI deposited to specific contract (demand \(\nearrow\))
  • funded by stability fees
  • \(\to\) SF>DSR

total amount of debt (or DAI) outstanding is limited

Sidebar: how is this decided?
\(\to\) special "governance" token MKR

Application: asset trading

The Ugly Truth: token trading and token markets are different from securities trading and markets

Investor

Broker

Venue

Settlement

Exchange

Traditional

Wholeseller

Darkpool

Internalizer

Venue

Settlement

Investor

On chain

Crypto

decentralized exchange

Key Components

Idea:

  • create a way to exchange items on-chain
  • fully decentralized
  • \(\to\) no single controlling entity, or location, everything runs with smart contracts

How do you organize DEX trading?

Atomic swaps

How do you organize DEX trading?

Liquidity?

  • Laissez-faire: Etherdelta or Kyber
    • people submit contracts (limit orders) on-chain
    • system collects info
    • system offers "tools" to trade against standing contracts
  • Hybrid: 0x
    • "dark liquidity"
    • off-chain/sidechain purchase/sale agreements
    • system matches compatible orders and posts on-chain
  • Automated market maker (AMM) (Uniswap)
    • AMM holds assets on both sides
    • offers two-sided quotes (\(\to\) always liquid)
    • prices adjust continuously to demand/supply shifts

How do you organize DEX trading?

automated market maker

Price mechanism:

  • risk-neutral "invariance" pricing
  • at price, contract (AMM) is indifferent between buying and selling
  • \(X=\) contract balance of asset \(A\)
  • \(Y=\) contract balance of asset \(B\)
  • \(k=\) invariance factor
  • key relation \(k=X\times\ Y\)

Prices

  • when you want to sell \(x\le X\) you receive \(y\) that maintains invariance. 
  • implied exchange rate: \(e=\frac{x}{y}\)

How do you organize DEX trading? EXAMPLE

automated market maker

invariant \(k=4\times4=16\) 

Instantaneous exchange rate:

1             =   1

Contract deposit:

How do you organize DEX trading? EXAMPLE

automated market maker

sell 4 DAI for USDC

what price will therefore be quoted?

\begin{array}{rcl} k&=&\#\text{DAI}\times\#\text{USDC}\\ 16&=&(4+4)\times(4-y)\\ x&=&2 \end{array}

how many USDC?

e=x/y~~\to~~e=2

How do you organize DEX trading? EXAMPLE

automated market maker

Problem: large "slippage" (or price impact)

  • imagine: deposit is 100 DAI & USDC:
    • \(k=100\times100=10,000~\to\) for \(x=4\) need \(y=100-10000/104=3.85\)
       
  • imagine: deposit is 10,000 DAI & USDC:
    • \(k=10,000\times10,000=100,000,000~\to\) for \(x=4\) need \(y=10,000-100,000,000/10,004=3.998\)
       
  • ​\(\to\) the more money is in the contracts, the lower the price impact

How do you organize DEX trading? other mechanisms

automated market maker

  • anyone can become a liquidity provider when supplying both sides of a pair
     
  • trades carry a fee of 30bps \(\to\) paid to liquidity providers (pooled)
     
  • LPs still face opportunity costs relative to all other assets \(\to\) income must be sufficient

supercool feature

automated market maker

  • establish and sell a new token
     

    • create token
    • deposit token and counterasset (e.g., DAI)
    • \(\to\) opening price
    • \(\to\) new purchases will increase price

  •  

superannoying feature

automated market maker

  • front-running

    • transactions enter mem-pool

    • \(\to\) all visible there

    • arbitrageur make instant-swap trade at higher gas price

      • \(\to\) trade instead of original trade

      • \(to\) reverse to gain slippage from earlier trader

Convenient feature for arbitrage: Flash loans (Flash swaps)

automated market maker

  • take three pairs (ignore that BTC is not directly on Ethereum)

    • BTC-DAI

    • ETH-BTC

    • ETH-DAI

  • three pairs must satisfy non-arbitrage condition
  • e.g. if ETH:DAI =1:100 and BTC:DAI=1:10000 then BTC:ETH=1:100
  • say BTC:ETH=1:200 then
    • borrow (say) 10,000 DAI
    • use DAI to buy  1 BTC
    • sell 1 BTC for 200 ETH and
    • sell 200 ETH for 20000 DAI
    • of which you use 10,000 DAI to repay loan and pocket 10,000
  • Normally, this is hard!
  • But on blockchain you can do all operations in one go
  • \(\to\) no risk of leg of transaction not going through or non-delivery
  • flash (single-block) loans enable this

How does it look?

automated market maker

\(\to\) simply connect with MetaMask (or similar wallet)

Application: Innovative Lending

How does compound finance work?

Lending

Fundamentally, what does a bank do?

  • size intermediation
  • term intermediation
  • risk intermediation

And how is this done?

  • pooling deposits
  • issuing loans based on deposits
  • loan rates based on collateral or credit rating

on blockchain

  • short-term loans
  • pseudo-anonymous

collateral

compound Finance

  • Collateral ratio \(\in[0,90]\)
  • =0 \(\to\) not usable
  • =90 \(\to\) stablecoin
  • post 100 DAI 
  • factor 90
  • \(\to\) for each $1 borrow, deposit $100/90=$1.11
  • can borrow up to $90
  • post 1 ETH=$300 
  • factor 60
  • \(\to\) for each $1 borrowed, deposit $100/60=$1.67
  • can borrow up to $180

Example 1

Example 2

Example 3

  • post 1 ETH=$300 and 100 DAI \(\to\) $400
  • factor 60 and 90
  • \(\to\) for each $1 borrowed, deposit
    $100/(.75\(\cdot\)60+.25\(\cdot\) 90)=$1.48
  • can borrow up to $270

borrowing and lending rates compounded per block

how are the rates determined? - a function

compound Finance

100%

fraction of supplied that's been borrowed

base rate

borrow rate

\textsf{borrow rate}=\textsf{base rate}+\textsf{slope coefficient}\times\textsf{\% borrowed}
\textsf{supply rate}=\textsf{borrow rate}\times\textsf{\% (borrowed}-\textsf{reserve)}

compound Finance

  • Compound escrows tokens
  • must account for % ownership
  • \(\to\) tokenized user share
  • \(\to\) use the c-token
    • cDAI
    • cETH
  • minted/burned based on funds added/removed from underlying
  • seamless movement of these shares (reduced transactions costs!)

Tracking ownership

common theme in DeFi: jumping between dApps

  • Assume 
    • 1 ETH = 200 DAI
    • supplied 100 ETH in Compound
    • borrowed 10,000 DAI to lever up and purchase an additional 50 ETH
    • \(\to\) also supplied to Compound
    • Borrow interest rate in DAI
      • Compound: 15%
      • Aave: 5%.
  • ​Can you refinance your borrowing?

dapp-linking

Defi is like real "high" finance

Source: Harvey, Ramachandran, and Santoro (2020)

Application: Innovative Financing Tools

Cumulative Token sales since Jan 2016

Data: coinschedule

$25B total

$21B in 2018

for comparison: total size of

  • Toronto Stock Exchange: $2,200B

  • Toronto Venture Exchange: $41B

Tokens as Payments: a New Financing Tool?

Preliminary (academic) Research insights: What can (utility) tokens finance that traditional securities cannot? 

can finance projects that otherwise would find no debt or equity funding

enable network effects and new business opportunities

allows entrepreneurs to extract more surplus

can finance projects that otherwise would find no debt or equity funding

Blockchain Tech Stack: Tokens vs Cryptocurrencies


Infrastructure
 

reward
and
internal currency

usage fee
or
incentive


usage fee
 


Service
 


Application
 

Tech Stack Layer

Role of Token

cryptocurrency

Token

Token

Some spectacular returns

Source: Tokendata

The Ugly Truth: Scams

Source: Satis Group LLC

The Ugly Truth: Failure Rate

Source: Morgan Stanley (Nov 2018) “Update: Bitcoin, Cryptocurrencies and Blockchain”

Source: Tokendata

Also: a real horrow show

Key: you cannot collect money from just anybody!

The Ugly Truth: Many tokens are securities

Blockchain Tokens and Coins as Payments: a New Financing Tool?

  • Since Jan 2016: $31 billion for 1,700+ early start-ups
  • TMX Venture (successful, since 1999, for junior firms)
    • $42 billion market cap (since 1999!)
    • In 2018: 52 IPOs, $2.2 billion
  • Private markets in Ontario: raised $70 billion in 2017 

Lessons?

  • Significant interest in FinTech
  • Appetite by retail investors for risk/early-stage firms
  • Possible to raise funds directly from investors
  • VCs and intermediaries do provide a service
    • money does not substitute for business plan/advice
    • "wisdom of the crowd" is non-existent (?)

Key Challenges for the blockchain Community for 2019

Technology

Legal/Regulation

Economic functions

What is the right governance structure for systems?

How should we design tokens as contracts?

How do platform payment means interact with outside world

How much do we have to pay operators to maintain the chain?

Key Economic Questions for Blockchain Design

Key Technology Questions for  Blockchain Design

interoperability

cybersecurity and privacy

functionality

scalability

smart contract features and verification

space constraints

Solution projects to Key Technology Questions

interoperability

scalability

space constraints:

Does the law have to change to accommodate new tech? If so, how? What's dated, what's not?

Key Legal Questions for  Blockchain Design

Legal setup of a platform: what rules can, should, and must a platform establish? What regulations are necessary?

How can token design and the law be married?

Questions for the future

What is the economic impact of "tokenizing everything"?

How will it affect investments and investment banking?

Which business opportunities will it enable?

What do tokens and "alternative money" mean for payments?

Related Development: Libra

The most controversial entrant of them all ...

Partnerships

"new financial infrastructure"

My prediction: Libra Network will go live in the Spring of 2021

The One the world is talking about

What is Libra and how does it work? 

issued by a consortium of firms (e.g., Facebook, Mastercard) and not for profits (Creative Destruction Lab)

each coin will be backed by a basket of SIX fiat currencies

idea is conceptually similar to IMF Special Drawing Rights (pegged to USD, EUR, YEN, GBP, YUAN)

Survey Info on Libra

Would you use Libra/Money issue by Tech Firm?

If we ask explicitly for Facebook vs Tech Firm

Scaled to yes/maybe/no. About 20% say: "Need more info"

Will people use Libra?

Source: Will Libra Succeed? Results of a Global Randomized Survey Experiment; by Danielle Goldfarb and yours truly

     

 

Key question: what business opportunities will arise?

Why does BigTech enter the finance game?

They have ZERO interest in becoming a financial institution/bank

\(\rightarrow\) no expertise

\(\rightarrow\) competitive market

\(\rightarrow\) one of the most regulated business environments

My take

They are trying to deal with frictions that impede their business

They aim to collect data which will vastly improve their business

Related Development: Central Bank-Issued Digital Currencies

Newest Developments: CBDC

CBDC = Central Bank issued Digital Currency

not a cryptocurrency \(\to\) just a "normal" liability on central banks balance sheets

  • BIS Jan 2019: "Proceed with caution"

  • BIS Jan 2020: "Impeding Arrival"

Is it coming?

players (inter alia) 

  • China: in test mode; provinces prep own initiatives, coming next year

  • U.S.: has bigger problems and is always a last mover

  • UK: preparing

  • Canada: contingency planning (it'll happen within two years)

players (inter alia) 

What's the problem and what should a CBDC look like?

current problems

future concerns

crib sheet

too slow

too expensive

not flexible

lack of competition

disintermediation
by new players (Libra)

data harvesting
with no way out

ineffectiveness
of monetary policy

demise of the Loonie

two-tiered world in Canada

fast

cheap

flexible/programmable

universally accessible

 

Possible CBDC architectures

Source: BIS Quarterly Review, March 2020

What is "disintermediation"?

two types of money

government:

  • reserves

  • cash

commercial

  • each commercial loan \(\to\) deposit

cash withdrawl

convert commercial money into government money

lowers bank's balance sheet

disintermediation \(=\)

Would a CBDC destabilize the banks?

BoC analysis (August 2020):

  • [banks] are well-positioned to absorb potential temporary negative effects on profitability and liquidity
  • Banks[can] absorb the shock under plausible adoption scenarios.
  • [No] threat to the stability of the financial system or to banks’ competitiveness in terms of ROE.
  • banks will maintain healthy liquidity levels, and liquidity could become a concern only in the most extreme scenario.

Conclusion and final thoughts

blockchain is a transformative technology, but won't be used in practice overnight

many conceptual and technological challenges remain, but there are already various areas of application

legal, regulatory, and competitive changes are needed and then the opportunities are endless ...

it will open up the banking world further, foster international competition, and change how we pay and exchange value

My view: business development will happen in private/semi-public space; strong increase in recent activity; no more testing but re-engineering of processes.

@financeUTM

andreas.park@rotman.utoronto.ca

slides.com/ap248

sites.google.com/site/parkandreas/

youtube.com/user/andreaspark2812/

Intro to Blockchain and Decentralized Finance for MBAs

By Andreas Park

Intro to Blockchain and Decentralized Finance for MBAs

This is the slide deck that I use for a quick introduction in John Hull's course RSM2321 (Financial Innovation).

  • 923