Upload
others
View
1
Download
0
Embed Size (px)
Citation preview
(In)Stability for the Blockchain: Deleveraging Spirals and StablecoinAttacks
Ariah Klages-Mundt, Andreea Minca
July 26, 2019P2P Financial Systems, European Central Bank
Ariah Klages-Mundt, Andreea Minca (In)Stability for the Blockchain: Deleveraging Spirals and Stablecoin AttacksJuly 26, 2019 P2P Financial Systems, European Central Bank 1 / 24
Problem: No models to understand stablecoin design
Complex feedback e�ects
No truly stable asset easily accessible
This paper: Develop a �rst model of noncustodial stablecoins
Dynamic model with feedback e�ects, yet remains tractable
Characterize dynamics and liquidity =⇒ deleveraging spirals
Analytically show `stable' and `unstable' regions
Explains actual stablecoin movements
Suggests attacks from speculators and miners
A foundation for future design study
Ariah Klages-Mundt, Andreea Minca (In)Stability for the Blockchain: Deleveraging Spirals and Stablecoin AttacksJuly 26, 2019 P2P Financial Systems, European Central Bank 2 / 24
Focus of the talk:
1 Introduction to stablecoins
2 Motivate how stablecoins are distinct from traditional currency literature
Brie�y:
3 Our model
4 Analytical results on dynamics & liquidity
5 Simulation results
6 Motivations for follow-up work
So please refer to the paper (on arXiv) for more in-depth discussion!
Ariah Klages-Mundt, Andreea Minca (In)Stability for the Blockchain: Deleveraging Spirals and Stablecoin AttacksJuly 26, 2019 P2P Financial Systems, European Central Bank 3 / 24
Cryptocurrencies
Blockchain: a new way for mistrusting agents to cooperate without trusted third parties
Ethereum: generalized scripting functionality, allowing `smart contracts' that executealgorithmically in a veri�able and somewhat trustless manner
The promise: cryptographic security, privacy, incentive alignment, reduced counterpartyrisk
A tradeo�: their price is highly volatileI Price tied to network e�ects, adoption, further technical progress, regulatory hurdles
Ariah Klages-Mundt, Andreea Minca (In)Stability for the Blockchain: Deleveraging Spirals and Stablecoin AttacksJuly 26, 2019 P2P Financial Systems, European Central Bank 4 / 24
Introduction to Stablecoins
Aim of stablecoins
Protocol that stabilizes market price
More usable/adoptable cryptocurrency
Types of stablecoins
Custodial: reserve assets held o�-chain. E.g., LibraI Introduces counterparty risk that cryptocurrencies otherwise solve
Noncustodial: on-chain contracts collateralized in cryptoassets, e.g., MakerDAO's DaiI Operate in public/permissionless blockchain setting, in which any agent can pseudonymously
participate. Malicious agents can participate, which can introduce new economic attacks
Ariah Klages-Mundt, Andreea Minca (In)Stability for the Blockchain: Deleveraging Spirals and Stablecoin AttacksJuly 26, 2019 P2P Financial Systems, European Central Bank 5 / 24
Stablecoin VolatilityCurrent stablecoins not robust
Designs all similar and ad hoc
Markets can break down during extreme events
Price (USD)
24h
Vol
NuBits Charts
Jan '15 Jul '15 Jan '16 Jul '16 Jan '17 Jul '17 Jan '18 Jul '18
2015 2016 2017 2018
$0
$0.500000
$1.00
0
Zoom 1d 7d 1m 3m 1y YTD ALL
From Sep 24, 2014 To Dec 12, 2018
Market Cap Price (USD) Price (BTC) 24h Volcoinmarketcap.com
Price (USD)
24h
Vol
bitUSD Charts
17. Sep 1. Oct 15. Oct 29. Oct 12. Nov 26. Nov 10. Dec
2016 2018
$0.600000
$0.800000
$1.00
0
Zoom 1d 7d 1m 3m 1y YTD ALL
From Sep 12, 2018 To Dec 12, 2018
Market Cap Price (USD) Price (BTC) Price (BTS) 24h Volcoinmarketcap.com
Ariah Klages-Mundt, Andreea Minca (In)Stability for the Blockchain: Deleveraging Spirals and Stablecoin AttacksJuly 26, 2019 P2P Financial Systems, European Central Bank 6 / 24
Noncustodial Contract for Di�erence
Contract SpeculatorStablecoin
Holder
1 ETH = $100 1 ETH = $100
t = 0
Ariah Klages-Mundt, Andreea Minca (In)Stability for the Blockchain: Deleveraging Spirals and Stablecoin AttacksJuly 26, 2019 P2P Financial Systems, European Central Bank 7 / 24
Noncustodial Contract for Di�erence
Contract SpeculatorStablecoin
Holder
t = 0
2 ETH = $200
Ariah Klages-Mundt, Andreea Minca (In)Stability for the Blockchain: Deleveraging Spirals and Stablecoin AttacksJuly 26, 2019 P2P Financial Systems, European Central Bank 7 / 24
Noncustodial Contract for Di�erence
Contract SpeculatorStablecoin
Holder
Price Oracle1 ETH = $80
t = 1
2 ETH = $160
Ariah Klages-Mundt, Andreea Minca (In)Stability for the Blockchain: Deleveraging Spirals and Stablecoin AttacksJuly 26, 2019 P2P Financial Systems, European Central Bank 7 / 24
Noncustodial Contract for Di�erence
Contract SpeculatorStablecoin
Holder
t = 1
1.25 ETH = $100 0.75 ETH = $60
Ariah Klages-Mundt, Andreea Minca (In)Stability for the Blockchain: Deleveraging Spirals and Stablecoin AttacksJuly 26, 2019 P2P Financial Systems, European Central Bank 7 / 24
Noncustodial Contract for Di�erence
Contract SpeculatorStablecoin
Holder
t = 1
1.25 ETH = $100 0.75 ETH = $60
Similar to a forward contract except:Price is only fixed in fiat terms while payout in units of risky collateral In these markets: heavy frictions to convert to fiat
Ariah Klages-Mundt, Andreea Minca (In)Stability for the Blockchain: Deleveraging Spirals and Stablecoin AttacksJuly 26, 2019 P2P Financial Systems, European Central Bank 7 / 24
DStablecoins - no set expiration
Variants on contracts for di�erence:
Tranche-like risk transfer structureI Losses/gains borne by speculators, stablecoin holders hold instrument like senior debt
Oracle provides information from o�-chain markets
Dynamic deleveraging process balances positions according to protocol rulesI Important di�erence from CDOs! Critical to understand deleveraging e�ects
Agents can change positions through pre-de�ned processI Settlement times are random and dependent on the protocol and agent decisions
Noncustodial risks
Risk of market collapse (this paper)
Oracle/governance manipulation
Ariah Klages-Mundt, Andreea Minca (In)Stability for the Blockchain: Deleveraging Spirals and Stablecoin AttacksJuly 26, 2019 P2P Financial Systems, European Central Bank 8 / 24
DStablecoins - no set expiration
SpeculatorsLocks 1 ETH = $100Creates 50 STBL
Collateral Contract
Ariah Klages-Mundt, Andreea Minca (In)Stability for the Blockchain: Deleveraging Spirals and Stablecoin AttacksJuly 26, 2019 P2P Financial Systems, European Central Bank 9 / 24
DStablecoins - no set expiration
SpeculatorsLocks 1 ETH = $100Creates 50 STBL
Collateral Contract
Assets Liabilities
ETH (pledged) $100DStablecoin $50
Equity $100Smart contract $50
Speculator Balance Sheet
Ariah Klages-Mundt, Andreea Minca (In)Stability for the Blockchain: Deleveraging Spirals and Stablecoin AttacksJuly 26, 2019 P2P Financial Systems, European Central Bank 9 / 24
DStablecoins - no set expiration
SpeculatorsLocks 1 ETH = $100Creates 50 STBL
Collateral Contract
STBL Market
50 STBL→~0.5 ETH
‘Arbitrage’ maintains price target
Ariah Klages-Mundt, Andreea Minca (In)Stability for the Blockchain: Deleveraging Spirals and Stablecoin AttacksJuly 26, 2019 P2P Financial Systems, European Central Bank 9 / 24
DStablecoins - no set expiration
SpeculatorsLocks 1 ETH = $100Creates 50 STBL
Collateral Contract
STBL Market
50 STBL→~0.5 ETH
‘Arbitrage’ maintains price target
SpeculatorsLocks 1 ETH = $100Creates 50 STBL
Collateral Contract
STBL Market
50 STBL→~0.5 ETH
‘Arbitrage’ maintains price target
Assets Liabilities
ETH (pledged) $100ETH $50
Equity $100Smart contract $50
Speculator Balance Sheet
Ariah Klages-Mundt, Andreea Minca (In)Stability for the Blockchain: Deleveraging Spirals and Stablecoin AttacksJuly 26, 2019 P2P Financial Systems, European Central Bank 9 / 24
DStablecoins - no set expiration
SpeculatorsLocks 1 ETH = $100Creates 50 STBL
Collateral Contract
STBL Market
Can repurchase 50 STBL to unlock ETH
‘Arbitrage’ maintains price target
Ariah Klages-Mundt, Andreea Minca (In)Stability for the Blockchain: Deleveraging Spirals and Stablecoin AttacksJuly 26, 2019 P2P Financial Systems, European Central Bank 9 / 24
DStablecoins - no set expiration
SpeculatorsLocks 1 ETH = $100Creates 50 STBL
Collateral Contract
STBL MarketStablecoin HoldersBuys STBL ‘Arbitrage’ maintains
price targetAriah Klages-Mundt, Andreea Minca (In)Stability for the Blockchain: Deleveraging Spirals and Stablecoin AttacksJuly 26, 2019 P2P Financial Systems, European Central Bank 9 / 24
DStablecoins - no set expiration
SpeculatorsLocks 1 ETH = $100Creates 50 STBL
Collateral Contract
STBL MarketStablecoin HoldersBuys STBL
If Collateral ↓ < β, partially liquidated on STBL market
Price Oracle
Ariah Klages-Mundt, Andreea Minca (In)Stability for the Blockchain: Deleveraging Spirals and Stablecoin AttacksJuly 26, 2019 P2P Financial Systems, European Central Bank 9 / 24
DStablecoins - no set expiration
SpeculatorsReceive excess collateral
Collateral Contract
Stablecoin HoldersExchange STBL for ETH at last oracle price
System can be globally settled
Price Oracle
Ariah Klages-Mundt, Andreea Minca (In)Stability for the Blockchain: Deleveraging Spirals and Stablecoin AttacksJuly 26, 2019 P2P Financial Systems, European Central Bank 9 / 24
Academic Literature
Work on custodial stablecoins [Lipton et al., 2018], [Gri�n et al., 2018]
[Chao et al., 2017] presents a tweaked DStablecoin design that restricts leverage to pre-de�nedbounds using automated resets
Stablecoin holders are liquidated from positions during these resets
Maintaining stablecoin position involves re-buying in at possibly in�ated prices at resets
They develop a PDE method to value their proposed stablecoin
Stability results rely on assumption that payouts are exogenously stable
Payouts actually made in ETH, not e�ciently convertible
Ignores endogenous price e�ects from re-buying into stablecoins
Of the many designs, it is unclear which deleveraging method would lead to a system thatsurvives longer
Ariah Klages-Mundt, Andreea Minca (In)Stability for the Blockchain: Deleveraging Spirals and Stablecoin AttacksJuly 26, 2019 P2P Financial Systems, European Central Bank 10 / 24
Academic Literature
Can we use the existing literature on currency peg models? Unfortunately, no
In traditional currency peg models, e.g., [Morris & Shin, 1998]:
Gov. issuer mechanically committed to stability, not a player in the game
In contrast, in stablecoin systems:
Issuer role is replaced by decentralized speculators, who issue and withdraw stablecoins tooptimize pro�ts. They are not committed to maintaining a peg.
Best we can hope: protocol well-designed and peg maintained whp through incentives
Agents' decisions a�ect price of the `stable' asset and future incentives
Ariah Klages-Mundt, Andreea Minca (In)Stability for the Blockchain: Deleveraging Spirals and Stablecoin AttacksJuly 26, 2019 P2P Financial Systems, European Central Bank 11 / 24
Model
Simple model, but versatile, inspired by [Aymanns & Farmer, 2015]
Dynamic model complex enough to take into account feedback e�ects
Agents solve optimization problems consistent with a wide array of documented marketbehaviors and well-de�ned �nancial objectives
Tractable and modular foundation to build on (can add more features later)
Provides core of more general simulation environment
Assumption: In this �rst model, there is no movement out of the blockchain system to �at
This actually applies to some agents
In reality, there is going to be some movement, but it is by nature limited and costly
If relaxed (working on this), the e�ects in this model might be damped, but probably still exist(and indeed we see evidence in data)
Ariah Klages-Mundt, Andreea Minca (In)Stability for the Blockchain: Deleveraging Spirals and Stablecoin AttacksJuly 26, 2019 P2P Financial Systems, European Central Bank 12 / 24
Model
Agents
Stablecoin holder chooses portfolio weights to seek stabilityI Leave generic where possible; assume speci�c form for some results
Speculator chooses leverage in speculative position behind stablecoin
Assets
Ether: risky asset with exogenous price pEt
DStablecoin with endogenous price pDt
DStablecoin market clears by setting demand = supply in USD (blackbox stable) terms
Similar to clearing in Uniswap DEX
Related to quantity theory of money
Ariah Klages-Mundt, Andreea Minca (In)Stability for the Blockchain: Deleveraging Spirals and Stablecoin AttacksJuly 26, 2019 P2P Financial Systems, European Central Bank 13 / 24
Model Outline
t = 0: agents have endowment, prior beliefs
In each period t:
1 New Ether price revealed
2 Update Ether expectations
3 Stablecoin holder decides portfolio weights
4 Speculator, seeing demand, decides leverage
5 DStablecoin market is cleared
Rationale
Sophisticated agents able to front-run DEXs [Daian et al., 2019]
Evidence demand may not decrease tremendously with price (SBD)
Ariah Klages-Mundt, Andreea Minca (In)Stability for the Blockchain: Deleveraging Spirals and Stablecoin AttacksJuly 26, 2019 P2P Financial Systems, European Central Bank 14 / 24
Model: SpeculatorChoose ∆t to maximize next period expected returns s.t. constraints
Liquidation constraint (protocol): λt := β·liabilitiesassets
≤ 1
Risk constraint (self-imposed): lnλt = µt − ασbtVaR example: λt ≤ exp(µt − ασt). Consistent with a margin of safety
∆t Change to DStablecoin supply
µt Expected Ether return
σ2t Expected Ether variance
β Collateral threshold
α Inverse measure of riskiness
b Cyclicality parameter
Ariah Klages-Mundt, Andreea Minca (In)Stability for the Blockchain: Deleveraging Spirals and Stablecoin AttacksJuly 26, 2019 P2P Financial Systems, European Central Bank 15 / 24
Analytical Results about Dynamics & Liquidity
Proposition
There is a bound to the speculator's ability to maintain the market
(A lower bound on collateral) - (capital available to enter market)must be su�ciently high
Proposition
Speculators face limits to speed of leverage reduction, even w/ new capital.
Deleveraging spiral: speculators repurchase DStablecoins at increasing prices as liquidity driesup in the market.
Ariah Klages-Mundt, Andreea Minca (In)Stability for the Blockchain: Deleveraging Spirals and Stablecoin AttacksJuly 26, 2019 P2P Financial Systems, European Central Bank 16 / 24
`Stable' and `Unstable' Regions
Proposition
Assume
DStablecoin demand constant
Expected Ether return constant
Then if the leverage constraint remains inactive, the system converges exponentially to a steadystate with stable price and zero variance.
Observation: Steady state may have price < $1.
Conjecture: Outside of `stable' domain, volatility bounded > 0 whp.
Once outside, more likely to remain outside due to feedback loop
`Kink' in probability distribution at boundary
Ariah Klages-Mundt, Andreea Minca (In)Stability for the Blockchain: Deleveraging Spirals and Stablecoin AttacksJuly 26, 2019 P2P Financial Systems, European Central Bank 17 / 24
These E�ects Explain Data from Dai MarketM
arke
t Ca
p Price (USD)
24h
Vol
Dai Charts
14. Nov 18. Nov 22. Nov 26. Nov 30. Nov 4. Dec 8. Dec 12. Dec
Jan '18 May '18 Sep '18
$50M
$60M
$70M
$0.960000
$1.00
$1.04
0
Zoom 1d 7d 1m 3m 1y YTD ALL
From Nov 12, 2018 To Dec 12, 2018
Market Cap Price (USD) Price (BTC) Price (ETH) 24h Volcoinmarketcap.com
(a) Dai leverage reduction feedback (b) Dai normally trades below target
Source: Kenny Rowe, Tweet
Ariah Klages-Mundt, Andreea Minca (In)Stability for the Blockchain: Deleveraging Spirals and Stablecoin AttacksJuly 26, 2019 P2P Financial Systems, European Central Bank 18 / 24
Simulation: `Stable' and `Unstable' Regions
−0.10−0.05 0.00 0.05 0.10 0.15 0.20Log return
10−2
10−1
100
101
102
103
Dens
ity
DStablecoin Returns by Constraint ActivityActiveInactive
Figure: Constant expected ETH return.
Ariah Klages-Mundt, Andreea Minca (In)Stability for the Blockchain: Deleveraging Spirals and Stablecoin AttacksJuly 26, 2019 P2P Financial Systems, European Central Bank 19 / 24
Simulation: Di�erent Speculator Behaviors
VaRN.1 VaRN.01 VaRM.1 VaRM.01 AC1 AC2 RNSpeculator Risk Management
0.00
0.01
0.02
0.03
0.04
0.05
0.06
0.07
0.08
Vola
tility
(Dai
ly)
DStablecoin Volatility vs. Risk ManagementEther volatility70 percentile95 percentile
(a) t-distr(df = 3, µ = 0)
VaRN.1 VaRN.01 VaRM.1 VaRM.01 AC1 AC2 RNSpeculator Risk Management
0.00
0.01
0.02
0.03
0.04
0.05
0.06
0.07
0.08
Vola
tility
(Dai
ly)
DStablecoin Volatility vs. Risk ManagementEther volatility70 percentile99 percentile
(b) t-distr(df = 3, µ = r0)
VaRN.1 VaRN.01 VaRM.1 VaRM.01 AC1 AC2 RNSpeculator Risk Management
0.00
0.01
0.02
0.03
0.04
0.05
0.06
0.07
0.08
Vola
tility
(Dai
ly)
DStablecoin Volatility vs. Risk ManagementEther volatility70 percentile95 percentile
(c) normal(µ = 0)
Figure: Heatmaps of DStablecoin volatility for di�erent speculator risk management methods.
Ariah Klages-Mundt, Andreea Minca (In)Stability for the Blockchain: Deleveraging Spirals and Stablecoin AttacksJuly 26, 2019 P2P Financial Systems, European Central Bank 20 / 24
Simulation: DStablecoin FailuresDStablecoin failure/stopping time when
1 Speculator's liquidation constraint unachievable, or2 DStablecoin price remains below $0.5 USD
VaRN.1 VaRN.01 VaRM.1 VaRM.01 AC1 AC2 RNSpeculator Risk Management
0
200
400
600
800
1000
Stop
ping
Tim
e (D
ays)
DStablecoin Stopping Time vs. Risk Management
20 percentile5 percentile
(a) t-distr(df = 3, µ = 0)
VaRN.1 VaRN.01 VaRM.1 VaRM.01 AC1 AC2 RNSpeculator Risk Management
0
200
400
600
800
1000
Stop
ping
Tim
e (D
ays)
DStablecoin Stopping Time vs. Risk Management
5 percentile1 percentile
(b) normal(µ = 0)
Consequence: relies on new capital entering system during downturnsAriah Klages-Mundt, Andreea Minca (In)Stability for the Blockchain: Deleveraging Spirals and Stablecoin AttacksJuly 26, 2019 P2P Financial Systems, European Central Bank 21 / 24
Discussion: A Pro�table Economic Attack
Attacking a stablecoin is di�erent than a traditional currency attack
Focus not on breaking willingness of central bank to maintain peg
Instead, involves manipulating interaction of speculators
The attack: Attacking speculator manipulates the market to trigger and pro�t from spiralingliquidations
This can cause perverse incentives for blockchain miners
Attack rewards can be > mining rewards
Miners can censor or reorder transactions to extract value
Incentive to re-write blockchain to trigger liquidations in present
Ariah Klages-Mundt, Andreea Minca (In)Stability for the Blockchain: Deleveraging Spirals and Stablecoin AttacksJuly 26, 2019 P2P Financial Systems, European Central Bank 22 / 24
Discussion: Design Insights
Design focus: widen `stable' region, limit severity of `unstable' region
Design considerations in Dai
Fees amplify deleveraging spirals. Can instead make counter-cyclic fees
Good fee mechanism could reduce speculator herd behavior
Better `last resort' use of MKR to quell deleveraging spirals
Ariah Klages-Mundt, Andreea Minca (In)Stability for the Blockchain: Deleveraging Spirals and Stablecoin AttacksJuly 26, 2019 P2P Financial Systems, European Central Bank 23 / 24
Summary
This paper: Develop a �rst model of noncustodial stablecoins
1 Dynamic model with feedback e�ects, yet remains tractable2 Analytical results
I Characterize dynamics, liquidity, deleveraging spiralsI Show `stable' and `unstable' regionsI Explains actual stablecoin movements
3 Simulation results1 Support for `stable' vs. `unstable' regions2 Speculator behavior a�ects volatility3 Failure dominated by collateral returns
4 Discussion1 Suggests attacks from speculators and miners2 A foundation for future design study
Ariah Klages-Mundt, Andreea Minca (In)Stability for the Blockchain: Deleveraging Spirals and Stablecoin AttacksJuly 26, 2019 P2P Financial Systems, European Central Bank 24 / 24