Zero Knowledge Episode 140: Staking derivatives & DeFi with Alex Evans (and Tarun!) ** Thanks to Chris Lin For editing this transcript! ** Music] Anna: Welcome to Zero Knowledge. A podcast where we talk about the latest in Zero Knowledge research and decentralized web. The show is hosted by me, Anna. Fredrik: And me, Fredrik. Anna: Before we start in on this week's episode I want to remind you all of an upcoming AMA episode with Frederick and I. This will be hosted by our friend Alexandra Heller. If you have any questions or topics that you'd like to see us cover, please head over to the ZKPodcast subreddit and leave your questions there. I will also link to a tweet that Alexander sent out last week where you can also leave some questions. Be sure to ask us about production, blockchain, zero knowledge proofs, or where we see the space going. Ask us about our hopes, dreams, and aspirations. Whatever you've wanted to know but we're too afraid to ask. So the links are in the show notes, and hope to hear from you. I also want to say a big thank you to this week's sponsor Trail of Bits. For this spot they asked that I share recent update about Crytic. Crytic is a GitHub App that continuously assures your Ethereum Smart Contracts are safe and functional. Reporting build status on every commit and running a suite of security analysis, so that you get immediate feedback. Upgradeable contracts are not as safe as you think. Architectures for upgradeability can be flawed--locking contracts, losing data, or sabotaging your ability to recover from an incident. Every contract upgrade must be carefully reviewed to avoid mistakes. Crytic now includes a comprehensive suite of 17 upgradability checks to help you avoid these pitfalls. This tool allows devs to stress test their upgradeable contracts as they go, saving time and potentially catastrophic headaches down the line. For more check out their blog post where they describe how to use this tool. I've added the link in the show notes. So thank you again Trail of Bits. And now here's my conversation with Alex Evans and Tarun Chitra. [Music] Anna: This week I want to welcome back one of my favorite guests and our sometimes guest host Tarun. Tarun: Hey. Anna: Um, for this episode, we're actually speaking with Alex Evans, who's a researcher at Placeholder. Welcome Alex. Alex: Hi, thanks for having me. Anna: Alex and Tarun recently published a blog post, where they talked about the kind of challenges around POS staking derivatives and the batching of those derivatives. And that's going to be the majority of this episode. So Tarun today you're going to be sort of a combo guest host / guest. Hope you're ready for it. Tarun: Yeah I'd like to think of it as I rehypothecated myself as a staking guru as a guest. Anna: Cool. And Alex, uh, you know this is the first time that you're on the show. Tarun knows you quite well. but I don't. And maybe it would be great for you to introduce yourself a little bit to our audience: who are you and what do you... what you are working on. Alex: Sure. So, as as you said in the intro. I'm a researcher at Placeholder. A little bit of context, Placeholder is a venture capital firm in New York. We invest in open crypto networks and the infrastructures that supports their developments. We have a specific focus on governance and economics. And so a lot of what we end up spending our time thinking about is things like what makes protocols efficient, what ways do communities have of governing themselves, what drives value to these networks, and those sorts of things. So my role within Placeholder in that context is kind of twofold: so one is relatively typical of a VC firm, like, I take a lot of calls with entrepreneurs, developers, project leads. Once upon a time, I also used to do in-person meetings with those people. You can imagine. Um, and, I do some research on particular areas, that we potentially ultimately end up investing in. So that part is relatively typical and vanilla, as far as the vc world goes. Then I also have this other, and perhaps for the purposes of this podcast more interesting, version to my job, which is, I end up doing a lot of thematic research in vertical areas that I find interesting. Right, I have the opportunity to dig a little bit deeper. And so, in the past, that's including things like, um, credit risk, and lending protocols like Maker. More recently, it's included in this paper that we wrote with Tarun, and on staking derivatives, as well as another recent paper on liquidity provider returns in Automated Market Makers. So it's really kind of, it's two sort of opposed roles that I have. One is very vertical, uh very horizontal, I should say. Uh where it's my wide inch deep talking to a lot of different projects, seeing what's going on in the ecosystem; and then there's a supplementary piece where it's more vertical and I get the opportunity to to dig deeper. And those perspectives kind of inform each other, I think, in interesting ways. And so far that's producing papers that people like and has given like some opportunities that as a firm we've been able to pursue as a consequence. Tarun: Yeah, so you know, Alex and I started working together, because we had both around the same time realized there's a deep theory around Uniswap, um, and it was at that time that I realized Alex is actually kind of a weird, self-taught, savant in that he didn't really come from a math background, but he had taught himself a lot of probability, like formal probability theory, and stuff, at a level that people in the cryptocurrency space never have. Um and so we both just ended up being really great, because he has a lot of experience in venture but for some reason knows a lot of financial mathematics and it was very complimentary. Anna: Cool. So this episode should be pretty DeFi heavy. And this is something that it's so funny, because I think on our New Year's episode I said something along the lines of like DeFi is boring, or I said memes was born. Whatever, I made two bad calls, and I've actually been called out a little bit for it, and it's funny. Because I do find that like there's been so much activity in DeFi that it inevitably starts to kind of come into this podcast talk, into the topics that we cover on this podcast as well. And I think this episode is going to be looking at first at like the state of DeFi, and then we're going to dig into a paper that Tarun and Alex co-authored, looking at how PoS systems can be impacted by these staking derivatives. So since I have you both on the episode, I wonder, I wanted to ask you a little bit more about just general state of DeFi, where are like, what's going on right now. If you could like highlight one or two main trends that you're seeing at this point, what would they be. Tarun: Well, I think the easiest at least like market dynamic changes that have happened are that you know people have basically used these decentralized platforms to replicate, uh, financial services offered by centralized platforms like Coinbase, or BitMex, or BlockFi. And I think people had this sort of growth hacking issue, where like the only people who wanted to use DeFi for a long time were those who had really poor access to capital, but the people of really poor access to capital are oftentimes not very technically sophisticated. So you have this chicken-and-the-egg thing, like how do we get people using this stuff even though it might be too technically complicated. And over the last six months I would say the UX, uh, plus its very complicated incentive mechanisms, have actually made it cheaper in a lot of ways to use the decentralized versions of these products than the centralized versions, which has brought on a lot of migrated, a lot of people, over, um, and so we're witnessing one of the greatest growth hacks in history. Um I don't think I've ever personally seen anything that's come close to this, and that has been the sort of catalyst of migrating people from centralized crypto trading and lending, to decentralized trading and lending. I would say thematically that's what's happening. Anna: Do you think though that like, I remember like, you know, back in 2017 you were also seeing more traditional financial entities entering crypto. Would you say that now it's like centralized crypto is moving to decentralize crypto, but like are there also traditional finance also getting excited about this part of it? Or are they still kind of staying out of this? Tarun: It's still pretty complicated. I think it's like still too complicated for like very traditional finance folks. It's too complicated for centralized trading folks in a lot of ways, because you have to understand a lot more of the blockchain mechanics and engineering, and low-level details about the virtual machine, and like if you're really making good investments in DeFi, you need to actually understand a lot of the engineering details, which is very different than normal finance, where you only really care about the financial details. And the centralized exchanges usually act as this abstraction layer, so that when you're buying bitcoin on coinbase, you're not actually buying bitcoin on coinbase, you're buying the right to coinbase issuing you bitcoin later. But they could just be like, hey sorry we're gonna exit scam and take all of the bitcoin and not pay you back. DeFi doesn't have this problem. It's very much non-custodial. So if you have your own keys, you can keep track of all the funds you have on these exchanges, and you also can check whether the exchange itself is under collateralized, or is trying to pull a scam, or whether there's a Mt.Gox happening. These decentralized finance entities can actually make sure that those don't happen, but they are more difficult to use. And there's this trade-off surface and that trade-off surface is captured by the sort of difficulty in engineering problems. Alex: Yeah. So on that engineering problem, there're a couple interesting things that we're noticing as well. We're seeing a lot of engineering talents try to focus on building some of these opportunities. A lot of them are more traditional developers, might come from what software backgrounds that maybe don't have as much of the finance background, but just have an opportunity to play with these different primitives and assemble things that potentially users find interesting. One of the things that we hear repeatedly from people is that, they pursue the opportunity because the underlying infrastructure is potentially more neutral to the things that are on top of it. So you know, if I was building a lending system back in the day, potentially I might have to compete with a whole bunch of banks, and then Goldman Sachs launches Marcus and I have to compete with them, um, and a whole bunch of things like that. Now we're getting this opportunity where I can build things on top of lending protocols, knowing very very specifically what types of behaviors I can expect, I mean, borrowing, you know, hacks, and and that sort of things which are, uh, still all too frequent in DeFi. But as that infrastructure, ossifies, it's relatively predictable, in terms of somebody who's building a financial service, to know that the underlying infrastructure is ideally neutral to them. At least at this point of time, such that, they can build with confidence and know what functionality they're offering to the end user. Tarun: And one other thing I would say that's certain extension of that, is, you know, I, we kind of over the last 15 years, we saw the evolution of financial technology go from, you know, things in 2006 and 7, of, of, Venmo kind of figuring out how to make social networks useful in payments, as an evolution from paypal. And then you started to see Stripe and Plaid, uh, come out in like 2013 and 2012, which offered sort of these API access to banks, so people who are developers could sort of write programs that programmatically borrowed and lent for you, the end user, so that the end user could have experiences like Robinhood or, uh, you know, these other, other, like Coinbase itself, right, like, use Plaid heavily, right. Um, so these end users, or mean, .com, and these end user experiences rely on being able to have a single API to every possible bank, right. Because there're hundreds of banks, they all have different server stacks: some of them have servers from the 1960s using Cobalt. And you, as the end developers making this app, don't want to learn 500 different bank schemas, right. You want a single API. And so the growth in Stripe, and Plaid, and Revolut, and Monzo, and all of that type of stuff transfer wise, that all was driven by this kind of API layer that made access to banking very easy to use and uniform. But it didn't give you access to risky capital, you could only do kind of read-only bank operations, where you're, like, you can read someone's balance, and say, hey, uh, you can start an ACH transfer to Robinhood; or you can, like, say, hey, you can do some very minimal amount of transfers. But there's a lot of centralized gatekeeping, and there's a lot of like, it's still not a very efficient system, whereas crypto lets the risk operations take place on the smart contract platform, and DeFi is those risk operations: whether they're borrowing and lending, whether they're issuing derivatives. These are just things that Stripe and Plaid cannot do. And I'd say this is sort of that evolution art if that makes sense . Alex: Yeah. The other thing on there is, let's say, there are certain APIs that you have the capability to change system state, I write access to. Um, it's not exactly always clear in centralized finance if I'm stitching together two or three different services by accessing their APIs that, if I change something in the state of the first of three, but then in subsequent transactions that that state doesn't propagate. So if I borrow some amount of money in order to make a trade, when I go to trade, potentially something's changed, um, at that ladder venue. So in crypto, one of the things that you're able to do, and in some ways it's good, in some ways it's enabling things like Flash Lending. And that can be good, and promote efficiency (but can also be dangerous, if you have exploits), where I can guarantee the behavior within a transaction. So I can say execute this transaction if xyz conditions hold, and I can have guarantees about how these things are being stitched together in the context of a single transaction, as opposed to having to worry about different databases that may not be in sync with each other, and where you have to deal with this dynamical system of I'm changing the state of one system and therefore something maybe moves against me in another. Anna: Interesting. And I wonder, like, would you say that a lot of the DeFi protocols, like, I'm assuming a lot of them are at least semi-open source and, like, so there's like this way of locking into them, whereas these other kind of older systems would have been more siloed and more closed. Would you actually, let me ask the question, would you say that is the case, like, is part of the reason why you can do this programmatic thing more accurately because it's open? Tarun: It's open plus consensus. So I think, to Alex's point, without a consensus algorithm you can't enforce this atomicity of risk operations. Right now, when you go to Robinhood, and you say, hey, I want to transfer 10 thousand dollars from my bank, and then Robinhood gives you the experience of like, hey, we just increased your account by ten thousand, you can go buy Amazon shares. They don't. They're actually taking risk. They're assuming that your bank transfer will work. And if it doesn't, then they liquidate all your stocks, right? In the crypto system, you don't have to do that. Once I do the transfer, the money is there. So I can just make everything conditionally dependent programmatically, which just doesn't exist in normal finance, all of the hacks that are make it look like that's happening for you, are all like some centralized entity assuming risk and lending money to you implicitly. Anna: Yeah, oh wow, yeah, that totally actually makes sense. But do you feel like, is there no, I mean, and that's sort of speaking to the centralized version as well, where the centralized version was also sort of, just like, where the actual things were held weren't necessarily reflected in the user's experience of where those things were held, or when things transferred wasn't exactly reflective of the actual underlying transfers happening. Tarun: Yes. Anna: But now it is. Tarun: Yes. Anna: Through DeFi. That's cool. I have another, sort of, part of DeFi that, I have not explored very much. And Tarun, I know you do something around this. And Alex I don't know if you do, but liquidity farming like, I feel like I heard this word like three~four months ago. I'm sorry I know I must sound so out of the loop, but like, what is that, does that exist in every... is that a finance term? Tarun: So, so a phrase I like to say about DeFi is, arbitrage is the proof of work of DeFi. In order for these systems to work, someone has to be able to perform a profitable arbitrage. Otherwise these, the states of different contracts won't reflect the true value that they're supposed to reflect. So someone, there has to be kind of these pennies you can pick up in front of the steamroller. And the smart contract emits the pennies in the form of tokens. Liquidity mining is something where software, where a very kind of clever idea from Compound, to basically encourage you to use the system by paying you in tokens if you found an arbitrage. And this became this thing where now a lot of people were able to net borrow from Compound at negative interest rates, because they were earning more money in the token than the amount they're spending borrowing. And it's a growth hack. But it's a growth hack that the smart contract pays for itself. There's no like human. There's no SoftBank subsidizing Uber for 10 years, or WeWork or whatever. It's a growth hack where if it stops then basically it just means that the market price, the market price, the value of this incentive, down to zero. So there's like a market valued growth hack. Um I don't know if that Alex could add... Alex: There's two additional things that I'd layer in there. One is that, it's often used to distribute tokens. So you have a bunch of tokens as a project, and potentially your project that says I want my project to be community-owned, and governed through this governance token. And so the question then becomes how do I get that in the hands of my community. In the past you would maybe do an ICO or figure out some other way of getting that people into people's hands through investment. Now you're basically saying come use my protocol, and depending on how much you use it, you get more of it. And there's advantages and disadvantages to these different approaches. The second thing I'll add to that is, what, the question that, I think a lot of people are asking the question, they should be asking is, what is residually left over at the point at which the incentive stops, right? So you're, you are incentivizing people to come pick up these pennies from the steamroller, you're creating an ability for people to be set up to perform these arbitrage opportunities. When that stops, do they continue to stick around? And, and here you might see some differences actually across different protocols. So for instance, you might in the case of a AMM, say, well, as the protocol gets bigger it gets more liquidity, it's easier to trade. In some sense, there is kind of this network effect as it gets bigger, the experience gets better. Some lending protocols have the same effect and that they are also implemented as AMMs. You can do a bigger trade without moving the interest rate curve too much. But then also potentially as... Anna: Wait, just, what, what is an AMM? Alex: Oh right, uh, so... Anna: You're talking to a DeFi numb. Alex: So, an AMM... And I think Tarun you might supplement my definition here, but at least how I define an AMM is an algorithmic trading agent. In the simplest case you have a contract, like Uniswap on Ethereum, uh, users contribute, let's say, fifty percent DAI and fifty percent ETH to that contract, and then that contract offers that ETH-DAI to traders for pairwise swaps at an algorithmically determined price. Tarun: Uh, uh, maybe, maybe something I'm unraveling, something that's simpler. AMM stands for Automated Market Maker. So the idea is, on centralized exchanges like Coinbase, uh, you know, people like my old employer, or, or like JUMP, or other trading firms, will be doing what's called market making. So they quote prices. They say, hey, we're willing to buy Bitcoin at 9,000 dollars and we're willing to sell Bitcoin at 9,100. And by having people who are quoting prices that they're willing to buy and sell at, the market is liquid in the sense that, for many people, it's liquid, and there's a notion of a price that is discovered. Now if you want to decentralize that, just like the oracle problem, you need some way of being able to quote a price that is correct without having to have these humans in the loop. Um, and Automated Market Makers were sort of first invented in the early 2000s, to try to to capture this. Um, they, they were actually invented for online Ads. Because online Ads had this problem with liquidity, where each Ad that was sold was a non-fungible. If I went to booking.com and I saw an Ad for the zk podcast, and then I go to, um, I don't know, what's another site that exists that people see Ads, uh facebook, and I see a zk podcast Ad. Those are actually different products, right? They're not both zk podcast Ads. They are at some level of that abstraction. But at the level of who's selling the Ad, they're two different markets, technically, right? One is the booking.com market, one of the facebook market. And so the problem is, it's very expensive to, you know, you have to pay some incentives for people to market make. Aand when you have millions of markets, right, every Ad, online Ads, is kind of a non-fungible market like an NFT. Uh, when you have millions or billions of those, it's impossible for Market Makers to market make all of them. So one question is, can you make an algorithm that can correctly quote you the price based on how much people are interacting with that, right? So there's all this algorithmic data of... oh um... there's like 500 people going to the site, so like, this is how much you should pay for the zk podcast Ad. ... So they were invented to kind of get over this liquidity crisis of, like, if you know there's a fixed amount of capital, but there's an infinite number of online Ads, and somehow you have to allocate, and how do you do that algorithmically? You make these things called Automated Market Makers. People over time were like, hey, why don't we just get rid of like trading order book venues, um, and replace them with Automated Market Makers. Well, they have an engineering trade-off. The engineering trade-off is, they, their latency is much worse, and their ability to cover their losses in some sense is actually really bad, because if someone makes a really big trade against the Automated Market Maker, it's a piece of code that has to fulfill that trade. But it potentially is trading against itself. If someone finds an exploit in a certain sequence of trades. So it was hard to develop these things. Um I think, like, you know, people who are now algorithmic game theorists, who are looking at crypto, like Tim Roughgarden, they, they, invented the theory for a lot of this stuff in the 2008 era. And then Automated Market Makers made a jump to cryptocurrency, uh, in 2015, in this, uh, kind of blog post, uh, reddit, sorry, reddit post, between Vitalik and Martin Köppelmann of Gnosis, where they were like, hey, can we, can we get rid of these exchanges, and this has to do with the whole DAO hack, can you stop trading thing that... I don't know... if you're familiar with from Ethereum history. Um, but I think they wanted to have an Automated Market Maker on Ethereum selling you Ethereum, and that led to Uniswap. Anna: Is Uniswap an AMM? Tarun: Yes. Anna: Okay. Tarun: It is. It is an AMM. It used to be the most used on-chain AMM. Uh it's now the second most used on-chain. And, um, the first ... Anna: Awesome. Thank you so much for defining that by the way. And sorry Alex we interrupted you. You were actually describing it. So I wanna, I wanna take a step back to what you were talking about when you were basically adding to the conversation around liquidity farming. You're... sorry that we, we did the detour, but actually this is awesome. Alex: No, thank you. That was actually very helpful, because it clarifies what I think is a distinction. What I was talking about was, there's this difference between just the general AMM that's reporting the price between two different assets like Uniswap, and what Tarun described, what's the price of ETH versus the price of DAI. And there's this other AMM, that is something like Compound, where you're, you're trying to quote an interest rate, you have supply and demand people borrowing and lending, and your output is some interest rate. So in the former case, it's pretty clear that as you get more liquidity inside of this, let's say, ETH-to-DAI pair, that the experience kind of gets better. In a lending protocol, potentially it may not. I mean in a, in a certain sense, it does, because you can do bigger trades without moving the interest rate. But let's say if you have 90% of Ether supply inside of Compound, that may be pretty risky. And actually Tarun has done some really good work, explaining some of those limits. And so potentially some of these AMMs that are lending protocols may have to scale horizontally, but you can't get too big in any particular market, but you have to include multiple markets. So you're doing all this liquidity farming, you're building basically horizontal scale, while some of these specific AMMs like Uniswap pools, or curve pools, or Balancer pools, um, don't, don't have that as much in any one particular market. That makes sense. Anna: Is there... So... but I want to go back to that, like comparison to traditional finance, like that, first question I had was like, does it exist, is like liquidity farming a thing, what is the equivalent of liquidity farming? Alex: Yes. So it does. It does exist. So, um, but it exists in like weird esoterica that I think like the majority of people would never actually interact with. They just don't realize it. But in high frequency trading and market making, exchanges in order to drive liquidity to their exchange, pay incentives in the form of rebates, and these rebates are things that are like, if you trade more than a million shares a day, you, instead of paying ten percent in fees, you pay two percent in fees, right? And these, these incentives are meant to, like, and you, you can see this in crypto exchanges, it's like exactly the same in centralized crypto exchange. It's exactly the same incentive thing of, like, hey, if you, if you quote prices a lot, and the people who use the platform the most are the people who are Market Makers, because they have to, every, every time there's a trade, they need to update, and say, like, this is what we think the best price is, right? And then the market equals sort of an aggregated average of everyone's view on the best price. But basically exchanges have to pay these rebates, and these rebates are in fact the reason that you have Robinhood and free trading. Because Robinhood trading isn't really free. They're selling your orders to Citadel, Jump, my old employers, people, like, you know, like trading, like kind of algorithmic trading firms. And those people are actually executing it, and then they're, they're on average earning, let's say like 10 cents per execution, and they should give Robinhood three cents of that. So Robinhood is really selling your data to them, and they're executing it. And that whole system only works because of this incentive mechanism where the exchanges are rebating. Anna: Oh I see. Okay. Alex: Well, one of the things that's interesting here too is that, on exchanges, the different orders, it's not always necessarily, or at least historically hasn't always been clear, what the different rebates and incentives are. So some exchanges may charge takers, some may charge makers, some may have different orders, in fact, there's been a lot of controversy around hidden orders where people don't really know what the orders are. And so your order's not executed correctly and you have no idea why, versus there's a relatively set number of functions that these AMMs have, and so it's pretty clear what rebates you get at any individual time, and what the costs are to trading, or a little bit more predictable at times. Tarun: Yeah, one, one point clarification is when he, when Alex says takers, a taker is a person who makes an active market order. So it's a person who says hey currently people are are quoting, uh, I'm willing to buy the dollar, I'm willing to sell a dollar at one cent. Uh, a taker is a person who says, you know, what I'm just going to buy the dollar at one cent, I don't care, I just need to buy right now. I think like the financial terminology might be somewhat confusing. Anna: Well, not confusing. It's more like, when, when you're talking about liquidity farming, and then you're talking about these rebates. I mean, are they different mechanisms to incentivize the same action, or are they... because it's, it's from what I've understood of liquidity farming is more like you're, you're earning something. It's not that you're getting discounted something, or rebated. Tarun: So, you, you could think of it as a rebate though. Because in Compound, let's say, I'm borrowing, I put up a hundred dollars of Ethereum, I borrow fifty dollars of DAI or USDC, and I'm paying eight percent interest. But I'm earning like nine percent worth of COMP by borrowing. Well, now, I'm now on my... that's a rebate. Anna: Oh, I see it. Okay. Tarun: Right, you mean, okay, it could be viewed as you can always kind of eventually turn it into looking like a rebate. But it's a Proof-of-Work thing more than a Proof-of-Stake thing. So I think one of the points Alex made earlier about token distribution being very different when you follow these liquidity mining incentives is that, they're more fair in a lot of ways, they're much closer to Proof-of-Work where it's people competing to earn portions of the network. It's like versus Proof-of-Stake or ICOs, where the token distribution is, where the initial token distribution is, right, and you have to go figure out how to disperse it to as many people as possible. Here you're saying, hey, look, I have something where if you use it you earn my token, and you have, if the more clever you are at using it, the more you'll earn. So that you're, you're kind of competing on like whose algorithm is the best. And so in that sense, it's a lot more fair of a distribution than like, hey, I'm an investor, I'm gonna buy 10% of this thing, relative to what the community who uses it says it's. As if Stripe, every time you use Stripe, gave you a little bit of Stripe equity right, and so that's you should really, I think, that, that might be like a way of contextualizing it. Anna: Alright, let's, I want to move on to some other topics. And actually Tarun do you want to take a lead and ask one of those questions that we have? Tarun: Okay. So you know, I think, one thing that I've noticed certainly in, in the zero knowledge community, in layer one community, is that, people kind of are like, well, DeFi this thing is just writing a smart contract. Is there any real engineering? Is there any hard problem? Someone on this call, on this podcast, is guilty of this. There's no, there's no hard problems there. Um, so, and, uh, you know, oh, isn't it just like moving numbers, state, the state of numbers, around? So I think Alex, maybe, do you want to talk about comparing the differences in mindset in engineering, um, in DeFi versus zero knowledge proof system, especially since you are an investor in MatterLabs and are seeing kind of, uh, both sides of this. Alex: Well, in many ways, and, and I definitely don't want to be cheeky with the answer to your question, which is a good question, the investment in Matter Labs, and what excites us about Matter Labs is bringing together those, those two perspectives, right. The zero knowledge community has a lot of focus on diligent engineering and mathematics behind building these different systems is driving a lot of fundamental improvements on software and hardware and so forth, that are making these systems more viable. While DeFi maybe we're just playing with numbers, but we're having fun with them directly, and so bringing those technologies to bear in, in DeFi, uh, is something that we're incredibly excited about. In particular we feel that some of these, like the core things that make DeFi exciting, the security aspects of it, ultimately, the openness of it, the decentralized infrastructure that is neutral to the interfaces that we talked about earlier, are, I think, are better served in systems that reason very carefully about security. And, so, Matter Labs, for instance, should there be a DeFi layer 2, you know, would be positioned to do something like that, there are obviously lots of others that are vying for that. So we believe that ultimately the differences in engineering culture are just, one is a higher layer, and is, you know, potentially promoting a service that is for traders, for users, and so forth, while the other is building enabling infrastructure, uh. But we very much are believers in this idea that, the two ultimately converge as they have really in every technological trend and platform shift that we've seen. Tarun: Yeah. I will say, uh, in, you know, the normal world, um, the places that, that are the biggest cache aggregators in in terms of google's Ad exchange, and sort of like Citadel, like high frequency trading, those places are places where that's exact, they're the exact intersection of the type of people who build layer ones with people who like think about finance. And I think that's, that's kind of what you need to actually make a lot of these crypto products viable to the end user, who doesn't really want to think about gas prices, doesn't really care about the zero knowledge proof generation process. They just want to be able to use it, you know. It's like if I want my grandmother to use any of these crypto products, we need to actually get the finance part working well enough that you get the Robinhood experience. But it's really powered by people who are kind of both low-level engineering mixed with like finance. Alex: But I would say, one thing is, one of the ways I personally like to think about the difference, especially since a lot of cryptographers that listen to this podcast, is that, cryptographers like to think of the the stochasticity and randomness in the universe is coming only from one particular way they need to, everything needs to look like the uniform distribution, and you can only be a little bit far away from the uniform distribution. Because if you have a set of things, and you're like, hey, I don't, I want to be able to sample it, but you can't identify that, I picked something with high probability, then the uniform distribution is this sort of maximal entropy distribution. But people in finance and DeFi and, you know, Ad auctions, stuff like that, it's the opposite. It's much more like machine learning where you're trying to learn a lot of properties about probability distributions that are not uniform. And somehow do that to me is the fundamental mismatch between the two cultures and why they kind of are antagonistic to each other. At least, at least my observation. Anna: We should definitely explore that in further, as we go on. I want to lead us towards this conversation about this article that you created, and I think a question that could lead into that is, what are the similarities and differences between PoS and DeFi, like are... is PoS DeFi, in a way? Alex: Right. So, so, there's the general answer, and then there's the answer that's a little bit more specific to some of the work that we did which kind of incorporates a little bit of both, maybe that gives us an opportunity to transition to discussing that is, in some sense, Proof-of-Stake and DeFi do use stake in liquidity in somewhat not analogous ways. So there's a number of different Proof-of-Stake protocols, what all the different, say, protocols use this idea of coin as your collateral in providing some marginal security to the network. Similarly, I think a lot of DeFi protocols, may be innately, or maybe inspired by that approach have been pursuing something similar in that you back some amount of collateral, and then you issue assets against that collateral or provide insurance, as we've seen a number of different DeFi protocols that try to ensure the own functionality that they enable. We're seeing this a lot with lending protocols. So in that context, some of the ways in which you think about these things, may end up being quite similar, and, and they do end up being very much probabilistic as true and, said, a minute ago, that you have to think about what the probabilities that say of default are, or what the probability that somebody does something malicious, or messes with something, in this part of the system, and how that propagates to the rest of the system. So in that sense, there are some frameworks that can sort of incorporate both, and that's the non-tagline version of PoS as DeFi. Anna: And yet it's.. I feel like when PoS was really being developed, like the early ideas around it, DeFi didn't really exist the same way it does now. Or it hadn't come to fruition like even if some of the ideas were floated, we didn't know if it would be adopted. I mean think back to, I actually don't know this, but like PoS first proposed maybe like five years ago, six years ago. Tarun: Well, actually, technically it goes back to a 2012 bitcoin talk post as far as everything easy from someone, someone whose name is quantum mechanic. But the first PoS systems were, were like NXT in 2013 and peercoin around the same time. Anna: Yeah. Tarun: But the for this kind of current level of PoS systems that have, you know, like Verifiable Random Functions for sampling, and VDFs and stuff like that, that, that all I would say was really spurned by Tezos and Algorand, uh, circa 2015~16. Anna: Okay. Yeah, um, that, that's sort of the time frame. But like going back to that question, like how, like at the development point, when these were cons, when the concepts for these systems came in, came into being, DeFi wasn't on the radar. Alex: Yeah. I think that shows, in some sense, in some of the early designs in particular as Tarun mentioned some of the next generation of Proof-of-Stake protocols do take a lot of inspiration from some of the more financial work that's been happening, and that, it's incorporated the way they think about randomness and all these different problems that are fundamentally financial problems. But, but at their core, DeFi protocols, the core incentive is that you're getting some amount of yield on on your assets by being a validator. What, what ends up happening once you mesh those two worlds together that, in some sense, were up to a certain point considered parallel is a bunch of frankenstein-like effects. And I think the first person that I read that articulated this well was, Tarun, actually when you wrote this paper on competitive equilibrium between taking and lending, where you have these potential effects, where the returns to DeFi could be sufficiently high, such that you can destabilize the Proof-of-Stake system lights and causing people to leave it and go to DeFi protocols, that the Proof-of-Stake system was supposed to be securing in the first place. And so as a consequence, you get these these really weird dynamics, and so the, the report to that is, well, if you think about both at the same time, you kind of bring those two perspectives and design with the idea that, yes, there will be alternative yield opportunities on chain. Um I think then you can start to think a little bit more rigorously and systematically about the types of risks that exist in these systems and that's the work that we try to do which , um, it's work that we've both kind of done in parallel separately, and that's kind of what inspired this, um, staking derivatives paper. Anna: Let's to dig into this paper. I mean, Tarun, when did you publish that sort of staking and lending paper? Tarun: Uh, October 2019. And then it was presented at SBC in February. Anna: Okay. Yeah. So like, for me, it really opened my eyes to just like a problem space I didn't know existed. And I mentioned it a couple times on the podcast. In a nutshell, if I can summarize, like, maybe you can, you can expand on this, but it was basically when you, if you create sort of these, these tokens, like if you, if you are staking tokens, and then can create replicas of them that are liquid, and potentially lend those, that you end up with a problem of incentives or price differentials that could cause staking to become less viable. Is that roughly what you talked about? Tarun: Yeah. More or less. You could, you, think of it that way. Yeah, definitely. Anna: That's always the way that I've understood it. Now I want to dive into the work that you're, you've done together, because that took it kind of an extra step, and you were able to find kind of historic examples for what could happen if this wasn't properly managed. I thought that was quite powerful. So why don't you explain, you know, what this paper basically is describing? Alex: Sure. So we talked a little bit about the context too, and that Tarun was doing this work in parallel that I was introduced to, and at the same time, I think we were both noticing back to this idea of doing some horizontal work, noticing a lot of different protocols try to address this issue of liquidity, and how you wanted to lock people in Proof-of-Stake in order to provide you security, but then you're depriving them of other opportunities and so, how do the incidents work that way. So they were posing all these different mechanisms to resolve that, uh, that, that problem. Um, we wanted to first of all, ask the question of what these mechanisms were, and then ultimately what their their impact might be, and so that's kind of what motivated this work. So maybe a little bit before that, since we did this with AMMs very well, we can define what, what's taking derivatives are, um, so my best definition, and I hope you can supplement me here Tarun, is the easiest way to think about them for me is as loans. And, so, I have, um, I'm a validator, as we actually have a validator on the call, so I'm a validator. I have 100 ETH, let's name it 2.0. And then I borrow 25 synthetic ETH against my ETH collateral at some price point that is determined by some curve either set by the network or an external lender. I, at the end of that, loan either repay the 25 synthetic ETH and unlock my 100 real ETH, so to speak, or if I perform some malicious action, like I'm not online at a certain point where I'm supposed to be online, or I do something else that the protocol doesn't like, I could get slashed, and not have the capacity to repay my loan. The protocol will in some sense foreclose on my loan, delete my debt, but then seize my collateral, and then burn it or redistribute it as it sees fit. Anna: You, you use the term synthetic token. In this case, are you referring to Synthetix as the, the kind of project Synthetix? Are you talking about, like, is that the terminology for these kind of copies of the stake in in liquid form? Alex: I, I, I use that term generally, in this case, not... Anna: Okay. Alex: ...not Synthetix in particular... Anna: Uh, got it, okay. Alex: ...general too, describe sort of an IOU, um, that, you have issued against some amount of stake and, and the reason you have the subscript synthetic to the Ether that you're borrowing is that, technically it's not always one-to-one, and actually one of the important things is figure out what the relative price of those two things is. So they kind of look and feel similar ways and that one can give you access to another. But the dynamics of the interaction between those two prices are really what drives a lot of the interesting mechanics in the work that we did. Tarun: So, uh, you know, I think Alex started to point out, I think, that thinking as loans is probably the great most correct way to do it. For some reason people in crypto love calling everything a derivative, and yes, it's a derivative, but it's just simpler, sometimes, to talk about it as a loan. Um, but the, the main thing that I think these are, all these things are trying to address is this concept of capital efficiency of, like I have a bunch of capital I've allocated it to something that's earning interest, but optimally the the yield I can get might not be optimal -- what to keep it, it might not be optimal to keep it in these networks. But the networks need to incentivize people somehow to to keep their capital there, and offering them alternative ways to at least borrow a little bit against it, maybe pay their electricity bill for the validator, or something else, is kind of the main goal. And there are a bunch of Proof-of-Stake networks that are learning from what the lessons of what's happening in DeFi. Because DeFi is basically this gigantic exercise, and optimizing capital efficiency. And Proof-of-Stake is a particular subset, where it's really the insurance fund for, the, the, the blockchain itself. Uh, there are a bunch of staking derivatives that exist right now. Um, some of them are cross-chain. So Terra just announced this cosmos staking derivative called anchor, which will basically, and Polkadot is going to, there's going to, be a cross chain link between Cosmos and Polkadots for this, where you can borrow dollars. So Terra has a stable coin that's in the dollar, and you can borrow dollars against your stake. You don't, you normally, in the synthetic world that Alex is talking about, you're borrowing synthetic Atoms, let's say, right you're not borrowing, yeah against... Anna: Against your Atoms. Tarun: ...against your Atoms. But then if you want to get dollar liquidity, you have to take the synthetic Atoms, and sell them, get the dollars and pay your bills, right. The idea is, if there's a stable coin that exists, you could borrow the stable coin directly, and this is the thing that has driven Compound, um, to grow to a billion dollars really is that people want to borrow dollars against crypto, because they have expenses in the real world but they, they're net long, they still want to own their crypto. And, so staking derivatives are really starting to take off, uh, on Cosmos, PolkaDot, Terra. I think the only network that's really against them is Tezos, um, Arthur is very very much an anti-staking derivative uh, person. But if to go back to kind of the the paper, the idea that these things in DeFi are actually very similar to these things in Proof-of-Stake, made us kind of say, is there like a single mathematical structure that represents all of them, like you can, you know, you have some parameters you can tune, but you can represent all of the Proof-of-Stake with derivatives, and also all of these sort of DeFi capital efficiency, uh, game type of things. And one of the reason to think that is, in traditional quantitative finance, you have these sort of very grand theories, like the black scholes equation, which you know, uh, black trolls merton, I guess, I mean, black controls, won the Nobel prize in Economics for it, uh, where you can talk about this notion of replicating portfolios, and I think Alex can give another, can hopefully also add to this definition, but a replicating portfolio is something where you hold one set of assets, so like asset a, asset b, and c in some ratio, and it's equal in terms of the payoffs that you get to holding, say asset d, and what that means is maybe I own a bond and a stock, but that's equivalent to owning a bunch of options and ... Anna: Linke in terms of your return. Tarun: In terms of your return. Exactly. Like, the even though physically there are different goods, they have the same price returns to you, same yield curve, same whatever. And this notion of a reptain portfolio is quite powerful. Alex: So one way to think about this, maybe the easiest analogy that I've heard, is let's say you are a investment bank, and you, um, sell me a derivative, let's say, it's an option, and then you wanna, you basically short this option, and potentially if the price moves against you, you could be on the hook for a lot of money, and so your goal then is in order to make money to hedge your bets in some sense. So you could either buy an equivalent option and be net zero, but potentially if you don't agree with the price, I mean that's kind of a terrible place to be in, because you make zero profits, but if you think that the options premium is really high, you could say, well, I will go and assemble that option out of a stock and a money market, so equivalent would be your manufac, instead of thinking about in these financial terms that can be confusing, is you want to sell me a chair and I, I'm buying that chair for twenty dollars. But really, you know, you can buy the screws, the wood, the legs, or whatever else, and assemble that chair, uh, for less, and so, let's say eighteen dollars, you keep two dollars in, in profit. But in any case no matter what happens to the price of the stock, um, or in this case you know the, the different components you are still, um, you're still ahead, if, if your pricing model and replication model were was correct. Anna: So, but going like, let's come back to the paper though, so you are doing like it's building towards this formula that's supposed to predict in a way how, what secure a network is, or how or how expensive it would be to corrupt. Tarun: Yeah. So one, one way to think about this is, let's suppose there's a hundred dollars worth of Ethereum staked in Ethereum 2, if you borrow 25 dollars against the hundred dollars, and then you default on that loan. So you get slashed a bunch of times, or you just like don't repay it, or something like you take the money and you're like I hate the network, I sold my synthetic ETH for dollars and go, go to hell, ETH 2, right. Uh, you, the network has to pay some cost. And in particular, the network's cost is, it just lost 25 percent of its security budget, because 25 that it issued synthetically disappeared. And now it has to be like, oh we only have 75 dollars securing ETH 2 as opposed to 100. So the network's actually losing security every time it issues these loans, right. But the key thing is, is, if you use these Automated Market Makers, you can have the network figure out how to price these loans itself in such a way that it's measuring how much security it's losing in a very quantifiable way, by issuing these loans, and by knowing how much security it's losing it can kind of put risk guards on itself. Anna: But let's take, let's, I think you're, you're going ahead a little bit here, and I want to, I want to still kind of cover that, that background here. I want to sort of repeat what you just shared, which is the security goes down and like, say there's no derivatives... like DeFi doesn't exist, there's no derivatives you just have. These PoS systems that are standalone, they usually have a threshold that you need to reach in order for it to be secure and basically uncorruptable. It's either like 2/3, or 50%, or something like that. And we actually we've covered this quite a few times, so this is how it is supposed to work, and that's where the security, a lot of the security models, are created, just like thinking about this. Now you've introduced this second feature, the fact that you can do these token derivatives. If you do these, it like, if I have tokens, I've staked them, and then I take derivatives, how does that actually lessen the security of the entire system? Because from that, it just sounds like I have duplicates of the same thing that I can do stuff with. Tarun: Yeah, I mean, in some sense, if you're doing that, then you're double spending, right. So you need to somehow, the point of these security budgets at the very minimum is to prevent double spending. And you're effectively letting someone controllably double spend, but in such a way that, they have to pay it back, so that it like undouble spends themselves. Anna: The idea here though is like defaulting would be being slashed, right, like if you were, if on the staking side you were slashed, you would have less tokens to be able to repay this loan that you've taken against the stake. Tarun: Exactly. And, and the PoS network itself can execute the loan, and default in the smart contract. Because it itself is its own security. Anna: But this is a, this is like a step further, like I think we're still at the place where like, I guess, I still think of this as the existing PoS systems, and then things that are built on top, and, or things that are existing around it, but aren't necessarily deeply integrated. But I do understand that, as time has passed, and as these findings have become more clear, there are now PoS systems like, you know, that are just launching, are still in design phase, that have learned to incorporate these derivatives themselves. Tarun: Yeah. Anna: That didn't really exist before like the early... like tezos launched, without having derivatives included in it. Cosmos as well. So is this a, this is a shift basically that we're seeing in the ecosystem, that people are, that these networks are now hyper aware of this, and trying to plan it into their own, uh, systems? Tarun: Yeah, I think they've been taking two different tacks. Some of them are integrating it very deeply, and some are doing it via a smart contract that is external to the network. The, the, they have slightly different security, uh, complications and implications. In the one, where it's deeply embedded in the protocol, the protocol can arbitrate on itself, so it can basically say, like, all right, you know, I'm shutting down all loans, because like too many people are defaulting right now, and it's just not safe for the network to keep issuing loans. Whereas if it's done in a smart contract external hub, it can't really stop itself in some sense. And the end goal of all of this is, if the network itself becomes the biggest lender, so in the staking versus lending case, we have you know, Ethereum 2 and we have Compound on Ethereum 2, Ethereum 2 is offering you five percent interest, Compound is offering you seven, because of there could be farming or something, and so all the Ethereum stakers are like, I want seven percent so I'm gonna like move my, I'm gonna unbond and move to Compound. If instead the network itself was like, hey, hey, guys, guys, guys look, we also can lend to you at seven percent, and okay, well, if the network itself is the biggest pool of liquidity for lending, then people are like, uh, why should I take the risk on this smaller Compound thing instead of, instead of just keeping it in stake, right? So there's this, there's this idea that the network is its own best bank, and if you do that, then you can avoid this lending thing where people move their capital out, if the network can offer lending and borrowing services. Anna: Although I'm sure that it also comes with its own set of qualifications. Tarun: Yeah exactly. Alex didn't say anything. Alex: No. That was good, you know. One of the things that we try to look at in that context is, as you can see, there's all these different designs that these networks have, and so we try to just abstract to what are the core functions that such a thing would need to embed and enforce. We came across a couple things that were a little bit tricky to model to begin with. So one of the things was, you get these aggregations of, you know, there's a bunch of different validators, they're all taking out loans, but all their loans are denominated in a common asset, and that's priced on this curve, and has all these different characteristics. Anna: What an example of that be like, if you did the Cos.. you were staking Cosmos, and you took like a Cosmos synthetic, synthetic Cosmos, like that's the same asset basically, or that it's a single asset? Alex: Right, right. Something like that. Or like the Terra example that Tarun mentioned earlier, with some of these protocols are embedding the, the AMMs that do that conversion, uh, into the actual protocol itself, and, so we've seen some examples of that happening as well. So what ends up happening is once you have this aggregation is, you have different loans that kind of output the same thing, and then you also have this idea that, in order for the protocol to be secure, it needs to reserve these rights basically what Tarun was just saying of, hey, stop borrowing kind of thing, um, or you know this validator has been misbehaving, or has exhibited some other risky behavior, I want to basically take back this loan. So those types of things are just options that the protocol has during the term of the loan that can alter the behavior, and the actual price of the loan, but ultimately are priced in by people that are borrowing this type of thing. And so those two things make it really difficult to analogize it to just traditional lending. So we kind of just scoured the financial math literature to try to figure out a good analogy for this kind of thing. And really where we had actually a lot of luck was we found some articles from the 90s and early 2000s, where a lot of people were writing about mortgage black securities, and securitization it was really all the rage. And there were actually quite a lot of similarities in the types of approaches and stochastic models that those folks used, and similarly these types of structures were ones where you were pulling together different liabilities and issuing kind of these homogeneous bonds, so, to speak against them. And then also you have these options on behalf of, let's say, the borrower or, if the interest rate goes up on your home loan that you can prepay your loan, and so forth. So they... it was kind of a neat framework that incorporated both. And so that's kind of true is getting on with the replicating portfolio is that, you have these portfolios of all these different loans, and so you have this outputted asset that really behaves as an aggregation of all sorts of other things that, that are, um, subsumed by it in a sense. So that, that gave us quite a lot of ideas in terms of both the potential stochastic behavior of these things, but also the types of risks that we might see, in other words we've kind of seen this stuff before, and we've seen that it can work okay, but it can also be pretty bad, um, and so that that kind of gave us the direction to talk about some of the risks. Anna: I want to understand, when you talk about this combined, this sort of like portfolio of assets, or I forget how you just said it, but like I think, I'm thinking of it like a batch of these assets. Are they different? Like I, I want to kind of hear it through example where, is it something like different staked currencies like tokens from different networks are somehow bundled together, or are you talking about like an individual network and their validators all of their synthetic tokens being bundled together. Like that's where I'm not, I'm not exactly clear what you mean. Alex: The easiest one, is, is the latter. Where you have different validators with different risk characteristics, all have different loans, they have different collateral ratios, but they all, let's say, have synthetic ATOMs as as their liability, the extreme case of this, and this gets again to the example of PoS. And DeFi is something like multi-collateral DAI where you have people that are borrowing with different currencies as collateral, but they all owe DAI. And actually DAI's in some sense being backed by all these different heterogeneous loans, that have different characteristics and so forth. So when you're talking about DAI, or you're talking about the interest that you're getting. Let's say, as an MKR holder from the different loans that are outstanding, you think about all sorts of different loans, and how they aggregate up to ultimately your your stake in the network. Anna: Maybe we can talk about the inequality that actually exists in these PoS systems, between these like large stakeholders and those with that don't have that kind of stake. How have these derivatives like helped or aggravated. Alex: Yeah. Actually maybe before we get there, one thing that's helpful is, we, one of the things we looked at a lot in this paper was inequality, and under what conditions, um, Proof-of-Stake networks do better on inequality, then, when they have staking derivatives, then, otherwise, it was kind of a surprising result to us, when we first came across it. But you basically have this effect where potentially a large validator gets slashed and then that increases returns for everybody else around them, and then also you have the secondary effect where now I, for instance, have less capital than you, and can access basically the same opportunity set, if I want to take commensurate risk. So you get this more egalitarian like distribution, and so that's kind of a nice result you do end up having to burn up a lot of stake. And Tarun has these nice simulations which I guess is his, his firm's on Detroit to explore that you have these nice regions where you don't burn too much and also have these egalitarian effects. But let's say, now in the... taking the MBS analogy, um, as, as a given and then, there are differences in similarities, of course, but we found it an instructive analogy for the following reason, let's say, you have a large validator like finance that happens to hold a lot of points and is running validators, let's say, and they get liquidated in a pretty big way as they're doing these risky activities and borrowing against their stake lending to DeFi, and doing all kinds of tricks like that. They get liquidated, and now you have potentially a large network participant that is incentivized to fork the network to revert that state. And so then basically all the nice effects of inequality and stuff like that, that we talked about. In this theoretical sense, all get wiped out immediately, right. In that you actually have the exact reverse effect where the inequality becomes worse and the effects of concentration were pernicious. Anna: I mean, you pointed this out really nicely in the article, but what are the risks? Alex: Sure. And a lot of the results that we end up proposing in a lot of the positive ones hold on these regions where we can make some some analytical judgment about what's likely to happen. and then outside of those regions, basically you guys are on your own, um, and, and, and that's actually really what drives and motivates this, this analogy to some different financial collapse, that we've seen. So, for example, what we just mentioned and talked about, about a large validator, uh, being bailed out by the system, is something that creates a kind of moral hazard that we've seen in other situations, in the past. And I don't really have to dive into those, I think fair enough, in people's recent memory. The thing that is kind of different and interesting is that, you have different liquidation mechanisms in, in these types of security. So traditionally a loan foreclosure by the time, so if you for instance don't pay your loan or don't make interest payments on your mortgage, uh, I, the bank will foreclose on your loan. I'm the originator of your mortgage. I actually probably don't even hold your mortgage. It's somewhere securitized, and somebody's earning those interest payments when you pay them. So I then need to basically propagate that information across an entire chain of different folks in the financial system, and eventually makes its way to the holder of that mortgage-backed security, which could be the Federal Home Loan Bank of Seattle somewhere, and they now have to basically mark their positions to market, and figure out what's going on with the rest of the market, and all that. So, in, in crypto, there might be an opportunity to do liquidations differently and perhaps better. And, um, one key way that we see that, we see this with centralized exchanges, actually in crypto as well, where you know they're draconian with liquidations, and what that means is they don't then have to go after you or your broker. And so you basically know that you have limited liability when you trade on them. And that's something that's really driven their growth. It's something that's true in DeFi. Because you're pseudonymous, you know, you play around with DeFi, you lose your shirt, but then, you know, they don't come after your house, or anything like that. So the protocol can immediately enforce liquidations if they see you behaving in some some way that's not agreeable to consensus and they can do it immediately. Tarun: And I just want to add one thing. This ties back to our earlier discussion of, when I, we kind of talked about Stripe and Plaid versus DeFi. Where like in the Stripe and Plaid universe, you know Robinhood or Coinbase has to hold risk and give forward, advance you the ten thousand dollars. But if you default, then they have to, there's like, this time lag, because there's no globally agreed upon database, but the moment there's a globally consensus agreed upon database, you can instantly propagate all of these actions which, which is exactly what doesn't happen, didn't happen in the home loan crisis. It took a long time for the banks to realize that thousands of people were defaulting. The novelty is, in crypto, that it's instantly propagated. Everyone can know instantly that, like all these people are defaulting at the same time, which might, it's not guaranteed to help, but it might be a good thing. Anna: You make the comparison to the mortgage crisis, the mortgage-backed security crisis that prompted the 2008 financial crisis. Do you see, do you see parallels, like, is that or, or do you think that, that speed means that will never happen in the same way? Tarun: I think it'll happen, uh, we've already seen it happen at centralized derivatives exchanges. Because they have a similar liquidation crisis. In fact I would say one of the reasons I suspect that Coinbase hasn't been quite unsuccessful building a derivative exchanges that unlike Asian exchanges. I mean, there's legal reasons, but they're, they also just don't understand how to think about liquidation. They never had to do them. And there's this bad case like that happened on March 12th, for instance, where BitMex had runaway cascading liquidations, and the insurance fund was almost drained, uh, and well there are some very unhappy, uh, BitMex users who are liquidated and sued. But those liquidations are not so different than these liquidations of validators. And there's this cascading effect where one validator being liquidated might cause the price of the synthetic to go up, which causes another validator to be effectively liquidated. And then the price synthetic goes up, so the synthetic gets more expensive in some sense, or rather the real asset buying the real asset with the synthetic, which is how you recover your stake gets more and more expensive, the more people default. And if a bunch of people keep defaulting, there's this like feedback loop that looks like the financial crisis. So that can definitely happen. And it probably will happen, but at least it's a closed observational system, where you can really see all the statistics of this happening, as opposed to the kind of very indirect way this happens in the current banking system, where there's a lot of like trust that goes on that like leads to message propagation being delayed. Alex: So there's a benefit also to this trust too. To mention the other side of the equation, right, in that I, when I extend to you alone as a bank typically will have some more relationship with you, like I at least know your name, I know who you are, I know where you live, I have a lot of financial information on you, that you may say that's a very bad thing, but from the perspective of the bank, it's clearly honest, and from the perspective of the financial system, you have this entity that is proximate to the borrower and as such is able to underwrite the risks associated with that borrower, in a way that a decentralized protocol cannot. So the decentralized protocol by definition needs to assume the worst and have very high collateral requirements, and all that. The other part of it is very often the collateral that we're talking about here is in, you know, Bay Area real estate, whatever you may think of that, it's higher quality collateral, than a lot of coins that are traded on exchanges in crypto, and as such. These issues, particularly around liquidity, could very much propagate the types of deleveraging cycles, that Tarun just mentioned. So there's some axes upon which we can maybe do a little bit better, but there's some where these things can become worse than their centralized counterparts. They are a lot smaller comparatively to the larger economy, but that may not stay the case for too long. Tarun: So, one, one thing that's important in this world is that, now that you have this ability to have this sort of instant cascades that you can programmatically use in, in, consensus and in a Proof-of-Stake protocol. How do you think developers should take advantage of this? and how does this propagation even happen? Uh in some sense, maybe, maybe we could dive into the the details of of the pricing of the synthetic asset versus the real aeest. Alex: Right. So the way that we've seen this, the ideas that I think most compelling that we've seen, um, for getting that information into the protocol, to begin with, are through these Constant Function Market Makers, which is actually a term that Tarun created in an earlier paper with, uh, Guillermo, and Guillermo, and he, uh, they, they talked about this idea of a uh, AMM, as we discussed earlier that, um, who's the solution to the arbitrage problem of which is easy. In other words, it's very easy for people to figure out how much they should add or remove from the AMM, in order to have the right true price. And, so in this case, what we mean by the right true price is what the probability of default is, what the security budget is, and so forth. So we want to get information from the market about what they believe, what expectations are about the relationship between the derivative and, and the underlying asset. And so we believe that, that information will encapsulate future expectations about defaults and security. And as such the protocol can take that information and make certain decisions on it. Now there are lots of, lots of asterisks to that, in other words, you know, how these things are manipulated, and so forth, that we don't get into as much, but like the fact that there are mechanisms to which these protocol designers are, uh, implementing in order to get that information from market participants. The primary mechanism that we've seen are these CFMMs. What's also interesting historically is that, some of the existing CFMMs that are being used outside of Proof-of-Stake altogether seem to have actually been inspired by this staking problem. To begin with, so I was listening to this podcast from Michael Igero from Curve, and he was talking about how he was initially working on staking derivatives-like problem, and that's kind of where the idea of Curve came about. So there's this clearly this really tight connection between how do we get information about the relationship between staking and staking derivatives, and how we facilitate optimal exchange so that it's easy for people to report the true price to the market. Anna: Like, going back to this earlier conversation we had about the liquidity mining and the arbitrage, like, do you feel like the more efficient you get at this? Do you not sort of remove arbitrage, like, don't you get to this place, where it just becomes, like, there is one price it is completely correct and there's no way to like benefit from moving it around? Alex: Well, locally at a specific time, that's kind of the idea that the world's always changing and, um, as such. Tarun: You have to pay gas. I mean, fundamentally the problem is that the transaction demand market for the blockchain is what drives the fact that you can never be perfectly arbitraged. There's just some noise from that. This is one of the reasons I think Ethereum competitors actually are at kind of a huge loss, is that they don't have this like latent transaction demand coming from, like, out from exchanges, and USDC, and USDT, and stuff, such that people have to compete at that microstructure level, and understand the exact transaction ordering in the mempool, and understand how they bid on this, so that they can be as close to arbitrage as possible. But there's just enough traffic that it can never be perfect, which is kind of the beauty of of these crypto networks, like the traffic is all visible. Alex: You had to leak all that output again. Tarun: I mean, if that's alpha, then people are just getting DeFi beta, just buy sDeFi or whatever. Anna: This paper came out a month ago. What are you thinking about now? Like, are there, are there new phenomenons or new constructions, that you see emerging, that could have impacts on PoS systems and their security, that you haven't covered yet? Tarun: Um, I'm not quite sure. It's PoS. But I, I do think that, the, the, the, fact that I, I've talked to, to a bunch of traders in Asia recently, and they've told me, hey, we're like using Curve and like skipping the OTC broker on Skype. Kind of convince, convinces both of us that, there's actually some way at certain times where DeFi is actually way cheaper than CeFi, than centralized finance. And quantifying that, and when that happens is kind of something Alex and i've been thinking about. Alex: Right. It's, it's the idea that sometimes these AMMs, as we discuss in the context of stake, can have an opinion about the assets that they have in them. And as such can become more capital efficient by, saying, I actually think the price of, DAI in the place of USDC should be really close to each other, and I might be taking some risks that I'm wrong, but insofar as I'm right, I'm able to offer you a much better price as most of being completely agnostic. But, then, the question becomes what Tarun talked about, which is what are the gas costs to me using this exchange, and this is cost that's very reflexive in the way that things are being used and the arbitrage opportunities that exist out there. It may interfere with how that pricing happens at the microstructure level, and, and that may hold some atmospheres as to how DeFi trading is potentially more interesting and efficient in some cases as we're seeing with Curve and some of these other market makers that are popping up. Anna: Cool. Tarun: And, and one last thing I'll add on this is, uh, that, we, we've also seen kind of the design space of this grow, and different different forms of, you know, that an alternative to this is kind of what Gnosis is doing, which is way more complicated for the end user, and doesn't like, it potentially has some other types of bugs that we've seen over the last week or so. So there's, there's just a lot of differences, the design space, I think, has kind of exploded and I'm just excited. Because every day I read a new paper, that's like, oh well, we can make a slightly better that like version of this, so that it like loses less money than the centralized version, or whatever. And I think the fact that there's this like burgeoning explosion in this, means that 2016 for Proof-of-Stake is kind of 2020 for DeFi. Anna: Oh. Alex: That was a great way. Anna: Cool. Well, listen, thank you to both Alex and Tarun for joining me on the show, and sharing with our audience a little bit more about this paper and a little bit more of the work you're doing in that intersection between PoS and DeFi. Alex: Thanks. This was fun. Tarun: Thanks. Anna: Cool, and to our listeners, thanks for listening.