Blockchain and Decentralized Finance:
A 2024 Primer

 

Presenter:           Andreas Park
 

 

Agenda

  1. Background:
    • Vocabulary & Evolution
    • What's DeFi and what's different to TradFi?
    • Explain some key DeFi applications
  2.  Understanding tokens
    • asset-linked tokenization
    • stablecoins
    • crypto-tokens and their role
  3. Getting your hands dirty!

What is a Cryptocurrency?

Conceptually, what is a blockchain?

What our financial infrastructure looks like

payments

stocks, bonds, and options

swaps, CDS, MBS, CDOs

insurance contracts

payments

stocks, bonds, and options

swaps, CDS, MBS, CDOs

insurance contracts

\(\Rightarrow\) a single common resource

  • easy value management
  • straightforward transfers & ownership accounting
  • new types of contracts and usage of assets
  • \(\ldots\)

What would the most efficient financial infrastructure look like?

\(\approx\) 50% is bitcoin (but used to be 70%)

How do you own a blockchain asset? Addresses, Accounts, Wallets, and Public/Private Keys

Smart contract accounts

  • controlled by code
  • decentralized applications
  • tokens

Externally owned accounts

controlled by private keys

private
key

public
key

seed phrase

public
address

wallet = software to keep and use private keys

  1. Self-custody of assets
  2. Access to financial infrastructure
  3. Value management layer = common resource
  4. Platform approach to commerce

What makes blockchain-based finance different from TradFi?

Decentralized Trading

Trading Infrastructure

payments network

Stock Exchange

Clearing House

custodian

custodian

 beneficial ownership record

seller

buyer

Broker

Broker

Application: decentralized trading with automated market makers

Source of savings: 

  • better risk sharing among liquidity providers
  • better use of capital

Possible transaction cost savings when applied to equity trading: \(\approx\) 30%

Source: "Learning from DeFi: Would Automated Market Makers Improve Equity Trading?" working paper, Malinova & Park 2023

Let's look at some stylized facts

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

How does this look in practice?

Broker

Exchange

Internalizer

Wholeseller

Darkpool

Venue

Settlement

Pool-based lending principles

borrow

provide collateral

Application: Pool-based borrowing and lending

Application: Decentralized Borrowing & Lending

Obvious Smart Contract Application: Automate Investment  Strategies

idea: create new mutual fund like asset 

"yield aggregator:" push capital where rate of return is highest

Flash Loans

5. repay DAI

 for        loan
with health factor <1

liquidation
opportunity

1. flash-borrow DAI

2. repay loan
with DAI

3. claim
collateral ETH

4. convert ETH to DAI

What roles do tokens play?

  • People clearly treat tokens and cryptocurrencies as objects of speculation
  • data: authors calculations from TAQ (up to March 2023)
  • crypto volume worldwide is larger by factor >4
  1. Self-custody of assets
  2. Access to financial infrastructure
  3. Value management layer = common resource
  4. Platform approach to commerce

What roles do tokens play?

recall the differences

\(\to\) key feature: no necessary intermediaries

Application 1: decentralized trading with automated market makers

Problems:

  • How to get liquidity?
  • How do you attract traders?

lesser problem because

  • tokens trade elsewhere
  • arbitrage creates activity

Common solution: create a reward token! Here's how this works

Step 4: users receive a reward token based on the time that they lock up the "receipt" token

Step 3: users lock up the "receipt" token in a smart contract

Step 2: users contribute liquidity and get a "receipt" token

Step 1: create reward tokens and deposit into a smart contract

borrow

provide collateral

Application: Pool-based borrowing and lending

Application 2: decentralized Borrowing and Lending

Same problems as with trading:

  • How to get liquidity?
  • How do you attract borrowers?

But: in contrast to trading, here you need both!

liquidity \(\nearrow\)

volume \(\nearrow\)

protocol fees \(\nearrow\)

token value \(\nearrow\)

Platform economics is tricky:

  • What's the product?
  • How do you get it started?
  • How do you get people to contribute?
  • How do you earn money?

Without intermediaries:
platform economics!

incentives for both?

What value do these tokens have?

  1. Functionality:
    • fee levels for AMMs
    • decision to deploy on other chains
    • key threshold values for lending
  2. Monetary value
    • implicit claims on "protocol" income
    • implicit claim on reserve pools

Vampire Attacks and Other Shenanigans

Source: https://finematics.com/vampire-attack-sushiswap-explained/

  • Vampire Attack:
    • syphon liquidity from a different protocol
    • using your own token!!!
  • Mechanism: 
    • deposit in UniSwap, receive LP token
    • deposit LP token to Sushi, receive rewards
    • liquidate LP token and migrate original liquidity to Sushi = "suck out the blood from UniSwap"

another common trick:

  • pump the price of the reward tokens
  • \(\Rightarrow\) "yields" often exceed 500%

Application 3: Oracle Nodes Ecosystems

Chainlink

https://market.link/overview

  • Function 1: Payment
    • payment from decentralized applications for oracle function
  • Function 2: enforcement of uptime and honesty
    • providers must stake token to participate
    • deposit stakes can be slashed
    • \(\to\) deposit signal of commitment

A Taxonomy of Tokens

  • tokens are a re-imagination of value, ownership, use, rewards
     
  • tokens live on a single infrastructure and can interact with other tokens
     
  • tokens are immediately transferable  & immediately usable in DeFi
     
  • token can be programmed to have many features and have many different uses

  • tokens can assign ownership to "things" that could not be owned before
     
  • tokens are often important for the functioning and incentives of platforms

What's a crypto-token and what's special about it?

Tokens by use

payments:

  • you use them strictly to pay for something
  • example: native cryptocurrencies


     

utility

  • you use them to access a specific service of function
  • example: filecoin


     

stablecoins

  • digital representation of fiat money
  • centralized/ decentralized
  • examples: DAI, USDC, USDT
     

governance

  • voting rights to determine parameters of a project
  • example: UNI, Compound etc

     

asset

  • representation of ownership
  • pool claims, digital items
  • example: receipts from UniSwap, Compound, NFTs

derivatives

  • tokens based on other tokens & functions
  • Example: tokensets


     

Disclaimer: this list in non-exhaustive, new ideas and concepts come up every day!

Asset Tokenization or
"The Creation of Asset-Linked Tokens"

Tokenization is coming

  • this list contains mostly "neglected" assets
  • what about very "busy" assets aka equities
    • what challenges apply to tokenization?
    • what problem are you trying to solve vis-a-vis traditional markets?
    • what do we have to worry about with a defi implementation?
    • what are the opportunities?

Tokenization of stocks is nothing new: American Depository Receipts

foreign investor/
issuer

domestic bank with foreign representation 

ADR issuing bank handles

  • shareholder communications
  • dividend payments
  • other recording-keeping

Is this a workable model for blockchain- tokenization of existing assets?

foreign representation of domestic bank/ its custodian

domestic depository bank

S.E.C.

registration with form F-4

domestic broker

issues and cancels ADRs

domestic investor

lets investors own and trade ADRs

domestic
market

deposits shares

Blockchain Tokenization has many options

existing investor/
issuer

token issuance platform

 investor
wallet

instruct to create tokens

deposits shares

custodian bank

deposits shares

creates tokens and sells to investors

centralized or decentralized
market

S.E.C.

registration

Tokenization & DeFi Solutions

  • stock=ownership rights
    • rights to dividends
    • rights to shareholder votes
  • How can you retain them in a world where
    • tokens can be held indirectly by smart contracts
    • ownership attribution is pseudonymous
  • Li, Park, Singh, Veneris (2024)
    • off-chain registry of accounts
    • on-chain data collection
    • rights redemption contract
  • some of this may require legal and regulatory changes

DEX Accounting is complicated

  • issuer whitelist must include NFT position manager account for CL DEX
  •  \(+\) factory contract (to lookup pools by  pairs & fee).
  • knowledge of the pool’s invariant functions
  • shareholders must report corresponding tokenIds of any CL pool where they hold positions

Some solutions exist

  • automated dividend distribution 
    • will likely exceed gas limits
  • homemade dividends (=buy back schemes)
    • can't handle other holding rights
  • Zhitomirskiy, Schmid, and Walther (Dec 2023)
    • can't handle other rights and is not defi-compatible

Tokenization FAQs

  • Can we do KYC and restrict transfers?
    • Yes one can create whitelists.
    • But why? That kills all advantages of defi
  • Can we have tradfi involved, defi & KYC?
    • Yes. Can use a rollup.
    • Case: tokenized gold
      • issued on rollup
      • allows defi applications and free use within rollup
      • asset cannot "leave" the rollup

What is a stablecoin?

digital representation of a unit of a fiat currency on a blockchain

Collateral Backed Stablecoins: USDT & USDC

\(\Rightarrow\) 5% over-collateralized

primary market acces: 6 entities only

Collateral Backed Stablecoins: USDT & USDC

  • "Cash at Reserve Banks" once was SVB
  • Reserve fund = short-date US treasuries & overnight repos

primary market acces: 560+ entities

pulled from Nick Carter's talk on "Will stablecoins serve or subvert U.S. interests?"

What makes a Stablecoin stable?

USD-USDT (6 months)

\(\Rightarrow\) need a primary/reference market mechanism to allow for forces of arbitrage to align prices

  • stablecoins are issued 
    • by a single entity or
    • a blockchain-based algorithm (smart contract)
  • they trade in a secondary market
    • on crypto-exchanges against fiat
    • on crypto-exchanges against cryptos
    • on-chain against other tokens
  • \(\Rightarrow\) stablecoin price fluctuates

Arbitrage when price(stablecoin)>$1

collateralized stablecoin

arbitrageur

issuer/ primary market

secondary market

collateralized stablecoin

arbitrageur

Arbitrage when price(stablecoin)<$1

issuer/ primary market

secondary market

Stablecoin use cases

What do central bankers think about stablecoins?

BIS Survey of Central Banks:

Source: On-chain Foreign Exchange and Cross-border Payments by Austin Adams, Mary-Catherine Lader, Gordon Liao, David Puth, Xin Wan (2023) [team from UniSwap Labs]

DeFi fees:

  • fiat to crypto on ramp: 0%-1%
  • exchange fees 1-5bps
  • network fee: $0.001-5$
  • off-ramp fee: 0%-1%
  • total: from close to 0 to 2%+$5

Run Risks

Stablecoin Run Risks

  • Scenario:
    • concern about stablecoin backing
      \(\to\) mass-redemptions
    • stablecoin issuer liquidates backing assets
    • liquidity crisis in backing assets
    • \(\to\) contagion to traditional finance
  • Secondary effects
    • disruptions would spread across applications, wallets, and functions
    • \(\to\) stablecoin failure would disrupt every aspect of digital commerce
  • Is this plausibe? The Case of USDC
    • backing assets are in the most liquid assets and banks
    • limited number of arbitrageurs allows side deals
    • but: scale is still very small

The "U.S. President's Working Group on Stablecoins" would essentially make issuers narrow banks (deposits largely backed only by reserves)

Money Laundering and Crime

  1. Does it provide scale?
  2. Does it enable new criminal activity?
  3. Is there substitution from super-visable means? Is it easier and safer to use for criminals than traditional means?

What's special about crypto-crime?

Banned addresses (usually by OFAC order)

criminals don't use USDC - why are we so worried?

Chainalysis Crime Report

extra info:

  • 2019:  PlusToken Ponzi scheme 
  • numbers depend on known addresses, e.g., 2021 report listed ~.3% for 2020 and upped to .65 now

The Common View

The Reality

  • no evidence that Hamas has received significant volumes of crypto donations.
     
  • full understanding of blockchain analysis and context is needed
     
  • Elliptic: Wall Street Journal [must] correct misinterpretations of the level of crypto fundraising by Hamas.
     
  • in discussions with Senator Warren to ensure parties have a proper appreciation of the complexities and nuances of analyzing these wallets.

 

"The approximate amounts in USD received by wallets on the TRON blockchain associated with terrorist entities:

  1. Hamas: $2.3M
  2. DUBAI Co. for Exchange: $29M
  3. Palestinian Islamic Jihad: $87M
  4. Hezbollah: $2.364B"

Source: https://inca.digital/intelligence/crypto-intelligence-alert-tron/inca_digital_crypto_intelligence_alert-TRON.pdf

Reality Part 2: The Stinky Stuff

Central Bank-Issued Digital Currencies

Evolution

2008

2014/5

2019

2020

Possible CBDC architectures

Source: BIS Quarterly Review, March 2020

How will you introduce and run it? Concerns

  • first CBDC (Finland, early 90s) failed for the tiniest of reasons
  • you have only one shot to get it right
  • are you prepared to be customer-facing (in Canada: 40M+)?
  • can you do it?
  • what more than money are you offering?
  • you bring the government very close to people with AML supervision

go alone
and do self

partner with banks \(=\)
use them for distribution and operation

  • why would they support a competitor to their highly profitable payments?
  • what does a CBDC do that fast payments cannot? (case may be different in Europe)

The Year is 2008: what the Toronto a la cart program teaches us about CBDCs

Cautionary tales for central bank innovation

  • Finland:
    • Avant card failed
  • China:
    • people are unimpressed with the e-Yuan
    • trust AliPay/WeChatPay vs. CCP
  • Mexico:
    • QR code pay uptake <5%
      (not CBDC)

what people want

what we got

  • a program designed by city departments
  • no regard for business owners or customers
  • burdensome regulation
  • a truck ("cart") designed by committee that did not work
  • program essentially died after 2 years

Features of Digital Money

  • instantaneous 24/7 payments
     
  • digital = borderless
     
  • money that is compatible with digital applications, digital finance, internet of things etc
     
  • privacy protection
     
  • peer to peer transfers
     
  • transfers of money without the involvement of a commercially interested third party
     
  • non-fee digital payments

fast money
 

CBDC run by
Central Bank
 

CBDC on new communually run system

bank-issued stablecoin on public blockchain
 


What?
 
24/7 instantaneous
borderless
programmable
privacy
p2p
no commercial 3rd party
nominal fee

Taking a step back

  • balance sheet: $3T
  • cash: $>60B

Option 1a (existing cash):

  • lock up cash in an escrow
  • \(\to\) stablecoin is claim on cash
     

Option 1b (convert cash to digital):

  • issue stablecoin in exchange for new cash
  • lock up new cash in an escrow
  • \(\to\) stablecoin is claim on cash

Option 2 (overcollateralized):

  • lock up existing shares in an escrow
  • \(\to\) issue stablecoin as a claim on stocks
  • over-collateralize

Option 3 (exotic):

  • issue stablecoins in exchange for shares
  • guarantee fixed conversion of shares against stables at dollar market price

What are Apple's options?

Thought experiment: Apple Inc. wants to issue a stablecoin

Options 1 a&b: Collateral Backed Stablecoins \(\to\) USDC

  • "Cash at Reserve Banks" once was SVB
  • Reserve fund = short-date US treasuries & overnight repos

primary market acces: 560+ entities

\(\vdots\)

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

  • create fiat money on chain with borrowing
  • a collateralized loan with ETH in escrow

The User's Perspective for a DAI Loan

Option 2 (reminder): Assets converted to cash: MakerDAO

Case 1:

stablecoin \(>\$1\)

arbitrageur

issuer

for fully decentralized algo/smart contract stablecoin: there is no dollar to give!

The Case of Luna-Terra

 exchange LUNA for newly minted UST tokens at the prevailing $ market rate

secondary market

 LUNA secondary market

Option 3: Algorithmic Stablecoin like UST on Terra

arbitrageur

issuer

 exchange UST for newly minted LUNA tokens at the prevailing $ market rate

market

 LUNA market

Case 2:

stablecoin \(<\$1\)

Option 3: Algorithmic Stablecoin like UST on Terra

Sadly, we know how this has always ended

UST Stablecoin

LUNA (cryptocurrency of the TERRA network)

But: there is no theoretical result that shows that collapse is inevitable

BTC, ETH

HQLA: USD, EUR

asset (gold)

fee-backed

Seigniorage

Crypto

Traditional

Algorithmic

Collateral-Backed

Taxonomy of Stablecoins

DEPOSITS

other assets

JPM coin

USDC

USDT

UST, Basis, Neutrino

DAI, FEI

Final Thoughts

Some Final Thoughts

  • this presentation only scratches at the surface, there are tens of thousands of people working on blockchain ideas
     
  • this is not (only) garage band work -- university research plays a key role
     
  • blockchain tech won't get uninvented.
     
  • the space is still trying to figure things out, including tech and economic challenges
     
  • great progress has been made, but things will and do still go wrong
     
  • a common resource can have huge economic benefits
     
  • I'd like to see more thinking and discussion about paths to unlock the benefits

@financeUTM

andreas.park@rotman.utoronto.ca

slides.com/ap248

sites.google.com/site/parkandreas/

youtube.com/user/andreaspark2812/

Why are Blockchains challenging for current regulation?

UniSwap Lab supports development

a website app accesses the code

token holders control contact features

don't own the code

operation = decentral

control = decentral

anyone can use the baseline code

core code runs on the blockchain

tokens used as rewards

Illustration of the Challenges: The UniSwap Token

Questions around Regulation & Compliance

  • Are regulations as they are because of existing institutional arrangements or
     
  • are institutional arrangements the way they are because of regulations?
  • compliance in a borderless world
    • efficacy?
    • flight to offshore?
    • is compliance even possible?
    • cost-benefit of compliance for regulators and the regulated
  • What is the goal of regulation?
    • compliance?
    • disappearance?
    • investor protection?
    • issuer protection?

present vs future

  • moving and evolving space: fighting the last war?
  • unintended consequences of "future proofing"

Challenge 1: How do you get data onto a blockchain?

The Oracle Problem

<standings: 7,3,8,4,2,1,6,5> + digital signatures

Disagreement? 

Majority Vote

1 ETH = $4780

1 ETH = $4789

1 ETH = $4781

DEXes can be used as on-chain price oracles

Time-Weighted Average Price (TWAP)

The Oracle Problem

  • Participation incentives?
    • rewards, payments...

Oracle nodes form their own ecosystem

 

  • Incentives for honest reporting?
    • penalties, collateral...

 

  • Reputation?
    • Uptime, correctness, penalty history, collateral amount....
  • Fee collection from dAPPs
  • Nodes stake LINK
    • More LINK staked more jobs taken

staked LINK can be slashed

Chainlink

Same follow-on challenge for builders: how can you fit staking, rewards, and inevitable  speculation into securities law?

Challenge 2: the settlement layer has a mind of its own

a

b

c

d

e

f

g

Problem: Public Mempools allow Sandwich (MEV) Attacks

Solutions and Remedies

  • Flashbots protocol
  • encrypted transactions
  • FHE Protocol

A brief look under the hood: the workflow

liquidity pool

blockchain

user

website

router

liquidity pool

blockchain

user

A brief look under the hood: the workflow

aggregator protocol

router

pool 1

blockchain

user

pool 2

multiple
pools

A brief look under the hood: the workflow

back to UniSwap

pool 1

blockchain

user

pool 2

A brief look under the hood: the workflow

back to UniSwap

pool 1

blockchain

user

pool 2

just-in-time
liquidity bots

A brief look under the hood: the workflow

back to UniSwap

pool 1

blockchain

user

pool 2

just-in-time
liquidity bots
in the settlement layer ("MEV")

Are Tokens Securities and What Safeguards Should There Be? 

  1. People want(ed) crypto assets and they will get their hands on them
  2. US style differentiation of securities vs commodities etc is neither helpful nor useful
  3. There is no such thing as "technology-neutral" regulation.
  4. Some rules from securities regulation simply cannot be implemented with blockchain tech
  5. Just because someone buys something with an investment motive doesn't mean that they should get all securities protections

Provocative Thoughts

- End of Theory - 

Some Developments

  • Soulbound tokens, digital ID, privacy zero-knowledge proofs
     
  • improved user experience, e.g., SIM cards with blockchain wallets
     
  • invisible blockchains (used in China for AliPay NFT storage)
     
  •  

Blockchain Infrastructure

seller

buyer

What is a Blockchain?

The Premise of the
Internet & Blockchain

Peer to Peer Communication

Peer to Peer Value

!

?

?

Sidebar: What is digitize-able value?

  • money
  • digitally native assets
  • claims on resources and property
  • identity, personal data

The challenge: how do you ensure digital scarcity?

  • traditional approach: unique record-keeper
  • problem:
    • intermediary necessary for record keeping
    • tight supervision of custodian
    • no peer-to-peer
  • What is the equivalent of TCP/IP for value?

CUES Leadership Presentation on DeFi RSM 2024

By Andreas Park

CUES Leadership Presentation on DeFi RSM 2024

  • 200