Introduction Model Data and Stylized Facts Liquidity provision Exchange comparison Conclusion
Decentralized Exchanges
Alfred Lehar Christine A. Parlour Calgary Berkeley
2021 RiskLab/BoF/ESRB Conference on Systemic Risk Analytics June 2021 Introduction Model Data and Stylized Facts Liquidity provision Exchange comparison Conclusion Introduction
Most modern exchanges are operated as a variant of an open electronic limit order book.
It is viewed as an most efficient way of providing liquidity.
Key assumption are perfectly competitive market makers, obtaining zero profit
Investments into high frequency trading, co-location
Liquidity traders try to carve out a competitive niche and extract rents
We examine a new form of liquidity provision - liquidity pools Introduction Model Data and Stylized Facts Liquidity provision Exchange comparison Conclusion Main finding
Liquidity pools can dominate limit order markets when There are many uninformed traders Prices do not move by much Incentives to invest in high frequency trading are strong Liquidity pools track limit order market prices can have lower price impact have lower variation in price impact Introduction Model Data and Stylized Facts Liquidity provision Exchange comparison Conclusion The Uniswap system
Uniswap is a large, decentralized finance swap facility.
Part of the new “Decentralized Finance” or DeFi
Daily Trading Volume is over 3 billion USD.
Posted Liquidity is over 7.5 billion USD
Uniswap comprises tens of thousands of liquidity pools.
Anyone can be a liquidity provider
Trading: send token A to the pool, receive token B Introduction Model Data and Stylized Facts Liquidity provision Exchange comparison Conclusion Setup and Players
Asset
current value p0 With probability α innovation: p0 + σ or p0 − σ Traders Liquidity trader: trades for exogenous motive quantity q: arrives when there is no innovation Arbitrageur: Learns about innovation and trades on it Liquidity providers: unaware which type of trader they face Introduction Model Data and Stylized Facts Liquidity provision Exchange comparison Conclusion Limit order market
Competitive liquidity providers gain from selling to liquidity trader lose from trading with arbitrageur post innovation break even on average narrower spread Liquidity providers can invest in a technology that gives them a chance for a market niche where they have market power High frequency trading Learn if an institutional trader is placing a large order Learning information faster than others Monopolist liquidity provider charges high spread either p0 + σ or p0 − σ Technology is wasteful and costly (cost a) Introduction Model Data and Stylized Facts Liquidity provision Exchange comparison Conclusion Uniswap – Liquidity Provision A Pool with Ether “E” and a token “T”
Suppose that there is a pool with E and T
The exchange rate is E/T
Liquidity demanders pay a fixed, proportional fee.
Price impact: Trading will move the price in a deterministic fashion
The exchange rate is determined by a “bonding curve.”
This mechanically relates Eth to the Token, so that
(E + ∆E )(T + ∆T ) = k
An infinitesimal small trader pays E/T Introduction Model Data and Stylized Facts Liquidity provision Exchange comparison Conclusion UniSwap-Price Impact
Eth
E0 E1
T0 T1 Token
Figure: A bonding curve Introduction Model Data and Stylized Facts Liquidity provision Exchange comparison Conclusion Framework - Uniswap markets
Liquidity providers earn a fee τ per trade Liquidity trader - no change in ‘true price’
Pushes price from p0 = E0/T0 to E1/T1 An arbitrageur arrives and pushes price back from E1/T1 to E0/T0 No change in value for liquidity providers except collecting 2 x fee Arbitrageur - change in ‘true price’
Liquidity pool quotes price p0 assume true price is p0 ± σ Price is stale arbitrageur will take advantage of mispricing pool gets picked off Liquidity providers lose out Introduction Model Data and Stylized Facts Liquidity provision Exchange comparison Conclusion Types of Transactions
List of all UniSwap V1 and V2 liquidity pools from factory contract transactions.
36,958 individual liquidity pools, consisting of 3,937 V1 pools and 33,021 V2 pools.
We have 47,204,920 transactions on Uniswap from its inception on November 2, 2018 until May 20, 2021.
1,084,581 liquidity injections
582,063 withdrawals of liquidity
45,481,500 trades of tokens.
rest complex transactions or flash swaps. Introduction Model Data and Stylized Facts Liquidity provision Exchange comparison Conclusion Largest Exchanges
Token 1 Token 2 Number Volume Volume Pool size Transactions (ETH) (USD) (ETH) Panel A: Uniswap V2 Wrapped Ether WETH Tether USD USDT 7,516.2 83,445 72,383,925 211,915 USD Coin USDC Wrapped Ether WETH 5,757.4 81,018 71,535,793 197,864 Dai Stablecoin DAI Wrapped Ether WETH 3,008.9 46,683 36,897,989 162,671 Uniswap UNI Wrapped Ether WETH 2,429.9 31,156 26,624,652 53,511 Wrapped BTC WBTC Wrapped Ether WETH 957.9 29,277 23,932,848 284,151 Fei USD FEI Wrapped Ether WETH 288.6 26,780 68,605,073 374,990 yearn.finance YFI Wrapped Ether WETH 872.1 19,994 9,318,935 27,322 Tendies Token TEND Wrapped Ether WETH 144.3 16,260 24,569,585 724 SushiToken SUSHI Wrapped Ether WETH 894.5 14,860 6,750,425 77,097 Wrapped Ether WETH Truebit TRU 3,680.3 14,171 43,746,104 1,647 Panel B: Uniswap V1 Ether ETH Dai Stablecoin DAI 540.6 2,681 524,088 9,226 Ether ETH HEX HEX 219.4 1,801 378,702 22,300 Ether ETH USD Coin USDC 258.0 1,274 287,165 6,858 Ether ETH Maker MKR 118.3 1,101 217,221 11,010 Ether ETH LoopringCoin V2 LRC 20.5 983 365,065 794 Ether ETH Sai Stablecoin v1.0 SAI 166.4 770 153,078 5,030 Ether ETH Synthetix Network Token SNX 124.8 700 130,702 3,480 Ether ETH Synth sETH sETH 44.1 576 110,465 26,579 Ether ETH UniBright UBT 108.0 279 58,212 635 Ether ETH Pinakion PNK 40.7 197 59,877 1,544 Introduction Model Data and Stylized Facts Liquidity provision Exchange comparison Conclusion Network of largest pools Introduction Model Data and Stylized Facts Liquidity provision Exchange comparison Conclusion Volume
2,400,000,000 Uniswap V1 V2 Direct to WETH 2,200,000,000 V2 Other Tokens
2,000,000,000
1,800,000,000
1,600,000,000
1,400,000,000
1,200,000,000
1,000,000,000
800,000,000 Total Volume traded in USDVolume Total traded
600,000,000
400,000,000
200,000,000
0 May-2019 September-2019 January-2020 May-2020 September-2020 January-2021 May-2021 blockday Introduction Model Data and Stylized Facts Liquidity provision Exchange comparison Conclusion Optimal poolsize - Theory
Fee revenue = Losses from quoting stale prices
Fee revenues get shared among liquidity providers
As losses increase pool shrinks to increase revenue per unit of liquidity provided
5.0 100
Poolsize 80 Poolsize 4.5
60 4.0
α 40 σ σ = 0 α = 8 = 4 = 0 . .01 3.5 1 20
2 4 6 8 10 0.2 0.4 0.6 0.8 σ α Introduction Model Data and Stylized Facts Liquidity provision Exchange comparison Conclusion Optimal poolsize - Empirical
(1) (2) (3) (4) (5) Volatility -14646277.8∗∗∗ -14193779.4∗∗∗ -13976232.8∗∗∗ -15986481.5∗∗∗ (1907118.6) (1742450.0) (1615636.4) (2208943.9) Volume (USD) 0.255∗∗∗ 0.255∗∗∗ (0.0739) (0.0739) Number trades 3051.9∗∗ (1521.2) Reversals 18963.9∗∗ (9073.6) R2 0.000925 0.0498 0.0507 0.0338 0.0264 Observations 263,750 279,040 263,750 263,750 263,750
Poolsize decreasing in innovation and
increasing in uninformed trading Introduction Model Data and Stylized Facts Liquidity provision Exchange comparison Conclusion Stability in liquidity provision
No short term evaporation of liquidity
Only 1.17% of sample are liquidity withdrawals
Only 1,801 events where the same address added and withdrew liquidity within 50 blocks. Median size USD 146.75 Only 18 observations where deposit and withdrawal over USD 1,000 within 5 blocks Introduction Model Data and Stylized Facts Liquidity provision Exchange comparison Conclusion Liquidity provision - May 19, 2021
3,600 0.02
0.00 3,400
−0.02 sizepool of % in flow liquidity Cummulative 3,200 −0.04
3,000 −0.06
2,800 −0.08
USD/ETH price −0.10 2,600
−0.12 2,400 −0.14
2,200 −0.16
2,000 −0.18 04 PM 06 PM 08 PM 10 PM Wed 19 02 AM 04 AM 06 AM 08 AM 10 AM 12 PM 02 PM 04 PM 06 PM 08 PM 10 PM Time Introduction Model Data and Stylized Facts Liquidity provision Exchange comparison Conclusion Comparison to a limit order market
Liquidity pools track limit order market prices can have lower price impact have lower variation in price impact
We collect minute interval data from Binance, the largest crypto exchange
Identify 384 tokens that trade on both
Eliminate pairs with small trading volume and end up with 27 cross listed tokens. Introduction Model Data and Stylized Facts Liquidity provision Exchange comparison Conclusion Minimal Pricing difference for pools above 700 Eth
1,000,000 40
100,000 30 Relative Pricing Error Binance - Uniswap in % Relativein -Uniswap BinanceError Pricing 10,000 20
1,000 10
100 0
Pool Size 10 -10
1 -20
0.1 -30
0.01 -40
0.001 -50 May 10 May 24 Jun 07 Jun 21 Jul 05 Jul 19 Aug 02 Aug 16 Aug 30 Sep 13 Sep 27 Oct 11 Oct 25 Nov 08 Nov 22 Time
Figure: Pricing error and pool size Pricing difference for the USDC/ETH pair when comparing Binance to Uniswap in percent of the Binance price (blue line, right axis) and pool size of the Uniswap USDC/ETH pool (orange, log-scale, left axis). Introduction Model Data and Stylized Facts Liquidity provision Exchange comparison Conclusion Intraday Prices
Figure: Intraday prices for the USDC/ETH pair on October 21, 2020 The graph shows minute-by-minute prices of the USDC/ETH pair on Binance and Uniswap. Introduction Model Data and Stylized Facts Liquidity provision Exchange comparison Conclusion Price Impact
Binance 0.00034 Uniswap Uniswap A 0.00032
0.00030
0.00028
0.00026
0.00024
0.00022
0.00020
0.00018
0.00016 Price Impact Price 0.00014
0.00012
0.00010
0.00008
0.00006
0.00004
0.00002
0.00000 May 24 Jun 07 Jun 21 Jul 05 Jul 19 Aug 02 Aug 16 Aug 30 Sep 13 Sep 27 Oct 11 Oct 25 Nov 08 Time
Figure: Price Impact of USDC/ETH on Uniswap (orange, green) and Binance (blue). Price impact is computed as change in price over volume (green and blue lines) as well as analytically as the price change for a marginal unit bought using the bonding curve formula (green line). Introduction Model Data and Stylized Facts Liquidity provision Exchange comparison Conclusion Trading Volume
160,000 Binance Uniswap 150,000
140,000
130,000
120,000
110,000
100,000
90,000
80,000
70,000 Volume (ETH)Volume
60,000
50,000
40,000
30,000
20,000
10,000
0 May 10 May 24 Jun 07 Jun 21 Jul 05 Jul 19 Aug 02 Aug 16 Aug 30 Sep 13 Sep 27 Oct 11 Oct 25 Nov 08 Time
Figure: Trading volume of USDC/ETH on Uniswap (orange) and Binance (blue). The graph shows the trading volume excluding flash loans in ETH. Trading volume is aggregated over rolling eight hour intervals. Introduction Model Data and Stylized Facts Liquidity provision Exchange comparison Conclusion Conclusion
Presented evidence on the efficacy of a new model of liquidity provision.
Liquidity providers in limit order markets have an incentive to invest in wasteful technology to carve out a competitive advantage
In a pool, an automated market maker, adverse selection costs are mutualized, which reduced the cost to posting liquidity.
Liquidity pools can dominate limit order markets
Liquidity pools can have lower price impact and variation in price impact