DEXs: Uniswap Origin, Intents, Scaling, and LVR | Season 6 Premiere

26 Sept 2023 · 1:20:00

Bell Curve co-host Mike Ippolito opens a season on decentralized exchanges with Dan Robinson, General Partner and Head of Research at Paradigm, tracing Uniswap's origin story through to its V4 design. They dig into loss-versus-rebalancing as a way to think about liquidity provider losses, UniswapX and off-chain order flow, intent-based architecture, and how DEX design needs to serve both retail swappers and professional market makers.

Speakers

Topics

Transcript

all right everyone welcome back to another episode of bell curve before we jump in quick disclaimer the views expressed by my co-hosts today are their personal views and they do not represent the views of any organization with which the co-hosts are associated with uh nothing in the episode is construed or relied upon as Financial technical tax legal or other advice you know the deal now let's jump into the episode [Music] all right everyone welcome back to another episode of bell curve this is a special episode because it is the kickoff episode of season six and I'm very excited to be joined by my co-host for this season gwart I mean Dan Dan Robinson of Paradigm yeah thanks for having me I almost revealed my secret

identity there almost almost I think we Salvage I think we salvaged it so this will be a really fun season I'm excited to have you joining me because we are going to be going deep on the past present and future of dexes and for those of you who have tuned in to the show before just to give you a little bit of a preview of what you can expect for this episode Dan and I are going to go in and kind of give you an overview of some of the themes and the agenda that we're going to be exploring this season um so we're going to be talking about that this episode throughout the course of the Season we're going to be doing seven interviews with various leaders from the deck space and then we're going to do a wrap-up episode uh to just kind

of give you our thoughts um so to kick things off before we even get into the theme Stan I want to just leave this one and open to you because you've been involved very involved with uniswap since the early days of the protocol and have kind of seen it through many different iterations so can you kind of walk us through either chronologically or by different design decisions or however you think about it in kind of unit swap day one where it found product Market fit and just how it's evolved over the years and its successive iterations yeah and first I want to say thanks so much for having me on the show I'm really excited looking forward to this season um thank you but yeah I think that's a great place to start because I was one of you know a good number of people who

was lucky enough to be sniped by um hidden early on in the in the pre-unishop V1 days with starting to think about um about uniswap when he was so I met him in the spring of 2018 when he'd been working on uniswap for a little while and um almost you know on the first day it was the first the first I'd ever heard about amm's end um and particularly the constant product Market maker and I I was immediately kind of sniped by by the implications and and thinking about it particularly I remember just not believing on the first days like oh if if the price goes up and um uh then you then you sell at a loss and then the price goes back down and

you sell at a loss and in fact you've made no you've lost no money like that's it's I just took a while with a spreadsheet after that first day for me even just to become comfortable with that and of course that turns out to be as we'll talk about a fairly profound question in a m design but it was it was one of the first things that got me uh captured by it but also I think um as were many people early on with Hayden himself and with the idea for uniswap not just as a as you know a as a DEX but as a as a paradigmatic example of what a um an on-chain application could be and so some of the things that really fascinated me about it early on was he from the beginning I think had this vision of it as a completely

non-upgradable um uh non-custodial decentralized public good that anybody on ethereum could access and I think holding to that principle since then has just been um really important and and as a North star for um for unicell but it's one of the reasons why so many people including me got really excited about it is I think ah this like really is after a few years I've seen a lot of different kinds of things tried on ethereum this is the kind of thing that's like really uniquely enabled by um by technology like this yeah so my memory of uniswap in the beginning where it originally found product Market fit and where it really started to Garner some excitement outside of just uh sort of nerd sniping was you actually had very good execution for sort of a long tail of crypto assets

so you would still get better execution on a centralized exchange like binance or coinbase but this was around the period of time where tokens were starting to go live again icos weren't exactly a dirty word and I actually remember talking to I don't want out he's also a a paradigm guy about hey there's actually this this thing called uniswap and what you can get on execution here is better than some of the centralized exchanges and what up what up what also strikes me about the early design of uniswap is that it's really simple it was just very very simple now there are some drawbacks to the Simplicity but it feels like that was intentional from there am I right about where it sort of found product Market fit in the early days and with Simplicity a part of the design Choice yeah so in addition to that security

principle and the decentralization of segment as a core design choice I do think Simplicity was an essential part of what made early early unit swap work and and part of Hayden's approach to designing it um and yeah I think not just simple in the protocol which again yeah incredibly short you know 150 line smart contract in unit swap V1 um but also also Simplicity in the interface and I think it sort of uh uh permeated the whole idea of okay this should actually be pretty easy to go on and do this and I think if you tried using like you know um some of the more sophisticated uh decentralized exchange interfaces at the time they were designed to look like centralized exchange uh more Pro interfaces and I think if uh the early unit swap interface tended to look more

like uh well it looks it looks like coinbase like coinbase consumer in some ways the experience was going on and be able to buy just put in a number and just see another number but that interface of course it kind of come that Paradigm has come to kind of dominate um uh decentralized exchange interfaces and and all kinds of interfaces in B5 especially um because it's so simple and yeah I agree you know V1 incredibly simple you just saw V2 in some ways even simpler um and in some ways you know stupid started building on the complexity and then I think with with the 3n V4 you start saying okay like how how you know fast can we actually uh uh hit the hit the gas pedal in terms of of how much how much complexity we can handle here yeah can you walk us through almost take

us through so V1 has launched it's a success here we say okay great we want to stay to this court of these design decisions of being non-upgradable smart contracts and we wanted to still be non-custodial what were some of the big design choices that you made for v2 that was different from V1 you mean if you go from like kind of V2 to V3 because I think concentrated liquidity is something that will stick in people's minds is this was a really different design Choice yeah so I was tangentially involved in in helping Hayden with uniswap V1 and really mostly in um helping them with one like gas optimization decision in the in the code but I really got involved in unit swap research I'd say after Paradigm invested um after I joined uh uh in um in November and then Paradigm and

then Paradigm invested in all right I joined in January 2019 and then um we invested in unison about a month after that and I started getting really um uh deep into into helping you hit him with future versions and I think the the key things there we were looking at okay like what are the what are the things that are missing from this what's the most urgent things to deal with and for some reason I think we landed on um one was erc20 pairs um so the ability to trade for example stable coins against stable coins or trade assets against stable coins and um and that led to to the big change in New South V2 um uh allowing arbitrary years to 20 pairs and then another was people were starting to use uniswap as an oracle the price on yourself as an oracle but it

was it was really an insecure way to do that and it seemed unfortunate that there wasn't like a nice decentralized Oracle the way that you know something provided a decentralized uh exchange um and so we so that was the other uh feature and I think I was that's probably the future I was most involved with in helping in Albion B2 and ended up um uh writing the the white uh red and white paper for that with with Hayden and Noah the funny thing is and Hayden disagrees me on this but I sort of think the that so V2 as an upgrade in terms of the features it added were actually basically failures I think V2 actually didn't the the core goals of the those features weren't actually didn't actually end up working V2 wasn't wasn't the right solution to them and until we

got to V3 it actually wasn't you weren't really able to do the things that I would have expected V2 would have enabled and so um I tweeted about this recently and Hayden disagrees but um uh if you take EOC 20 years or 20 pairs right like a big part of that is the ability to trade stable coins um right against each other and uh the interesting thing is the it actually does not make sense to trade stable coins with a constant product curve because of capital efficiency because the we're providing uh liquidity at prices going from like zero to Infinity when in fact with stable coins they uh stable pairs you really want to concentrate liquidity closely around the price of one but I think we hadn't really I think maybe when we released originally worked in V2 we're thinking

okay this would still maybe be useful for these but um when we started working on V3 uh that that was what actually motive sorry that skipping ahead a little bit but starting working on V3 thinking oh actually this is this is before you do not be two start uh launched um was like oh actually maybe this is not going to work and then indeed with V2 stable stable pairs just never really made sense on it the other thing that happened in the meantime was curve launched and that showed that actually a concentrated liquidity um uh pool for stablecoins makes a lot more sense the other reason is the Oracle and I think decentralized price Oracle was is a really cool concept but in practice in order to use it in V2 you actually had to call this you basically had to had to if you wanted to get the

time rated average price over a period the T WAP price you were to call it at the beginning of a period and again at the end and so as it was designed in V2 it was actually really um uh it was kind of hard to use and So within the first year after launched you know between when V2 launched and when V3 launched um I think very rarely did people even use this Oracle so we added this whole feature and it didn't get very much usage until at least V3 launched all right that's super interesting tidbit of History so you have big ideas for v2 ERC 20 pairs and this decentralized orc by the way Oracle oracle's also now I feel like are a Hot Topic in in D5 as well but um and at the same time so some of these products

maybe weren't quite as successful uh maybe Hayden would say something different but in your mind it wasn't super successful at the same time to make Hayden's case to be clear I think he's right about this the big change in V2 was a big architectural change to how the contacts are structured it made it a lot easier to actually interact with and so there were these necessary rewriting and solidity from Viper fixing a few like minor bugs in it I think there was a lot that made it much easier to build on top of and those those things rather than the sort of top of line um feature changes where we really I think helped kick off uh uh V2 success okay so and that stuff is I mean that's critically important not as sexy as uh you know a decentralized oracles but extremely important obviously to the

user experience so you know you looked at you looked at some of these features okay maybe some of these work maybe some didn't quite so well but at the same time you saw curve and then maybe somewhere there maybe in your mind or the uniswap team's mind started to say okay maybe something like um concentrated liquidity makes sense and now it's sort of been in Vogue to question whether or not lping really makes sense and how profitable is it we've got measures like impermanent loss in lvr which we're going to get into how was that in people's minds at the time were people questioning that the idea that this didn't really make sense from a maker perspective or how much was that in the design decision yeah so impermanent loss was always and from from the very beginning and literally from the first day I was

um looking at Unison we start we were wrestling with this problem um and it came to the conclusion fairly early on which I mostly still believe that that impermanent loss is a is in a problem that's kind of inherent to Market making then you can chip away at some of the edges of it but um with the core idea that in order to Market make you have to actually take some some price risk on on the price moving against you when you're when you're trading these things that is actually a core to the idea of Market making that was that was something that uh was uh a conclusion we came to fairly early on and led us with V2 and V3 you know a lot of people were like oh are you going to solve impermanent loss on our at our approaches like I think no like I don't

think that's that it is solvable I think it are there are things that are very close to impermanent loss that it mitigates and so one of those things with concentrated liquidity which you can talk about is that um you don't have to hold as much inventory in the token as you would if you're providing liquidity um on V2 right you don't have to hold as much of the token to provide the same amount of liquidity at a nearby price and so that reduces your price risk in some sense but I think we did we didn't really think of environmental laws as something that we could really solve so really when we were driven by the by the upgrades I think V3 was a much clearer case where we identified okay Capital efficiency is this is the serious problem and I traced that back to a

conversation I had in September 2019 um with Martin koppelman from from gnosis where he was pointing out that um actually if 25 of the Assets in a uniswap V2 pool or you saw V1 pool I think it was at the time uh are not touched if the price unless the price moves by more than a factor of four in either direction and so most of the time like unless the price is just moving like crazy you just don't need these Assets in there and so that kind of like woke us up and then later when when curve launched um it woke us up to this fact of okay like you actually have a huge potential Improvement if you if you can solve this Capital efficiency problem um but we wanted to solve it in this way where it was where it was neutral to the

strategy that was actually been done and so that gets us to the to the this thinking about okay like are LP is making money or are they losing money and in my view um it's an important question and it's one that I'm very curious about and I don't think I'm the world expert on it um but uh it's an important question what is currently happening with LPS but that's primarily in some sense uh it's up to the lpus whether that happens and the system is designed in order to be to reach some equilibrium and it's possible right now that liquidity is over provided that there's that there's too much liquidity provided so that actually there's not enough retail trading uh fees split up across all of them to make them make money I think on some pools from what I've seen the the empirical evidence seems to say that they're that

in those cases liquidity is overrided it's a paradox to me that it is still provided because you seem like sophisticated parties but um that that's that's what I that's that seems to be the case but in my view what matters is you're designing the system in order to try to preserve as much value for people in it as possible and in order to be as convenient as possible for them and if people aren't making money they can provide less liquidity um and or or liquidity can go up or down based on based on that so the goal is to try to design this game and then allow people to play it yeah so that kind of takes us to V3 where this concept of concentrated liquidity is introduced and I'm assuming folks will have a basic knowledge of V3 but instead of providing liquidity across of an infinite spectrum

of prices it's just you're able to specify the range that you want to LP at and one of the questions that I've I've had for you Dan is you know as much as you can reveal in in the war room so to speak at the time you know at that time I think there was a lot of the excitement around amms that I remember is everyone can be a market maker do you remember that it's kind of a mirror like anyone can can Market make and the assumption that this was just going to be retail people just passively lping and making a a good profit um did you think obviously concentrated liquidity and we can get into why provides a or it adds a little bit more onus of complexity onto the supply side um so we were you already sort of thinking through like who ultimately is

going to be on the maker side of the uniswap protocol and were you thinking about that or yeah yeah I'll definitely say early on for at least the first year that I was thinking closer so around like the year 2019 I was thinking closely about uniswap um I did kind of buy the idea that uh passive liquidity really changes the game and so I had this thought that oh you know people are providing and you know not original to me but people are um providing passive liquidity there's just so much more that can be provided if you if it's passive and not just professional market makers so in fact like what if you know providing me a few SDC pools is kind of like buying the S P 500 and people will just do it with with some of their of their money and then

they'll actually just be earning fees um volatility harvesting these these assets um and that could actually really out compete um the professionals uh and I think I still think in the long run um that that's that that's possible in some in some ways I still think it along with as possible but I think you know and I think in some sense it was almost it was maybe true in 2019 and that's one of the reasons why uh these AMS started to take over in 2019 and 2020 is that actually it was a lot more effective to have if you had so much you unlocked so much extra capital from these uh things that you could and it was certainly true in the long tail of tokens and you mentioned before yes I I think you just really unlocked the ability to not have to hire professional market makers to in

order to have if you create a token boom suddenly there's already a a market for it and you can and you can provide a market record meeting for it I think it's incredibly important for the long tail of tokens but I think in the short sale with those like with you if usdc I think I I underestimated the importance of the microstructure of just of um uh Arbitrage flows and toxic versus non-toxic flows which is something that I think a lot of people at the time were talking about I thought it just wasn't important yet and I think it probably it wasn't and in fact the people who were who were most focused on um on those things at the time did not end up building uh uh winning amm and the people who were less focused on it did so it maybe it was too early to

worry about it but I think they I think they were right um and I think it is actually really important this one we get into loss versus rebalancing once you actually once you uh really zoom in on exactly what the issue is the fact that passive passive liquidity could just be armed um uh could end up only receiving toxic flow and only being armed is it is a threat to it in the long run yeah and I wanna just bookmark that answer because this idea of meeting the market where it's at in terms of product design is something that I think uniswap has just done at least from an outsider's seat just phenomenally well yeah it help it helps to not be that smart it helps to like not actually know that much about Market structures that go and you're learning it you know I've

learned it alongside Hayden um uh and sort of from a very D5 physical first point of view as opposed to coming in with a lot of preconceptions about what was going to be important well that I mean that's very humble take but I also there were plenty of folks right who I remember this in in around 2019 or 2020 is people would point to amms and the unit swaps of the world and say this is way too simple it's never gonna work ultimately this is what professional Traders want they make up X percent of the volume in Trad five markets here are all the features that they're going to need and they rolled these these things out that were just way too ahead of their time and um whether or not that was intentional it clearly worked out and maybe that can transition us a little bit to V4 so V4

is the latest iteration of uniswap which feels a little bit more again I'll speak from my perspective as an outsider and you can tell me if I'm right or wrong but it sort of marks a shift for me so it's a little bit more of a platform model and a a design decision that says hey maybe as uniswap we don't actually know what the best design decks is like we kind of made these very specific decisions in V2 we made a very specific move towards concentrated liquidity and V3 but now the market is at a mature enough point where we want to create more flexibility for participants so am I right or wrong there walk us through sort of the design principles of V4 I'd say actually I I think unistop has been a platform has had this platform philosophy since the beginning and in

different ways and I think before is absolutely an extension of that but I think when you when you think about Unison V1 and V2 um it's it's for one thing it's it's agnostic and permissionless as far as what what uh assets and what pairs it supports right it's basically it says any any pair of assets that you want to support you can just spin up your own uh unit sub decks right like there isn't any uh there aren't sort of rules they don't make decisions on what kind of assets can be added and what can't I think that's that's very important as a platform because it means yeah again you're not you're saying like I'm I'm not going to be opinionated about where this where volume of where growth is going to come from it's just going to be you know whatever users actually want to

do and I think that was um that was important and we're going to try to pick us on opinionated strategy as possible and in some formalistic senses I think the constant product Market maker is as unopinionated a a a rule as possible from for making markets like if you don't nothing about the underlying assets and there there are some reason you know reasons to believe that that's that that's the case um and in general I think we found that it worked for a lot of assets that were that were traded time stable stable pairs being like the big exception where it really failed um but in general I think it actually equips itself pretty well as a market-making strategy and it's one that that predates AMS as far as you know the the idea of market makers is running a rebalancing portfolio as a strategy um

it sort of is a is kind of a classic idea um so yeah so again I think it was trying to be as neutral on this as platform like as possible and like you know when liquidity brothers are coming in here you go like you we're just gonna merge all of your liquidity together right we're not going to um uh run some like complicated complex strategy with it again it's basically you choose what's it what to provide too um you if you want to provide on one pair and not another a lot of amms I think fell off a cliff because they tried to allow somebody to like provide liquid on a bunch of different assets or like the governance making these decisions it's like no we're just gonna be a platform for that all right so then getting to V2 I I'm sorry to V3

um I think V2 becomes more of a even more of a platform because it's okay like we are you know it's a pla we allow you to provide in any in any pairs you want but we are forcing you into this one strategy and while it's kind of a very agnostic strategy it's not one that probably anyone any particular person usually wants to do it's not what they would what they would choose to do ideally so say okay let's allow you to provide a different a different um uh concentrations on different or different price ranges and one thing about about that is you know when you look at what amm design and amm Innovation looked like at the time A lot of it was based around um different shapes for for liquidity curves right like we're going to do this curve a constant you know power sum or

the constant whatever is the thing right and it's like okay well what is like the the ER design for all of these it's like okay it's one we'll allow you to provide literally whatever um uh liquidity concentration you want any L prices you can construct from that and I have a blog post about how to do this construct from that uh from any arbitrary reserves curve that you want the right unit swap B3 pattern to provide thread liquidity in and so it becomes a platform for Dex Innovation itself and then I think V4 takes it one more step which is okay like where's the innovation coming now I think it's largely coming from these features that involve doing something before every trade or doing something um uh changing the fees on in response to every trade um and I think you know some examples are we we can talk about some of those

but like trying to do auction various kinds of auctions for to capture um I mean V you're trying to change the fees and responsible volatility or in front of other kinds of signals and all these things require a little more Innovation a little more flexibility than yourself if you provided as a platform and that's what before uh is there for one interesting things it also enables um the kind of features we were adding manually in V2 which is like uh oracles right like you can actually add an arbitrary price reposition before to whatever pools you want um since that was in Boston V2 we said okay we're just going to add one to every pool but now we actually took that out because you don't you don't need it built into the thing anymore so it's more agnostic than V2 was so to maybe sum up the History part of

this and and start to move out we've we've actually introduced a lot of the themes that we're going to cover this season but sort of the the through lines in terms of uniswap's History up till this point is that it actually that's really interesting I hadn't necessarily thought of it like that but there was always an element of platform to the model right and it was always very unopinionated about what the market first Whoppers and LPS were going to look like even starting at V1 so you know swap V4 is sort of a natural the most recent iteration on that you've also got this idea or uh contracts being non-upgradable non-custodial those are things that have stuck with uniswap throughout the years and then the last thing maybe to end it on before we get into our theme is I I feel like I've seen this a couple

times in crypto um actually a lot in crypto which is I don't have a more eloquent way of saying you need to meet the market where it's at and not just try to design for the customer that you think might be here in five years because then what you end up doing is you set you end up sitting you know sitting on your your hands for a couple of years waiting and then you get no traction and as as opposed to starting something that's a little bit more simple having the the market come to you and then being able to iterate based on some early success and I just yeah again from the outside it just feels like you know swap has done that absolutely and I think it's important to still be kind of pushing the envelope in terms of in terms of making things

better and always be doing things like concentrated liquidity was this and I think before is like this your sub X is like this where some people at the time are like oh no we liked it how it was I think if you're not doing getting a little of that um then you're not pushing forward fast enough but yeah very very often I think people people aren't actually looking at what the needs the immediate being driven by the immediate needs in the market um I think that that's like one of the biggest mistakes you can make I agree all right let's let's move a little bit into the themes of our season many of which you introduced actually in the first part of this but the first one we'll talk about we'll we'll call it value capture in the Dex ecosystem and really what we mean by this is when

we're talking about scaling a DEX we need to balance the needs of two different stakeholders which is swappers and LPS so I know you have thoughts on this but can you just kind of walk through that idea of sustainably or equitably scaling index between these two parties yeah so I think if you go back to the early days of uniswap there were basically two charts that I would just look at all the time on uniswap.info and it was the the TV out just the total amount of value locked and top errors and across the system and that's the amount of liquidity that's being provided and then there's the daily volume um and I think you know if you ask at the time like which one drives the other I think you'd say like they there's you know there's chicken and egg right they

both Drive each other um you're not going to get any volume if you don't have significant really and if you don't have real like volume and I think more than Arbitrage you need to have some like some actual retail volume on it then the people aren't you know liquidity is not going to come um and so I think it is it's essential during this during this whole bootstrapping phase of a of a decentralized exchange or any or any application to be serving um both of those constituencies um if I had to if I had to pick like what is what is a DEX for um and I've gotten in trouble for this before but I think it's true if I had to pick what is a text I think a DEX is for the swappers I think the point of it the point of a decentralized exchange is to

be able to trade non-custodially um and you get the best prices and to some extent the LPS are there because because it is valuable for them to be there for the swappers um I I basically don't buy the philosophy that like oh the whole point of this is people should be able to provide retail uh uh liquidity because if there's no swapping going on then it's not going to make sense for them like what are we even doing here um right so I think I think it's I think it's a decision Exchange in LPS are there for that but that said like you have to absolutely keep a balance where um providers You Can't Screw over liquid dividers in order to um the favorite swappers or they're going to leave and you're not going to have you're not going to have a decks either yeah I think it's such a good point

because you know people will often bring up the bill Gurley quote of trying to scale two-sided marketplaces and I'm slightly paraphrasing here but if I have to choose between the supply and demand side I'll pick the demand but you still got to do both at the same time right you need the LPS to be there otherwise there's no one to trade against yeah um so let's talk a little bit you know to use the phrase value capture right now there's a tremendous amount of value that is leaking out of this ecosystem right and it kind of happens in the form of uh Mev in in many ways and there are different types of Mev but you know you've done a really good job of highlighting some of the value that's flowing out of the decks ecosystem and sort of mapping that onto some of the

most interesting branches of Dex research can you walk us through how you see that yeah so this this gets in my perspective that actually you know we talk about this LP versus swapper tension and dynamic but really what matters is actually growing the size of the pie for both for both parties and ultimately it's it's certainly not a zero-sum game between LPS and swappers and again like you're not going to if if decks are successful both are going to be are going to be very well served and if you end up killing your decks and they both end up um end up screwed so you what matters actually is where's the value leaking that isn't going to LPS and swappers I think there's there's three big ones that I that I can think of at least in current dexes on ethereum one of them is

um is lost versus rebalancing which is this is this common um research theme recently and that's uh you can think about that as the as a kind of the latency Arbitrage that's that's suffice by liquidity providers and what it means what that means is when you're providing liquidity on a decks and the price changes on a centralized exchange it changes somewhere else and somebody arbitrages the um the decks to the to have it match the centralized Exchange price um liquidity providers lose money compared to what they would have would have happened if they had just executed at the new price or if they didn't trade at all um because they end up uh they end up executing this trade with the arbitrager that the average cost of that trade is worse than the worse than the current price that they could be getting for the

asset um and so they've lost a little money within this block um compared to what again compared to the cost of uh rebalances that's lost versus rebalancing is imagine if they had actually traded at the at the true price if they were able to rebound rebalance on on binance for this external centralized exchange and I know we'll talk a lot about lawsuit balancing but that's one way in which in which loss leaks out of the system and I think this is very interesting because back when you know Hayden and I were thinking about this as a permanent loss I think in some in some real sense impermanent loss is unavoidable um but I think loss versus rebalancing is not exactly as unavoidable um as impermanent losses because you have to rebalance to be a market maker but you don't necessarily have to rebalance at a

worse price or at least like a worse price you know any worse than like Epsilon compared to the to the current price in theory if you were a professional Market maker you rebalance you'd be rebalancing on binance or something right you'd be rebalancing maybe at a better price and so you'll lose some money but um that's something you can really make a dent in whereas again I think impairment and loss and everyone who's tried to to sort of solve impermanent loss I think has has catastrophically usually failed um uh sometimes horrifically so and I think but I think lost really balancing is much much more attractable well I think we'll talk in the episode about how those how those two concepts differ another uh uh way the value leaks out is um for Traders just their their um uh price slippage um they're trade executing it worse than

their than the price that they uh then they might have been able to get somewhere else and I think that um uh most most egregiously happens when a trade a sandwich and a sandwich attack is when somebody trades on a trades ahead of you they see your trade coming on a amm they trade ahead of you to cause you to get a worse price so they front run you first and then they background you they trade against uh the other direction on the amm in order to lock in a profit for themselves um and I think that's a way to get a risk-free profit sometimes and that's one that again I think people were talking about since the early days of uniswap but sort of got professionalized over the course of the other years I think I think it's a big problem and one that's important to address

um but but so much can happen for other reasons it may just be your trade hasn't got optimally routed um sandwiches just one it's just sort of maybe the most egregious example um and then the final one is is the gas the the transaction fees um that the transaction is paying to the platform and on ethereum that's generally in the form of um the base fee or the the EIP 1559 burn and so that's that's a significant cost that uh unit swap users are paying in order to able to use the ethereum platform and that's another area where I think we you know improvements in that have typically come from trying to gas optimize the um the implementation and make it as efficient as possible yeah so to you just bookend the first part of this theme which is value

capture if I'm reading you right you know we shouldn't be thinking about this sort of tension in between swappers and LPS because really there's so much leakage that's going out of the system that there's just a lot of wood to chop in order to just secure that all up within the decks ecosystem yeah and on all of these I would I would say debatably AP 1559 all these sort of fall into the category of minor extractable value or or I guess I'll just call it mavnow doesn't really stand for anything like the SAT um but uh but I think essentially this is going to the proposers of the blocks um as value is just being extracted out of the system um that could be going potentially disrupters or LPS the one other thing I think is so some value is leaking out but some value just never

comes in right because swap fees are so high because the um uh the burn the East cost of transaction is so high a lot of Trades probably don't happen like you might get a lot more volume and you see on l2s we start to see like volume actually goes up a lot um once you decrease the fixed costs of trading and similarly with liquidity provision you might get a lot more liquidity provided if you didn't have low stressery balancing you might get a lot more volume if it couldn't be sandwiched or if it wouldn't have slippage and like these are not the cost this is not value that's going to swappers LPS it's not even value that's going to map it's just stuff that isn't isn't actually happening it's dead weight loss and I think reducing that deadweight loss by decreasing some of these costs I think could could just

benefit everyone in the system including ethereum including the platform itself yeah so we've got our three branches of Dex research that we're going to be talking about a lot lvr which is a specific measure of some of the the value leakage away from LPS uh towards Arbitrage or is there people that are trading at a better price then there's uh what we can maybe just call best execution so the slippage that uh Traders suffer by swapping on a decks and then there's just the the burn we could call it maybe the the platform tax that ethereum extracts from apps that are built on its ecosystem you were starting to just get at that so maybe let's tack those in reverse order here so the platform tax that ethereum extracts so you were saying that basically there's this concept of dead weight loss which is that if if the if

the transaction costs are high enough you're just going to get people that don't trade on uniswap or anywhere else on ethereum and it's going to go to binance or something like that so by having that much cost it's not like hey ethereum's taking too much it's just that's just so high that that's just trade volume that we're just not going to see otherwise right so that's a big issue yeah you have this concept from economics of the of the Laffer Curve which is about how um uh uh government revenue response response to the rate of Taxation if you imagine for example like a 100 income tax um uh government revenue would actually probably be zero dollars because nobody would work because there's no incentive or you know you might you might imagine maybe like 110 nobody absolutely nobody would work even if they gave all that

they give more than all their money to the government um and then zero percent because if uh the government would make no money so somewhere in between there um and you could sort of Imagine This curve in between somewhere in between there's some optimal rate of Taxation for for government revenue and I think there's something similar for um uh for the platform tax that's that's uh imposed by ethereum where if um the burn is too high if the if the costs are just transacting on ethereum is too high then no one will go there no one will no one will actually use it and if it's too low then ethereum doesn't um uh doesn't capture any value from transactions that happen on it and so at either of those extremes it's zero dollars and somewhere in between we you imagine we have that we have the maximum

and my my guess and I don't have I don't have proof of this or evidence of this and I'm starting to think maybe I should I should look into it my guess is that where or higher on the Laffer Curve we're at a point where actually if you were to lower the base fee lower that then actually you would get more ultimately um more value accrue into ethereum the amount of transactions that happen across different smart contract platforms based on what you know about the fees on that platform do not it has not played out how I you would thought right if I just told you there's there are platforms out there where you can get charged you know 0.001 cents or something or like 20 bucks you know just guess where more transactions are happening it wouldn't have necessarily happened like that there's you know

without getting into specific I think there's a lot of path dependency when it comes to these ecosystems as well and um yeah I but I think your point is absolutely very well taken that I think lower lower gas cost there's probably some equilibrium right where we can maximize the amount of value that participants in the ecosystem get and that the ecosystem itself can actually extract and worse and you know where it's still ethereum where you it's there's still there's a lot of network effects and path dependency obviously where people want to trade in ethereum even if it costs a lot more and the KDA here is it might be possible to actually lower those rates and still and increase the lower lower those rates increase the actual um uh usage and I think we don't see that exactly on ethereum now because um the max the max gas uh the the max

block size actually doesn't like increase necessarily so again it's hard it's hard to see that um but if you could if you were able to basically scale things more and and get more um get more usage I think you I think you might actually see more revenue and therefore you know a more a more secure L1 as well so we kind of it's kind of a free lunch yeah now the the last question I want to ask you about gas is I think kind of interesting is if you're designing especially any app on ethereum L1 you're designing in a very gas constrained environment and it limits for example the types of strategies that LPS can do and therefore it's sort of fundamentally limits what you can do in terms of your platform so can you just kind of like as someone who's probably thought through

uh sort of gas efficiency when you're designing these protocols I mean what are kind of the design constraints right and we're going to talk to some uh some people from the Solana ecosystem that are building decks that don't have these constraints so be curious to get a compare contrast but you know what kind of lessons you have in terms of building in a gas constrained environment yeah so a big a big one and this was a lesson that was learned fairly early on um but it's at the the naive way you might want to build this which would be a non-chain central limit order book um just doesn't work and the primary reason it doesn't work is that the cost of placing and canceling and claiming orders um is too expensive um it just costs way too much to and the things on a traditional

um uh centralized exchange I think with professional market makers and everything I think uh the number of the average number of times trades are um are canceled orders are canceled is far greater it's like 10 maybe to 100 times as great as as they are executed against so when you if you have a a on-chain order book where people have to like do a transaction to place an order and then do a transaction to cancel an order you just can't professional American basically uh profitably market makers as a um even even if I think uh gas costs were a lot lower even if they're like 10 times lower I think they'd have to be like 100 or more time slower for this to be to be really worthwhile um so that model doesn't work and the two models that have tended to work are um uh amms and and off chain uh order

books and um amms with like you know bancor and then and then unusual episode as the uh early ones the key Innovation here is you don't have to place a new order every time you order gets crossed because it gets automatically um uh flipped for your basically when if someone if someone trades against an amm um instead of like everyone has to come back in and place a new order um uh instead like it's automatically placed the amm automatically makes makes a market back going in the other direction um and so that reduces that that uh that gas cost and the other thing is a off chain ammware or an off chain I'm sorry an off-chain Central limit order book like like Xerox or in some ways like um like UNICEF access although it isn't really an order book

um where the orders are orders are off chain and they only get put on chain when they get executed again so that that also depending on how you do it can really reduce reduces the cost of of canceling orders and placing them yeah well we'll get into that what belongs on chain for a soft chain in a bit as well um and then maybe to just briefly touch on the other so best execution and lvr lvr is a funny one I actually I don't know if I told you this but before this season I I did ask a couple people it's like hey do you know what lvr is and people like yeah no no I know what lvr is and then proceeded to confidently tell me a definition that was completely wrong and uh I think the the way to that sort of my journey in terms of

understanding what it is is just it actually sort of mirrors how market makers and Trad five think about profitability and the key thing if you're someone who's familiar with financial statements profitability is always sort of an expected metric like if you look at the p l that doesn't actually line up with cash coming in and cash going out it's sort of an expected measure of profit over a certain period of time and market makers or anyone that's managing inventory actually have a pretty complicated sort of business under the hood right they're placing trades um they might want to understand their expected profitability after a period of time even though they don't necessarily sell those trades after so they've developed these techniques and try to fight I guess the best analogy would be sort of a markout or realize spread and

then that has gotten mapped those those Concepts have gotten mapped onto LPS and we've started to ask in a more sophisticated way how can we make sure that these trades are profitable that they're placing and what we found is that they probably aren't right right that's the take in at least some cases that's what some of the studies have found yeah yeah so I think that's right that that's right so now there's a there's a very nitpicky in the weeds debate we could have about about lever and I think we probably will get into it with the guests that we're planning to have on on that episode um but we're actually the first paper that defined lever um did so without the concept of fees there weren't fees on the it was assuming there were no fees on the amm um and the second paper came out you

know added the concept of fees and then uh came up with a new word to describe loss versus rebounds basically after fees uh which is they just they just Define it with this term our profit so lever as defined in the papers only means without fees that's an incredibly nitpicky technical academic point but yeah so the the key I think the key the key idea about lever is yeah at the beginning of every block where the prices moved somewhere else uh liquidity Riders are getting get armed and then they they lose money um because that our trade happens at a worse price than um than the true price and so in expectation as a result you know uh they're they're losing money relative too if you were just um you could just be like Delta hedge and you could just be trading these maybe doing this exact same strategy the

rebalancing strategy on a centralized exchange and make more money than you could be as a liquid Leaf Rider and so there's there's some you know uh subtleties and exactly how why this is the thing to measure and I will definitely get into it in that episode um but I think it's important to think about the concept just just very in like a very microstructure level where it's just like it just means at the beginning of the of every block or at some point during every block there's usually like some net trade that makes that is bad for liquidity providers and everything else has to make up for that and I think if you think about things in that way um it starts to well for one thing like it's different from how I was thinking about it in 2019 for sure and in part that's because I

think we we had sort of the luxury of there wasn't um basically yeah there wasn't a very sophisticated toxic flow um uh a lot of a lot of attacks flow and like there was a lot of non-ducks flowing all of it was coming to us whether we get the price best price there or not so I think um I think it just wasn't the right thing to worry about at the time but now certainly is and I think as we start to be able to measure it more we can think about okay how can we actually design um dexas to to address this problem yeah I completely agree I I also think I gotta give a shout out this is a very crypto thing to say but I gotta shout out Xerox FBI femboy um it was the uh it was a member of the

now ambient Finance Croc swap team who originally in I think he was one of the first to at least publicly put out sort of empirical studies of impermanent loss um on uni V3 which were really helpful and maybe that laid some of the groundwork towards lever yeah to them I think the bancor guys did um did a put out a paper on it um and then I think thickie thought on Twitter yeah again this is only in crypto uh right Vicky thought on Twitter um uh I think has done some good work on markouts I'm and I I haven't looked closely enough at like all the analyzes here and I think there's a lot of subtleties but yeah like a lot of work especially done on the youth uscc 5-bit pool um which I think is important agreed so we'll be kind of continuously referring back to some we've got our

first episode actually to tease that a little bit is a as a deep dive on lover which is going to be a ton of fun uh but we're going to be kind of referring back to these these areas which is loss first rebalancing best execution and uh sort of gas optimization um next I want to get into the tension some tensions that we see in Dex design and there are three big tensions that I want to call out so let's call it the active versus passive lping uh tension that you might see indexes there's the on-chain versus off chain and then there is the retail versus toxic order flow tension so one thing that you used to hear quite a bit back in 2020 or 2021 maybe was this sort of uh amm versus Dex holy war of like it's going to be amms or it's going to be dexes and at least

um the way that I've started to see it in preparing for the season is the lines are already starting to blur like unit swap V3 looks a little bit more like a central limit order book than at least V1 did and a lot of actually what we're really debating here is active versus passive liquidity provision and an essential limit order book assuming that gas costs aren't a thing market makers are very actively placing and withdrawing bids and uh in an amm it's just super passive and a lot of the decks designed today exist sort of somewhere on the spectrum of active versus passive liquidity provision so my question to you Dan is a do you also see it like that and then B where ultimately if we're having this conversation five ten years from now what is the sort of

market share look like of active versus passive liquidity provision yeah so I think it's important not to be too religious about some of these things and I think maybe I at times maybe have been more have had more religion around one concept of how December should work but ultimately a lot of it I think shakes out to just the empirics of and it can depend on these really just sort of like niggling details about like is um what is the relative gas cost of so-and-so operation or what data structure actually works for this those aren't the kind of things you'd be able to derive from first principles um and so the idea that oh like I know that amm's will win or I know that Central limit order books will win um just from like yeah the idea that you could just come up with that without

diving really deep and trying to build one or the other and trying to figure this out I think it's just it's just not possible because again you're just gonna it's gonna depend on these really detailed in the weeds in the weeds things about how what works from like a gas perspective or a ux perspective or how ethereum Works something like that but then this is crypto we get religious about really small technical details that's what we're doing here it's true yeah and again I think the religion actually does it helps a lot in terms of um uh spurring like these big changes that otherwise maybe maybe wouldn't be possible um but I think ultimately yeah ultimately you should just got to look at kind of the the actual costs and the um and some of the specific affordances of the platform and figuring out what

makes the most sense but yeah so with active and passive liquidity I do think and there was a period yeah in 2019 2020 where there was just way more passive liquidity than there was uh active there weren't a lot of professional market makers who wanted to touch crypto um and so at the time actually you got not just in the long chat which is which is obviously it's still true I think may always be true that you that you will have more passive liquidity in the long tail um but uh but in the in the in the short tail like you could have like a lot of um just a lot of liquidity in where where uscc uh We've becomes way easier to trade on on uniswell there's a lot more liquidity for an unusual than there is even on these off-chain Central limit order books

um and I think that I think that was that was sort of an essential um thing at the same time you do have a lot of inefficiency when you you uh if you go with passive liquidity and as you start to see more sophisticated parties actually move in um as past if you're trying to be fully passive and you're just running the negative strategy that UNICEF v1v2 um we're doing you probably eventually you get basically out competed by liquidity that's able to it's more Capital efficient that's able to respond more to prices um and I think that you sort of sad to see the writing on the wall a bit there and say okay even this is this is dominating um right now but okay like what's actually the end game and I think part of it is if we don't want this to go

completely like centralized we want it needs to still be decentralized but it may need to go more sophisticated and it goes okay like who do we actually want to be what sacrifice are we going to make there and it goes all right well I think we can I would rather count on liquidity providers to be more to be more sophisticated than um than people just putting in money like than just whales putting money into into yourself V2 pulses okay I'm willing to believe that there's going to be like a a um at least some liquidity writers are going to be able to do that and so that's that's the motivation okay and then that's going to keep us from being out competed by the aggregators or by the RFQ systems at least for a while yeah I agree with that I feel like it just I'm not sure

yeah I also have not a huge fan of religious thinking and I do think there are yeah you got to be pragmatic about it at some point and it's not I I would love it if retail ended up being able to make money passive lping it doesn't make intuitive sense to me that they really should be and it's certainly not a god-given right well yeah that's not it not in how it's currently designed I would say I think I think in V4 and we'll talk about this I'm sure like there's there's certain kind new kinds of designs you might be able to put in that could actually make it a lot more profitable um by recap by reducing if you reduce the lever it starts to make a lot more sense that you might be able to um yeah but yeah but I think without

without some kind of solution for Lever it feels it feels tough in the long run for that to happen let's talk about on Chain versus off chain so maybe we could bring this into uniswap X actually which is another recent product launch from uniswap which is sort of this um aggregator layer isn't really the right thing it's really it's an off-chain RFQ system but uh kind of walk us through it's become a bit of a debate because in originally all of liquidity sort of existed um on chain with uniswap right in the amm you just locked up a whole bunch of liquidity there but now I've actually heard you an interview say um maybe it actually doesn't really make sense because it's a little bit of a Honeypot right it's a security concern and we might not be getting best prices for our swappers so I mean walk us through I

mean even if you could just imagine kind of like the the different parts of a decks like what are the important parts to maintain maintain decentralization to be on chain and then what is it like yeah we can actually have this part off change sure well so first I'll say I think when I talk about a honey pot um typically I'm talking there and not having to answer in liquidity and like and moving entirely or almost entirely off of engine liquidity that's in the context of cross chain swapping I think we'll talk about it in a future episode and I think with Bridges it's a lot more dangerous to have on chain liquidity so the fully off chain designs seem a lot more appealing to me I I think I think with with single chain liquidity like there's a lot of tremendous benefits to engine liquidity and passive liquidity

um and I I think we will be able to preserve those and I think they're worth preserving much less clearly with across change which parts of a decks are important to be like if you just imagine sort of the stack of a decks like I know for Antonio what was sort of prompting the question is I know Antonio when he moved over to dydx a big part of that motivation was the fact that you just could not have a an on-chain order book right based on an ethereum sort of roll up so I'm just sort of wondering like what are the parts of a like again from an outsider's perspective it started to say well the guts of an exchange actually we can keep mostly off chain but as long as settlement is on chain that's that's good enough whereas I'm sort of wondering where's the Nuance in

the gray area there and which are the important parts of an exchange to keep yeah on train to me the essential thing I'm saying that I hope we never have to compromise on is that um as non-custodial non-custerity illness and and permissionlessness um and I think nagascar illness maybe being the most important is that it should never be the case that swappers um uh are trusting or trusting anyone that or like liquidity Fighters or governance or athletes or anything with their money and it should never be the case that the LPS um liquidity providers if you're providing liquidity you shouldn't be trusting like a governance system or something with your money you should still be um you should be depending maybe on some properties of the system um and like there aren't any bugs in the

contract but in general I think it's it's important that you uh you still have custody of your money and use and that uh nobody's able to like to rug it from you so I think that those are important really important properties to to preserve I think a lot of the other ones are are more instrumental to me I think some like like programmability and composability right um these are really important composability being the ability to do something atomically or atomicity exercise is better term than composability Adam is the ability to do it on unitop at the same time you do some other atomically with some other operation on ethereum I think that's very important um and like was really useful like a lot of um ethereum of unistrop volume um is atomically combined with other with other actions on chain and so um I

think that's really important it's cool that you can do a flash uh flash loan or a flash swap in order to um to Arbitrage some other decks or to or to do a like a large borrowing position or something using using your swap I think that's important I don't think it's not I don't think it's essential I think in fact like many trades don't need to be composed with other things and so if you can if you can sacrifice that property in favor of another I think that's I think that's um potentially valuable I think uh programmability and uh I would call this like or maybe visibility of liquidity on chain right incredibly important in the early days of uniswap and today for liquidity mining for the property you're able to pay somebody for providing liquidity um when that's provided on chain in a way that you can't really do um if the

liquidity is provided off chain not not trustlessly and so I think that's very important for certain for a lot of kinds of use cases it's not necessarily important for everything like for the most part maybe like ethuscc volume isn't isn't like subsidized and it's still uh you see liquidity is not subsidized by anything nobody's running liquidity mining campaigns and no one ever has as far as I know um yeah oh I guess I mean other than the indexes obviously um but uh but nobody is right now on units have nevertheless you know almost half of Unicef volume is a through STC so I think uh you know it's not an essential property that'd be that the liquidity be visible there because it's not being really used in that way um and so I think some of these are there's different applications different kinds of things you might mean by decks

and so different yeah I'm willing to sacrifice some of these but I think it's really important is when you don't become like a centralized Exchange in the terms of like in terms of you're trusting some company that to hold your assets right just often hasn't worked out well unfortunately and I think it's I think it is a pretty essential uh essential encrypted that it not be I think I think there's another sense of permissionlessness where it is important to me that you be able to trade a to be able to trade at whatever assets you want on the system in some sense maybe with degraded performance um and I think that's why it's due it'll always be useful to have purely on-chain exchanges but um but yeah again I think the nonca started doing this is the most important to me yeah I think that's well said and then

maybe the the last tension is um you know we talked a lot about a lot of people have probably heard this phrase toxic order flow that just consider that sort of informed order flow right there's and broadly two groups of of Traders there are retail Traders like you and me who are well maybe not you but me uh who's a dumb retail Trader and generally is not trading on Market Edge and it's just like hey I feel like buying some ethereum today and that's really good from the perspective of a market maker or an LP right because I'm probably wrong or there's a good chance that I'm wrong um and so you can actually quote me in Trad file you could quote me a really good price and then there's toxic order flow which again in the in the Trad Phi analogy would be like Goldman Sachs right so if Goldman

Sachs wants to sell you 100 million dollars worth of some stock you should probably be pretty concerned that they're gonna run over you because they're pretty smart guys and they might know something that you don't know so from the profitability of a maker or an LP standpoint it's very important to get an understanding of who are your retail Traders and who are who are the the info formed sort of toxic order flow and the question I guess is like how do you segment those out is it appropriate to charge toxic order flow more for instance which might make sense but then if you think about overall volumes for an exchange like uniswap I would guess it's probably mostly at this point what you would call toxic water flow so what does that end up do to your doing to your volume so I just spit a bunch of

words at you but how do you kind of think about that tension of balancing out retail order Flow versus more toxic water flow yeah so I think yes I think I think my understanding is that probably majority of volume on unisupp is arbitrage volume um in some form or another um and then some percentage of it is probably like like sandwich volume or something that's you know like you don't want it to happen um even if it isn't technically technically Arbitrage volume so if you were to like solve some of the problems we were talking about before in some sense volume um on these probably goes down if you just remove these but at the same time if you remove um toxic order flow oh uh imagine you say like you get no toxic order flow and and

um or rather it's sort of tough to figure out what that even means on an amm but really would be like that it rebalances at the true price rather than at the at the price that the the Arbitrage person would want to trade on the on the pool at um suddenly becomes more profitable to to be an LP and as a result you might get a lot more liquidity on the pool and if you get more liquidity now you can actually get more natural more retail trading volume and I think it's a sign you know rather Dex volume estimated around 10 to 15 percent of of centralized exchange crypto volume um if you if you say okay but actually maybe half or more of that volume actually shouldn't really count because it's Arbitrage volume it's stuff that doesn't even show up on the binance volume arguably because on binance and

my Trope is just people canceling orders um that means actually that that's good news because it means in fact we have more room to grow there's actually more possibility for growth and like we're more likely to get there if we actually cut out the cut out the the toxic volume so I think ultimately it's we should welcome and the current events should welcome its swappers um uh uh uninformed Stoppers should all should all welcome this um and unit shop as a platform it just would be good um yeah and again I I think uh I I don't think it behooves us at all to be to be deluded about that fact um that yeah and like a lot of the volume is volume actually you might not want on the on the uh to actually be happening it's unprofitable effectively yeah what do you think and this will

come up I think in our discussion of lvr as well but one of the big topics in dexland right now is dynamic fees as well right you could consider this at a very high level most like surge pricing for market makers market makers tend to uh usually do well in spread they make money by charging a spread right now sometimes you can end up taking warehousing a lot of risk and and uh take a big loss but in General market makers like when there's volatility you get the spreads get higher but one of the one of the problems in amms from my understanding is you don't really have that differential pricing option so I mean how do you kind of think about um appropriately charging Arbitrage yours for what they're doing and also in times of uh you know extreme Market stress right like how do you crank up

the search the search charge yeah so I think a lot of this is uh comes down to just to the lever reduction strategies that we'll talk about more in that episode um because a lot of what people currently use fees for right now is to is to protect against that initial uh Arbitrage and if you imagine like raising the fee so that um uh like in times of volatility that's typically I think because otherwise you'll lose a lot more in those times to um to Arbitrage trades and so if you have a solution potentially for Lever or a good mitigation for that it may reduce the need to do that but um in some other sense like picking an optimal feed does depend on this function that we just have no idea what it is and that's just the demand curve for retail trading volume as a function of fees and I've

talked to some academics about this and and some practitioners nobody has any idea what that what that looks the man function looks like um and I think market makers do a lot of do a lot of different strategies basically partly in order in terms of how they of how they Market make in order to try to maximize Revenue but I don't think that's anything you just put into a like you can't just plug it into a formula and put it on chain so a lot of the ideas that I've seen and some that I've worked on a paper around uh around this actually right now um but those ideas are more around trying to align off-chain parties to to pick your strategy for you and get them to be incentivized to be able to pick okay what should these fees be or what should what you know what what it should

happen um uh buy me yeah by sort of having them having them be aligned with uh with liquidity providers yeah all right I wanna I wanna introduce our our next set of topics here which is order flow auctions and intents so intense is something that has been uh buzzword for a little while I feel like that's generally well understood at this point but could you give us a sense of like just Define intents for us and then talk about how like I think unit swap X is a really good example of this cow swap is another really good example of this what does it mean to design uh sort of an intent first architecture so to speak in how's that going to impact X's I think I'm not going to give the best explanation of intense in part because I'm I'm not really as up to date on like

on the lore and the and the the standard thing people call it it's like I'll use sort of my own terminology my the way I would think about it is that a transaction an ethereum transaction is this exact like message format where you sign and has you know like your the uh tx.orgen and it has like some call data and has you know a two address and and has some priority fee and uh and base fee and everything right and there's this format you can sign a message and intend is literally anything anything else an intent is just any message that you're assigning that isn't an ethereum transaction in this context is what I would say okay that's an intent um and so when you think about like intent based designs you know I I think of like zero X the original um uh zero x uh uh protocol as being

like one example where you're signing off chain limit orders um uh but you know a lot of other things are I think in general and in the idea I think of an intent is you're signing a message that expresses you know not not how you want to do something which is what an ethereum transaction effectively does but um but what you want to do what you want to be done and then you leave it to others to potentially solve this uh figure out how to get it to you um and then your transaction you know your order for a limit order I think is a great example of an intent it's not the only kind but it's one that probably is what we'll mean usually when we talk about intents in this context it'll be some kind of limit order um or maybe a market order

um is uh it's just it's an intend to say like I'm willing to trade at this price or or better um but if if not like don't even include my transaction I don't even want to be heard from and if this my transaction my my order my my signed intent will only be ever included and executed against in a transaction that successfully actually uh gives me what I want from it and what I like about intensity is just like like I said it is the vast majority of all possible designs for things don't involve I signed exactly an ethereum transaction that gets submitted as a their interest action on the Chain right and so it's just an incredibly more flexible way of Designing a decentralized exchange and what I love about you know sub X which is which is this intense based protocol that um uh

launched recently um is that it moves us into intense space it moves into this incredibly much more flexible design space um and allows you to do a lot more potentially off chain yeah it's you know the simple explanation of intents that made a lot of sense to me was just to put in really high level terms is you're hard coding the output not the input right so you have the flexibility to do whatever whatever you really want in terms of get as long as we get this guaranteed output and it gives um it it sort of changes the architecture right of Dex is enabled to be able to actually execute this more nebulous sort of structure for input so you just swap X would be a really good example of that

Cal swap zero X I'm less familiar with zero X's when I'm talking about it less but basically the idea would be instead of like a transaction getting placed on uniswap and then some Mev bot comes and builds that it sends that into a bundle and sends it off to a net boost and it gets put into a block instead there are these much more nebulous sort of flexible intents that also get passed down to column fillers or solvers but my my understanding is that there'd be Builders and they manage and Abstract away a lot of the Cross chain complexity uh and then end up sort of executing those transactions for you right so if you're an intense first app then you have to think about how am I going to recruit this network of hopefully permissionless Builders yeah right so exactly so it depends on a lot more

off-chain infrastructure generally intense-based architectures too and one of the cool things is I think in the past couple years we went from having felt relatively unsophisticated off-chain actors and when you were designing protocols in 2017 or 2018 you might design this beautiful protocol that incentivized somebody anyone to like come and do something and then just they wouldn't show up and do it no one would show up and take this free money that you were leaving on the ground and then I think with the Mev revolution in in 20 um 2020 2021 um you actually started to say okay like actually people will take this money and so now we can actually depend on them to do this and we can design our protocols with that in mind and with intents I think um yeah there's ways to do it with more centralized systems but there's there's

ways to design an intense-based system that don't yeah and I think use of x's uh uh is designed partly in this way well you don't actually have to depend on anyone um uh any any trusted party because you just sort of depend on the market to do this and that's what the Dutch auction um component of Unicef X is designed to do yeah we're gonna we're gonna get into Dan I know you're a big fan of the Dutch auction and uh we're gonna get into we're gonna do a whole episode we're gonna do a whole episode on order flow auctions for the OFA nerds out there but um I want to keep moving through these these uh themes so one big one that is a little bit um Less in the weeds of ducks is but more high level strategy is sort of the vertical versus horizontal scaling

approach and what I mean by that is like when I look at something like uniswap whether this was intentional or not there are kind of these layers to it right which is maybe like the front end or wallet layer got you know swap the wallet you know swap the front end then there's an aggregation layer which is would be uniswap X you can correct me if I'm technically wrong on some of these the liquidity layer in the form of uniswot V4 and ultimately then maybe at some point down the road there would be a settlement layer right in the form of a could be like a much touted uni chain that people love to write blog posts about um but those are sort of the layers and at least in terms of the liquidity layer the aggregation layer and the the front-end wallet layer it seems like

uniswap is pursuing that which I would call sort of a more vertically integrated approach as opposed to I guess in an alternative world you could have been like I'm gonna pick one layer right like metamask has a very horizontal sort of approach or horizontally integrated approach where they're trying to be a wallet across multiple different chains so you kind of just like walk us through the internal strategy as much as you can share in terms of the unit swap side of things sure um well so first yeah I think definitely I can give I can give some like my thoughts I think I'm not it's uh not going to be speaking for for you to stop or even of course Paradigm or others on it and generally with us with this whole um on this whole series in general whenever I'm talking I think I'm giving

my own views and again just full disclosure like we're invested in uniform invest in some other companies we may discuss in this um in this podcast but none of this is investing or legal advice um needless to say so but yeah but I think on this happy to have a good disclaimer to give an hour in yeah I know right we've got it we've got one at the top too okay great yeah so yeah so I think on um I think on the strategy speaking just for my own my own View and how I see this on all those layers except you know arguably with the front end and the wallet okay like that's a fairly integrated um you know single product that unit swap is um uh provides and I think I think uh the unit shop Labs interface and the and the wallet are our products um on in

these layers when you think about the other layers um I think it gets back to the thing we were talking about with platforms right and the way that they approach these I think is it is essential that these be that these be more like platforms than like than like individual products that are competing against others and so when you think for example about the liquidity layer um with uniform V4 it's not here we have the solution to to liquidity um we have a solution to lever we have the solution to these systems it's let's build a platform on which anybody who wants to build a DEX connection and come up with cool new solutions for this can build it and compete within this within this system um and I think that's that's important when you think about that layer it's like it's not we're just trying to force

everybody into this particular solution but rather like how do we actually enable the right one to the right the people with who are best able to to design a good system or to provide that um to do it and so thinking about it as a platform even more again than V3 or V2 already were um and then when you think about it the aggregation and routing layer that's um that that again the solution unit swap X is not an aggregator right it's a it's a competitive system for um for or it's not an aggregate it's not a router it's a competitive system for routing trades and like one way I like to think about it is when you think about on-chain liquidity right now getting our the market for arbitraging on chain liquidity is incredibly competitive like right now if you just put an amm on chain with like a low fee

even if you don't have good docs if you don't have like an SDK or an API right even if it's like the source code isn't verified on ethereum then either scan if it's if it's an amm someone's gonna like go our bed atomically against other against say other amms because that's just like free money and people will go to that trouble of integrating it but they're not going to Route volume to it because it's actually really annoying to integrate somebody um as a router and there's not a strong an incentive to give users the best possible prices such that like I can't make necessarily that much more money if I like design a slightly better aggregator I'd have to like go unless I work at work at one of the companies that uh that runs aggregators right um uh or I have to like somehow find

that user that order flow but I think with UNICEF X the idea is can we make it a really open competitive market to give users as good execution as possible um and make that the kind of have just like the brutal competition in that sphere and I think if you do then that makes the unit swap the routing complexities that UNICEF before introduce is a lot simpler um because then now like you can count on if somebody's uh wants to just like put in a trade that it's going to be routed to the best pools um and like you don't have to depend on on yeah again like like somebody some aggregator uh building the building exactly the right Navigator because there'll be a competitive market to do so so it's almost like in order to give users the experience the the best possible experience for them there are

all these different challenges that need to be solved here and it makes just a lot of sense we feel like we have the capability of doing it so it just makes sense to try to solve all those that's right and then I think in the long run on this I don't have a I don't I have as clear revision for as I would like I in the long run I think there it could be possible to return to a more integrated right right now this this uh the layers are kind of are separating a bit right and you do have like this these com people compete on the front ends and people who compete on the routing layer people compete on the um for liquidity layer but in some sense like what we're trying to do here is often we're trying to help like uninformed flow like retail

order flow unsophisticated flow and like we're trying to enable we want to bring in some of the original Vision here we'd like to bring in like unsophisticated passive uh liquidity people who don't have to like be running this really complicated strategy and we think you can unlock a lot if you can serve both those uh users well and one thing might be like what if we just match them against each other and we say like you're only going to trade against uh passive liquidity right and I I don't think that would work today I don't think we have the perfect system for that and I think you need a lot of sophisticated actors in the system I think in the long run you will need these sophisticated actors to make the whole thing like like uh uh uh flow smoothly but I wonder if we could have a

system ultimately that actually reintegrated it so that that's a bit more Pie in the Sky though no it's a super interesting idea and honestly the um sometimes I we talked about this last season where in the liquid staking season where there's a tension in between making things a super permissionless versus getting the outcome that you might ultimately want and the community decides is better so we talked about this a lot within the context of Lido and uh and um whether or not it would be a better outcome even for ethereum node operator decentralization like if you had just left it up to the free market right and was just like we're going to have no perspective over this as opposed

to Lido Gathering a lot of stake you know they put it in a small number of No Doubt node operators but they say hey you can't we're going to distribute the stake you know you can't all just have it on AWS that kind of thing um so there is that's what I'm kind of that's the through line that I would draw to what you just described which is technically it's a more integrated system it's a rebundled system but if you have that control then you can actually ensure an outcome that is better yeah and it's it's a real tension and I think there is always this tension where actually those concept of mechanism design of the cost of Anarchy where if you just have parties that don't that aren't coordinated you might end up with just like a worse outcome um than if you if you were able to set

rules for the whole system I think it's a really uneasy balance because you obviously like it's you don't want to give someone that power to be able to set um uh just accept the whole the rules for the whole system and you may not end up with them the best ideal possible like benevolent dictatorship if you end up giving giving someone that power um but yeah you do get a lot of benefits potentially from something being designed a system being designed in order to optimize something so it's it's a really complex and interesting um tension there and yeah I think it's something that you know I think a responsibility that unit stuff takes and I think take fairly seriously while at the same time recognizing you know you still actually have to compete in the real world and you don't it's not it's a privilege to be right now like a market

leader and I think everybody you know they glido and and you know stop and others um in ethereum others in this position like always do and have to keep in mind that they have to they have to remain competitive um uh within this competitive system in order to be able to have that privilege of of being able to sort of top down design things the way they might want by the way that might be like theoretically efficient I think cost of Anarchy is an extremely good way to put it and there's no sometimes I have a little bit of a knee-jerk reaction when people are like well let's just turn it right over to governments on day one it's like how do you think that's gonna work my man like just just open it up to something perfectly yeah um good luck with that right but at the

same time I meant to use yes price of Anarchy um yeah it's a it's a it's a good concept to keep in mind all right last thing we'll close on WE you and I are going to touch a little bit we're going to be mostly talking about this within the context of sort of spot uh exchanges but we're also going to talk a little bit about on-chain derivatives so perps and options uh this season and I would maybe just like we could I'd love to get your thoughts on how you see the market structure playing out obviously if we look to tradify as an example or even uh CFI within crypto already the the market for futures and op or Futures and options has exceeded um spot volume so um just kind of walk us through like how do you think about that market playing

out on chain do you think the mix of different derivatives is going to be relatively similar or what are your thoughts on on-chain options in general yeah so I think it's something I've thought a lot about and don't I don't feel like I I have a really firm um theory on um some observations so one is I think you do see say in in equity markets you see like retail usage of options but um I think that that might be almost entirely because uh they don't have perps and for for various historical and Regulatory reasons we don't have uh uh Perpetual swaps in U.S especially like U.S equities so uh and you don't have you don't generally have Futures in U.S equities either and so the the main way

to trade with leverage um is using it on on equities uh for retail or trade leverage on equities is options and I think in it's it's sort of doesn't really make sense and you saw like a lot of people you know with GameStop or whatever like getting into options trading with it with equities um and it has all these weird properties you're buying a lot of stuff um uh Vega or whatever that you actually maybe don't have use for or don't really want if you're actually just looking for leverage um and so uh I do think like it's kind of a it's a weird historical artifact um that that uh equities that retail options trading is a thing at all um and so I so I'm I'm not that surprised it hasn't taken off as much as perhaps have in uh in crypto in C5

crypto trading in part just because yeah I I think for retail like perhaps kind of make more sense as a product to me um that said you know I think uh there are a lot of things that options are used for and and useful for professional Traders and so I do think they'll be though there will still be a professional um options Market but I in good in crypto and potentially on chain long term as for what makes sense on chain now um in current on-chain environments uh leverage Leverage is dangerous right because um I think primarily because of liquidation um is that if you're if you have these these like highly levered positions um you might actually end up getting uh getting liquid you know the position may end up being uh insolvent now there are

some incredibly high profile examples of centralized uh uh prep exchanges um having a similar problem made worse by the fact that they do not have transparent on-chain collateral and so I wonder if actually the the uh the upside of putting things on chain May well end up uh uh outweighing the downsides but I also think we're going to get better in terms of uh just what's it what's what can be enabled on chamber like latency is going to get lower long-term throughputs going to get higher cost these costs of doing things on chain and you may with some amount of privacy be able to um to have perhaps be a little a little more practical on chain but um but yeah so I don't see a reason why preps couldn't be couldn't be a big thing on chain I also think I want to talk a little about

um uh squeeth which is this interesting product that um that we worked on with with the portfolio company called open um where squeeth in some sense is a I think it's a very cool way to get convexity to get this this product um uh one of the things that options provide um but in a more without the expirations without without some of the properties that options have um and the way squeeze works is that it always it's a it's like a Perpetual that always trades at the price of um of each squared and so that means is that like when it moves by a dollar it always moves by two dollars basically um and so it gives you kind of this like 2x leverage exposure to you but that continues to remain 2x levered um as the price uh of Youth goes up or down which

is which is a beneficial property um called convexity but I think like it's it's a really interesting product it's one that as far as einer doesn't really exist in traditional Finance as one that was invented because you get a lot more innovation in crypto because of um uh you have this this permissionless environment to to figure out these things um but you know it's one that I'm I'm not sure you know squeeze I'm not really sure whether uh whether it will make sense long term on chain um but it's it's one example of like we might see weird things to happen I think this happened with Perpetual swaps or Perpetual swaps were invented not not in D5 but in but in centralized crypto trading in a way that it hadn't really existed as a product in um uh in any other in other Market before

um I think in part because like you had just you know companies like bitmex innovating on um on inventing these new these new things kind of outside of the regulatory um environment I mean what people were giving allowing allowing people to have more creativity in what they and what they imagine yeah actually uh perps although they were first popularized in crypto they're actually they they existed outside of crypto before they were first proposed by Robert Schiller in uh in the 90s I'm pretty that is so interesting that is news to me um yeah that's very cool it's just it just never really took off and I can't I can't 100 remember why but so the actually the old Uncommon Core uh hasu and and suzu actually did a really good episode on the history of perps and that

was one of the takeaways is that it did exist in Trad five before as a structure but it found product Market fit in in crypto and it is interesting I hadn't really thought about it from that perspective but there's probably some path dependency just in terms of financial products that existed in tradfi and we're starting with something of a blank slate here so maybe uh yeah there will be different products that ultimately make sense although man people really do seem to like Leverage doesn't really matter where it is so yeah you can probably expect uh you know a rip roaring on chain derivatives Market to take place but damn we covered a ton of ground here if this is gonna I'm just so excited for this season um we're gonna get into some very in the weeds topics I hope to talk about some like very interesting sort of

deck strategy uh and maybe we can reason a little bit about the market structure moving forward and and get into the weeds and it should be a ton of fun absolutely I'm really excited for it all right to tease our first episode we uh we're gonna be getting deep on lever with two uh let's just say very qualified guests so that'll be a ton of fun and then I will see you next week see you next week [Music]