ZKPodcast: The Challenge of Building Private AMMs with Guillermo Angeris

24 Mar 2021 · 1:17:25

Anna Rose and Tarun Chitra talk with Guillermo Angeris, a Stanford PhD student who co-authored several foundational papers on automated market makers, about why building a private AMM is so difficult. The conversation covers how optimization theory and convexity explain AMM behavior, the front-running and impermanent loss problems that plague constant function market makers, and why naive attempts at adding privacy to AMMs tend to fail.

Speakers

Topics

Transcript

[Music] welcome to xero knowledge i'm your host anna rose in this podcast we will be exploring the latest in zero knowledge research and the decentralized web as well as new paradigms that promise to change the way we interact and transact online in this week's episode tarou and i chat with guillermo and jairus a phd student at stanford we chat about inverse design and convex optimization we also explore what these fields aim to do exactly and how they could be applied to a d5 context specifically we look at the work guimo

did figuring out why cfms actually work as well as the challenges that come when you try to add privacy into these constructions now before we start in i want to let you know about another privacy event that i'm involved in it's happening on friday march 26th this coming friday it's called the cosmos privacy and zkp showcase so it's focused a little bit more on the cosmos ecosystem and the types of privacy projects happening there if you want to check it out i've added the link in the show notes also just want to mention we currently have a grant live during git coin's latest clr matching round if you'd like to support the show now would be a great time head over to git coin i'll add the link to our grant in the show notes i also want to thank this week's sponsor ave

ave is an open source decentralized non-custodial liquidity protocol on ethereum with ave users can participate as depositors meaning they can provide liquidity to earn a passive income they can also act as borrowers to borrow in an over-collateralized way or an under collateralized way think one block liquidity flash loans that we've mentioned a number of times on the show they've recently just released the ave amm market a new amm liquidity pool which enables liquidity providers or lps on uniswap or balancer to actually use those lp tokens as collateral in the ave protocol i've added the link to that announcement in the show notes as well and if you want to find out more about ave please visit ave.com

so thank you again ave for sponsoring this episode now here is our conversation with guillermo [Music] so today taron and i are chatting with guillermo and jairus who is a phd student at stanford his work basically formalizes a lot of the defy concepts that we learn about so welcome to the show guillermo thank you that was i think that's a solid description if terrifying um and mildly you know but whatever it's weird having someone actually speak about your work for some reason or another i don't know what it is right yeah so no worries well tyrone how would you describe the work that guillermo's doing well you know over the last year we've

seen people pour money into uh smart contracts also known colloquially as aping um and uh you know they must be pouring money in for some reason you know they're not totally irrational they're at least somewhat rational they have future expectations of future profits right and somehow understanding what those systems are doing is really important at a mathematical level and a fundamental level and it's something kind of cryptographers have not really studied and neither have economists because it's kind of like a weird mishmash of both fields and no kind of one subject matter expert can be the expert of most of this stuff so we try to take a different lens than the lens that

cryptographers take or the lens that economists take we take kind of the lens of sort of more how optimization uh people from the optimization literature look at this yeah and tyrone you and guillermo actually work on a lot of this stuff together you've we've co-published papers yeah yes so guillermo and i have a long history together which it started in 2016. 2016 i think is right yeah 2016. 2016. and definitely 2016 because i didn't work there at that place in 2016. so yeah we were he was my intern in 2016. and uh yes then we stayed in touch and kept working yeah nice so guillermo why don't you tell us a little bit more about yourself

you were at an intern of tyrone's five years ago what have you been up to since then it's been a while right so five years is getting old it is weird it is weird to say like oh yeah like you know turin was literally my boss before and i guess now in some weird sense after i think i think the best way of describing to ruin a nice relationship is um one of continual nerd sniping right uh it's it's this weird thing where you know he hands me relatively nicely packaged problems he's like oh yeah you know i i've been thinking about this thing and then all of a sudden right i i look at it and i'm like oh yeah you know have you have you thought about this other thing and this other thing and whatever and it goes on to like i don't know

essentially like i end up spending you know tens or hundreds of hours on this stupid problem and it's like oh okay well i guess we found something he said cool do you want to write it up and publish it so roughly speaking that's that's kind of how how it goes uh at least how it's been for quite a while now i think got it um so and i guess kind of going back to the original question is like what the hell have i done since five years i i mean in some ways i want to say like almost nothing um you know maybe part of the phd it's stanford why it's a blatant lie okay yeah yeah right but but here's the idea actually actually you know maybe it actually makes sense to describe what you're doing your phd in because i think people in the crypto world

uh don't really actually understand or know anything about the field you're in um and might not even see why math from there is applicable elsewhere so maybe start starting right what is your phd on yeah okay that's a that's a good point so well i guess that's like that goes to two things is one uh i don't really know what my phd is on uh i mean i have an idea right there's some weird general vague notion uh and two i guess my phd essentially is just involves me becoming a machine that turns like coffee calories and booze into like literal papers right i'm just like i input these three things and outcome paper i mean tyrone kind of kind of attests to this right it's it's weird but it kind of happens

what what is the field like i think this is what we're trying to get to the bottom of is there a field is there a field so yeah the answer is yes um okay weirdly uh so so the the actual thing technically speaking that i think i think on average i'm supposed to be doing my work for is this weird intersection between physics and optimization theory right um and and there's kind of a bunch of crap that goes into this right i mean it's it's super in some ways you know people make it super complicated and super magical but it boils down to this question of look you know in physics the beautiful part about physics is that we have you know the whole point of physics is to

study systems right we study anything i mean a system is pretty much anything right it can be anything from like you know the trajectory of planets around the sun all the way to really complicated things like you know the the different pressure patterns around an airfoil in you know whatever in at high railing numbers and things like that so i work in this weird intersection of fields where the the question of physics in some ways is you know what's i give you a system you tell me what the behavior of a system is right so it's like you know you solve some 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 kind of does the opposite and the question is in that area is look i want to design something right that i have i have a very good grasp of how that thing behaves after it's been designed so if you give me a for example like this could be a bridge right a bridge is like if you give me a bridge i could probably stick it on a big ass computer simulate you know the tensions along each one of the strings and all the things right and afterwards tell you like yeah this bridge it's going to like absolutely fall in in two seconds if you try building it or hey congratulations like you know given some basic assumptions on what the bridge does right it's going to roughly work and i guess applying this then into the defy

context you are looking at existing bridges or some sort of like construction and trying to figure out if it's gonna collapse or how it might evolve right or i mean essentially yeah like everything is like a system right in some weird sense or another and the question is just can you write down the mathematics that correspond to that thing before guillermo keeps sounding like a too much of a category theorist and 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 is a thing that's actually very important to hardware design for sort of optimizing layouts and hardware and also kind of making sure that you're

able to have hardware that does the certain features you want right but guillermo works a lot in 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 you know 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 kind of where where the galaxy brain bridge analogy was coming from i actually i did wonder like in your background you you have you have sort of an electrical engineering background um so that that question kind of came up

like how how do you link from that to what you're doing today but i guess maybe it's through this hardware angle so yeah it's i mean so so what i was going to get to in the end is like it turns out you i mean you have very good descriptions of whatever the hell system let's call the bridge right the question now is okay i want to build a bridge that works can i do that in an automated way and that that's what inverse design is ah i see the automation of these things like it's literally automation right so in particular it's like you know you have some requirements your bridge needs to hold this much you know it can't have resonance frequencies at some stupid thing whatever it is right you just plug that into a computer and because you know exactly how the system's going to behave

right you just then just optimize the bridge right i mean it of course a bridge is a very very large structure so you would optimize some simplified version of it but the point is this could be applied to anything and when i mean anything i literally mean like anything for which we can like mathematically talk about its behavior uh and congratulations now you've got some you know optimization theory uh and that's kind of where i come in is 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 and it turns out there's the bridge right so the ee is you know kind of teaches you the physics and also kind of teaches you the optimization things and and those two things combine very nicely

to you know describe not just physical systems but in in our case like you know weird defy primitives with crazy behaviors that like at first glance look somehow magical but it turns out they're usually pretty simple in the surface like under the surface is it common to use this type of technique on economic systems or are you only able to do that with d5 because it's like also built into code and it's sort of more digital so it's a funny thing and turn has some thoughts on this too i suspect but i i'm gonna i'm gonna front run him on those thoughts probably uh hopefully so that you know in some sense economists try to do this right in classical market making literature right

economists try to come up with models for general behaviors so in in in you know what what people call the classical exchanges for these order books right you have kind of very complicated mechanics or i guess very complicated dynamics specifically that kind of like give rise to a bunch of like behavior that like on average looks like something the beautiful part about defy is that here's what the behavior is it's exactly what's written in the damn contract right so i can write down an equation that says actually you know when someone makes a trait this large here's exactly how much they're going to get out of it right whereas like economists will approach it because you can't in some sense right like the while the behavior of all of the ages of their

modeling has on average some function that represents it or something really complicated like that right in d5 you know the function because it's written into the damn contract so got it in some sense right like yeah economists can approximate what defy is doing exactly and that that's a good thing or a bad thing right because in some sense the system is d5 could be potentially less flexible than than kind of the classical capitalist systems of free markets right but at the same time you could analyze them pretty damn well um with very basic tools one one thing i would add to that is that economists are really historically focused on you know i would say there's a very high amount of interaction between

optimization and and economics and say a lot of the modern developments and economics are pretty much due to changes in mathematical optimization however uh you know if you if you take a graph if you go to grad school like you know even the like labor economist who doesn't know how to add two numbers is forced to take an optimization class for a reason uh but there's kind of a sort of sense in which mathematical optimization talks about much more like less prescriptive things so a lot of economists like writing down sort of functional forms that describe an object but there's never actually really consensus on whether those functional forms are correct or not and then they optimize assuming that model in d5 at least you can say hey

the function's correct um but i think what guillermo and his lab are kind of quite famous for is actually optimization over things where you don't have functions and you rely on computation to to give you a solution versus something where you're like hey i think this economy is linear or quadratic or exponential right instead you say hey here are all the possible models try to optimize sort of like given those constraints and so so so i think maybe like taking a step back it might be good to talk about kind of like your research lab and like the different types of fields they work in because for instance advisor does economics as well sometimes so okay one of the labs that i work in is a thoroughly

completely and entirely physics lab and this this is like the one that terrain is not referencing and they do like real people things with real people photonic chips and real people like quantum vacancies trying to do a bunch of combinations of of stuff that's like you know quantum potentially getting too much computers they make esoteric quantum computing plus plus hardware oh wow yes exactly um and it's really complicated and they are actually doing real things that i like understand approximately one percent of so if you want something useful you kind of go to that lab and then the other lab which is the one that turin is referencing is um is stephen boyd's lab and they do honestly they do a bunch of [ __ ] 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 uh really does you know his whole thing is essentially the best way i can put it is mathematical modeling right all he does is he takes a problem that's kind of in the literature uh and then frames it in a way that can be solved right uh usually using some techniques that that we develop which is in convex optimization theory and then kind of does this for everything i think at some point he's he's done stuff in baseball and he's done stuff in we did some stuff on you know surveys like how to uh like how to optimally weight survey responses such that they are approximately

representative of like a population that's useful for production i guess hmm yeah yeah exactly so this is this is our our we like to call it our coveted paper right everyone had a coveted paper that they did that was like directly or indirectly related to it so that was ours okay um but in some sense kind of the overarching theme of steven'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 in very clean very simple very like almost innocent ways for which once you frame it in this way

you you now have a perfectly reasonable solution method and so kind of that's what he's been famous for right he's been famous for taking things that are initially seem really complicated and have a bunch of stuff kind of a bunch of details and then reducing them to things that are very very mathematically clean but are still extraordinarily useful and and you know this 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 that can then you know you 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 then just get solved for you but you don't see any of that right 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 hard what seems like a really hard problem and turning it into something that's like very concrete and very simple and can be solved with you know these optimization tools uh and that's kind of where i fit in essentially i do the same thing but just apply to a bunch of different fields so in this case physics or d5 or even i have some paper robotics with another friend and all of this i mean it's just it's it's weird it sounds fun it is it is it's yeah so so one thing you should kind of take away from this and i some of the listeners who maybe have taken convex optimization in undergrad they probably probably use steven's book it's kind of the most popular i would say undergrad and maybe graduate and some

institutions uh book for teaching this field but the key thing is that the plumbing of like almost all modern mathematical modeling is convex optimization part of the reason for that is it sort of uh guarantees you sort of 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 sort of 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

interesting economics like pretty much anyone who ever does linear regression is doing convex optimization every day and there's probably the most used piece of library code outside of like a kernel and an operating system is our convex optimization tools and matrix multiplication but you know right but you know one is applied to the other inside yeah they're very closely really so what is convex optimization you just mentioned that a couple times and i don't know what that is so so convex optimization is kind of a really weird field that seems absolutely esoteric the first time you see it uh 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 express what is a convex function or even a convex set so one way of thinking about it is you know everyone kind of or maybe like in geometry at some point you might have learned what like a convex polyhedron is right essentially it means you take any set 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 between them or a line segment then that line segment had better lie inside of the set itself right so for example a circle is a convex shape or so is a triangle but you can imagine that you know an s shape is not a convex shape right because if you take

you know you can take up two points one at 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 got it and of course this is the question look congratulations you have a line that fits inside of the side who the hell cares um utterly shocking is you get a bunch of very very nice and very simple properties that kind of emerge from it so some 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 right for any set you don't always get this right so if you can imagine two interlocking c's which never overlap right

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'll be essential to proving you know the weird privacy result that we've just recently published a paper on but other things that it implies is that um kind of extending so now we've talked about convex sets and let's talk about convex functions and they're almost as simple is a function is convex if you fill in so you could think of you know x squared right it looks like a parabola right and if you think about it if you fill it in right 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

right on the graph itself it will always lie above the graph itself like a line between those two points you mean a line between them correct yeah okay because it's sort of an upside it's like a u what's i mean i know it's not it's exactly but it looks a bit like a u and any point any two points will always cross over that sort of inside area of that u correct okay so we we joke and certainly in steven's lab we joke that convex optimization is simply the study of things that look like bowls right simply because what you're doing is every function that you're going to ever have that's convex looks like a bowl right and so that's it it might might have a fat bottom yeah it could it could potentially it

does not need to be sharp it could be completely flat it could be but in some sense right if you put water it's not going to spill out of it okay but you just just are describing convex functions but what is the optimization if you have a convex function then the one property you should get out of it which is kind of a weird one but it's at any local minimizer so any point for which you know if you were to look left to the 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 you know the bowls

never there's always the the bottom of the bowl is always going to be the the only optimizer over all of these things the point is if the way you think about this if you're walking down a hill at some point in you know in a normal hill that we normally walk if you've ever just taken a hike right at some points you're going to reach kind of these flat spots where you look like you're kind of at the bottom but you are not actually really at the true bottom of the hill okay that can't happen in a convex function if you just if you walk downwards and you reach a point where you can't walk downwards anymore that means that you are optimal you are like at the minimum value of that function okay period why is optimal the minimum why is that a connection so

and this is just by definition right so optimal could mean minimum or maximum but it turns out you know the the minimum of something is just the negative of the maximum right so if you think about it right if i'm if i minimize a parabola right it's the same thing as maximizing the negative of the parabola so we just use minimization as the important one but you know it act either of the two is fine 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 yes it is literally getting to the bottom of the thing so you know in that sense right conversation is utterly obvious you're like yeah of course i got to the bottom of the thing i look around all i see is up

right and congratulations you've now discovered literally every important facet of convex optimization of course it gets weird and complicated in like high dimensional spaces or whatever but like no one actually cares it turns out it all works exactly the same way i'm gonna let you have that i don't entirely understand why the word optimization is used for this so so the 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 sort of 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 right that's a really weird prediction but there's a set of possible models

maybe maybe maybe there's like the models that say like uh you know maybe that that was too simple that was sort of 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 okay and that is an optimization problem right because i say here's a set of models that i i think describe this system but there are many of them and they're 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 that optimum to the bottom of the hill the bottom of the hill is some notion of fitness of like how good your model is is it the distance from the

like model to the reality yeah and so it's almost like getting your delta very low or something okay i think i kind of understand that yeah so essentially like you know here 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 okay it turns out very often that prediction error is a convex function of your you know the parameters of the model ah okay finding the minimum means that you pick the model that has you know minimized the error in some sense right and there's many many possibilities of errors cool well thanks for explaining that that's awesome yeah hopefully it was a useful explanation i have no idea of it maybe it was

i think it was useful i think i think we got there so so something most people probably who listen to those podcasts have heard of is uniswap and you may have also heard of balancer or curve or you know now there's hundreds of of these types of decentralized exchanges that are automated market makers and one you know natural question is why do they work because there have been many many attempts at making automated market makers and decentralized exchanges for the last 10 to 15 years and so an interesting question that i guess i had had in like 2019 like trevor or march was

hey there's like a million dollars in this uniswap thing like why is anyone putting any money into it and in the process i started talking i started trying to write some equations out and i was like yeah it looks kind of like an optimization problem uh but like people seem to be losing money like 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 like how is everyone not just losing all their money and we were like yeah we got to we got to find some description of like why this is profitable for different types of people who are participating in this both the people trading as all the people providing liquidity and in that process i i nerd sniped him uh that's usually cd 363 if i remember

oh man wow that's like where the definition of that is 363 or 353 but whatever the main point is that he then was like hey this is definitely a convex optimization problem and you know crypto people i don't think we're really thinking about like hey what's the math behind this they were just kind of like well hey look i made some money and someone made a smart contract who didn't quite know why or how it worked but like just had a lot of conviction that it would and kind of 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 you know 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 i found unappealing about the space was that it wasn't 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 unisop at that time really started seeming not like that and you know 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 right like 100 lines of code right so so it kind of behooved 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 kind of to set the stage what our first paper which kind of got published in december 2019 although this journal has been

extremely slow about publishing it although i think we got an email about it recently so it might not be that maybe it's finally 2021 will be the i mean it got it got a bunch of citations but it's like since then but it's kind of it kind of like weirdly like has never it didn't actually see the light of day but use but it was like exciting i mean it's yeah it's accepted but it's the pre-print was online and so this paper tries to formalize unit swap then you know i think the second thing i kind of tried to nerd snipe gear about is like there's something nice about the senior slot paper we got some very simple clean properties we proved how expensive it is to manipulate it we prove that people don't lose money and we proved kind of that like this property that academics had

fetishized for about a decade in the automated market maker oh yes field called path independence was actually a red herring like unisop worked because it didn't have that ooh right so that was actually kind of 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 touring prize winners who've written papers on this stuff like it's impossible to solve this problem it's sharp p complete like much harder than np complete and then you know 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 was

that hey the convexity is actually the thing driving why people are able to make money right and then the second thing was hey there's this huge outcrop of new automated market anchors there was balancer there was curve and this was january 2020. so there's there weren't that many more wait you just said you just said something the convexity yes allowed that people that is why people would make money i don't understand that okay here's the beautiful part about convexity right is i told you look uh you know whatever like you're at the ceiling you're trying to find the bottom of the hill what you do is you walk downwards so it's 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 right okay 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 a you know silly algorithm that does something that seems to get the right answer it turns out convexity essentially will not quite but will almost guarantee that you get the right answer right so if a trader wants to perform the optimal trade they don't need to know that the problem is convex they simply use you know some potentially complicated method right but because it's convex in in the some sense right even though the trader doesn't know that they're going to get the right answer i see an another interesting facet of this is in unisoft there's two sides of

this market there's liquidity providers who are trying to earn fees and then they're 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 you know keep buying the more expensive asset and giving them the crappier asset that's kind of what impermanent loss is it's terrible name but that's that was the state of 2019 ethereum um but the kind of 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 you know 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 like you can be dumb and just see 5000 apy putting my money there and the system will will be able to reach an equilibrium quickly if it wasn't convex it could never reach equilibrium right but this has to do also like that particular example also has to do with timing though doesn't it are you thinking in a system where like everybody sees this at exactly the same moment yeah it does have to do a timing but the idea is like there might be some optimal apy right like in the real world where people do know what convex analysis is like bond traders and stuff like you'd be surprised what you know guillermo's advisor is the one advises a lot of this type of stuff

everyone is competing for like fractions of these percentage points because everyone's like oh look this thing slight move like 0.001 percent and like there's an arbitrage opportunity and that actually is it's just in crypto the the liquidity constraints and the way capital moves into space make it so that there's not much capital in certain opportunities even though they there should be maybe because they're providing some yield or they have some some reward and the the idea is that if the mechanism is actually has sort of 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 right right so remember how girmo 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 the 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 it's in convex problems it's very easy to get to the global minimum which is the equilibrium yep yeah so in some sense you you can think about the economy as like one i mean this is a weird thing but you think about the economy as one big function so this function takes in like you know 100 million parameters every person gets to only locally change one parameter if everyone does that right okay congratulations you have got the best possible function value

right it's the best and it's the best this is the thing it's this is what you're not looking because like you can map whatever but you're looking for optimized but for what exactly here like you're you're trying to get the best amount is it supposed to go higher is it like what does it do yeah the best amount here right and for a trader the best amount is what that's me the most money but back to that example of everyone having a parameter it's like if everyone does that right then everybody nets the right the most amount or is it like the entire system nets the most amount so okay this is where the analogy gets cut a little complicated and it wasn't sure but um the point yeah so it you can imagine there's like you know one function that in some sense

right like the system is this big function and if the system is at a minimum so if that function is minimized right it's good for the system right that function could be a bunch of things so in the case of of tyron it could be like you know some notion of stability right 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 want to 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 then the whole function is optimized not just the local version but the whole function actually is optimal i mean this is one way in which convex there's many ways in which complexity is nice um

but yeah i think this is what turin was trying to get at if i understand correctly yeah i mean i think the question of that i think anna's going at is like what's the objective function like what is the thing that i'm optimizing and why is that the best optimum or like why is that the thing that was decided to be optimal and so in the case of of uniswap you have to frame a problem such that you can talk about a notion of optimum and the 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 a thousand dollars and then uniswap says ethereum's worth 900.

so the question is you want to buy low and sell high right so you want to buy from uniswap and you want to sell and finance and so what kind of 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 utop how much should you buy from unison 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 is however guillermo and then you know our the co-authors we we kind of realized that oh actually for uniswap it's convex so it's

there's a unique exact quantity to trade you have to trade 50 of ethereum and it maximizes it equilibrates the two prices to be exactly equal yeah so what's surprising is that the solution to this problem so that the best thing for the arbitrary to do and why it's important for unisof so the best thing for the arbitrator to do is to maximize their profit right but it turns out if an arbitrary we should they maximize their profit they're also making the two prices equal just as a side effect of whatever they're doing i see this is the arbitrage right like they take some asset out of something that increases the price and then they move it into somewhere else which decreases the price it goes to the price equilibrium yes until they're literally equal

and so of course i mean it's kind of if you think about it it's not that complicated but you know the whole point was it was utterly surprising that the uniswap tracked some external market but you know kind of when you think about it you're like wait yeah of course if there's ever a difference right 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 unit swap and then later as we showed and actually wheels for this imbalancer and afterwards showed it for essentially all of the cfms that exist now is that that problem because it's a convex problem is easy to solve and so arbitrage who you know even though potentially it could be very complicated they're like potentially many many coins which they have to all balance in just the

right way to make sure that prices all line up correctly right there's none of that actually really matters because almost every silly heuristic will work to equilibrate those prices even though you know in some sense the arbitrary need not know that this problem is convex 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 what the original kind of 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 right that's bad and they basically

proved hey there's here's a design where you can't do that but guess what you can never compute what the optimal arbitrage price is to synchronize with other markets that's sharp complete in some cases and so the cool thing about unisop 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 like i was observing that in practice and was like there is no [ __ ] way that the people who are doing this on ethereum are actually like computing some very like the exact correct solution but somehow they're getting the right answer right because it's like they're saying the binance price and the uniform price were the same and that was when it was like there has to be some some magic here

under the covers and that was kind of what was the magic though like was it just their intuition was there some market force that was like putting the right number in or what the market force is convexity okay so here you know let's get back to the original question that we're talking about is yeah we talked about these local functions you know we talked about everyone has to switch a little local lever on this big function here's what it is right in some sense unit swap has a bunch of different markets with a bunch of different coins here's the deal is that if you know if i'm looking at two pairs of coins let's say you know ether and usct or something like that right 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 gonna go and change that that's like a you know a separate lever of this function then like they go and you know perform arbitrage there and now those two things get equilibrated and the other two things are pretty close and if you do that in a bunch of rounds just kind of what arbitrators all do locally the global system has this beautiful property that all of the prices will match if you trade like usdt for eth and then for eth for die and then die for whatever and then back to usdt in some sense all of these cycles right will have zero profit or or approximately speaking they will be approximately equal so this is what i mean when i you know what we say like

look the arbitrage problem if people kind of 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 you know whatever an external market and that that's sort of a notion of equinox economic that's exactly that the prices are synchronous synchronized exactly what were they and i don't know if you did research on this for the work that you did but like the folks that actually came up with this structure were they coming from a different place which allowed them to do this you mean vitalik and koppelman on the site yeah like 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 [ __ ] bitfinex i don't know if you guys know that google can you stop trading if you if you want to to learn about the history of this thing because this is when ethereum was hacked during eth devcon shanghai oh yeah which ones and basically like the attacker was dumping all the coins on on this one exchange and vitalik was kind of trying to tell the exchange hey can you shut down the exchange can you shut down the exchange and they were like [ __ ] you uh 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 kind of annoying solutions like zero x like where it's like off chain relayers and

you post proof since it's like augur just incredibly complicated and you have no guarantees that the price even is can stay synchronized or it's like things like 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 kind of the beauty of this design but i think the design wasn't it wasn't inspired by any academic insight as much as like hey you know we plugged in a couple numbers in this formula looks like maybe it'll work kind of the usual kind of like crypto luckiness that i think people in 2015 and 16 don't you know got walk their way into that people now are like what

you could figure find something that easy but the 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 right 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 kind of exploited them with flash 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 right so the next paper we did was kind of making it generic and saying hey for any convex function you can kind of get this synchronization

property yeah and from there i think then the question was hey are we paying a price for this convex property and i think that's when you know that's where privacy comes in right hmm actually before we move on to that the impermanent loss where does that whole concept come from who coined that this guy pintail who's some anon blog post writer february 2019 medium why a permanent loss it's such a bad term it's like truly attacking i think that person has apologized though right yeah they they they too agree it should be called opportunity costs okay yeah but uh i oh i agree you know opportunity cost is way more it's way more descriptive right we know

what that is and more correct right because a permanent loss has nothing to do with impermanence like other than in some weird esoteric sense where you have some complicated recurrent thing i mean it's you know it doesn't make any sense is the point i mean it kind of does in single points or something but that's it i mean so it turns out here's a fun fact uh without fees so if the cfm charges no fees and permanent loss is just a thing that happens for all cfmms sorry that's that's the deal cfm stands for constant function market maker which is the set of all of the possible mechanisms that act like uniswap um and sort of you know a lot of our work works on like classifying those and describing like what properties are

necessary to be sort of economically stable right so what you just said if there were no fees and by fees do you mean fees in that network or or like gas fees so i i actually mean fees like the percentage fee so you know swap phrase handful has this beautiful constant called you know whatever 0.997 is the classic or point zero zero three depending where you're looking at it so without that fee liquidity providers always end up losing okay we have some other paper that essentially shows that like the the best fee is the smallest possible fee under some conditions as well but it turns out like this some permanent loss or whatever you want to call it opportunity costs is all opportunity costs yeah is it is a kind of like an intrinsic feature so that's one

one place you know it might not be good uh or it might be good it depends um wait dude are you calling are you calling the opportunity cost or impermanent lost a fee here are you acquainting me is supposed to compensate for that loss exactly because so here here's one thing about if i'm a liquidity provider and i put in 50x and 50y and the price now keeps going up and you're losing somewhat you're losing the more valuable one and gaining you're getting your ones so you need a fee to in the more valuable one to compensate for the loss and things that you're having because you're just holding the shitty one although isn't there a point where that feed doesn't no longer it's no longer worth it like i feel like i've experienced that myself

by leaving ethan too long some of these things so yeah so so one example of this is like you know you could imagine you you'll know for certain that coin a is going to increase and coin b is going to stay the same right and like think congratulations there's essentially you know if a is increasing too quickly there's essentially no fee by which you're ever gonna like make money right totally um so this is absolutely the case and so so this is you know it's what i call the fashion bargain or the devil's bargain that you have with when you when you become a liquidity provider for for these constant function market makers or whatever units hop or whatever you want to call them and it's 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 so one one thing is that this is also true in real life c gamestop yes because if the price moves too fast market makers can't actually cover on both sides and then they just don't put any liquidity there or they're required too much collateral and then so the same thing happens in order books it's just that people like ha you know 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 yep and and it's in defy land you can't do that and so that is i don't even know if it's necessarily even a fascinating bargain it's just uh

that's that's the bargain you have for for being censorship resistant you better be okay with that right right yeah this is why i call it the deal with the devil right because it's it's it's fundamentally part of like the deal you make as selling your soul for the good things of whatever decentralized finite i mean whatever whatever it is that gets you into this can i ask a really kind of naive d5 question here no by all means please please because like 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 like value stable plus the fee or no not so you're shaking your head so the price

going down on one asset and having and being stable on the other is exactly the same it's in fact equivalent to the price staying the same and the other asset going up i see because it turns out that uh uniswap has this this this property is this balancer and all these things that it's uh what's called scale invariant you know any time one asset goes down it's the same as all of the other ones going up by that same multiplier like what do you do you lose like does it the value of your entire amount just go down so the yeah as 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 i see so the stable asset will potentially will just they'll be less of that that's where your

loss will be less of that exactly haven't seen it yet and you get more of the other asset too so congratulations right you have less of the good more of the bad more of the bad okay exactly all right so now let's let's move on to kind of the last part of this interview which is how then does privacy play a role like what are you trying to solve for with privacy yeah well so that's the question that i uh that i think we post in our latest papers because you know i guess for the audience this is in reference to a recent uh note i guess it's not even a paper it's a note because it's like nine pages or something so they like that uh compared to the 40 page tomes yeah a sketch exactly okay

um inspired actually by anna on essentially an event that i did yeah i mean might as well be you equivalently right um okay for and we'll see what that is it was the zk sessions defined privacy and guillermo gave a talk and it was about this particular topic which is sort of privacy cfmm how does it help how does it hurt correct so i don't know if that's a good desk no no this is great so um another part of the of the bargain that i was you know that turd 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 okay one way of you know one way of thinking about privacy is look we we don't want anyone to be able to tell apart any other person's traits right so someone buys a bunch of coin in some market right what we don't want is we don't want kind of an eavesdropper we usually call eve to be able to tell apart what the agent who we usually call alice is you know has traded so in normal transactions it's super easy to hide uh how much someone has traded it's simply here's the deal you hide the quantities that alice has sent to bob and by by normal do you mean like in traditional yeah transactions so in classic

transactions right where like we say privacy we mean like look if alice and bob change some quantity of money right the if you if you hide that then like congratulations no one knows anything about anything right so if they exchange between each other and you hide those quantities and then like an eavesdropper cannot know what the quantities were right because by definition they're hidden so it turns out that logic or i guess that intuition doesn't actually carry through for cfms right so here the setup is alice instead of trading with bob not trades with a cfm or a constant function market maker for example trace of the unit swap and you know the intuition says okay i'll stretch the unit swap let's just hide whatever she traded

right and then eve obviously can't tell so that's not true the problem is that unit swap only allows very specific trades to go through and 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 right 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 you know in finance the the idea this idea of like you know your

markets your market price changes when someone makes a trade it's called slippage right and most people probably know what this is already but it turns out the slippage is kind of what outs you because what you do is you check the price before alice's trade and after alice's trade and you see okay look the price went up by one 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 kind of 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 this weird point where even though eve need not know alice's you know 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 there's a point i kind of want to bring up before we go even deeper into this which is like going from what you were describing before why do you even want privacy like does privacy also have some good qualities that could be useful or is it just kind of like we want it because we're businesses and we just don't want people to see our work so i think sharon has better thoughts on this than i do but i mean privacy kind of makes a lot of

sense in in weird ways right one is this notion of front running resistance right what you don't want is you don't want someone to come in so you know what can happen is if if someone knows you're going to buy whatever ten dollars of some asset right what they can do is they can front run you by buying some amount of the asset then you buy your ten dollars of the asset right and now the price is higher than it should have been because you bought some amount and they bought ten dollars and then you go and sell it so essentially you're you're kind of taking advantage of the fact that you know someone is going to trade with the market right and you know which way they're trading with the market and that's really important so that's case one i mean case two is also that it's very

it's you know in some sense we all claim that wallets are pseudonymous and and like yeah that's mostly true in some weird way right if if you create a wallet like very temporarily for like a very small number of trades but it turns out everything can be traced pretty easily and there's like a whole industry around like de-anonymizing wallets and it's really damn good right so my point is good luck trying to stay private if you have anything more than like some negligible amount of money in the market all right um and i think tariq probably has better thoughts on this so i'm gonna let him continue answering this but the only thing i would add is that um if you're there there are two other things one is if you're a whale you don't want people know you're knowing you're selling because it it

kind of like not just front runs you but also back runs you so maybe you're a whale and you can't sell you have yeah thousands of tokens you sell 10 tokens and everyone's like oh [ __ ] this whale is selling we're just going to dump and then now you're right fortune is pitiful right has been depleted yes um but the interesting thing is as i will say the lack of privacy and defy has led to a bunch of very interesting market dynamics that remind me a little bit of like instagram influencing um where people will like have public vanity addresses that they they advertise as them and then they say hey i bought this or i'm trading this and then people copy trade so it's like it's a little bit like kind of

yeah there's like influencers who take advantage of the lack of privacy and then there's people who follow that right um of course at the same time there's also this like the fact that you can't do big trades and this is the same thing that exists in the normal market where like big orders and big trades or really leak a lot of information and you can't do them efficiently without privacy without like everyone else trying to you know in a sense that's like societally mechanistically stable where like no one party loot takes all the loss or something if i look at everyone's sort of the distribution of profit and loss so this is this is helpful to sort of frame this and what you just described before

was kind of describing why the sort of 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 correct do you have an example of where it does work like are there things that people should be doing if they're thinking about these private i i don't know what you'd call them like private cfmm structures something like that private ams yeah i mean if you come up with a good name you should tell us because you know that might be the title of the next paper or something like they're called private amms pams no yeah

[Laughter] with trading or privacy that reminds me of the office the tv show right okay we'll leave that one on hold we'll come up with a better word eventually fine but it's actually pronounceable which is you know much better than any of our current ones so i guess in the paper we do provide a few mitigation strategies right and and it's it's not clear these are sufficient but they're certainly at least necessary in some sense one of them is is kind of almost silly and that is the the idea that you can batch orders right so what you do is

instead of having but you know 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 you know alice makes a trade but also a hundred other people make a trade and the trades aren't executed until like a long time after everyone has submitted them uh and in that case right eva's gonna have a pretty damn hard time telling apart alice's trade if alice's trade isn't like you know super large compared to the rest so in that sense there exists some things you can do right another thing you can do which actually gets starts to get very complicated because you have to do it in a way that is self-consistent is you can you can add random noise to the reported price

so if you add enough noise there's a there's a few downsides to that right one is if you add noise to the reported price you might be under reporting the price right so people are going to be incentivized to buy uh you know at that price and so liquidity providers end up kind of losing some amount of money similarly the same thing happens if you over provide you know if your price is too high or whatever the other kind of issue with that is that your randomness or your you know your noise so this because be very carefully constructed because a simple like dumb idea would be to just you know kind of every time someone asks for the price you give them a price with some additional noise but here's the deal right if i take 10

measurements when i average all of them that's going to be pretty close to the right thing i mean just all if you're telling me look i'm adding noise that's you know mean zero right it's like roughly it cancels out if you add enough of them and take the average then that's kind of silly right because then you don't have you never had privacy in the first place so this this kind of requires a very complicated mechanism for which to add noise in such a way that that doesn't happen but also you know after you make a trade what you also don't want is you don't want the the price to change too much because then someone else can distinguish actually how much the price changed which is before leads us to the original attack right essentially if we know the

slippage we know how much someone traded to get there so it becomes this kind of weird trade-off where what happens is you either have a degraded user experience right in some sense or another because you're either either misquoting prices or you have to batch things in general or there's you know any one of these trade-offs you're kind of paying a price in some sense for privacy it's not just like kind of a freebie you don't just get privacy right and and the problem with this in in the end is that you could imagine that for example orders taking a long time because they're being batched or similarly kind of weird price misquotes because you've added noise to them

end up threatening the solvency of the system right in some sense the system itself works because there's this feedback loop that allows it to work but you're kind of threatening that by injecting noise right and whether 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 like positive effects and potentially just just a negative user experience in fact might yield you know more consequences outside of personal but rather systemic risks that kind of emerge from doing things like this one thought i had as you're talking kind of about this like specific randomness and i realize this is like a different track but like has anyone thought of using like vdfs for this kind of thing

and i 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 yeah so no no it it it's definitely the type of thing you want to use for this that's how you would actually implement the batch uh time to be non-manipulable and it also kind of ensures that like the egg precise timing is not uh attackable but it's it's like most vdfs are still i would say 90 theoretical 10 real um right but it's definitely one way of doing this gnosis had another approach um which was really complicated again i think somehow people in the last era of icos

just believed that really complicated mechanisms would work and then they didn't realize they were dealing with quote unquote apes as as the twitter meme goes right uh but uh gnosis's thing has a notion of a batch auction great 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 what people would do is like around they people did like initial token

offerings in in this gnosis thing and gnosis was really hyping this up earlier this year um before kind of balancer took over the balancer lbp and unit swap have kind of completely taken over this whole like ipo token thing that that like gnosis really wanted to take over but completely flopped on which uh which was you know you crowdsource this solution to this np hard problem that solves this allocation so people would just front run so everyone would who would send orders early was actually like a fish who the person who was the last person to send in an order would send in an admissible solution it 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 an allocation of price quantity and the interesting thing is whoever the last person to submit a solution in would always be like the person who puts in a huge whale order um and then they give themselves the cheapest thing and then like make everyone else take a worse price and they have this problem that like 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 like the person who's smartest and the last and sniping takes everything and so it's the opposite of uniswap because in the unislop case there's no dispute over the best allocation like there is just a single best notion of trade size

and that is why it's 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 xerox gnosis right so it sounds like the vdfs and amms and privacy maybe that's something for the batching in the future and we're just gonna like leave it as a project but um the idea of the convex optimization and the privacy paper i kind of 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 kind of engineering or inverse design in this case or are you more

designing a privacy amm so this is foreshadowing some paper i think it's supposed to be due in the near future there is some notion of designing a private amm um maybe i shouldn't say that's her and i don't know uh but you know in some sense actually you do bring up a very good point and this is a question that turn and i had been thinking about for a while which is the question of designing either privacy ams or really amms in general and you can kind of do that you know they're not really related originally as stated because inverse design is like usually a very specific connotation but you know you can you can optimize parameters of amms and things like that for specific application uses and this is kind of a thing we mentioned like way back in the cfm paper

okay um and it's this question of you know you you give me some figure of merit some some function that tells you how good your ama is for us given circumstance and you can change the parameters or change the function itself to best match to be best for this metric right or something i guess that's roughly right to optimize this metric maybe we can motivate this a little bit with the example which is curve has a different curve that's very flat okay which is very good for things who uh kind of are stable coins that like trade around a fixed value and it doesn't cause loss um 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 like 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 cfms for better or worse are just trying to solve that problem of like what function do i choose that's slightly better and i think a year ago there was no one doing it and

it was you're probably likely to succeed whereas now there's just a million people and they're making tiny tweaks it reminds me of like proof of stake in 2017 like by the end of 2017 everyone and their mom was like i'm making a mistake protocol with this little special thing special thing right um but the the special thing people are doing is adjusting this curve and so one question might be how do you go how can you automate that process to go from a kind of like hey this is what the real life data is here's the curve that fits best to it um and i think that's all we should say yeah the next step is to add privacy to that okay because there's actually some parameters where like for a trading curve like

curve you might actually not need as big of a batch size right whereas for something like uniswap you might actually need to batch more transactions spread privacy and there's some notion in which the shape of the curve maps to how much privacy and or how easy it is to lose privacy so there's interest this is where they got the true uncharted design spaces and i think right now everyone's kind of trying to go for the easy thing because investors like are like oh you're you're ten percent better you swap you take my money right oh that's interesting so it's almost like the mitigation of the issues caused by adding privacy to a c cfmm setup that mitigation may be influenceable by

this curve yeah yeah exactly so that's i think where guillermo's kind of inverse design lens of the world inverse design is kind of very similar where you have something you want and you want to recreate the bridge to choose this analogy like that kind of you're like i have two islands and there's some water between them and i it's really windy there and i have millions of cars driving on it every day build me the best bridge that's like you know and that's that's kind of there's just the equivalent problem here but there's privacy is one of the it should be one of the objectives and you have to design with privacy in mind and the

first cfms were designed with no kind of notion of privacy in mind and so i think our our work's really about showing kind of that aspect that like hey like these things work and they work on a blockchain with no transactions per second like very low transactions per second like ethereum but they do give up something and if you want to recover it here's kind of the constraints to recover it cool well i'm so excited to see this me too actually because i wip this is the future work not the work that experiences okay okay alpha league we have mentioned some of this we've dropped hints about this on some of our older papers for sure but uh yeah this is this is definitely a

true alpha beta and gamma leak i guess is the it is kind of crazy that when you think about it that guillermo is able to kind of take this thing that's used for like very esoteric hardware research and kind of apply it to defy and i think you know that type of you know every bull market in this space always brings in new talent and so i think that that's you're naturally going to get people from more varied backgrounds from weird fields like physics and optimization theory because you know whatever why not yeah exactly right i used to think it was just my mom reading my papers it turns out now it's approximately 10 more people uh from d5

so they make up 90 of people who do read my papers it's great that's great well maybe after this podcast there'll be a couple more hopefully i do want to say a huge thank you for coming on and going through all of this with both of us i know taron you're well versed but for me this was a new new territory um it also helps to put in context the presentation and the paper that you recently published i'll add i'll be adding links to that in the show notes if anyone wants to catch that i mean i i got the presentation but i didn't understand where it fits into this like larger study that you're doing so this is very cool one one of the other interesting things i think about guillermo oh god now i'm worried and and and and steven sort of stephen boyd's

lab's writing style is i think boyd is a really probably the most popular kind of textbook that people learn convex optimization from and one of the reasons uh it's so popular is he writes in the like most simple mathematical language which is kind of a little bit of the opposite of cryptographers who really love this like very kind of crazy way of writing math with like challenge response and like writing kind of these algorithms out in kind of a a little harder to read for a generic audience manner but part of the reason that their writing style is quite important for this type of work is that it's very interdisciplinary like a lot of people are from different fields are consuming

it so you kind of don't want to write towards one specialty's vernacular you want to write at like the you know multivariate calculus and that's it you took it in college and i think that's actually a really interesting thing i think about the the way the style of of these papers we work on this because it's always like alex who's on the podcast earlier and i we we we kind of come from more like we were like writing out the math more math language and guillermo is like axe axe and it's actually super interesting because i think that level of approachability is actually what made these papers quite widely read

in the crypto community because it was they were able to learn something without actually having to be subject matter experts in these other fields yeah it's it's funny i think um when i the first time i talked to turin and alex i gave them um essentially like an e-ula right essentially waving all rights to to to the 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 about as a co-author about writing um but i think it's true that well it sounds like an amazing combination yeah it's i've definitely learned a lot about how to write for like multiple fields in the process of this because i think it's actually quite hard if you want

you know crypto is a very interdisciplinary space and one of the reasons i see people not understanding what's happening is that like people of different fields will write in their own vernacular and then it sometimes will be purposely cryptic because they're trying to raise money and god damn it and then other times it's not purposely misleading it's just that they they're not really trying to write to an audience except you know they're used to kind of 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 yeah i think we've had i think a lot of guests that have come on actually have have that and then they have to face my dumb questions and dumb it down a little bit i think i

think the interesting interesting thing about guillermo's advisors he he's he's very i would call him a contrarian academic because most academics keep their kind of position get tenure get more funding by being more esoteric wow right being highly more specialized and somehow their group is the opposite they've been able to kind of like by being very broad and being in many different fields and having to write in a manner that covers covers all of them right they've actually been quite successful so i think that there's it's kind of it crypto mirrors that in a lot of ways right well this is interesting i want to learn more well i think that brings us to the end of this incredible interview an incredible

conversation actually i i learned a lot and i really appreciate you taking the time and thanks to roon for being back on as a as a co-host and as the co-author of some of this stuff yeah i don't i think i was i was schrodinger's interviewer i was never never clear whether i was the interviewee or interviewer at any point during this again like i said like my savior for some of these you know sometimes i'm like uh uh tyrone turner has some great answers to this and surprised lo and behold cool so yeah anyways thank you so much for having me oh my god this is like kind of weird because the first time i've like really publicly spoken about a lot of like research that wasn't at some weird academic conference so oh that's great i didn't know that well fantastic

so thanks again no thank you so much for having me and to our listeners thanks for [Music] listening