Intro to FinTech

MBA F741

Blockchain Part 2

Instructor: Katya Malinova

Lectures 3/4

This slide deck was developed in collaboration with Andreas Park (University of Toronto)

Questions we wish to address today

How does blockchain apply to finance?

How does blockchain work?

Some facts about "tokens"

Blockchain?

  • Social Media
  • eCommerce
  • Uber, AirBnB
  • ......
  • ?????

Three Fallacies for Crypto Economics

crypto assets = traditional equities

crypto trading = traditional trading

crypto entities = traditional firms

Crypto

Exchange

Traditional

Internalizer

Wholeseller

Darkpool

Investor

Venue

Broker

Settlement

Investor

Venue

Settlement

On chain

Concerns

arbitrage is either not possible  or requires large capital commitment => expensive

exchanges = brokers? => single point of failure

decentralized: totally anonymous => easy price manipulation (e.g. wash trades)

Spirit of Blockchain: Fully decentralized

... 300 lines of code ...

standard trading rules practically impossible to enforce

Crypto exchanges are a security risk

August 2016

Crypto exchanges are a security risk

https://www.forbes.com/sites/jasonbrett/2019/12/19/congress-considers-federal-crypto-regulators-in-new-cryptocurrency-act-of-2020/#7ddcdfd65fcd

Transactions costs

Source: Interactive Brokers

Broker
Level

crypto exchange fees for $1,000,000 market order

account

wire/in-out

  • 25 bps = 2,500 trading fee

  • in/out fee 0.1% - 3%

  • mining fee ($0.25)

$1,000,000 market order

Summary: Crypto Trading

exchanges = brokers

exchanges = security risk

high exchange fees

tokens: large spreads

very active market

trading rules? => info(price)

decentralized trading possible and happening

Cumulative sales since Jan 2016

Data: coinschedule

$31.7B total

$21.6B in 2018

for comparison: total size of

  • Toronto Stock Exchange: $3,200B

  • Toronto Venture Exchange: $60B

Why bother with Tokenomics?

$3.2B in 2019

Tokens

Data: coinschedule

$21.6B in 2018

$3.2B in 2019

Canadian IPOs

$5B in 2017

$2.2B in 2018

$2.3B in 2019

Some spectacular returns

Source: Tokendata

Why bother with Tokenomics?

Returns:11x - 97.97x

BETSY STARK, ABC News: Some say the [technology] is so
revolutionary that the usual roles for valuing an asset, such as
revenues and earnings, no longer apply.

Source: PBS Documentary DotCon

Why bother with Tokenomics?

MIKE LEE, Venture Capitalist: The conclusion we came to,
rightly or wrongly so, was that the [technology] was going to
fundamentally change the way business was run across the
board, in every sector of business.

technology = Internet

time: 1999-2000 

When First Mortgage
Network changed the name to Mortgage.com and went on the Net, the
estimated market value jumped from $100 to $800 million.

Source: Tokendata

Why bother with Tokenomics?

Some spectacular losses

$1.984 -> $0.001 => 0.00x

Some stats caught on Twitter

Top 10 (?) ICOs that are public

Time for the Ugly?

The Ugly Truth

Source: Satis Group LLC, July 2018

Scams: 81%

Successful: 3.8%

The Ugly Truth: Failure Rate

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

Token Categories (Swiss Regulators):

  • debt & equity 
  • Tokens for blockchain-based trading of physical assets

Payment

Asset

Utility

  • digital access to an application or service on blockchain-based infrastructure.
  • cryptocurrencies
  • no claims on issuer

Curious case of a utility token: KIN

  • Also: from Raquel Jackson on Medium
    • "Everything KIK wants to do can be accomplished with fiat currency or a simple payment integration with their app."

Are tokens/coins securities?

“I believe every ICO I’ve seen is a security. … ICOs that are securities offerings, we should regulate them like we regulate securities offerings. End of story.”

Jay Clayton, Chairman, U.S. Securities and Exchange Commission, testimony before the United States Senate, February 6, 2018

“Distributed ledger technology has incredible promise for the financial industry.

Just because it's a security today doesn't mean it'll be a security tomorrow, and vice-versa.

Jay Clayton, April 05, 2018 (Princeton University)

Key: you cannot collect money from just anybody!

What's a security?

  • Not necessarily .... 
  • US and Canada have provisions for private firms
    • Reg D (USA => SAFT-compliant)
    • Exempt offering memorandum (Canada)
  • token contract can restrict who can own and transfer the token!
    • => maintain list of accredited investor IDs
    • => restrict issuance and transfers to "suitable" investors
  • Simple Agreement for Future Tokens (“SAFT”) 

If it's a security, is that it?

What is it that an ICO can do that you cannot get elsewhere?

Crowdfunding through coins/tokens

Create new assets

  • Example: revenue-based tokens (as opposed to "profit-based").
    • Revenue-based contracts offer different incentives relative to traditional debt and equity (several research papers on this, incl. my own with Andreas Park)
    • No need to have "one firm-one token" -- can issue project-based tokens.

Tokenize everything?

=> More efficient market?

Small aside: public US markets are ailing

 "Eclipse of the Public Corporation or Eclipse of the Public Markets?" by  Craig Doidge, Kathleen M. Kahle, G. Andrew Karolyi, and René M. Stulz

As an aside: Private Markets in Canada

IPOs

$5B in 2017

$2.2B in 2018

  • Lots of interest in FinTech
  • Appetite by retail investors for risk/early stage firms
  • Possible to raise funds directly from investors

 Takeaways?

  • VCs and intermediaries do provide service
    • "wisdom of the crowd" is non-existent (?)
    • money does not substitute for business plan/advice

Time for a Demonstration

  • Last time we discussed blockchain at a very high level.
  • Let's return, get a few terms in ("hashing", "nonce", etc.) and see how the blockchain is put together.
  • This demonstration uses Anders Brownworth's excellent demos at
    • https://anders.com/blockchain/hash.html
    • https://andersbrownworth.com/blockchain/public-private-keys/blockchain
    • Go to: https://anders.com/blockchain/  for his videos

Summary of the Demonstration

  1. A block is in essence just text
  2. A Hash is
    • a function that produces a collection of letters and numbers
    • that is deterministic (same text => same hash)
    • no mechanism to invert (you can guess, but there is no inverse function)
  3. A nonce is
    • a special piece of text that 
    • combined with the hash of the rest of block produces a new hash that starts with 4 zeros (in the demo)
  4. Blocks are linked
    • by including a hash of the last block in the header of the new block
  5. The block-link provides security because
    1. tampering with the past alters the hashes of past info
    2. would be inconsistent with current state (expressed as a hash)

Hashing

  1. What is hashing?
  2. Why do we use hashing?

Definition

  • M: a message/text of arbitrary length
  • h(M): a fixed length output or "digest"

What is cryptographic hashing?

What is cryptographic hashing?

Properties

  1. Deterministic (i.e., not random)
    • the same message always generates the same digest
  2. Fast
    • you don't need much time/many computing cycles to compute a hash
  3. "unpredictable"
    • if two messages M and M' are similar, their digests should look very different
  4. not invertible
    • there is no inverse function, i.e., there is no functional form h^-1(M) such that one can infer M from h(M),  nor can an attacker find M from h(M) in "normal" (polynomial) time.
  5. Collusion resistant
    • an attacker cannot find two messages M and M' such that h(M)=h(M') in "normal" time.

What hashing functions are there?

  • Many!
  • MD5
  • SHA1 (better than MD5)
  • SHA256 (better than MD5)
    • output of 256 bits; 4 bit= 1 characters => 64 characters
    • developed by the NSA
    • Code, e.g., https://www.movable-type.co.uk/scripts/sha256.html
  • SHA512
  • RIPEMD-160 (for "160 bit output)

What hashing functions are used with blockchains?

  • MD5
    • 6b3dbad99021ee09d3671128d251bf30
  • SHA1
    • 9AC12834678BC144ED7FD95136603AE60A73E524
  • SHA256 
    • ABED62C25A567F39E344A1DC55D13DF4183BEAC95A4CBE3AF5042D96B81D1549

Examples of "katya"

  • MD5
    • c9ce9f53b20f9e9edd3a8460c4db5502
  • SHA1
    • 4D83C1351202EE8B0DC33AEFC2E855D9EF063AB9
  • SHA256 
    • 7DDC376A90AF1AC11015CE8F24DB97CF93D20CFFA5119B5FE492C8A4F6CD2C04

Examples of "kAtYa"

What is cryptographic hashing?

Simple Application

  • Databases should not store user passwords and usernames in plain text
    • => attacker could immediately impersonate every user
  • Store as a hash: attacker cannot (easily) invert the username & password

What hashing functions are used with blockchains?

Problem: Hashes can be cracked!

cracked by "CrackStation"

**The "red" line is SHA256 hash of mAlInOvA (not cracked)

Why are hashing functions used with blockchains?

  1. efficient way to represent data
    • always same-length output
    • => good convention
  2. small changes to data trigger large changes in hash
    • (recall the demonstration)
    • => easy to check consistency 
  3. they work as "pointers"
    • each block contains a hash of the past block
    • this hash is a pointer
    • pointers make searches easy
  4. Hashes of hashes are used to simplify data storage
    • the process of hashing hashes repeatedly creates the "Merkle Tree" 

Consensus Protocol

Blockchain is akin a distributed database

  • Public-private key signatures ensure that (in principle) no one can impersonate someone else and steal money
  • Hashing links information and ensures that the history can't be changed
  • But how does the network know what to include?
  • And what happens when they disagree?

Proof of Work Protocol

The role of the nonce

  1. Looking for leading zeros is a coordination device
    • If you see such a message update what you want to do.
  2. Mining is difficult and time consuming
    • a forger needs to work hard to change the message
  3. Many miners:
    • strength in numbers: a forger needs to win over many
    • unless there are too many forgers (there is a math result here), the network can be trusted 

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

Economic Analysis, Part I

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

Importance of Economics, Part 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

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: 115 million tera-hashes per second (blockchain.info)

Back of the envelope calculation

  • hashrate: 115\(\times 10^6 \times 10^{12}\) H/s
  • GPU cost estimate per 1 MH/s is $10-20, depending on the graphic cars you buy.
    • "Best" GPUs have 25-45 MH/s & cost on the order of $600 each.
  • =>GPU cost of \(\approx \$115\times 10^{12}\)

Mining Concentration (Bitcoin)

Source: blockchain.info 30/01/2020 

Source: etherscan.io 30/01/2020

Mining Concentration (Ether)

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:  needy to make sure that the rewards are sufficiently high relative to the reward from an attack

  • Implications: blockchain may work well for small, retail-size transfers but conduct large-value transfers off-chain
  • Want to learn more? See:
    •  Chiu and Koeppl (2018) "Blockchain-based settlement for asset trading" (Review of Financial Studies) or
    • Budish (2018) "The economic limits of Bitcoin and the Blockchain" (University of Chicago working paper)

Key Challenges for Blockchain

legal

technological

economic

Key Technology Questions for  Blockchain Design

interoperability

cybersecurity and privacy

functionality

scalability

smart contract features and verification

(probabilistic) finality

Key Legal Questions for Blockchain Design

  • legal governance

    • what rules can and should a platform develop

  • legal contract/token design

  • code/contract audit?

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

  • Ensure that the law doesn't impede the tech?

Key Economic Questions for Blockchain Design

  • system governance

    • political economy

  • contract/token design

    • corporate finance

  • How does platform payment interactions with outside world

    • open-economy macro

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

    • mechanism design

Private/Permissioned Blockchains

  • public:
    • no restrictions on reading blockchain data (which still may be encrypted) and submitting transactions for inclusion into the blockchain.
  • private
    • direct access to blockchain data and submitting transactions is limited to a predefined list of entities.
  • permissionless
    • no restrictions on identities of transaction processors (i.e., users that are eligible to create blocks of transactions).
  • permissioned
    • transaction processing is performed by a predefined list of subjects with known identities.

Terminology

Why private/permissioned?

  1. KYC = Know Your Customer
    • private allows operator to check who is using the chain
    • can restrict access to, e.g., investments when not suitable
  2. AML = anti money laundering
    • crypto-currency transactions can be used for money laundering
    • can be prevented when you know users
  3. No need for cryptocurrency
    • private blockchains can operate with monetary coinbase rewards
  4. Scalability/no need for proof-of-work
    • validation roles can be assigned to trusted parties => higher throughput
  5. Data protection
    • higher control over what is shared and how interactions are organized

Ethereum Enterprise Alliance

Common Idea:

  • build private blockchains on top of Ethereum
  • use open source tools

Advantages

  • preserve interoperability of systems
  • compatibility and free development
  • best of two worlds? 
  • 150 companies are members of EEA
  • US$400M invested in VC funding (CBInsight)
  • US$900M from tokens since Nov 2016 (Smith and Crown).

Below are examples of prominent private blockchain initiatives

Quorum (by J.P. Morgan)

  • Idea: a permissioned version of Ethereum
    • known nodes
    • private interactions
    • trustless
  • Design:
    • privacy layer for smart contracts
    • contracts stored locally
    • hashes of encrypted contracts on public chain
  • Key feature: Zero Knowledge tech

AION

  • Allow creation of custom blockchains that connect via Aion network
    • => customize governance, issuance, and participants.
  • Provide federated inter-chain communication of data and value between all Aion network spokes.

Features

  • high-performance virtual machine (VM) (for smart contracts)
  • scalable database

Premise

  • In the future there will be many blockchains.
  • Enterprises will operate various blockchains in-house
  • mined chains are not suitable for enterprises because they are dependent on entities (miners) outside their control.
  • Aion will combine them and enable interoperability

R3 Corda

  • Similar idea as most others:
    • keep transaction details locally
    • rely on direct interactions with record keeping

Key feature

  • digital notaries that settle disputes by reviewing signed transaction data

 

  • translation of the current world into the digital world?
  • maintains position or rent-seeking institutions?

Raiden Network

Description Idea:

  • Raiden Network is an off-chain scaling solution for performing ERC20-compliant token transfers
  • no need for global consensus
  • How? This is achieved using digitally signed and hash-locked transfers, called balance proofs, fully collateralized by previously setup on-chain deposits.
  • = "payment channel technology"

Basic idea

  • two parties who plan a regular interaction put money in an Ethereum escrow account
  • they interact and final settlement occurs on the Ethereum blockchain
  • they maintain a hash-secured record of the interactions (both sides sign)
  • can be extended to multi-party interactions/networks of interacters

A Tale of Railroads

US Standard railroad gauge (distance between the rails) is 4 feet, 8 1/2 inches

Because that's the way they built them in England

that's the gauge used for pre-railroad tramways

the same jigs and tools that they used for building wagons, which used that wheel spacing

other wheels would break on  old roads. Because that's the spacing of the old wheel ruts

The first long distance roads in Europe were built by Imperial Rome

Blockchain Technology and Activity Layers

Infrastructure

Services

Network

Protocol

Application

dApps, application hosting, programming languages, browsers

oracles, wallets, smart contracts, digiIDs

consensus protocols,
sidechains

block delivery,
peer-to-peer

mining,
nodes