Anna:
So today Tarun and I are chatting with Guillermo Angeris who is a PhD student at Stanford. His work basically formalizes a lot of the DeFi concepts that we learn about. So welcome to the show Guillermo.
Guillermo:
Thank you. That was, I think a solid description if terrifying, mildly, but whatever. It's weird having someone actually speak about your work for some reason or another, I don't know what it is.
Anna:
No worries. Well, Tarun, how would you describe the work that Guillermo's doing?
Tarun:
Well, over the last year we've seen people pour money into smart contracts, also known colloquially as aping. And they must be pouring money and for some reason, they're not totally irrational, they're at least somewhat rational. They have future expectations of future profits. And somehow understanding what those systems are doing is really important at a mathematical level and a fundamental level. And it's something cryptographers have not really studied and neither have economists, because it's a weird mishmash of both fields and no one subject matter expert can be the expert of most of this stuff. So we tried to take a different lens than the lens that cryptographers take or the lens that economists take. We take the lens of more how optimization, people from the optimization literature look at this.
Anna:
Yeah. And, Tarun, you and Guillermo actually work on a lot of this stuff together. You've co-published papers.
Tarun:
Yes. So Guillermo and I have a long history together, which started in 2016... Definitely 2016. Cause I didn't work there at that place in 2016.--- So yeah, he was my intern in 2016 and then we stayed in touch and kept working.
Anna:
Nice. So Guillermo, why don't you tell us a little bit more about yourself. You were an intern of Tarun's five years ago. What have you been up to since then?
Guillermo:
It's been a while. ---So five years is weird. It is weird to say like, Oh yeah.--- Tarun was literally my boss before. And I guess now, in some weird sense, after. I think the best way of describing Tarun and I's relationship is one of continual nerd sniping. It's this weird thing where he hands me relatively nicely packaged problems. It's like: Oh yeah. You know, I've been thinking about this thing. And then all of a sudden, I look at him and I'm like: Oh yeah. Have you thought about this other thing and this other thing and whatever. And it goes on to essentially, I end up spending tens or hundreds of hours on this stupid problem. And it's like: Oh, okay, well I guess we found something. He's like: Cool. Do you want to write it up and publish it? So roughly speaking, that's how it goes. At least, how it's been for quite a while now. So I guess, going back to the original question is what the hell have I done since five years? I mean, in some ways I want to say like almost nothing.
Anna:
May be part of the PhD at Stanford? ----Okay. Yeah, yeah. Right. But here's the...
Tarun:
It actually makes sense to describe what you're doing your PhD in, because I think people in the crypto world don't really understand or know anything about the field you're in, and might not even see why math from there is applicable elsewhere. So maybe start with what is your PhD on?
Guillermo:
That's a good point. So I guess that goes to two things. 1. I don't really know what my PhD is on. I mean, I have an idea. There's some weird general vague notion. And 2. I guess my PhD essentially just involves me becoming a machine that turns coffee, calories and booze into literal papers. I'm just like, I input these three things and outcome paper. I mean, Tarun can attest to this. It's weird, but it happens.
Anna:
What is the field? I think this is what we're trying to get to the bottom of. Is there a field?
Guillermo:
Is there a field? So the answer is yes. Weirdly. So the actual thing, technically speaking that — I think on average, I'm supposed to be doing my work for — is this weird intersection between physics and optimization theory. And there's a bunch of crap that goes into this. I mean, in some ways people make it super complicated and super magical, but it boils down to this question of... Look, in physics, the beautiful part about physics is that we have, the whole point of physics is to study systems. We study anything. I mean, the system is pretty much anything. It can be anything from the trajectory of planets around the sun, all the way to really complicated things, like the different pressure patterns around an air foil in whatever and at high railing numbers and things like that. So I work in this weird intersection of fields where the question of physics, in some ways, is: I give you a system, you tell me what the behavior of a system is. So it's like you solve some dumb, really complicated differential equation. And then you get some output that says, you give me the system, here's how it's going to behave. So I work in an area that's just the opposite. And the question in that area is: look, I want to design something that I have a very good grasp of how that thing behaves after it's been designed. So if you give me, for example, a bridge. A bridge is like, if you give me a bridge, I could probably stick it on a big-ass computer, simulate the tensions along each one of the strings and all the things. And afterwards tell you: this bridge it's going to absolutely fall in two seconds. Have you tried building it? Or: hey, congratulations. Given some basic assumptions on what the bridge does, it's going to roughly work.
Anna:
And I guess applying this then into the DeFi context, you are looking at existing bridges or some sort of construction and trying to figure out if it's going to collapse or how it might evolve.
Guillermo:
Right. I mean, essentially, yeah. Everything is a system. In some weird sense or another. And the question is just: can you write down the mathematics that correspond to that thing?
Tarun:
Before Guillermo keeps sounding like too much of a category theorist in the abstractions at which he's describing systems, I think a more concrete description of what he's doing to ground our listeners is he works on something called inverse design. So inverse design is a thing that's actually very important to hardware design for optimizing layouts in hardware, and also making sure that you're able to have hardware that does the certain features you want. But Guillermo works a lot in optimization and optimization historically is extremely useful for solving problems in many different fields. And it just happens to be that this is the subfield that he is applying optimization to. But if we take a step back, optimization is a really good way of describing how to solve, how expected behaviors of complex systems will be. And so I think that was where the galaxy - brain - bridge analogy was coming from.
Anna:
I actually did wonder... You have an electrical engineering background. So that question came up, how do you link from that to what you're doing today, but I guess maybe it's through this hardware angle?
Guillermo:
Yeah. So what I was going to get to in the end, it turns out you have very good descriptions of whatever the hell system, let's call it the bridge. The question now is: okay, I want to build a bridge that works. Can I do that in an automated way? And that's what inverse design is.
Anna:
I see. The automation of these things.
Guillermo:
It's literally automation. So in particular, you have some requirements, your bridge needs to hold this much. It can't have a resonance frequencies at some stupid thing, whatever it is. You just plug that into a computer and because you know exactly how the system's going to behave, you then just optimize the bridge. I mean, of course, a bridge is a very, very large structure, you see what ultimately is a simplified version of it. But the point is this could be applied to anything, I literally mean anything for which we can mathematically talk about its behavior. And congratulations, now you've got some optimization theory. And that's where I come in. The field is mostly physicists who do real things. I'm mostly a mathematician who doesn't do real things, but can apply some of my knowledge to these rough aspects. And so, it turns out there's the bridge. So the EE teaches you the physics and also teaches you the optimization things. And those two things combine very nicely to describe not just physical systems, but in our case weird DeFi primitives with crazy behaviors, that at first glance look somehow magical, but it turns out they're usually pretty simple under the surface.
Anna:
Is it common to use this type of technique on economic systems? Or are you only able to do that with DeFi because it's also built into code and it's more digital?
Guillermo:
So it's a funny thing. And Tarun has some thoughts on this too, I suspect. But I I'm going to front run him on those thoughts, hopefully. So in some sense, economists try to do this in classical market-making literature. Economists try to come up with models for general behaviors and what people call the classical exchanges through these order books. You have very complicated mechanics, or I guess very complicated dynamics specifically, that give rise to a bunch of behavior that on average looks like something. The beautiful part about DeFi is that here's what the behavior is. It's exactly what's written in the damn contract. So I can write down an equation that says when someone makes a trade this large, here's exactly how much they're going to get out of it. Whereas economists will approach it because — you can't in some sense. While the behavior of all of the ages that they're modeling has on average some function that represents that or something really complicated like that. In DeFi you know the function because it's written into the damn contract. So in some sense, economists can approximate what DeFi is doing exactly. And that's a good thing or a bad thing. Because in some sense, the system's DeFi could be potentially less flexible than the classical capitalist systems of free markets. But at the same time you could analyze them pretty well with very basic tools.
Tarun:
One thing I would add to that is that economists are really historically focused on, I would say there's a very high amount of interaction between optimization and economics. I'd say a lot of the modern developments in economics are pretty much due to changes in mathematical optimization. However, if you go to grad school, even like the labor economist who doesn't know how to add two numbers is forced to take an optimization class for a reason, but there's a sense in which mathematical optimization talks about much more less prescriptive things. So a lot of economists like writing down functional forms that describe an object. But there's never actually really consensus on whether these functional forms are correct or not. And then they optimize assuming that model. In DeFi at least you can say: hey, the functions, they are correct. But I think what Guillermo and his lab are quite famous for is actually optimization over things where you don't have functions and you rely on computation to give you a solution versus something where you're like: hey, I think this economy is linear or quadratic or exponential. Instead you say: Hey, here are all the possible models, try to optimize, given those constraints. So I think maybe taking a step back, it might be good to talk about your research lab and the different types of fields they work in. Because for instance, your advisor does economics as well sometimes.
Guillermo:
So, okay. One of the labs that I work in is a thoroughly completely and entirely physics lab. And this is the one that Tarun is not referencing. And they do real people, things with real people, photonic chips and real people quantum vacancies, trying to do a bunch of combinations of stuff.--- That's like, you know, quantum potentially got into 12 to computers. ---
Tarun:
They make esoteric quantum computing++ hardware.
Guillermo:
Yes, exactly. And it's really complicated and they are actually doing real things that I understand approximately 1% of. So if you want something useful, you go to that lab. And then the other lab, which is the one that Tarun is referencing, is Stephen Boyd's lab. And they do, honestly, they do a bunch of shit. I mean, it's like a weird combination of enormous amounts of everything. So one of the friends I co-author with quite a bit, Shane, his whole thing is essentially, the best way I can put it, is mathematical modeling. All he does is he takes a problem that's in the literature, and then frames it in a way that can be solved, usually using some techniques that we developed, which is a convex optimization theory. And then this is for everything. I think at some point he's done stuff in baseball and he's done stuff in, we did some stuff on surveys, like how to optimally weight survey responses such that they are approximately representative of a population.
Anna:
That's useful for polling, I guess.
Speaker 2:
Yeah, exactly. We like to call it our COVID paper. Everyone had a COVID paper that they did, that was directly or indirectly related to it. So that was ours. But in some sense, the overarching theme of Stephen's lab is essentially you have this big tool of optimization theory, and there are hundreds upon hundreds upon hundreds, upon hundreds of just problems that you can fit in, in very clean, very simple, very almost innocent ways for which once you frame it in this way, you now have a perfectly reasonable solution method. And so that's what he's been famous for. He's been famous for taking things that are initially seem really complicated and have a bunch of stuff, a bunch of details, and then reducing them to things that are very, very mathematically clean, but are still extraordinarily useful. And this has led to a bunch of things like really good software for writing. So essentially like these domain-specific languages for writing optimization problems. You write it in like some Python thing and then afterwards you press enter and then you have it be converted to this really complicated format that just got solved for you, but you don't see any of that. So in some sense, the overarching theme of Steven's lab is: yeah, optimization is a hammer, but 90% of the work is taking up what seems like a really hard problem and turning it into something that's very concrete and very simple and can be solved with these optimization tools. And that's where I fit in. Essentially I do the same thing, but just applied to a bunch of different fields. So in this case, physics or DeFi, or even I have some paper of robotics with another friend and all of this. I mean, it's just weird.
Anna:
It sounds fun.
Guillermo:
It is.
Tarun:
So one thing you should take away from this and some of the listeners who maybe have taken convex optimization in undergrad, they probably use Steven's book. It's the most popular, I would say, undergrad and maybe graduate in some institutions, book for teaching this field. But the key thing is that the plumbing of almost all modern mathematical modeling is convex optimization. Part of the reason for that is it guarantees you a unique solution. It guarantees you one that's also computable. You can efficiently find an answer that's good enough. And so even if you have a problem that's really hard, sometimes you try to just find the closest convex optimization-like problem, and then solve that because you actually have tools to use it. And so making those tools better actually improves many fields: statistics, machine learning, economics. Pretty much anyone who ever does linear regression is doing convex optimization every day. And it's probably the most used piece of library code outside of a kernel in an operating system, are convex optimization tools and matrix multiplication.
Guillermo:
But one is applied to the other.
Tarun:
Yeah, they're very close.
Anna:
So what is convex optimization? You just mentioned that a couple of times, and I don't know what that is.
Guillermo:
So convex optimization is a really weird field that seems absolutely esoteric the first time you see it. And I will apologize in advance. But then it becomes utterly natural. And then you're like: okay, everything makes sense. So convex optimization... First things first, what is a convex function or even a convex set. So one way of thinking about it is, maybe in geometry, at some point, you might've learned what a convex polyhedron is. Essentially it means you take any set and you can think about it as a drawing somewhere, you take any two points that are inside of that set. And if you draw a line in between them or aligned segment, then that line segment had better lie inside of the set itself. So for example, a circle is a convex shape or so is a triangle, but you can imagine that an S shape is not a convex shape. Because you can take up two points, one on the very top of the S and one at the very bottom of the S, connect them, you're going to have a point along that line where it's not inside of the set itself. And look, congratulations, you have a line that fits inside of the set, who the hell cares. Utterly shocking is you get a bunch of very, very nice and very simple properties that emerge from it. So some simple properties that you get out of this is, if you have two convex sets, you can separate them by a line. This isn't always true. For any set, you don't always get this right. So if you can imagine two interlocking seas, which never overlap, so there's no line you could ever draw through those that would separate them. And this, again, this seems almost silly, but it turns out it will be essential to proving the weird privacy results that we just recently published a paper on. But other things that it implies is that kind of extending. So now we've talked about convext sets and I was talking about convex functions, and they are almost as simple, is a function is convex, if you fill in, think of an X squared. It looks like a parabola. And if you think about it, if you fill it in, so if you color all of the points that are above this line, you get a convex set because if you take any two points on the graph itself, it will always lie above the graph itself.
Anna:
Like a line between those two points, you mean aligned between them. Okay. Because it's an upside, it's like a U, it looks a bit like a U, and any two points will always cross over that inside area of that U.
Guillermo:
Correct. So in Steven's lab, we joke that convex optimization is simply the study of things that look like bowls. Simply because what you're doing is every function that you're going to ever have that's convex looks like a bowl.
Tarun:
It might have a fat bottom.
Guillermo:
Yeah, it could potentially, it does not need to be sharp. It could be completely flat.But in some sense, if you put water, it's not going to spill out of it.
Anna:
Okay. But you are describing convex functions, but what is the optimization?
Guillermo:
If you have a convex function, then the one property you should get out of it, which is a weird one, but it's that any local minimizers, so any point for which, if you were to look left of that point and to the right of that point, if it looks smaller than its neighboring points that's called a local minimizer, is actually a global minimizer. So it actually minimizes the entire function. So in particular, one way of thinking about it is like the bottom of the bowl is always going to be the only optimizer over all of these things. The point is, the way you think about it, is if you're walking down a hill, at some point in a normal hill that we normally walk, if you've ever just taken a hike, at some point you're going to reach these flat spots where you look like you're at the bottom, but you are not actually really at the true bottom of the hill. That can't happen in a convex function. If you walk downwards and you reach a point where you can't walk downwards anymore, that means that you are optimal. You are at the minimum value of that function, period.
Anna:
Why is optimal the minimum? Why is that a connection?
Guillermo:
So, and this is just by definition, optimal could mean minimum or maximum, but it turns out the minimum of something is just the negative of the maximum. So if you think about it, if I minimize a parabola, it's the same thing as maximizing the negative of the parabola. So we just use minimization as the important one, but either of the two is fine.
Anna:
But it's not that you're trying to make the line between the points smaller or something like that? That's not the optimization you're describing. It's getting to the bottom of the thing?
Guillermo:
Yes. It is literally getting to the bottom of the thing. So in that sense convex optimization is utterly obvious and you're like: yeah, of course, I go to the bottom of a thing, I look around and all I see is up. And congratulations! You've now discovered literally every important facet of convex optimization. Of course, it gets weird and complicated and like high dimensional spaces or whatever, but no one actually cares. It turns out it all works exactly the same way.
Anna:
I'm gonna let you have that. I don't entirely understand why the word optimization is used for this.
Tarun:
So one way of thinking about it is, let's say generically, you have abstract to this level, you have a bunch of data you're getting, and you have some model you're fitting that says like: hey, if there's five cherries and two oranges at the store, then we must be in a pandemic because everyone's buying all the oranges and not buying cherries. That's a really weird prediction, but there's a set of possible models. Maybe there's the models that say: maybe that was too simple. That was a linear model. Maybe it needs to have some other features or some other facets. Well, one question is how do I choose the best model over the set of all possible models? And that is an optimization problem. Because I say here's a set of models that I think describe the system, but there are many of them and there are many parameters. So how do I fit those parameters? Well, if it's convex, I know that I can find an algorithm that is local and computable and efficient, that gets me to the optimum, to the bottom of the hill. The bottom of the hill is some notion of fitness of how good your model is.
Anna:
Is it the distance from the model to delta. And so it's almost like getting your delta very low or something?
Tarun:
Exactly.
Anna:
Okay. I think I understand that.
Guillermo:
Yeah. So essentially here's what you want out of a model is that it makes good predictions and what you want is to minimize the prediction error. It turns out very often that prediction error is a convex function of the parameters of the model. So finding the minimum means that you've picked the model that has minimized the error, in some sense. And there's many, many possibilities of errors.
Anna:
Cool. Well, thanks for explaining that. That's awesome.
Guillermo:
Yeah. Hopefully, also useful explanation. I have no idea, but maybe it was.
Anna:
I think it was useful. I think we got there.
Tarun:
So something most people probably who listen to this podcast have heard of is Uniswap. And you may have also heard of Balancer or Curve, or now there's hundreds of these types of decentralized exchanges that are automated market makers. And one natural question is why do they work? Because there have been many, many attempts at making automated market makers in decentralized exchanges for the last 10 to 15 years. And so an interesting question that I guess I had in 2019, February or March, was: hey, there's a million dollars in this Uniswap thing. Why is anyone putting any money into it? And in the process I started trying to write some equations out and I was like: yeah, it looks like the optimization problem, but like people seem to be losing money. Why would anyone put money in this? And so then I started talking to Guillermo. I was like: hey, here's some equations. And here's what I think is happening. But how is everyone not just losing all their money? And we were like: yeah, we gotta find some description of why this is profitable for different types of people who are participating in this. Both the people trading as well the people providing liquidity. And in that process, I nerd sniped him, case CD3-63. --- If I remember that, wow, that's a word. The definition of that is there's 63, three 53.--- But the main point is that he then was like: hey, this is definitely a convex optimization problem. And crypto people, I don't think were really thinking about it like: hey, what's the math behind this. They were just like: hey look, I made some money. And someone made a smart contract, who didn't quite know why or how it worked, but just had a lot of conviction that it would. And like a lot of things in this space, in the cryptocurrency space, people go and implement something that they completely don't understand why or how it works. And then users try it. And if they don't lose money, then all of a sudden they're like: okay, it must work. So something I personally have found unappealing about the space was that there's a lot of that type of stuff. And half the time you can't tell if it's a Ponzi scheme or not. But Uniswap at that time really started seeming not like that. And if you try to write the equations out, it's a very simple smart contract, it's probably the most amount of money per line of code ever written in history. A hundred lines of code. So it behoves the question of why does this thing work and why doesn't it exist in the normal world already if it works so well. And so that was to set the stage what our first paper, which got published in December 2019, although this journal has been extremely slow about publishing it...
Guillermo:
Although I think we got an email about it recently, so maybe finally 2021 will be...
Tarun:
I mean, it got a bunch of citations, but since then has never...
Anna:
It didn't actually see the light of day...
Tarun:
I mean, it's accepted, but the pre-print was online. And so this paper tries to formalize Uniswap. Then, I think, the second thing I tried to nerd snipe Guillermo about, I was like: there's something nice about this Uniswap paper, we got some very simple clean properties, we proved how expensive it is to manipulate it, we proved that people don't lose money. And we proved that this property, that academics had fetishized for about a decade in the automated market maker field called "path independence", was actually a red herring. Uniswap worked because it didn't have that. And so that was actually the interesting thing that this Martin Koppelman and Vitalik on a Reddit post in 2015, that basically invented Uniswap, that Reddit post was right. It had the right intuition that all the automated marketing literature was wrong. And you have all these very fancy academics, Turing prize winners, who've written papers on this stuff like: it's impossible to solve this problem, it's ♯P-complete, much harder than NP-complete. And then it turned out, it's actually this convex thing, which is extremely simple and easy to solve. And so that was the key insight Guillermo had, it was: hey, the convexity is actually the thing driving, why people are able to make money. And then the second thing was: hey, there's this huge outcrop of new automated market maker. There is Balancer, there was Curve. And this was January 2020. So there weren't that many more.
Anna:
Wait, you just said something, "the convexity", that is why people would make money. I don't understand this.
Guillermo:
Okay. Here's the beautiful part about convexity. As I told you, look, you're at this hill, you're trying to find the bottom of the hill. What you do is you do walk downwards. So it's a very funny thing because it turns out convexity essentially tells you something silly like any heuristic you can think of, any silly way of getting to the bottom, will probably work. So it means that people don't have to know something as convex in order to solve the problem. You can simply say: look, I have an approximate guess, I have this silly algorithm that does something that seems to get the right answer. And it turns out, convexity essentially will not quite, but almost guarantee that you get the right answer. So if a trader wants to perform the optimal trade, they don't need to know that the problem is convex. They simply use some potentially complicated method. But because it's convex in some sense, even though the trader doesn't know that, they're going to get the right answer.
Tarun:
Another interesting facet of this is: in Uniswap there's two sides of this market. There's the liquidity providers who are trying to earn fees. And then there are the traders who are trading against it to get moved between currencies. And there's a sense in which the liquidity providers could lose money, if the traders keep buying the more expensive asset and giving them the crappier asset, that's what impermanent loss is. It's a terrible name, but that was the state of 2019 Ethereum. But the interesting thing about the convexity, if I were to put it in yield farming language, is that if you have a thousand metaphorical apes who see 500% APY and all of them say: I'm going to put all my money in it, that strategy is actually optimal because it will converge to an equilibrium very fast. And that's the key to convexity, it's that you can be dumb and just see 5000% APY putting my money there. And the system will be able to reach an equilibrium quickly. If it wasn't convex, it could never reach equilibrium.
Anna:
But that particular example has to do with timing though, doesn't it? Or you're thinking in a system where everybody sees this at exactly the same moment?
Tarun:
Yeah. It does have to do with timing, but the idea is there might be some optimal APY. In the real world where people do know a complex analysis, like bond traders and stuff like that. Guillermo's advisor is the one who advises a lot of this type of stuff. Everyone is competing for fractions of these percentage points, because everyone's like: oh, look, this thing, slight move 0.0001%, there's an arbitrage opportunity. And that actually, it's just in crypto, the liquidity constraints and the way capital moves in this space make it so that there's not much capital in certain opportunities, even though there should be maybe, cause they're providing some yield or some reward. And the idea is that if the mechanism is actually has some convexity property, anyone just has to say: hey, look, I'm going to go move my capital to optimize that reward locally, individually. But then the system, the global thing will be optimized. So remember how Guillermo was saying convexity is important for local. Like: oh, if I'm locally an optimum at the bottom of the mountain, I'm globally at the optimum. What that means in economy is locally any individual trader trades what they think is the best. That's the notion of local. Global is the whole system of traders. And the idea is that in convex problems it's very easy to get to the global minimum, which is equilibrium.
Guillermo:
Yep. So in some sense, you can think about the economy as, I mean, this is a weird thing, but you think about the economy as one big function. So this function takes in like a hundred million parameters. Every person gets to only locally change one parameter, if everyone does that, congratulations, you have got the best possible function value.
Anna:
And it's the best. And this is the thing: you're not looking cause you can map whatever, but you're looking for optimized, but for what exactly here? You're trying to get the best amount? Is it supposed to go higher? What does it do?
Guillermo:
Yeah. The best amount here. And for a trader, the best amount is what nets me the most money.
Anna:
Back to that example of everyone having a parameter. It's like, if everyone does that right, then everybody nets the most amount? Or is it the entire system nets the most amount?
Guillermo:
So, okay. This is where that analogy gets cut a little complicated, and I wasn't sure. So you can imagine there's one function, like the system is this big function. And if the system is at a minimum, so if that function is minimized, it's good for the system. That function could be a bunch of things. So in the case of Tarun, it could be some notion of stability. And the point is that if everyone ---'s incentivized to make, you know, they--- can only change one of the variables of that function, but they wanna maximize it for their own sake because they net money potentially, even though it could be smaller and smaller amounts of money, but they still will net money. If everyone does this, and the whole function is optimized, not just the local version, but the whole function actually is optimal. ---Maybe this is one way in which convexity---- There's many ways in which convexity is nice. But I think this is what Tarun was trying to get at, if I understand correctly.
Tarun:
Yeah. I mean, I think the question that Anna is getting at, is what's the objective function? What does the thing that I'm optimizing and why is that the best optimum? Or why is that the thing that was decided to be optimal? And so in the case of Uniswap, you have to frame a problem so that you can talk about a notion of optimum. And the problem we phrased in the first paper was what's called "the optimum arbitrage problem", which is, let's say there's another market, there's Coinbase or Binance. And Coinbase says: Ethereum is worth $1000. And then Uniswap says: Ethereum is worth $900. So the question is, you want to buy low and sell high, so you want to buy from Uniswap and you want to sell on Coinbase. And so what the automated market maker literature of the 2010s said was that: hey, you can't figure out, in the way they're structured, you can't actually figure out what quantity to trade to maximize your revenue, to buy from Uniswap. How much should you buy from Uniswap, and then sell on Coinbase. And the automated market makers, that academics were designing, had no ability for you to quickly compute what the amount you should buy to maximize your profit. However, Guillermo and the co-authors, we realized that: oh, actually for Uniswap it's convex. So there's a unique, exact quantity to trade. You have to trade $50 of Ethereum and it equilibrates the two prices to be exactly equal.
Guillermo:
So what's surprising is that the solution to this problem, so that the best thing for the arbitrageur to do and why it's important for Uniswap, the best thing for the arbitrageur to do is to maximize their profit. But it turns out if the arbitrageurs, they maximize their profit, they're also making the two prices equal, just as a side effect of whatever they're doing.
Anna:
I see. This is the arbitrage, they take some asset out of something that increases the price and then they move it into somewhere else which decreases the price.
Guillermo:
Until they're literally equal. And so of course, if you think about it, it's not that complicated. But the whole point was it was utterly surprising that the Uniswap tracked some external market. But when you think about it, you're like: wait! Of course, if there's ever a difference, someone can profit by buying low and selling high. But the key to all of this is that how much to buy low and sell high in Uniswap. And then later as we showed, actually we all saw this in Balancer. And after essentially all of the CFMM memes that exist now is that that problem, because it's a convex problem, is easy to solve. And so arbitrageurs... Even though it potentially, it could be very complicated. There are potentially many, many coins, which they have to all balance in just the right way to make sure that price is all lined up correctly. It's just none of that actually really matters because almost every silly heuristic will work to equilibrate those prices, even though, in substance, the arbitrageur need not know that this problem is convex.
Tarun:
And here the assumption of optimal is that given more than one market, they can stay synchronized strictly by incentives, without actually needing money to keep being printed or come into the system. And that's the key that you could never show in old automated market makers. The original very complicated designs that existed in 2010 and 11 had these problems where people could do, what's called a money pump. They could trade back and forth between the assets and they could drain all the liquidity. That's bad. And they basically proved: hey, here's a design where you can't do that. But guess what? You can never compute the optimal arbitrage prices to synchronize with other markets. That's ♯P-complete in some cases. And so the cool thing about Uniswap is you can show: hey, you can synchronize and you can bound the error of how much the prices can differ by. And then in practice, that's what happened. And so I was observing that in practice and I was like: there is no fucking way that the people who are doing this on Ethereum are actually computing the exact correct solution, but somehow they're getting the right answer. Cause they're saying the Binance price and the Uniswap price were the same. And that was when it was like, there has to be some magic here under the covers.
Anna:
What was the magic though? Was it just their intuition? Was there some market force that was putting the right number in or what?
Guillermo:
The market forces convexity. Okay. So let's get back to the original question we were talking about. We talked about these local functions. We talked about everyone has to switch a little local lever on this big function. Here's what it is. In some sense, Uniswap has a bunch of different markets with a bunch of different coins. Here's the deal is that if I'm looking at two pairs of coins, let's say, Ether in USDT or something like that. And I locally optimize that. It's going to open up another, but smaller arbitrage opportunity for someone else along a different pair. If they go and they're like: I know this arbitrage here, I'm going to go and change it. That's like a separate lever of this function. Then they go and perform arbitrage there. And now those two things could have collaborated. And the other two things are cut pretty close. And if you do that in a bunch of rounds, just what arbitrageurs all do locally, the global system has this beautiful property that all of the prices will match. If you trade USDT for ETH, then ETH for DAI and then DAI for whatever, and then back to USDT, in some sense, all of these cycles will have zero profit or, approximately speaking, they will be approximately equal. So this is what I mean when we say: look, the arbitrage problem, if people solve it locally, will approximate the true problem on the graph, which is, here's what it is. It's making sure that there's zero profit everywhere on the possible graph, which is equivalent to saying that all of the prices are equal to whatever on external market.
Tarun:
And that's a notion of economics, that the prices are synchronized.
Anna:
I don't know if you did research on this for the work that you did, but the folks that actually came up with this structure, were they coming from a different place, which allowed them to do this?
Tarun:
You mean Vitalik and complement on the site? No, this was right after the "Can you stop trading" thing. And basically Vitalik was like: we need to somehow have Ethereum tradable without relying on fucking Bitfinex. I dunno if you guys know that, Google "can you stop trading" if you want to learn about the history of this thing, because this was when Ethereum was hacked during ETH Devcon Shanghai, I forget which one it was. And basically the attacker was dumping all the coins on this one exchange. And Vitalik was trying to tell the exchange: hey, can you shut down the exchange, can you shut down the exchange? And they're like, "fuck you." And so that was what led to it being essential in his mind that there was a decentralized exchange. And most people at that time had come up with really complicated and annoying solutions, like 0x, where it's off-chain relayers and you post-proofs — It's like Augur, just incredibly complicated and you have no guarantees that the price even can stay synchronized. Or it's like things from the academic literature, which were also equally complicated. And they also don't have the property that it's easy to figure out, what the amount you should trade is. And so I think that was the beauty of this design, but I think the design wasn't inspired by any academic insight as much as like: hey, we plugged in a couple of numbers in this formula, looks like maybe it'll work. The usual kind of crypto luckiness, that I think people in 2015 and 16 got walk their way into that. People now are like: what? You could find something that easy? But the key point is this convexity property ends up being more generic. All of the constant function market makers that have hundreds of millions of dollars or billions of dollars in them, all have this property. There's not a single one that doesn't. In fact, some of the ones have gotten hacked, don't have this property and people exploited them with flash loans. And it's very clear that this property, both in practice and in theory, is the number one reason these things are stable and they're stable by incentives alone. You don't have to add too much. So the next paper we did was kind of making it generic and saying: hey, for any convex function, you can get this synchronization property. And from there, I think then the question was: "hey, are we paying a price for this convex property?" And I think that's where privacy comes in.
Anna:
Hmm. Actually, before we move on to that, the impermanent loss, where does that whole concept come from? Who coined that?
Tarun:
This guy Pintail, who's some anon blog post writer, February 2019, on Medium.
Guillermo:
Impermanent loss. It's such a bad term. It's truly terrible.
Anna:
I think that person has apologized though?
Tarun:
Yeah. They too agree. It should be called opportunity cost.
Guillermo:
Yeah. I I agree.
Anna:
Opportunity cost is way more...
Guillermo:
More correct. Because impermanent loss has nothing to do with impermanence. Other than in some weird esoteric sense where you have some complicated recurrent. It doesn't make any sense, this is the point. I mean, it kind of does in single points or something, but that's it. So here's a fun fact, without fees, if the CFMM charges no fees, impermanent loss is just a thing that happens for all CFMMs. Sorry, that's the deal.
Tarun:
CFMM stands for constant function market maker, which is the set of all of the possible mechanisms that act like Uniswap. And a lot of our work works on classifying those and describing what properties are necessary to be economically stable.
Anna:
So what you just said, if there were no fees, and by fees, do you mean fees in that network? Or gas fees?
Guillermo:
So I actually mean fees like the percentage fee. Uniswap, for example, has this beautiful constant called 0.997, it's the classic, or 0.003, depends where you're looking at it. So without that fee, liquidity providers always end up losing. We have some other paper that essentially shows that the best fee is the smallest possible fee under some conditions as well. But it turns out, this impermanent loss or whatever you want to call it, opportunity cost is an intrinsic feature. So that's one place, it might not be good, or it might be good. It depends.
Anna:
Wait, are you calling the opportunity cost or impermanent lost a fee here? Are you equating them?
Tarun:
Fee is supposed to compensate for that loss. So here's one of the things: if I'm a liquidity provider and I put in 50x and 50y and the price now keeps going up, you're losing the more valuable one and gaining the shittier ones. So you need a fee in the more valuable one to compensate for the loss and things that you're having, because you're just holding the shitty one.
Anna:
Although isn't there a point where that fee is no longer worth it. I feel like I've experienced that myself by leaving ETH in too long.
Guillermo:
Yeah. So one example of this is you know for certain that coin A is going to increase, and coin B is going to stay the same. And congratulations, if A is increasing too quickly, there's essentially no fee by which you're ever gonna make money. So this is absolutely the case. And so it's what I call the Faustian bargain, or the devil's bargain, that you have when you become a liquidity provider for these constant function market makers, Uniswap or whatever you want to call them. And essentially you as a liquidity provider are betting in some sense that the price isn't going to change too much, or if it does, it's going to revert back to what it was before. That is your bet.
Tarun:
So one thing is that this is also true in real life. See Game Stop. Because if the price moves too fast, market makers can actually cover on both sides. And then they just don't put any liquidity there or they require too much collateral. So the same thing happens in order books. It's just that we have all these market mechanisms by centralized political authorities of like: oh no, no. Circuit breakers can't go over X percent per day. And in DeFi land you can do that. And so I don't even know if it's necessarily a Faustian bargain. It's just the bargain you have for being censorship-resistant. You'd better be okay with that.
Guillermo:
Right. This is why I call it the deal with the devil. Because it's fundamentally part of the deal you make as selling your soul for the good things of whatever in decentralized finance. I mean, whatever it is that gets you into this.
Anna:
Can I ask a really naive DeFi question here, please? Because I haven't actually experienced this because I haven't seen the price go down significantly. But what happens if you're holding and then one of the assets' prices just drops and the other one stays stable. Does it keep the amount of value stable? Plus the fee? Or no? You're shaking your head.
Guillermo:
The price going down on one asset and being stable on the other is exactly the same, it's fact equivalent to the price staying the same and the other asset going up. Because it turns out that Uniswap has this property, as does Balancer, obviously, it's what's called scale invariant. Anytime one asset goes down, it's the same as all of the other ones going up by that same multiplier.
Anna:
But do you lose? Does the value of your entire amount just go down?
Guillermo:
So yeah. You, as a liquidity provider, lose because you now end up getting more of the, so to speak, less valuable asset and less of the more valuable.
Anna:
I see. So the stable asset will potentially, there'll be less of that. That's where your loss will be. Haven't seen it yet.
Guillermo:
And you've got more of the other asset too, so congratulations.
Anna:
You have less of the good, more of the bad.
Guillermo:
More of the bad. Exactly.
Anna:
All right. So now let's move on to the last part of this interview, which is: how then does privacy play a role? What are you trying to solve for, with privacy?
Guillermo:
Yeah. So that's the question that, I think, we posed in our latest papers. I guess for the audience, this is in reference to a recent note, I guess it's not even a paper, it's a note. Cause it's like nine pages or something silly like that, compared to the 40 page tomes that we usually do. It's a sketch, inspired actually by Anna.
Anna:
Or by an event that I did.
Guillermo:
Yeah. I mean, might as well be you, equivalently.
Anna:
We'll see what that is. It was the ZK sessions "DeFi and privacy", and Guillermo gave a talk. And it was about this particular topic, which is: privacy, CFMM, how does it help? How does it hurt?
Guillermo:
So another part of the bargain that Tarun had mentioned is convexity is very nice in a lot of ways, but it also hurts you when you're trying to be private. And the reason why is: convexity provides a lot of structure into how the market behaves. One way of thinking about privacy is: look, we don't want anyone to be able to tell apart any other person's trades. So someone buys a bunch of coin in some market. What we don't want is we don't want kind of an eavesdropper, we usually call it "Eve", to be able to tell apart what the agent, who we usually call "Alice", has traded. So in normal transactions, it's super easy to hide how much someone has traded. It's simply, here's the deal: you hide the quantities that Alice has sent to Bob.
Anna:
And by, by normal, do you mean like in traditional transactions?
Guillermo:
Yes. So in classic transactions, where we say privacy, we mean: look, if Alice and Bob changed some quantity of money, if you hide that, then congratulations, no one knows anything about anything. So they exchange between each other and you hide those quantities, and then an eavesdropper cannot know what the quantities were, because by definition they're hidden. So it turns out that logic, or that intuition, doesn't actually carry you through for CFMMs. So here the setup is: Alice, instead of trading with Bob, now trades with the CFMM, constant function market maker, for example, trades with the Uniswap. And the intuition says: okay, I'll trade through the Uniswap, let's just hide whatever she traded. And then Eve obviously can't tell. Certainly, that's not true. The problem is that Uniswap only allows very specific trades to go through and that's essentially due to the convexity of the market itself. So just hiding the quantities doesn't help you, because Eve can also interact with this market. Eve can look at the prices of the market, Eve can check whether she can trade some amount of money. And in some sense, having the ability to do that before and after Alice's trade, is enough to recover actually what Alice traded. And in finance, this idea of your markets, your market price changes when someone makes a trade, it's called slippage. Most people probably know what this is already, but it shows that the slippage is what outs you, because what you do is you take the price before Alice's trade and after Alice's trade, and you say: okay, look, the price went up by 1 cent. I know there's this much liquidity in the market. So I know exactly what Alice must have traded in order for the price to have gone up that much. And so that's what our paper shows is that there's this attack vector that's often not really considered that says the following: if Eve can interact with the market and knows, roughly speaking, when Alice transacted with the market, so when Alice performed her trade, then you reach this weird point where even though Eve need not know Alice's trade or really anything about it, it suffices for her just to be able to interact with the market and ask what's your price here. And then after Alice's trade, what's your price now. And then use that to reconstruct what the original trade was.
Anna:
There's a point I want to bring up before we go even deeper into this, which is: going from what you were describing before, why do you even want privacy? Does privacy also have some good qualities that could be useful? Or is it just like, we want it because we're businesses and we just don't want people to see our work.
Guillermo:
I think Tarun has better thoughts on this than I do. I mean, privacy makes a lot of sense in weird ways. One is this notion of front running resistance. What you don't want is you don't want someone to come in. So what can happen is if someone knows you're going to buy whatever, $10 of some asset, what they can do is they can front run you by buying some amount of the asset. Then you buy your $10 of the asset. And now the price is higher than it should have been, because you bought some amount and they bought $10 and then you go and sell it. So essentially you're taking advantage of the fact that you know someone is going to trade with the market. And you know, which way they're trading with the market. And that's really important. So that's case one. Case two is we all claim that wallets are pseudonymous and that's mostly true in some weird way, iIf you create a wallet very temporarily for a very small number of trades. But it turns out everything can be traced pretty easily. And there's a whole industry around deanonymizing wallets. And it's really damn good. So my point is good luck trying to stay private, if you have anything more than some negligible amount of money in the market. And I think Tarun probably has better thoughts on this. So I'm going to let him continue answering this.
Tarun:
The only thing I would add is that... There are two other things. One is, if you're a whale, you don't want people knowing you're selling. Cause it not just front runs you, but also back runs you. So maybe you're a whale and you can't sell. You have thousands of tokens, you sell 10 tokens and everyone's like: oh, shit! This whale is selling! We're just going to dump. And then now that's been depleted. But the interesting thing is, I will say the lack of privacy in DeFi has led to a bunch of very interesting market dynamics that remind me a little bit of Instagram influencing, where people will have public vanity addresses that they advertise as them. And then they say: hey, I bought this or I'm trading this, and then people copy-trade. So there's like influencers who take advantage of the lack of privacy. And then there's people who follow that. Of course, at the same time, there's also the fact that you can't do big trades. And this is the same thing that exists in the normal market, where big orders and big trades really leak a lot of information and you can't do them efficiently without privacy, without everyone else trying to... In a sense, that's like societally mechanistically stable, where no one party takes all the loss or something. So look at everyone's distribution of profit and loss.
Anna:
This is helpful to frame this. And what you've just described before was kind of describing why proposals for privacy, a superficial proposal for private CFMM, will still leak information. It actually doesn't solve for what it says it will solve for. Do you have an example of where it does work? Are there things that people should be doing if they're thinking about these private, I don't know what you'd call them, private CFMM structures? Something like that? Private AMMs?
Guillermo:
Yeah. I mean, if you come up with a good name, you should tell us, because that might be the title of the next paper or something.
Anna:
You call private AMMs PAMMs. no?
Tarun:
It just reminds me of the Office. I don't want anything to do with trading or privacy that reminds me of the Office, the TV show.
Anna:
Okay. We'll leave that one on hold. We'll come up with a better word eventually.
Guillermo:
But it's actually pronounceable, which is much better than any of the current ones. So in the paper we do provide a few mitigation strategies. And it's not clear these are sufficient, but they're certainly at least necessary, in some sense. One of them is almost silly and that is the idea that you can batch orders. ----So what you do is instead of having kind of---- This whole argument that I gave previously relies on Eve being able to critically know when Alice's trade was. But you could imagine that Alice makes a trade, but also hundred other people make a trade. And the trades aren't executed until a long time after everyone has submitted them. In that case, Eve is going to have a pretty damn hard time telling apart Alice's trade, if Alice's trade isn't super large compared to the rest. So in that sense, there exist some things you can do. Another thing you can do, which actually starts to get very complicated, because you have to do it in a way that is self-consistent, is you can can add random noise to the reported price. So if you add enough noise, there's a few downsides to that. One is if you add noise to the reported price, you might be under-reporting the price. So people are going to be incentivized to buy at that price. And so liquidity providers end up losing some amount of money. Similarly, the same thing happens if you over provide, if your price is too high or whatever. The other kind of issue with that is that your randomness or your noise, so to speak, has to be very carefully constructed because a simple, dumb idea would be to just, every time someone asks for the price, you give them a price with some additional noise. But here's the deal, If I take 10 measurements and I average all of them, that's going to be pretty close to the right thing. I mean, if you're telling me: look, I'm adding noise, that means zero. Roughly, it cancels out if you add enough of them and take the average. Then that's silly, because then you never had privacy in the first place. So this requires a very complicated mechanism for which to add noise in such a way that that doesn't happen. But also, after you make a trade, what you also don't want is you don't want the price to change too much, because then someone else can distinguish actually how much the price changed, which as before it leads us to the original attack. Essentially, if we know the slippage, we know how much someone traded to get there. So it becomes this weird trade-off, where what happens is you either have a degraded user experience, in some sense or another, because you're either misquoting prices or you have to batch things in general. Or with any one of these trade-offs, you're paying a price in some sense for privacy. It's not just like a freebie. You don't just get privacy. And the problem with this, in the end, is that you could imagine that, for example, orders taking a long time, because they're being batched or similarly weird price misquotes, because you've added noise to them, ended up threatening the solvency of the system. In some sense, the system itself works because there's this feedback loop that allows it to work, but you're threatening that by injecting noise. And whether the noise comes from delays or whether it comes from actual stochastic noise added to the price, it's something to consider. It's not super obvious that it just yields positive effects. And potentially just a negative user experience, in fact, might yield more consequences outside of personal, but rather systemic risks that emerged from doing things like this.
Anna:
One thought I had, as you were talking about this specific randomness, and I realize this is a different track, but has anyone thought of using VDFs for this kind of thing? And I say that because I always think of randomness in the context of VDFs, even though I know it has more to do with time.
Tarun:
Yeah. So it's definitely the type of thing you want to use for this. That's how you would actually implement the batch time to be non manipulable. And it also ensures that the precise timing is not attackable. But most VDFs are still, I would say 90% theoretical, 10% real. But it's definitely one way of doing this. Gnosis had another approach, which was really complicated. Again, I think somehow people in the last era of ICO's just believed that really complicated mechanisms would work and then they didn't realize they were dealing with "apes", as the Twitter meme goes. Gnosis' thing has a notion of a batch auction. That's a check plus, but then they also had this crazy thing where people had to crowdsource solutions to this NP-hard problem. So really hard, opposite of a convex problem in a lot of ways. And then whoever had the best solution that would map to how the orders got allocated to price, and this thing was super front runnable. And so the people did initial token offerings in this Gnosis thing. And Gnosis was really hyping this up earlier this year, before Balancer took over the Balancer LBP and Uniswap have completely taken over this whole IPO token thing, that Gnosis really wanted to take over, but completely flopped on. Which was: you crowdsource this solution to this NP-hard problem that solves this allocation. So people would just front run. So everyone who had sent orders early, it was actually like a fish: the person who was the last person to send in an order, would send in an admissible solution that doesn't need to be optimum. Remember it doesn't need to be optimal, unlike in the convex case, for their thing, it just needs to be an allocation of price, quantity. And the interesting thing is whoever were the last person to submit a solution then would always be like the person who puts it in a huge whale order. And then they give themselves the cheapest thing and then make everyone else take a worse price. And they have this problem that, because you don't know what the true best solution of how to distribute these tokens to the number of people who submitted orders is, you just get really bad things, where the person who's smartest in the last and sniping takes everything. And so it's the opposite of Uniswap, because in the Uniswap case, there's no dispute over the best allocation. There is just a single best notion of trade size. And that is why it's so much better than almost every other alternative that's ever happened. That's why this notion of convexity is the key to why it has worked in practice much better than every other solution, like 0x, Gnosis.
Anna:
So it sounds like the VDFs and AMMs and privacy... Maybe that's something for the batching in the future. And we're just going to leave it as a project. But the idea of the convex optimization and the privacy paper, I want to reconnect those. So when it comes to those privacy AMMs, they don't exist necessarily. There's some theoretical ones that have been proposed, but are you doing an inverse engineering or inverse design in this case? Or are you more designing a privacy AMM?
Guillermo:
So this is foreshadowing some paper I think I'm supposed to be doing in the near future. There is some notion of designing a private AMM. Maybe I shouldn't say that here, I don't know. But in some sense actually you did bring up a very good point. And this is a question that Tarun and I had been thinking about for a while, which is the question of designing either privacy AMMs, or really AMMs in general. And you can do that. In substance, they're not really related originally as stated, cause inverse design is usually a very specific connotation, but you can optimize parameters of AMMs and things like that for specific application uses. And this is a thing we mentioned way back in the CFMM paper. And there's this question of: you give me some figure of merit, some function that tells you how good your AMM is for a given circumstance, and you can change the parameters or change the function itself to best match it, to be best for this metric, to optimize this metric.
Tarun:
Maybe we can motivate this a little bit with the example, which is: Curve has a different curve that's very flat, which is very good for things like stable coins that trade around at fixed value, and it doesn't cause loss. But it's very bad for things that drift a lot. Like one's price is way higher than the other, like Ethereum versus USD. And that's a function of the shape of the curve. So this impermanent loss, how much impermanent loss you have is dependent on A) how people are trading, but also B) the shape of this curve. And so one question is, given some process, some notion of the way a price behaves for a certain asset or some property of the payoffs of that asset, you can try to say: hey, what is the best function I can fit to that? And so I would say 90% of people who are raising money right now on CFMMs, for better or worse, are just trying to solve that problem. It was like: what function do I choose that's slightly better? And I think a year ago there was no one doing it. And you were probably likely to succeed. Whereas now there's just a million people and they're making tiny tweaks. It reminds me of proof of stake in 2017. By the end of 2017, everyone and their mom was like: I'm making a proof of stake protocol with this little special thing. But the special thing people are doing is adjusting this curve. And so one question might be, can you automate that process to go from: hey, this is what the real life data is, here's the curve that fits best to it. And I think that's all we should say. The next step is to add privacy to that. Because there's actually some parameters where for trading a Curve-like curve, you might actually not need as big of a batch size. Whereas for something like Uniswap, you might actually need to batch more transaction-spread pricing. And there's some notion in which the shape of the curve maps to how easy it is to lose privacy. So this is where the true uncharted design space is. And I think right now everyone's trying to go for the easy thing. Cause investors are like: oh, you're 10% better than Uniswap, take my money.
Anna:
Oh, that's interesting. So it's almost like the mitigation of the issues caused by adding privacy to a CFMM set up, that mitigation may be influenceable by this curve.
Tarun:
That's, I think, where Guillermo's inverse design lands in the world. Inverse design is very similar ,where you have something you want and you want to recreate the bridge, to choose this analogy. You're like: "I have two islands and there's some water between them, and it's really windy there, and I have millions of cars driving on it every day, build me the best bridge." There's the equivalent problem here. But the privacy should be one of the objectives and you have to design with privacy in mind. And the first CFMMs were designed with no notion of privacy in mind. And so I think our work's really about showing that aspect, like: hey, these things work and they work on a blockchain with no transactions per second or very low transaction for a second, like Ethereum. But they do give up something, and if you want to recover it, here's the constraints to recover it.
Anna:
Cool. Well, I'm so excited to see this.
Guillermo:
Me too actually.
Anna:
This is the future work, not the work that existed.
Tarun:
Alpha leak.
Guillermo:
We have mentioned some of this, we've dropped hints about this on some of our older papers, for sure. But this is definitely a true alpha beta and gamma leak, I guess.
Tarun:
It is crazy that when you think about it, that Guillermo was able to take this thing that's used for very esoteric hardware research and apply it to DeFi. And I think every bull market in this space always brings in new talent. And so you're naturally going to get people from more varied backgrounds.
Guillermo:
From weird fields, like physics optimization theory. I used to think it was just my mom reading my papers. It turns out now it's approximately 10 more people from DeFi. So they make up 90% of the people who do read my papers. That's great.
Anna:
Well, maybe after this podcast there will be a couple more. I do want to say a huge thank you for coming on and going through all of this with both of us. I know, Tarun, you're well versed, but for me, this was new territory. It also helps to put in context, the presentation and the paper that you've recently published. I'll be adding links to that in the show notes. If anyone wants to catch that. I mean, I got the presentation, but I didn't understand where it fits into this larger study that you're doing. So this is very cool.
Tarun:
One of the other interesting things I think about Guillermo and Stephen Boyd's labs writing style is Boyd is a really, probably the most popular textbook that people learn convex optimization from. And one of the reasons it's so popular is he writes in the most simple mathematical language, which is a little bit of the opposite of cryptographers, who really love this very crazy way of writing math with challenge-response and writing these algorithms out in a little harder to for a generic audience manner. But part of the reason that the writing is quite important for this type of work, is that it's very interdisciplinary. A lot of people from different fields are consuming it. So you don't want to write towards one specialty's vernacular. You want to write at the "you know multi-variate calculus and that's it. You took it in college." And I think that's actually a really interesting thing about the style of these papers we work on, cause it's always like with Alex, who was on the podcast earlier, we kind of come from more writing out the math, more math language. And Guillermo always like axe, axe, axe, axe, axe. And it's actually super interesting because I think that level of approachability is what made these papers quite widely read in the crypto community, because they were able to learn something without actually having to be subject matter experts in these other fields.
Guillermo:
Yeah. It's funny. The first time I talked to Tarun and Alex, I gave them, essentially, like an EULA, waiving all rights to any of the writing being made and to apologize in advance for just how much of a pain in the ass I was going to be as a co-author about writing.
Anna:
That sounds like an amazing combination.
Tarun:
I've definitely learned a lot about how to write for multiple fields in the process of this, because I think it's actually quite hard if you want. Crypto is a very interdisciplinary space. And one of the reasons I see people not understanding what's happening is that people of different fields will write in their own vernacular. And then sometimes will be purposely cryptic, because they're trying to raise money. And then other times it's not purposely misleading. It's just that they're not really trying to write to an audience, they're used to the highly specialized academic environment of: there's 10 people who know how to read this paper and I'm only writing to them and I don't care about anyone else.
Anna:
I think we've had a lot of guests that have come on, actually have had that, and then they have to face my dumb questions and dumb it down a little bit.
Tarun:
I think the interesting thing about Guillermo's advisors, I would call him a contrarian academic, because most academics keep their position, get tenure, get more funding by being more esoteric, being highly more specialized. And somehow their group is the opposite. They've been able to, by being very broad and being in many different fields and having to write in a manner that covers all of them, they've actually been quite successful. So crypto mirrors that in a lot of ways.
Anna:
Well, this is interesting. I want to learn more. Well, I think that brings us to the end of this incredible interview and incredible conversation. Actually, I learned a lot and I really appreciate you taking the time. And thanks, Tarun, for being back on as a co-host and as the co-author of some of this stuff.
Tarun:
Yeah. I think I was Schrodinger's interviewer. I was never clear whether I was the interviewee or interviewer at any point during this time.
Guillermo:
Like I said, my savior for some of these... Sometimes I'm like: Ah, Tarun has some great answers to this and surprise, lo and behold. Anyways, thank you so much for having me. Oh my God, this is kind of weird, cause it's the first time I've really publicly spoken about a lot of research, that wasn't at some weird academic conference, so..
Anna:
Oh, that's great. I didn't know that. Well, fantastic. So thanks again.
Guillermo:
No, thank you so much for having me.
New Speaker:
And to our listeners. Thanks for listening.