# (In)Stability for the Blockchain: Deleveraging Spirals and Stablecoin Attacks by Ariah Klages-Mundt

- Speakers: [Ariah Klages-Mundt](https://streameth.org/speakers/ariah-klages-mundt)
- Channel: [Devcon](https://streameth.org/devcon)
- Date: 2020-10-09
- Duration: 20:31
- Topics: blockchain, smart contracts, distributed ledger, ethereum
- Watch: https://streameth.org/watch/yt-qOi50UtxL7A
- YouTube: https://www.youtube.com/watch?v=qOi50UtxL7A

## Description

Visit the https://archive.devcon.org/ to gain access to the entire library of Devcon talks with the ease of filtering, playlists, personalized suggestions, decentralized access on IPFS and more.
https://archive.devcon.org/archive/watch/5/instability-for-the-blockchain-deleveraging-spirals-and-stablecoin-attacks

We develop a model of stable assets, including noncustodial stablecoins backed by cryptocurrencies. Such stablecoins are popular methods for bootstrapping price stability within public blockchain settings. We demonstrate fundamental results about dynamics and liquidity in stablecoin markets, demonstrate that these markets face deleveraging spirals that cause illiquidity during crises, and show that these stablecoins have `stable' and `unstable' domains. Starting from documented market behaviors, we explain actual stablecoin movements; further our results are robust to a wide range of potential behaviors. In simulations, we show that these systems are susceptible to high tail volatility and failure. Our model builds foundations for stablecoin design. Based on our results, we suggest design improvements that can improve long-term stability and suggest methods for solving pricing problems that arise in existing stablecoins. In addition to the direct risk of instability, our dynamics results suggest a profitable economic attack during extreme events that can induce volatility in the `stable' asset. This attack additionally suggests ways in which stablecoins can cause perverse incentives for miners, posing risks to blockchain consensus.

Speaker(s): Ariah Klages-Mundt, Andreea Minca
Skill level: Advanced
Track: Society and Systems
Keywords: academic

Follow us: https://twitter.com/efdevcon, https://twitter.com/ethereum
Learn more about devcon: https://www.devcon.org/
Learn more about ethereum: https://ethereum.org/ 

Devcon is the Ethereum conference for developers, researchers, thinkers, and makers. 
Devcon 5 was held in Osaka, Japan on Oct 8 - 11, 2019.
Devcon is organized and presented by the Ethereum Foundation, with the support of our sponsors. To find out more, please visit https://ethereum.foundation/

## Transcript

[Applause] [Music] okay there's no penalty post-op but so if stable points are a centerpiece of decentralized projects which is rapidly growing and increasingly complex in just two years it's grown to five hundred million dollars in assets and it's evolved into a pretty complicated system of composability between a number of different levels and in the financial world complex system is usually come with complex roots so an example that everybody's aware of is the 2008 financial crisis where we had some contracts that were intended to really stabilize the system but ended on that make a huge destabilizing force but decentralized finance and blockchain is different right the whole idea is to try to correct some of the properties from the traditional financial system well it turns out that defy India has and complex risks so here is a noob it's one of the first stable points in USD which has a major competitive Angeles December hears steam dollars which has struggled to maintain its peg over the last year here's BIP et Cie a synthetic asset trying to track Bitcoin which is also collapsed in more recent news this past summer synthetics suffer an Oracle attack and a month later in Tehran another stable client suffered two oracle attacks the problem with these systems is this we really have sort of little formal understanding of how they work they end up having some complex feedback effects there's no a truly stable asset it's efficiently accessible within these systems sexual early trying to create in the first place with steroids and involves complex interaction in though different agents so in this case in this talk we're gonna go through a little bit about understanding stable coins sort of motivating how they're different from existing currency models and then go through a high-level overview of our paper which introduces a new model to try to understand these systems so a stable point aims to be a protocol that stabilizes the market price or purchasing power of the coin to become a more usable and adoptable cryptocurrency and there are two main types of state points one is the custodial point where some custodian holds the reserve assets off chain this is something with each other which reintroduced as counterparty receive back into cryptocurrencies and then there are now just oil systems in these systems which is what we're selling is being involve on chain mechanisms to try to target stability so example here this maker downs dive and this is like the systems we saw in the slides earlier they end up having very similar designs currently are very bad luck we don't really understand these systems very well and so to potential failure so let's go through a simple example of one of these systems this is a simple contract for difference so here we have a contractor preparing to read agents a stable plan holder and speculators let's say they each put in want to use their current worth $100 for a contract so now there's two e's over $200 as time goes for the price oracle updates the contract with the new price of ether but six eighty dollars and then the contract service returning $100 worth of ether now one point you Bobby be there to the stable one holder either a Mainer to the speculator but of course it's interesting a price point which is different the speculator wanna make a property and that's what they're really betting on that's why they are taking these systems so this is similar to a forward contract importantly except the prices really like fixed in terms while the payout is in this crystal core and you can't really settle in u.s. dollars blockchain so that's one limitation and in these markets they usually they're usually a heavy frictionless for doing converting between Virginia risky assets and yet and in many jurisdictions it may not be possible and so if you're a stable part holder and there's a settlement event it may actually be undesirable for you because now you're holding a risky asset and to maintain a stable my position would involve buying back into stable clients at a similar stable point and there's no guarantee that a good market for that continues to exist in all environments so this is motivated some of the new designs which is what we're focusing on in our modeling work to make it make stable points that perform in this sort of way but don't have sort of a set expiration date so in these systems you again have a speculator let's say they currently lock one Eve for the hundred dollars into a contract and they create fifty stable coins against or so amounts up to some other collateral effect so if you think in terms of balance sheets this is what the speculators balance sheet looks like and then they can take those fifty stable coins go to a stable plan market and trade for about 0.5 and I say about because it depends on what the market is willing to bear and that come turns out to be pretty complex to understand and this table by market works through some idea of arbitrage but importantly it's not real arbitrage because it depends on sort of assumptions about how the system continues and then at any time the speculator can repurchase those fifty stable ones to unlock their collateral but they're essentially getting is a leveraged position to make the leverage bet on this risky and at some time at some wife they may want to exit that lecherous position and then the other side of the statement market is taken by these staple gun holders who buy the stable coins that want to maintain a stable position for some sort or potentially in the future for purchasing reasons so now as time involves a price Oracle again updates its contract to tell what the true price of Defense and get the collateral value decreases below some threshold then the speculator can be partially liquid in him to try bring them back within that threshold and so you can see two main sort of areas of weaknesses of all instances one is around the price Oracle which if you can manipulate it you can connect the entire system and the other is around the stable point market which if it collapses it also breaks down the system and then at any point there could be some I did like this global settlement where this is getting back to what would happen in the original contract for difference the contract has settled the stable and holders in exchange they're stable points for either at the last oracle price and the remainder it goes to speculators but this is meant as sort of a last resort sort of thing and not intended to really take effect so an important question in these models is can we use the existing literature currency peg models to try to understand fees and unfortunately the answer is no so in traditional currency peg models we're really looking at a game played between holder's and there's a government issuer which is not really a player they're sort of mechanically committed to to maintaining stability for its own city but now in the stable point systems we're really replacing the government issuer with decentralized speculators who are now players linking so they issue and withdraw stable coins stop - - their profits over the long term they're not there importantly not committed to maintaining any idea all right and the best part you hope for is that protocols will assigned and the peg is maintained through incentives with some high probability so this motivates the model of this that we're building which it's we're building of a model of the ascetic we put forward in the previous slides and that behind those pictures and so we have two agents these stable point holders were seeking stability and provides row at the demand side of elasticity and speculators who choose leverage bets that are vacuuming the silver and there's madison's ether which is risky an exogenous price and stable one which has our doggedness price that we're trying to understand which is over collateralized in in the and then there's a stable point market which clears by setting the demand with the supply in the target terms in this case a simple list of dollars and this is similar in concept of how clear is not yes well and so in our paper we're focusing on understanding how speculators make to see so in our model the speculators decide how to change the stable point supply to maximize their next period expected returns subject to some constraints so this is some idea idea of honest behavior in these systems of these speculators because assistant designers really intend what are the systems to be maintained this idea of arbitrage if the price of the stable point is trading too high or too low then there's some idea of incentives for these stable point issuers and speculators to change the supply to bring them back in line with the target but as we mentioned earlier the stock should really to arbitrage that depends on some assumptions the systems continue performance so these speculators are then that they're subject first to a liquidation constraint and this is inherent to the protocol it says how over collateralized their positions have to be and then in our model they're also subject to a risk constraint which is self imposed by the speculator it's sense how much to the speculator want to avoid liquidation so some examples of how to formulate this might be risk constraint which is consistent with idea like a margin of safety you want to avoid liquidations with some probability but importantly we can consider a number of other formulations in our law so from our model were able to back out some analytic laws also help us understand these systems so the first is that there's a bound to the speculators ability to maintain the market it looks something like it's not really important to rest on the second result is that speculators case limits on how quickly they can reduce coverage even if they're bringing in capital for outside of the system and this leads to what we call deleveraging spirals where a speculator can end up having to research a stable point at an increasing price as liquidity dries up in the market so let's look through intuitively how this sort of works so here we're looking at to measure the price of the stable point so measures of demand and supply in the stable point market and on the far side the collateral in the system and so now if there's a liquidation collateral is used to reduce the supply by buying back stable coins which leads to an imbalance between supply and demand and to make up for that that leads to increase in price of a stable coin and a decrease in the demand thanks back your wine but now if we're looking at starting at this state if there's another wave of liquidations because the price is higher there's less liquidity in the market the more collateral needs to be used to buy back the same amount of supply to its epicenter facts and so you have sort of a potential apple amplification effect to how much collateral and how quickly it's used our third analytical result it describes when these systems are stable versus unstable if we had a couple more assumptions we contracted we show that if the leverage constraints for these speculators is never acted then the system converges to a steady-state where we have a stable price and zero variance and important observation here is that this steady state may not have a price of $1 maybe below put there potentially be above and then sort of outside of this stable or each other when this constraint activated then we conjecture the volatility is bounded above zero with high probability and the reason here is that sort of when you're outside of this this region you're more likely to remain outside because of this feedback effect which leads to something like a kink and the probability distribution at this about G and so we can actually see some of these effects in real data this is just a preliminary analysis of this here on this side here we're seeing and either decline in December of last year leading to a large reduction of the supply of dye and an accompanying increases in the price of dumping consistent with potentially an early stage of a deliverance by troll and so if that continued for a while we might see more extreme effects after that and then on the far side here in sort of more normal times for diet you can see that the price the certain normal trading price of diet can be below the $1 target but to serve in line with our stable original results and sort of effects from liquidations can cause spike spike increases to the trading process of technical our system lets us our model also lets us do some simulations so in these simulations we can see these stable and unstable regions as well we can also look at the effects of different speculator behaviour volatility and sort of survival rates of the system I'll leave that to sort of more details in the paper to watch check it out another important thing from our results is that they can lead to new attack examples so first an important thing is that attacking a stable one is a different idea from a traditional the focus here is not on breaking the willingness of the central bank to maintain a peg its instead involving manipulating the interaction of a number of speculators and there are three sort of attack primitives that allow these attacks to happen first is that these delivering spirals can lead to your arbitrage like trance around these to be supplemented with the fact that real implementation is stable at arbitrage to try too hard automate these regulations and then third miners have ability to censor reorder transactions to extract problems so the first attack we consider if there's either decline attacker and manipulate the market to trigger and profit from these liquidations so this is similar to a short squeeze like attack on existing speculators it can be supplemented also with a bribe to miners to try to freeze collateral chopped up transactions and it sort of works like this so the attacker would buy stable points early sort of try out put it in the market during the ether decline liquidations are triggered and then the attacker can potentially earn a spread by selling at the post of liquidation prices and also potentially the mentor as a new speculator attacks by prices which is good for speculator position intentionally and start looking at this in our model through some examples could potentially be very profitable the second attack is after their spiritual attacker trying to re-argue blotching to trigger and profit from spiraling liquidations and so the idea here is that a change in the transaction ordering can cause more liquidation and extractable value for the speculator which leads to the fact that perverse incentives for these attacks for miners is if those rewards are greater than the mining rewards then there's an incentive for the to do this technically so what is this kind of look so in the current state of the system we might have a timeline of the transaction history and say this is the Oracle price view and now the attacker are and then there are liquidations in the current timeline here and now the attacker wants to branch the watch chain here and importantly they can inherit the price because those transactions that are designed they can inherit the liquidations as well and place themselves in the position to perform those and benefit from those and in fact they can reorder and censor transactions to trigger even more liquidations and put themselves in the position of the proper doses [Music] so they're there also some design insights that come forth from our work so one idea is that if we're trying to figure out how to design these the focus should be on the widening a stable region and limiting the severity of the unstable region and there are some specific certain considerations I prefer diet particularly so there are fees in the die system which can actually have the effect of amplifying these deleveraging spirals but there's potentially ways that this could be reformatted in a counter cyclical cyclical way so that's work that's more a good key mechanism could also reduce speculator earth behavior and also reduce the effect of spirals and also there are potential better uses for a last resort idea of mk9 insurance to try to do quality to leverage expertise I talked about that a little bit more okay a key factor in how severe these deleveraging spirals can be is how exchangeable was the stable point to use alternatives on the sighting system so things like stable fiat currencies or stable Fiat back to crypto currencies and the highest exchange ability is to lower the feedback effects but it introduces an idea of shut numbers because we're really relying on these flows outside the system to help to stabilize the system and in many jurisdictions this being optional so there's a couple sort of open questions that I'm continuing to look at along these lines the first is expanding the strategy space of the speculator is an attack there's understanding what else it could be possible in this space and understanding governance now our fluorisis how that relates to the interests as well and then connecting back to the first slide understanding sort of composability of the risks between all these protocols but you can have layers upon layers of de letters that could potentially occur and then eventually we want to learn how to design more crash resistant systems so that wraps up the talk here so key takeaways you can take away either a stable kind of lateral yeah potentially be consumed a lot faster because of his deleveraging sort of effects and this can lead to you arbitrage like trades around liquidations and new attack incentives to consider so there are a couple more resources here as we want to learn more and you can follow me to see some of the subsequent work that i'm working out [Music] yeah yeah that was acting to understanding how the demand side works yeah more of artistic oh no that's not quite right like that motivated team the external Lord as the system you go back like four best nights okay actually I think we have to wrap up but come talk to me right now [Applause] you
