Blockchain Technolgy & Decentralized Finance Part 2

Instructors:          Andreas Park & Zissis Poulos
 

 


Rotman – MBA

Challenges

Proof of Work uses unsustainable amounts of energy

Source: Cambridge Bitcoin Energy Consumption Index https://cbeci.org/

Ethereum is full and using it is expensive

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

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

going back to Budish (2018)

Selfish Mining Attack in CONFLUX

Serial Chain

Conflux Chain

In Conflux, withholding a block leads to greater anti-cone size

Intuition: Anticone = blocks created without properly referencing others blocks in its vicinity

Selfish Mining/Double-Spent Attack in CONFLUX

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
  • secondary PoS chain in operation
  • merger of chains expected in late 2021

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

Miner extractable value and High Priority Gas Auctions

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

Obvious application: trading

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

Evolution

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

Private Sector Solutions

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

Enter BigTech

cellphone data from 2018 (NewZoo), inflation from 2020 (World Population Review)

Evolution

DIEM = "new financial infrastructure"

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

Lay the groundwork for the next step of the digital evolution: the "Metaverse"

5-minute version:
Finance, Metaverse, and Non-Fungible Tokens

metaverse =
marriage of the digital and physical world

sale price: $69,000,000

Decentraland: a digital world owned by its users

What is an NFT?

  • "unique" token
  • digital ownership certificate
  • ERC-721 standard (also ERC-1155)

Why bother with an NFT?

  • difficult legal question: what do you actually own?
  • allows royalty payments
  • could be used in other tools (e-book readers)
  • NFTs can be tokenized (partial ownership)
  • used as collateral in DeFi

Metaverse application

  • ownership in the digital world
  • payment for digital experiences

Related Development: Central Bank-Issued Digital Currencies

Evolution

CBDCs

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) 

Source: CBDCTracker.org

Risks and open problems

  • many apps are still experimental, many kinks need ironing, and tech progress is needed
     
  • smart contract risk: 
    • detecting problems with code
    • detecting problems with economic incentives
    • foreseeing unforeseen contract contingencies
    • contract contagion risks
       
  • governance of decentralized organizations
     
  • role of regulators

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

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?

How does it all work and why?

How do we establish trust in commerce?

trustworthy People

long-term Relationships

reputation

contract law

institutions

What's needed for trust in  anonymous deals?

Authority

Execution

Continuity

A deep dive into the "How?"

Cryptography: only Sue can spend her money

Authority

Execution

Problem: double-spending

How can we trust that

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

Execution

Security

B3

B1

B2

B4

B5

Contains transaction from Sue to Bob

Question: Can Sue rewrite history?

immutability

No! Because: Economics!

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

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 Sue to Bob

Sue wants to undo the transaction by rewriting history with B6

Sue's objective

  • Wants to undo this trade and cheat Bob 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: 150million tera-hashes per second (blockchain.info)

Back of the envelope calculation

  • hashrate: 150,000,000 TH/s
  • best hardware (ASIC) has 110TH/s per unit
  • => need 150,000,000 / 110 x 0.5 = 682,000 ASICs
  • 1 ASIC costs around $10,000 (conservative)
  • =>Cost = $6,820,000,000
  • But it doesn't end here...Power consumption at 4.5GW
  • => enough to power 1M homes in the US

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 do you agree though that something happened, or, what is consensus?

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

Time for a blockchain demo...

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

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/

Topic 2: Execution, Immutability, and BFT

By Andreas Park

Topic 2: Execution, Immutability, and BFT

This is the slide deck that I use for a quick introduction to the Decentralized Finance class.

  • 769