Learning from DeFi: Would Automated  Market Makers  Improve Equity Trading?

Katya Malinova and Andreas Park

 



 

Agenda

  • Very brief overview of Automated Market Makers
    • function
    • difference crypto-trading to traditional markets
    • difference DeFi to CeFi trading
  • Research question: what if we used AMMs for equities?
    • theory: liquidity provision & demand
    • data: implementation & trading costs

Some Motivation

  • Blockchain: borderless general purpose value and resource management tool

Basic Idea

  • DeFi: financial applications that run on blockchains
  • \(\Rightarrow\) brought new ideas and tools
  • one new market institution: automated market makers

Trading Infrastructure

payments network

Stock Exchange

Clearing House

custodian

custodian

 beneficial ownership record

seller

buyer

Broker

Broker

Broker

Exchange

Internalizer

Wholeseller

Darkpool

Venue

Settlement

Application: decentralized trading with automated market makers

New institutions!

  • passive "shared" liquidity provision
  • new pricing function
  • pooling of liquidity

Key Components

  • pro-rated 
    • fee income
    • risk
  • Liquidity providers:
    • use existing assets to earn passive income
  • Liquidity demanders:
    • predicatable price
    • continuous trading
    • ample liquidity
  • AMMs do not require a blockchain - just a concept
  • could be run in the existing world (though there are institutional and regulatory barriers)
  • Our question:
    1. Can an economically viable AMM be designed for current equity markets?
    2. Would such an AMM improve current markets?
  • Answers:
    1. Yes.
    2. Massively.
      Could save up to 30% of transactions costs.

Overview

Roadmap for the rest of the talk

  • How does an AMM work?
     
  • liquidity provider income: traditional market vs AMM
     
  • mechanism to implement an AMM
     
  • costs/benefits
     
  • capital requirements
     
  • obstacles and challenges

Automated Market Makers

Basics of Liquidity Provision

  • Basic idea of liquidity provision:
    • price end-of-day is "truth"
    • during the day this happens
      • buy volume: \(B\)
      • sell volume: \(S\)
      • for simplicity \(B>S\)
      • price moves \(p_0\nearrow p_t\)
         
  • earn more on balanced flow than what you lose on price movement

    \[\underbrace{\text{fee}\times(B+S)}_{\text{fee income}}+\underbrace{\text{net revenue} (B-S)}_{\text{what I sold it for}}- \underbrace{p_t\times (B-S)}_{\text{value of not position}} \ge 0 \]

in traditional markets: bid-ask spread

The Decision of the Liquidity Provider

  • earn more on balanced flow than what you lose on price movement

    \[\underbrace{\text{fee}\times(B-S)}_{\text{fee income}\atop\text{unbalanced}}+\underbrace{\text{fee}\times(2\times S)}_{\text{fee income}\atop\text{balanced}}> \underbrace{p_t\times (B-S)}_{\text{value of what I sold}} - \underbrace{\text{revenue} (B-S)}_{\text{what I sold it for}}.\]
     
  • Assume:
    • balanced volume \(V\) trades at opening price \(p_0\)
    • unbalanced volume is \(q\)
    • fee collected on cash value of trade
       
  • Then \[F\times (\Delta c(q)+Vp_0)>\Delta c(q)-p_tq.\]

AMM Pricing

  • AMMs require liquidity deposits
  • Deposits:
    • \(a\) units of an asset (e.g. a stock)
    • \(c\) units of cash

Constant Liquidity (Product) AMM

  • Purchase \(q\) of asset
     
  • Deposit cash \(\Delta c (q)\) into liquidity pool, extract \(q\) of shares
     
  • Idea of pricing: liquidity before trade \(=\) after trade
    \[L(a,c)=L(a-q,c+\Delta c)\]

The Decision of the Liquidity Provider

Deposit \(\Rightarrow\) slope of the price curve 

  • Most common form of AMM liquidity rule is Constant Product Pricing
    \[L(a,c)=a\cdot c~\Rightarrow~a\cdot c= (a-q)\cdot (c+\Delta c).\]
  • Total cost of trading \(q\) \[\Delta c=\frac{cq}{a-q}.\]
  • Price per unit \[p(q)=\frac{c}{a-q}.\]
  • Average spread paid\[\frac{p(q)}{p(0)}-1=\frac{q}{a-q}.\]

AMM Properties

  • Liquidity deposits/withdrawals do not affect the marginal price by construction
    • deposits \(\Delta a,\Delta c\) must be such that \[p_0=\frac{c}{a}=\frac{c+\Delta c}{a+\Delta a}\]
    • contrasts limit order markets where order changes often move marginal price
       
  • Prices move only by trades. Trade \(q\) and pay \(\Delta c(q)\), marginal price

    \[p_t=\frac{c+\Delta c(q)}{a-q}\]

AMM Properties

  • Let \(q^*\) be such that \[p_t=\frac{c_t}{a_t}=\frac{c_t+\Delta c(q^*)}{a-q^*}\]
  • Value of post-trade  position: \[p_tq^*\]
  • Cash flow from trade \[\Delta c(q^*)\]
  • Regret-free pricing would mean \[p_tq^*=\Delta c(q^*)\]

Constant liquidity pricing function is not "regret free" - LPs always lose (Park 2023)

  • Implication: Need a separate fee to compensate liquidity providers
  • (That fee can create problems - see Lehar, Parlour and Zoican (2022))

Liquidity Provider gains/losses

  • Liquidity providers net gain loss is

    \[\Delta c(q^*)-p_tq^*.\]
     
  • Let \(R=p_t/p_0\) be the gross return and
    let \(d=c+p_0a\) the cash value of the deposit at \(p_0\)
     
  • Then (see also Barbon & Ranaldo (2022)):
     \[\frac{\text{net gain loss}}{\text{value of deposit}}=\frac{\Delta c(q^*)-p_tq^*}{d}=\sqrt{R}-\frac{1}{2}(1+R).\]
     
  • We call this term ILLRAS \(=\) Implicit Loss from Long-Run Adverse Selection.

for orientation:

  • If the stock price drops by 10% the incremental loss for liquidity providers is 13 basis points on their deposit is
  • If the stock price rises by 10%, the liquidity provider gains 12 basis points less on the deposit

Another way to look at the net loss:

  • If you buy and hold \(a,c\) and the price moves from \(p_0\) to \(p_t\) you have \[p_ta+c\]
  • If you make an AMM deposit and the price moves you have \(a-q^*\) of the asset but \(c+\Delta c(q^*)\) cash with value \[p_t(a-q^*)+c+\Delta c(q^*).\]
  • The net amount is \[\Delta c(q^*)-p_tq^*\]

Liquidity Provision

Theory Overview

  1. Liquidity supply decision
     
  2. Liquidity demand decision AMM vs traditional market
     
  3. Welfare optimum
  • Goal: liquidity demand-supply decision with AMMs
     
  • \(\to\) apply to equity data to see if it's available and beneficial

Big Picture for Liquidity Provision

  • You supply capital for a while.
     
  • During this time the fundamental value of the asset may change.
     
  • In an efficient market folks will move the price to the fundamental.
     
  • You may trade at a wrong price in the process.


     
  • Almost every model explicitly or implicitly works like this, e.g., Kyle (1985), Glosten and Milgrom (1986), Grossman-Miller (1988), Biais (1993), Foucoult (1999) Budish, Crampton, Shin (2015)

\[\text{what you earn from dumb people}-\text{what you lose against smart people}\ge0\]

  • Asset with value \(V_0\) that may change to value \(V_t\)
     
  • Efficient prices so that \(p_0=V_0\)
     
  • Arbitrageurs who move price from \(p_0\) to \(p_t=V_t\) by trading a net quantity \(q^*\) at price \(\Delta (q^*)\)
     
  • Additional balanced (dumb) volume \(v\)
     
  • Collect a fee \(F\) on all trading volume

Big Picture for Liquidity Provision

  • Example: 
    • limit order books:
      • Fee=collect bid-ask spread on uninformed trades
      • amount paid = cumulative cost of multiple trades or walking the book
    • Auction market (a la Kyle)
      • Overcharge uninformed to balanced in expectation against possible informed

\[\underbrace{F\times v}_{\text{earn on dumb people}} +\underbrace{F\times \Delta (q^*)+\Delta c(q)-p_tq}_{\text{loss from smart people}}\ge 0\]

Liquidity Provision in AMMs

  • Asset value \(V_0\) that may change to value \(V_t\)
  • Efficient prices \(p_0=V_0\) and  \(p_t=V_t\)
  • Arbitrageurs move price from \(p_0\) to \(p_t=V_t\) by trading a net quantity \(q^*\) at price \(\Delta (q^*)\)
  • Price gross return \(R\sim \Phi:\mathbb{R}_+\to[0,1]\) with continuous cdf \(\phi\).
  • Balanced volume that trades  \(V\) at \(p_0\)
  • Exogenous protocol fee \(F\) on all dollar trading volume
     
  • Liquidity providers are risk neutral and competitive: earn zero return in expectation
     
  • Liquidity providers collectively choose liquidity deposit \(d=p_0a+c.\)

Big Picture for Liquidity Provision

Liquidity Provider Expected Return

  • In equilibrium it must hold that expected returns from liquidity provisions are 0:

     \[\frac{1}{d}\left(\int_0^\infty (\Delta c(q^*)-p^*p_t(R)+F \cdot \Delta c(q^*))~\phi(R)dR +F p_0 V\right)=0.\]
     
  • Expressing terms:

    \[\int\limits_0^\infty\left(\sqrt{R}-\frac{1}{2}\left(1+R\right)+\frac{F}{2}|\sqrt{R}-1|\right)~\phi(R)dR+F\frac{V}{2a}.=0\]

Equilibrium Liquidity Supply

  • Expressing terms:

    \[\int\limits_0^\infty\left(\sqrt{R}-\frac{1}{2}\left(1+R\right)+\frac{F}{2}|\sqrt{R}-1|\right)~\phi(R)dR+F\frac{V}{2a}.=0\]
     
  • Gives us an equilibrium deposit \(a^*\)

    \[a^*=\frac{F V}{2}\underbrace{\left(-F\times E[|\sqrt{R}-1|/2]-E[\text{ILLRAS}]\right)^{-1}}_{=:C^\mathsf{CP}(\phi,F)^{-1}}.\]

liquidity provider choice variable: the initial deposit

The Decision of the Liquidity Provider

  • For a firm, quantity \(a\) is the number of deposited shares.
     
  • We express \(a\) as the fraction of shares outstanding:

    \[a=\alpha S, ~~~\alpha\in[0,1].\]

  • The equilibrium value is (also) the largest deposit so that liquidity providers want to participate. Hence
    \[\overline{\alpha}=\min\left\{1,\frac{F V}{2S}\frac{1}{C^\mathsf{CP}(\phi,F)}\right\}\]

The Decision of the Liquidity Demander

  • Wants to trade \(q\).
     
  • Picks the AMM over traditional market if the bid-ask spread exceeds AMM price impact \(+\) fee

    \[\underbrace{\sigma}_{\text{bid-ask spread}}\ge\underbrace{\frac{q}{\alpha S-q}}_{\text{AMM price impact}}+\underbrace{F}_{\text{AMM fee}}.\]
     
  • Define \(\underline{\alpha}\) the smallest value of \(\alpha\) such that AMM cheaper than limit order market (may not exist)
     
  • For any \(\alpha>\underline{\alpha}\), liquidity demanders prefer the AMM.
  • Therefore if \(\overline{\alpha}>\underline{\alpha}\) an AMM is economically viable.
     
  • \(\sigma-\frac{q}{\overline{\alpha} S-q}-F\) are the largest possible transaction cost savings.
\begin{array}{rcl} \underline{\alpha}&=&\frac{q}{S}\frac{1+\sigma-F}{\sigma-F} \end{array}

The Optimal Fee for Liquidity Providers is not Zero

  • Loose idea (details later): LPs are price takers, enter the day and then
    submit liquidity until they break even in expectation
    • \(\Rightarrow\) submit \(\alpha=\overline{\alpha}\)
    • All benefits go to liquidity demanders in expectation.
       
  • The contemporaneous profit for a liquidity demander is

    \[\pi=\sigma-\frac{q}{\overline{\alpha}(F)S-q}-F\]
     
  • which has a local maximum for

    \[F^\pi=\frac{1}{E[|\sqrt{R}-1|/2]+V}\left(-2q\ E[\text{ILLRAS}]+ \sqrt{-2qV\ E[\text{ILLRAS}]}\right).\]
  • two opposing forces for \(F\nearrow\)
    • more liquidity provision \(\to\) lower price impact
    • more fees to pay
  • Also observed by Hasbrouck, Rivera, and Saleh (2022)

Model Summary

  • We can express the equilibrium choice for liquidity provision.
     
  • We can measure the benefit for liquidity demanders who use the AMM.
     
  • We can determine the fee that maximizes the liquidity demander benefit (it's not zero!)
     
  • Next question:
    • How would this look like when applied to stock markets?
    • What are the optimal fees?
    • Is it feasible?
    • What are the empirical benefits?

How we think of the Implementation of an AMM for our Empirical Analysis

Approach: daily AMM deposits

  1. AMMs are closed overnight.
     
  2. Market starts with opening auction to determine \(p_0\)
     
  3. For fixed fees, LP submit liquidity \(a,c\) at ratio \(p_0=a/c\) until \(\alpha=\overline{\alpha}\)
     
  4. Liquidity is locked for the day.
     
  5. At the end of the day, remaining deposits are released back to LPs.
     
  6. Back to 1.
  • LPs act backward-looking: Submit liquidity today based on yesterday's
    • dollar-volume 
    • fee
    • returns
       
  • and provide liquidity iff \(\overline{\alpha}>\underline{\alpha}\) on the previous day.

Assumptions for Empirical Investigation

  1. Peaking at the data to understand relations
    • AMMs come with exogenous fees => analyze hypothetical behavior for different fee levels
  2. Using optimal fees \(F^\pi\) but 
    • ignore fees for price-moving trade and optimize based on "yesterday's" return
    • (version in the written paper)
  3. Using optimal fees based on return distribution 2014-2021
    • specification that is "true" to the model

Presentation of the Results in THREE steps

Data-Peeking

Getting a Sense of the Relationships

Special Consideration 1: What volume?

  • some volume may be intermediated

  • with AMMs: no need for intermediation
  • \(\to\) intermediate volume should disappear
  • \(\to\) use volume/2

Special Consideration 2: What's \(q\) (the representative order size)?

  • use average per day
  • take long-run average + 2 std of daily averages

All displayed data CRSP \(\cap\) WRDS

  • CRSP for shares outstanding
  • WRDS computed statistics for
    • quoted spreads (results similar for effective)
    • volume
    • open-to-close returns
    • average trade sizes, VWAP
  • Time horizon: 2014 - March 2022
  • Exclude "tick pilot" period (Oct 2016-Oct 2018)
  • All common stocks (not ETFs) (~7550).
  • Explicitly not cutting by price or size
  • All "boundless" numbers are winsorized at 99%.
  • Plots are for per-stock yearly averages.

Some Cross-Sectional Relationships

retail = as defined in "Tracking Retail Investor Activity" Boehmer, Jones, Zhang, and Zhang (JF 2021)

Threshold for Feasibility: \(\overline{\alpha}-\underline{\alpha}\)

Days with feasibility

Average Benefit of AMM per day

Optimally Designed AMMs

Business implementation:

  • Fee \(F=F^\pi\) is set today based on yesterday's 
    • av trade size + 2 std(trade size) at the VWAP
    • quoted half-spreads
    • return post-open to pre-close
    • volume

Assumptions for Optimality

The optimal fee \(F^\pi\) maximizes

\[\pi(F)=\sigma-\frac{q}{\bar{\alpha}S-q}-F\]
with solution (no expectations)

\[F^\pi=\frac{-2qp\ \text{ILLRAS}}{V}+ \sqrt{\frac{-2qp\ \text{ILLRAS}}{V}}\]

Optimal fee \(F^\pi\)

\(\overline{\alpha}\) for \(F=F^\pi\)

\(\approx\) 200 low-volume stocks (avg volume 20% of rest)

quoted spread minus AMM price impact minus AMM fee (all measured in bps)

relative savings:
fees paid in AMM/fees paid with spreads

average benefits liquidity provider in bps (average=0)

AMMs with expectations

Assumptions for Optimality

  • The optimal fee \(F^\pi\) with the full specification is
    \[F^\pi=\frac{1}{E[|\sqrt{R}-1|/2]+V}\left(-2q\ E[\text{ILLRAS}]+ \sqrt{-2qV\ E[\text{ILLRAS}]}\right).\]
     
  • Means we need
    • \(E[|\sqrt{R}-1|/2]\) and
       
    • \(E[\text{ILLRAS}].\)

Two approaches

  1. Fit a parametric distribution to returns
    (used Gamma; Log-Normal is similar)
     
  2. Fit a non-parametric distribution

Implementation notes:

  • restrict \(R\in[0.5,2]\)
  • require 100 observations per firm
  • use data from Jan 2014 - March 2021
  • test on April 2021-March 2022

Return distribution example: Microsoft

Return distribution example: Tesla

  • average \(F^\pi=13\)bps
  • average \(\overline{\alpha}=30\%\)

average savings: 18 bps

average daily: $12K

average annual: $2.95 million

Some Numbers
(based on "yesterday's")

average per stock and day benefit for liquidity takers

aggregate benefit for liquidity takers (in B$)

Sidebar: Capital Requirement

Deposit Requirements

  • Our approach: measure liquidity provision in % of market cap
     
  • Share-based liquidity provision is trivial: the shares are just sitting at brokerages.
     
  • But: requires an off-setting cash amount
     
  • Cash is not free:
    • at 6% annual rate, must pay 2bps per day.
    • Would need to add to fees
       
  • But: do we need "all that cash"?
     
  • No. 
  • (hand-waving argument)
     
  • 2nd gen AMMs have liquidity provision "bands": specify price range for which one supplies liquidity
     
  • Here: specify range for \(R\in(\underline{R},\overline{R})\)
     
  • Outside range: don't trade.
     
  • Inside range: "full" liquidity with constant product formula.
     
  • Implication: only need cash and shares to satisfy in-range liquidity demand.
  • For return \(R\), the following number of shares change hands: \[q=a\cdot(1-\sqrt{R^{-1}}).\]
  • Fraction of share deposit used \[\frac{q}{a}=1-\sqrt{R^{-1}}.\]
  • Fraction of cash used \[\frac{\Delta c ("R")}{c}=\frac{1-\sqrt{R^{-1}}}{\sqrt{R^{-1}}}.\]
  • Example for \(R=.9\) (max allowed price drop \(=10\%\)) \[\frac{\Delta c ("R")}{c}=-5\%.\]
  • \(\Rightarrow\) "real" cash requirements \(\not=\) deposits

Literature

AMM Literature: a booming field

  • Theory
    • Lehar and Parlour (2021): for many parametric configurations, investors prefer AMMs over the limit order market.

    • Aoyagi and Ito (2021): co-existence of a centralized exchange and an automated market maker;  informed traders react non-monotonically to changes in the risky asset’s volatility

    • Capponi and Jia (2021): price volatility \(\to\) welfare of AMM LPs;  conditions for a breakdown of liquidity supply in the automated system; more convex pricing \(\to\) lower arbitrage rents & less trading.

    • Capponi, Jia, and Wang (2022): decision problems of validators, traders, and MEV bots under the Flashbots protocol.

    • Park (2021):  properties and conceptual challenges for AMM pricing functions

    • Milionis, Moallemi, Roughgarden, and Zhang (2022): dynamic impermanent loss analysis for under constant product pricing.

    • Hasbrouck, Rivera, and Saleh (2022): higher fee \(\Rightarrow\) higher volume

  • Empirics:

    • Lehar and Parlour (2021): price discovery better on AMMs

    • Barbon and Ranaldo (2022): compare the liquidity CEX and DEX; argue that DEX prices are less efficient.

The Bigger Picture. Obstacles, Solutions, and Last Words

  • Background: The S.E.C. suggests that their retail flow auction proposal could save retail traders $1.5B per year
    • average annual transaction costs currently are <$1.85B
    • \(\to\) retail would pay almost no spread.
    • retail would have to perfectly meet a "natural" counterparty.
    • How would that work? \(\to\) strong belief in magic

Where do the savings come from?

  • Here: the origin of savings is not magical
    • better use of idle capital (shares sitting unused in brokerage accounts)
    • better risk sharing
      • Limit order book liquidity supply =  fill short-term trading needs
      • supply liquidity only when it's opportune
      • without high-tech monitoring will be on wrong side of market-moving trades often
      • AMM: "shared" risk among many
  • Business: Who would build the AMM?
    • Exchanges? 
      • Can they manage liquidity deposits? What would that mean?
      • Their biggest customers are intermediaries like HFT firms.
      • Stand to lose data fee income.
    • Brokers?
      • Lose income from securities lending
      • Trading fee income?
  • Regulation: Would the S.E.C. allow it?
    • Are AMM deposits securities? (I think yes)
    • What disclosures are required?
    • How would they fit into the market? (Hard to satisfy NMS rules)

Obstacles

  • Going back to slide 2: blockchain is not technologically needed to run an AMM
  • But a blockchain may be needed to overcome entrenched business and regulation
    • Asset tokenization on public blockchains & fully decentralized systems: puts the power into investors' hands.

Summary

  • Idea: Implement and AMM with equity trading
    • use learnings from two centuries of trading (info disclosures, price finding, etc)
    • design it to benefit liquidity providers and demanders
      • deploy assets to achieve more than buy-and-hold
      • trade cheaper than limit order book
  • Propose process that is viable based on historical data
  • Evidence suggests that AMMs could save investors about 30% of transaction costs.
  • Assumptions are optimistic:
    • All volume to AMM? 
    • Sufficient liquidity provision?
    • Not too much liquidity provision?
  • Assumptions are conservative
    • cheaper trading should invite more volume
    • \(\to\) would make AMMs even more attractive
  • Sad news: unlikely to be developed adopted in current regulatory environment

@financeUTM

andreas.park@rotman.utoronto.ca

slides.com/ap248

sites.google.com/site/parkandreas/

youtube.com/user/andreaspark2812/

Learning from DeFi: Are AMMs better? Short version

By Andreas Park

Learning from DeFi: Are AMMs better? Short version

  • 314