New Ethereum talks, every Monday. The week's conference uploads by event, in your inbox.

Loading player…

Token Dynamic Workshop - Stablecoin Collapses; A Thing of the Past

Stable SummitWed, Oct 9, 2024, 12:00 AM

Stablecoin Collapses; A Thing of the Past Presented by: Nate https://twitter.com/OfficialESC, Founder at Token Dynamics (@tokendynamics). This workshop was recorded at the unStable Summit, Devconnect, presented by Stake Capital Group https://twitter.com/StakeCapital, Curve Finance https://twitter.com/CurveFinance and Platinum Sponsors Angle https://twitter.com/AngleProtocol, Maker https://twitter.com/MakerDAO, Venus https://twitter.com/VenusProtocol, Aave https://twitter.com/aave and Bitget Wallet https://twitter.com/BitgetWallet.

Transcript

great all right awesome all right great well thank you everyone for coming I appreciate it I'm going to be speaking about stable coin collapses and specifically what can do to prevent them in your protocol design so my name is Nate I go by eat sleep crypto and I'm the founder of token Dynamics I've been in the space for 10 years now and I've been writing about token economics and related Concepts how to Value cryptocurrencies where currencies get their value from and how to financially engineer value into your token in a way that aligns the incentives of all of the participants in your protocol um that's what we do at token Dynamics so it's tokenomics as a service and prot call Design shop and I want to start by talking about why Bitcoin captured my attention and why stable coins have my attention now so when I first found Bitcoin my friend told me about the Silk Road and he told me people were buying drugs and other illegal things over the internet and I asked them what currency are they using that this thing hasn't been shut down by the US government yet at this point Silk Road had been going on for two years and I was fascinated when I found Bitcoin and he's like there's a network and some Miners and I was an information systems major at the time in college and so I started to look into this and realized that this protocol and this currency had legs and what initially attracted me and still attracts me to this day is that Bitcoin survived because of the economic incentives Bitcoin is primarily an economic Innovation not a technical one all of the components for Bitcoin existed predated its launch for at least 10 years proof of work other components of Bitcoin had been around for a long time it was bitcoin's alignment of these pre-existing Technologies coupled with the economic incentives that have kept it alive Under Fire from so many governments and large corporations that would rather it not exist so for a little bit of context on my talk today I'm going to be focusing on the economic exploits to protocols rather than the technical exploits I'm going to distinguish what that is but for now the term is economic security and I'm going to be focused on what everyone calls decentralized stable coins I prefer to call them censorship resistance stable coins because decentralization is a means to an end and not the end in itself just because your protocol is completely decentralized doesn't mean it's going to work doesn't mean it's going to be valuable or hold up under pressure but if it's censorship resistant by definition it will and part of that is because censorship resistance the only unique value value proposition of blockchains and blockchainbased applications there are other ancillary points but mainly censorship resistance is what gives these things value and makes them so different from existing Technologies so I'm going to be talking about that and I'm going to be going through the history of exploits of particularly stable coins and give you guys a couple examples and try to sum them up into categories of ways that protocols specifically stablecoin protocols have been economically exploited in a way that gives you a way to think about your protocol design I'm also going to leave you with some essential questions that you need to ask in your design process to make sure that your protocol doesn't get economically exploited so Economic Security is uh I Define it as a lack of bugs in the incentives technical security is a lack of bugs in the code and economic security can also be described as the alignment of incentives in a protocol that allow it to be sustainable for the longm without human intervention so without trusted third parties or something like a dow that wraps your parameter adjustments and keeps it just alive enough to persist um and I have Charlie Munger up here because he is uh big inspiration for a lot of my work he didn't actually say code is law he probably thinks bitcoin's as bad as his partner Warren Buffett does but Charlie Monger has two quotes that I really like in relate to tokenomics and incentives that first one is he says uh show me the incentive and I will show you the outcome and so what we're working with in Economic Security is a system of incentives that do three things they're providing value to users they are acre value to investors and they're keeping the protocol sustainable for the long term as long as they're properly arranged these are the three principles of tokenomics I'll get to them later the second thing that Charlie Munger says is uh if you have the opportunity to work on anything else or if you have the opportunity to work on incentives don't work on anything else so that's the reasoning behind the economic security Focus rather than the technical security focus and so you could sum this up by saying Economic Security is concerned with system design rather than the translation of the or or rather than the code itself it's more the translation of your code uh into your the translation of design into code and also the design itself there are three e of Economic Security these are edge cases exploits and externalities so I'm going to start by going over a couple of vulnerabilities and exploits collapses that have happened in the past and categorize them these are a few categories up here that you can lump things into um so we have uh this GitHub thing here you can check it out it's a repo of economic exploits that have happened across all protocols that's on our GitHub token Dynamics XYZ and uh on the right here this is a timeline of the economic exploits of stablecoin protocols you can see they're kind of clustered around Peaks because a lot of the things are um collateralization underlies a lot of the issues liquidity underlies a lot of the issues and these things come up at Peaks so uh a couple categories here the first one um dependencies so this is is the logo of angle and their stablecoin was uh used in Oiler which got hacked earlier this year and when it did it caused the token to drop drastically in value um the point that I want to make and something that I reiterate a lot is economic security is inherited so when you're designing your protocol you have to consider what your dependencies are whether that's uh a dependency on another protocol or a dependency on your token price the uh Upstream the the consequences of other people's protocols that you build on have Downstream effects the second category of exploit that we see a lot of are governance exploits and I'm in to I have a entire slide dedicated to this because governance is the largest attack Vector for most protocols and I think it's very underestimated today I think going forward we're going to see a lot of the older protocols exploited through governance rather than through other system design failures or technical issues um Central planning is a third broad category of Economic Security exploits we have uh that was Fay there and I have a little bit more to say about that but when you try to engineer people's behavior you're going to create externalities these unwanted consequences that are borne by people who don't necessarily opt in the um underlying Behavior so uh one case of externalities is like phas uh trying to phase over engineering of the incentives in their protocol led to a dpeg and that caused a death spiral for hundreds of millions of dollars of value uh fourth category here that is um not entirely unique to stable coins so all of these categories are not unique to stable coins per se but system design um and M is a stable coin uh Olympus da but um you know sometimes they're just fundamental issues with system design and poor game theory is one of those so when I first heard about Olympus 33 I thought -10 -10 the prisoners dilemma because Olympus Dow and M the idea that you would uh you know not sell if someone else doesn't sell is just a glorified prisoners dilemma it has extra boxes in the grid um so sometimes just simple system design issues come up that developers don't anticipate for one reason or another because there's a lot of moving pieces in protocol and going back great okay so um I want to talk a little bit more about governance issues so like I said governance is the largest attack Vector for most protocols and that's because governance rights don't actually make a token valuable um the analogy I like to use is McDonald's so you could meet someone that goes to McDonald's every day for their lunch and they might see the little slip that says vote on our next menu item they probably won't check those boxes they won't go out of their way to do that they definitely won't pay for the privilege and this is the situation that I think most protocols with pure governance tokens are in where their users are not that invested in the future of their protocol because there's no direct incentive to be um so you need to capture value in other ways this is a solution to the economic security issue of a pure governance token and I have here the logo for UNIS swap fee switches and the promise to maybe someday acrw value to your token is not a good enough reason to uh is not a good enough mechanism to ACR value you have to use your token in ways that people are willing to buy it and I wanted to go over two examples here before I move on so the first is beanock um beanock had a a system design issue but it was their governance which immediately voted a protocol a um proposal through that was exploited and had they not had that issue they might have survived to this day the second is my second favorite economic ex security exploit which was build Finance so they had a four or five day voting window where somebody had managed to acrew most of the treasury tokens and they were uh it was a large minority and they were voting themselves the treasury funds and so you had build Finance all over Twitter for almost a week trying to Rally their Community to vote against this proposal but they were watching a slow motion train wreck which culminated with the loss of all of their treasury funds so second uh high level category here is Central planning um so this is mostly concerned with a second order con consquences and being able to think through all of those um I actually shy away from even trying to suggest people build complex enough mechanisms that they have to simulate things in uh agent-based simulations my thinking is and and we do agent-based simulations at token Dynamics but in general if your protocol is so complex that you can't put it to a thought experiment to find these kinds of exploits it's likely that you're not going to be able to identify all of the agents in the system such that you could model that behavior and prevent the same exploit um and so what I uh generally Advocate is for market-based mechanisms so markets are self-correcting and they're maybe the most efficient coordination mechanism that we have as people and I advocate to include market-based mechanisms wherever you possibly can in your protocol instead of things like um one token one vote which or I'm sorry uh one person one vote schemes with pure democracy and Dows or uh having you know set groups of people upgrading the protocol those uh amount to centralized inefficiencies um or centralized dependencies in uh decentralized systems so one um particular uh thing that I like to talk about is is the uh setting of parameters so you can set parameters H in a centralized way but um if you leave your protocol you know uh sorry I'm GNA backpedal here um so hardcoding parameters is a problem hardcoding algorithms is still a problem so people have the idea that they can sidestep uh the need to hard uh to update parameters but uh hard coding a controller can be just as bad so we see this in Rye with reflexer Ry is uh trending lower and lower because they've hardcoded the controller even though they have something that's kind of um mechanistically changing the rates internally in the protocol it's still a predictable enough behavior that it can be exploited and taken advantage of we've seen vitalic even trading Ry and and uh recognizing after recognizing these kinds of flaws in the system so to sum this up with Central planning it's mostly concerned with second order consequences um this this liquidity is a unique concern of stable coin protocols so there are two fundamental questions here the first is how do you price collateral assets and there's this concept of marking assets to Market that's borrowed from traditional Finance so Mark to mark Market accounting is where you say the last traded price applies to all of the existing shares of a stock for example um you know if Tesla traded at $100 then all of the shares of Tesla are then valued at $100 each but in real in reality that's not really the case there might not be all you know the entire market caps worth of liquidity at that price and so um one important consideration for stablecoin protocols is to properly model this in their uh in their uh protocol design the second uh liquidity question that is unique to Sable coin protocols is which assets do you even use so some of the things that you might think about when you're deciding which assets to use to collateralize your protocol it might be the liquidity of that token like we previously mentioned the stability of that asset the volatility of it and how long it's been around its its longevity over time and on the bottom here are a few logos that have different approaches different answers to these questions so on the left some of you that have been around for a while might remember bitshares bitshares collateralized several different currencies and gold and silver um and so they were solving you know they were using the same uh collateral bitshares for multiple things they were diversifying in that way synthetics does more or less the same thing but they have a dow wrapper sort of where where people vote on parameter updates and so it end ends up being a slightly more centralized version of bitshares with some extra longevity uh Tara obviously uh I was going to make this entire talk about Tara and just going deep into that but I feel like that'd be playing Stairway to Heaven in a music store so I didn't want to go that route um but Tara was using terara actually was like I won't say it was a good idea but it wasn't as bad of an idea ideas most people think because terara was attempting to do what synthetics and bitshares did uh but for multiple protocols so uh terara itself had an uh anchor protocol which caused us but it also had mirror which was um collateralizing various traditional equities with uh Luna tokens so they were diversifying in the same way as the first two um but the two really interesting ones that we've seen stable coins out of recently are go and and curve USD and both of these are moving in the direction that I think uh most Protocols are going to move in that they're basically guaranteeing the liquidity of the stable coins the underlying assets that are used as collateral because the liquidity exists on their own platforms and I think the direction we're going to see in crypto is toward an oracle list design and the referencing of actual liquidity for the backing of these tokens so oracles are another consideration and the essential question here is how do you know the price you're getting is accurate and this boils down to what I call cryptoeconomic Authority this is the quantifiable trust that you can place in any piece of data or module or protocol and it's calculable so unlike decentralization censorship resistance and economic security are quantifiable and you can look at protocols and almost deterministically find exploit vectors in this manner and uh the this fundamental Paradigm here with the Oracle question is whether you introduce third-party trust to your system um so chain link is the de facto Oracle for crypto but there are many other Alternatives Tor is one of them and uh I'm going to use an example of a protocol that actually integrated telor but in the wrong way uh despite tons of feedback from various uh teams that um that they needed to adjust their system design but uh Bon Dow minted had a stable coin minted and um they uh this is actually my favorite Economic Security exploit so they uh someone figured out that they could update the price of an asset to instead of being worth $13 in change to be worth5 billion each and they deposited that asset uh into the treasury so they staked $175 worth of Tor trb uh deposited that asset into the treasury and minted the protocol dry um and this is a a simple fix but comes from the question of how do you know the price you're getting is accurate um so these are this is the essential Oracle concern and so all of these questions are the economic security considerations that are particularly relevant to stablecoin protocols and these are not all of them you also have questions about the other two principles of tokenomics so if you're interested in this check out my eth Denver talk I explained demand side tokenomics and the tokenomics trilemma but Economic Security is just one of the three principles you've also got to consider the usefulness the utility of your value of your protocol to users and the value that you're acre to the investors in the protocol your token holders um and so in addition to the sustainability of the protocol itself Economic Security and so that's what we help protocols consider at token Dynamics we have room for two additional projects right now and if you're interested you can scan this QR code or come talk to me this has got all of our contact info and with that I'll open it up to [Applause] questions like you quoted from eming uh regarding the F stable coin like can you explain what was their major problem yeah so um thanks yeah I forgot to I skipped over Fay um so they penalized uh Fay was penalizing users for redeeming Fay but uh in doing that they nuked their demand for their token because people don't want to buy a token that they have to pay penalties on in the case that they redeem it they had a lot of other uh you know kind of Market manipul not Market manipulation Central planning is really the best way to put it because uh one issue that I see we see a lot with protocols is people are porting over their reasoning from traditional Finance they're thinking about how it's done in trafi as an analogy to how it should be done in crypto where they don't maybe have idea or they're not creating a brand new mechanism and that's fair but uh one of the things that's inherited is this idea of centrally planning an economy because protocols in crypto crypto Protocols are essentially uh Island economies like Nation island nation state economies they're small and um insulated from maybe their uh other economic counterparts but um and so the issue with Fay protocol in particular was they were trying to micromanage their users behavior and this manifests in a bunch of different ways it's not just the coding in of the parameter ERS to elicit certain behavior from users it's also issuing tokens as a uh an incentive to participate in the protocol can actually be like really detrimental to your protocol because you focused on a supply side distribution rather than the demand side uh of your protocol and generating demand for your token so these are a couple different ways that uh protocols centrally plan that leads to exploits or vulnerabilities or edge cases uh in in different ways and so fate protocol is one example of that thanks um I was interested in your point on governance um do you think we're going to see the end of of kind of governance tokens Al together because as you quite rightly pointed out there's a number of drawbacks thanks for that I hope so uh I'm a government governance Fran slip I'm a governance minimalist uh so I think governance is probably the worst way to uh change crypto protocols I think issuing things in an immutable way as a hyper structure and then iterating on that or building modularly in tandem is the best way to design protocols it requires a lot more thinking upfront and that's where the censorship resistance comes in that's where um you know that's what we help protocols think about so I think uh governance might go by the wayside the the steps between here and there are several whales accumulate large well first of all the crypto markets become slightly less speculative and token governance token prices Trend toward zero until some large whales come in buy up a large minority of the governance tokens and vote themselves the treasuries if there are some um or change the protocol to their own ends something that I didn't mention uh but related to governance is if you only have a pure governance token if if uh the ability to change the protocol is your main driver of value in the token the only people that are going to buy your token are those that uh benefit at the expense of the protocol or potentially at the expense of the protocol because they can make upgrades to um change your uh change your protocol to point to theirs for example like I think we're going to see hostile takeovers of protocols in the future and that's going to be super interesting from an economic security perspective but I don't want to see any of the protocols that are securing lots of value suffer those kinds of exploits yeah I know at the end you had said that uh maybe Oracle list protocols or protocols with kind of built-in amms on top of them would would do really well so do you isn't that sort of naturally fragmented of the liquidity and like would you see like one I guess taking off and winning yeah that's a good question um so I think those Oracle list protocols for now are going to start as um for longtail assets and the way I see that evolving is that those protocols in particular can become launchpads so similarly to how curve um does away with the need for binance like binance used to be the Launchpad for all prodject projects and you had to pay them 100 Grand just to get listed and then you had to give them Market Mak fees or someone Market making fees to provide liquidity for your protocol with curve if your token is valuable enough from organic demand you can use that to bribe LPS to give uh to give a discount to people trading for your token through a pool and so the same kind of or Oracle less protocols like hoyu is one that has an amm mixed with a lending protocol um could be a decentralized Launchpad as like a way to gain Traction in longtail assets before eventually becoming the main decentralized Exchange and lending protocol for uh all tokens so you have also mentioned uh that you don't like biged in constants or like big in controllers but uh it seems to me at least that there are no great alternatives to those right so either you kind of freeze your protocol and then it's like V1 and that's the end of it or alternatively you have some governance which then allows to kind of smoothly evolve away from this initial version so like how do you square this problem I guess yeah great question so um I think I'll use an example of one protocol that is doing this well um the short answer to that is I think everything should be IBC compatible and upgradeable in modular it's hard to think about that in advance but if you have a road map then it is possible to think about how to design your smart contract so that it's extensible and you can build on it in the future and integrate different modules of various smart contracts from places in the past and one protocol that's doing this for their next upgrade is rail gun so they're a privacy protocol and they're building on their own past contracts but without porting you know without a V3 of every contract they're using V2 from past contracts and upgrading in that way so building modularly is I think the way to do that it does fragment liquidity for defi protocols but there are various ways to build defensibility into your protocol even if it's open source and immutable like Unis swap has one of the strongest economic Moes in crypto I think it's why their token hasn't gone to zero yet um they have they're they do several things very well they have good developer documentation they've got great PR they have um you know a lot of good things going for UNIS swap that keep people using Unis swap even when there's one inch and other Dex aggregators that are offering users lower costs so there are ways to protect uh your protocol in upgrades and avoid fragmenting liquidity to other protocols in that way

Automatic transcript — names and jargon may be misspelled.