AMMs vs DEXs: DeFi's First Debate Revisited | Season 6 Episode 3
10 Oct 2023 · 1:16:18
Bell Curve hosts a debate between Doug Colkitt, co-founder of Crocodile Labs, and Eugene Chen, co-founder of Ellipsis Labs, on central limit order books versus automated market makers for onchain trading. They cover how gas costs and latency shape DEX design, the case for modular hooks, whether pushing DEX components offchain undercuts DeFi's core premise, and where AMM and CLOB architectures are ultimately headed.
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-host 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 hey everyone this episode is brought to you by Maverick protocol awe of liquidity tools built around an Innovative amm Maverick helps token projects Dow treasuries LPS or basically anyone in defi shape their liquidity with efficiency and flexibility how you might ask stick around and you're going
to be hearing about them more later now on with the show welcome back to another episode of bell curve today Dan and I are going to be joined by Eugene Chen of Ellipsis labs and Doug kulit of ambient Finance this is going to be a really special episode in the first episode of this season we talked about loss verse rebalancing and the profitability ility problems that LPS and dexes are facing in this next episode we are going to go one layer deeper and explore some of the different design decisions that Dex designers and Builders ultimately have to make outside of just lvr now the reason we got Eugene and Doug on here is because Eugene represents a central limit order book design and Doug represents an amm design but also they're building on different
environments so Eugene is building on salana where gas constraints are much less of an issue as opposed to where Doug is building on mainnet ethereum where gas and gas optimization is the name of the game so this was a very interesting Dynamic conversation uh from two people who are building with from a very different set of perspectives and it was a ton of fun so hope you enjoy it as much as Dan and I did all right everyone welcome back to another episode of bell curve I am joined by my co-host Dan Robinson uh and today we're going to be talking to Eugene Chen and Doug kit of ellipses labs and uh ambient Finance guys welcome thanks for having us excited to be here yeah we're pumped too guys this should be a really fun episode and uh what we want to do is sort of dig
into some of the differences in between amm and Central limit order books and what I think also will be really fun about this conversation is that Eugene you're building on salana and Doug you're building on ethereum so it'll be fun to kind of poke at what are some of the differences of building uh and those different protocols with very different constraints but maybe to just open this up at very high level I think many many folks who are listening to this will be familiar with these arguments and and sort of debates that people would have back back a couple years ago this sort of holy war in between amms and Central limit order books um you don't hear many of those debates going on anymore and I think partially that's because the the line has started to blur a little bit in
between a classical amm and a central limit order book but um I would love to maybe we could just start at a very high level of sort of defining like the sort of value prop right or sort of Steal man of amm versus Central limit order book and then if you guys think that's still an appropriate distinction or maybe we can just take it from there sure uh I think that's a pretty reasonable place to start I think the debate still exists it's just not as loud as it used to be on Twitter and I totally agree that the lines have been blurred a little bit between uh two like totally separate camps and now you see some of the models starting to converge towards each other a little bit I think at a high level the amm and the limit order book are really just different liquidity
Primitives designed for different environments so the amm is designed for ethereum mainnet originally which has a pretty high cost to update uh Place transactions uh update your liquidity and so it's very opinionated on the shape of the liquidity in the pool you give market makers or liquidity providers a little bit less Choice the XY equals K example as a liquidity provider you kind of only have two choices you can either place liquidity or remove liquidity with concentrated liquidity now uh you can have range order so there's a few more parameters for a liquidity provider to play around with and the limit order book comes from
the trafi world centralized exchange World which is a world where the cost to update your quotes the cost to quote unquote send a transaction is literally zero and generally these uh transactions make it to the order book in a fiveo manner first in first out whatever makes it to the matching engine first um you know orders are executed in that order and sophisticated market makers compete to primarily on uh providing better prices because you get more fills if you're closer to the top of the book and market makers can place liquidity wherever they want and I think there's still a lot of room to experiment on order types uh on top of a a limit order
book but it's sort of the the core liquidity primitive is different because the design space is different and so today I think you know the amm is clearly still better for retail liquidity providers because there's fewer dimensions on which they can get out computed you don't need to be like running code you don't need to be running like a separate you know AWS box to be placing your quotes um whereas limit order books really require ticated liquidity providers so different types of pairs with different levels of competitiveness you know do you need to be quoting less than one basis point wide to be able to win flow or can you be quoting like 1% wide I think the amm
versus the limit order book differ a lot here but the end game I think is probably going to look like a mix the specifically the onchain defi end game is going to look like a mix because the gas cost isn't zero so the limit order book does does have some some issues here there's like so much activity happening at the top of the book maybe you can reduce the number of transactions required to have close to Optimal top of book liquidity um the gas cost is all is going to be positive even if it is pretty close to zero push back a little bit there so uh or maybe maybe give a bit of an orthogonal take there uh so generally I think regardless of the underlying mechanics there's kind of this core philosophical difference or at
least kind of the way we it is that the core philosophy of amm is to make liquidity provision as simple and low barrier as possible and I think right like the very very classical like xyk version of that is really simple right like everyone's everyone kind of deposits and then everyone participates all all the LPS participate together so like kind of Cooperative um even if there is a very sophisticated player it's hard for them to kind of out earn somebody else and uh I would with concentrated liquidity it's a little more complicated but I think that right that core philosophy still holds if liquidities in range everyone kind of participates at the same time and with uh order books I think right like kind
of the core philosophy there is always you need VAR like they've always existed you need specialized market makers who just do that and nothing else so if you're not if you're not one of the best kind of Market making firms out there right you're probably not going to make any money in uh in order books so uh kind of a very different philosophy where two people providing liquidity in a book can have very very different results based on based on their skill and some of that does come from competition which is good but some of it also just comes from Pure uh rent seeking well not rent seeking necessarily but pure uh winner take all games like who's in the front of the queue tends to be uh very very
profitable regardless of uh you know you're not actually improving the price you're just competing to be the first order at a at a new price so generally like I think even outside the mechanical or the gas constraints the kind of the reason that we're amm Maxes is because uh we think it's very powerful to have anyone kind of participate and be able to provide liquidity maybe to square the circle I think between them I would say I I consider myself a compatibilist between between uh Central liit AO books and amm and you know at times having been in my life a rabid am Maxi I'd say I I I still try and i' maybe sort of always tried not to be too have too much religion about it um and I think often the right you know you don't want to be
uh to sort of be blinded to to good arguments or to um or to good compromises or an implementation or good new features just because you think oh like this wouldn't be the amm way to do things um and I think that was certainly true with concentrated liquidity I think has been with a lot of the other of the other changes that we've seen um I think from my perspective the core feature of what distinguishes amm from uh centr BS probably is still the gas um gas and implementation but I think it's actually it's so overwhelming that I I do think in most environments in decentralized environments often um I think onchain liquidity as an amm is just always going to make sense um or it's like to make sense more than Central Li books order books and that's just because if there's
any non-zero cost of placing and cancelling an order um just orders in a in a central Li order book are placed and canceled so often that it is just it's just much too expensive I think to be able to have transactions for every one of those and I think the key feature to me of an amm that actually makes it uh a critical um uh gas gas saving is that when orders are crossed that'll automatically uh you flip the um the liquidity that you that you place a buy order after it's been crossed and I think if you had a central limit order book that does that you may be able to actually overcome a lot of these costs but if you don't then it's just going to be kind of overwhelming to have a um a central Li order book with multiple liquidity providers and it's and just
never going to have that in a in a gas constrained environment so that would roughly be my prediction is that I think I do believe it is it is primarily about gas and I think you probably will still see professional uh liquidity providers dominating um on amm even um in the long run ultimately but I think it It ultimately is a very Adaptive One for an environment like a blockchain hey everyone wanted to take a quick second to shout out this season's partner Maverick protocol now many of you probably know Maverick is an Innovative amm which they are but in reality they're a lot more than that as well Maverick is a Suite of tools for defi users and builders that allows them to put liquidity where it will get the most work done since Maverick launched in March they have been gobbling up market
share and at the time of this recording which is the end of September on a trailing 7-Day volume basis Maverick is now a top three decks by volume and they support over 50% of the volume on the L2 ZK sync ER chain Maverick enables LPS and token pairs to process higher volume with limited tvl which allows them to support some of the highest levels of cap efficiency for lsts like rap Ste another very cool feature is something called Maverick boosted positions so that allows protocols looking to bootstrap their token liquidity to Target the shape of liquidity of any token pair with surgical Precision Maverick is backed by some of the leading institutions in crypto Founders fund panta coinbase Ventures Finance labs they are all backing Maverick in
their Vision to revolutionize the next generation of defi daps and helping them build their liquidity in all market conditions click the link at the bottom of this episode let them know that I sent you thanks guys yeah I'm curious I don't know Eugene if you have a response there but I think that that that was a helpful squaring of the circle because I'd been thinking about them as two relatively separate things of kind of this idea of retail passive versus very active professional liquidity and I've sort of seen amms and Central mid order books existing on a spectrum there with some of the more recent changes like univ V3 maybe looking more like an amm but like coming close closer and closer to that um maybe moving a little bit more to the midpoint in between amm and
Central limit order book and then obviously gas efficiency is is a massive a massive thing so maybe maybe we we kind of attack those and you know Dan I guess you just kind of uh ideed that maybe gas is the most most important thing there so maybe Eugene if you have any response to just the long-term efficacy of central limit order book which is entirely on chain and even if it's you know whatever the fee is on salana these days 0.001 cents if you're placing hundreds of you know placing and cancelling hundreds of thousands of bids on a daily basis that does start to stack up and then I do want to tease out the the second maybe more minor part uh which is you know how realistic is it that we get sort of retail passive um market makers you know we're able to to
profitably make but maybe Eugene if you want to respond to the the gas cost thing for sure so we've seen um with univ V3 the amm moving a little bit closer to what we conceptualize as a limit order book some of the stuff we're experimenting with internally at Ellipsis Labs is sort of going the other direction starting from the pure limit order book implementation which again is designed for a world that has literally zero uh quote unquote gas cost and figuring out how we can reduce the number of transactions required to place like effective top of book liquidity and this sort of looks like programmable liquidity different order types some that you could imagine would be uh as as Dan mentioned uh orders that uh when
they get filled they sort of flip to the other side uh with some specified uh spread that you want to take you can also Imagine orders that instead of you having to cancel them explicitly they just like widen out on their own over time uh you can also program in uh specific liquidity curves I think the design space here is super super Broad and it definitely still is going to be wider in a environment where the your compute budget is just much less constrained like a salana uh of course there's other tradeoffs uh here as well but I definitely don't think that a pure naive limit order book implementation is going to be the like
the end state for onchain liquidity this seems very unlikely to me one question maybe just uh just to help level set for the audience and for me as well is you know when you're talking about designing and there there's sort of a spectrum of let's say zero Gap which doesn't really exist today and then there's a very relatively cheap gas environment so that'd be like a salana and then there's an environment which is extremely gas constrained like ethereum main chain and then maybe roll up it even somewhere in between there what is the mental framework for if if gas is less expensive does it just widen out the scope of what you can do is there just a much broader design space in it in an environment that's cheap in terms of gas
or is it sort of like a necessity is the mother of invention thing and actually there like you have to be a little bit more creative but you can do just about everything in a very gas constrained environment like eth main chain that you could in even a very cheap environment well I think the converse is definitely true that anything or pretty much anything you can do with Dex design on ethereum that's viable there you can just mindlessly Port over to salana but the converse is just uh not going to be true for example like you can't have an order book on salana you can't really have an efficient order book on ethereum uh ethereum main net is the design space just much more broad so you can Port things directly from Sal to eth maybe not the other way around but you know if
I'm a a Dev and I'm sort of building on an ambient or Unis swap am I like man there's like all this stuff that I would love to do in the world of Unis swap but I just can't do it because of the gas constraints um and maybe I know uh Doug and Dan you guys are both uh like for instance like the Singleton contract in Unis Swap and Doug I know ambient unit utilizes a a single contract as well maybe that's an example of a way to get around some of these constraints but I think we're just I'm just trying to get a sense of like is it is there stuff that's just possible on salana that's not possible anywhere else or that's what I'm trying to poke at here yeah my impression is you can just do way more on salana for like a given dollar of gas
you get so much more compute the total throughput in terms of compute is significantly higher um so the design space is just much more wide open well i' say it's also not just necessarily gas the other the other constraint was block times so so um if you have a 12 second block that means you can't update your quotes for 12 seconds unfortunately binance doesn't freeze for for 12 seconds um which is challenging right and kind of requires different different considerations there and then uh the third thing which is actually even true of Solana which is not true of a like a traditional centralized exchange is uh the traditional centralized exchange
right there's an order Gateway and I send my order and it gets executed automically in any blockchain there's a block Builder and that block Builder has the ability to rearrange transactions now blocks can be shorter and they can rearrange transactions over smaller periods but um that's just like a fundamental issue with decentralized systems that that even like Solana doesn't fix right like there's less of that on Solana because there's also just less of a market in general but if you saw like 10 billion a day trading on Solana yet you bet like there' be block Builders Who start playing games with how construct the block that create problems that don't exist in a centralized exchange it's a problem with with leaderful consensus protocols but
right to to date we basically only have those so yes in in theory maybe there are other ways to do it but I'm actually curious about that what what what would be like an alternative well there are there are uh having people working on projects to try to do say batch auction dexes with uh with threshold encryption and panum is one example uh of a project that does this but um the idea and this this still leader it's still uh not leaderless consensus so I maybe I take back that uh as the uh the qualifier here but the the key idea being that if orders are encrypted and um can't be decrypted except by the full group of the full validator set um and then they're confirmed before they actually get decrypted and then all executed and as a
batch auction then potentially you can avoid some of the Mev um uh that that might otherwise happen and there are caveats to that but I think there's there's designs that try to avoid this problem of having somebody who can see all the orders be responsible for order for um arranging them all uh within a block so I think there are some designs that you can do requires like major consensus level changes yes okay it's a it's a it would be a big change yeah but a the current uh Paradigm in both in both um ethereum and salana I agree has this has this issue I mean h how um yeah the the block time thing is is definitely something interesting as well maybe we can poke at this concept of latency which is come up in uh our earlier two episodes actually which is
just the role of latency just being very important for uh for our deck so ethereum obviously has 12 second block times um salana has I think Eugene is 400 milliseconds give or take somewhere around there um so can you just kind of like just talk maybe at a high level about how you think about the role of block times and something Dan and I were actually talking about on the last episode is you know in an environment like ethereum that has 12C block times that just uh prohibitive um in some in is obviously there is some price Discovery occurring on sort of smaller pairs on on the likes of Unis swap or or ambient but U just a little bit tougher from some of the more popular trading pairs where price Discovery happens with uh extremely on extremely low latency
Sexes like binance so we just love to get your thoughts on sort of like how block time fits into the overall design decisions of a decks and the role of latency as well yeah um I guess like a helpful thought exercise is like imagine block times or like a day like 24 hours or whatever right and I'm I'm the block Builder and I can go watch the price at like bance and wherever the price of B they moves up or down like 1% um so wherever the price of binance goes I will just uh arbit for 1% and just you know do one trade one big trade at at the end of the day um and the liquidity providers won't earn much feeds off of that say the pool's I don't know like five basis
point fees they won't earn much off of that so um not great for them and say say we move down block times are 1 second or something where price moves about one basis point um right like on average they're going to do like 10,000 trades per right they're still going to arrive at the same place but they're going to do 10,000 trades right because the price is going to move kind of bounce around during that period so some will be up some will be down even at at the end of 24 hours it's up right they will Arbitrage ORS will have done a lot more executions and that's just better for liquidity providers right because that means they earn like cumulatively a lot more lot more fees over that period And there's uh theoretical results that okay if like
you perfect Browning in motion and like block times go to zero um like all the Arbitrage profits go to uh liquidity providers that's not really true because prices aren't Browning motion like they jump discontinuously so even if you have instant block times like there's still going to be kind of Arbitrage ORS who drain uh capital from liquidity providers but in general um as block times get shorter um kind of it gets better for liquidity providers we we've done some research and like basically if you have like 100 millisecond block times like in a hypothetical world the lvr on like e usdc would be I don't know over some period like half as much as it is on a 12 second basis so it's pretty
meaningful like at 12 seconds it's a pretty meaningful impact so basically the deal is just that overall the amount of arbitr Crush like move the pric is roughly the same but if block block size or uh block times are smaller then just more trading happens so it ends up being beneficial for LPS who get to collect those trading fees and offset some of that lever yeah the block Builder basically like the dictator for the block times so very big block or very long blocks mean a very powerful dictator who can kind of abuse the system more than very short live dictator yep so on these like l1s like ium and Solana to like the the first order thing to do to reduce the lbr is
to reduce the the block times uh but there's also these worlds where we have the benevolent block Builder like the all of the l2s today with the single sequencer most of them uh roughly just order transactions in the order they receive them and so that looks a little bit closer to the to the centralized exchange World um where there's going to be significantly less uh lbr dou I want to get back to something you said in um uh when we were introducing the topic that you think the key uh feature of amm is that they allow for Passive liquidity provision and that's that's independent of gas right so sorry yeah even yeah even independent
of gas I think so so if you were in developing and you know I suppose eth solves all its scaling problems and now gas is is uh near free and um uh and latency is half a second um do you think you'd still be building amm yeah I I think so actually I mean and like you can see this on the like long tale of tokens it becomes very obvious right like market makers professional Traders have a very high cost of capital um and so right like at the end of the day like Jane Street and Citadel and whoever don't really want to be holding Harry Potter Obama sonicu uh on their portfolio so right to provide liquidity on it they're going to uh
demand a very high return on Capital and market makers do make a very high return on Capital so I think there's an economic uh argument to be made that retail providers especially to the extent they're already holding these assets to begin with have a much lower cost of capital to provide uh liquidity and like I that's very obvious on longtail tokens right where the cost to hold uh like some very longtail shitcoin is really high and like no Market maker like wants to get involved in that to begin with so you need amm but I think if you can fix the economics if you can fix the mechanism then there's potentially a world where passive liquidity because of its cost of capital Advantage can actually out compete uh active liquidity so there's ways to
circumvent this right like I agree the hurdle rate on capital is going to be much higher for sophisticated market makers than it is for retail but you can have another model where retail sort of just lends to the market makers rather rather than going through the perfect Market design rigma rooll and you still just let the the best liquidity providers be the one who are providing liquidity and if retail is Happy say making 10% on their capital and the market maker is going to make 20% or 50% uh there's there's a trade to be made there on the on the lending side do I mean do you think there's some benefit to not having uh the lenders have to trust the market maker it it has been known to happen that people who lend to market makers in the crypto industry um have have lost money
no I mean there's ways to do it on train right you can build a mechanism here I don't think it's too complicated where you integrate a a lending or margin engine into the into the uh The Exchange itself and that can be done in a totally transparent way unlike I think some of the examples you're referencing and so what you're saying is you you have a market maker that's that's somehow constrained so that they're not actually they're able to use uh lender Capital but Limited in how they're able to use it yeah like they can only use it to place orders on the book and you have like a pretty standard liquidation mechanism there well I mean I guess uh maybe duve Hills into something else is that like the nice part about xyk curves are like your
losses are bounded right like you can not charge the right fees you can hit with lvr but like you can't lose all your money versus if you have like a rogue Market making algorithm like night right like for example 2012 like lost 600 million so like XY or like I mean xyk like concentrated liquidity has like very very nice properties and um around like bounding losses and uh separating out capital from like fees earn that's also kind of a very nice property that you can use in other ways um so yeah I mean I I think there's a lot of really nice properties that come out of I I agree I think this is something we talked about with um with Alex nlin last week um but I think if you if you did build an a protocol like this for
Lending to market makers and then they can you know they can Market make with your Capital but um only you know preserving some amount of path dep Independence for your losses I think you will actually end up with basically an amm there an amm where the um uh uh where some offchain agents uh chooses fees which is sort of similar to the design we were discussing with Alex again and this this is part of my my compatible list you know we're all actually just working on the same Spectrum with mult in multiple or or playing with different things on different on different levels with these features rather than um there really being one like core dichotomy between and Central limit order books here I mean I guess the other part like maybe is like ideological but like it's nice for decentralized markets not to be
dependent on like a small handful of trading firms and like the reality is like that kind of did happen with Sol laon after FTX collapsed is like liquidity disappeared for a lot of things because those protocols were dependent on very very centralized entities obviously that doesn't mean right like KS can still compete people are going to use like whatever's cheapest but like I think it's nice to have passive liquidity from like just an ecosystem perspective I think it's definitely nice to enable it uh but realistically speaking it's probably going to like probably the most sophisticated liquidity providers are going to be the ones who make the most money and there's some economic forces there for sure I I guess that's just a because Doug I don't think anyone on this call
would argue from an ideological standpoint that you know it be a great world right if like anyone who's just retail person could passively provide liquidity in such a way that they earn a return but um you know my understanding of Market making is that it's actually a very difficult highly competitive task um and even some of the best in the world yes but is it difficult because the market makers are doing very very well for the end customers or is it difficult because it's a winner take all game um where they have to out compete each other right like if you were the only Market maker on Microsoft it probably would not be that
like no one else was allowed to provide liquidity on Market Microsoft you were the market probably would not be that difficult to make money right you have competitors right like maybe things get tighter but like market makers also compete in other ways that don't provide anything for the end user so there I mean they're entire trading firms that do nothing but I'm just always first at the que like I have no signals I don't price improve just price changes on the first order right I have the fpgas on the f so like like it is difficult uh in that sense but the question is like how much of that difficulty is because they're doing really really well for end users and I think that's kind of ambiguous you might have a point there I I think it's a different I think it's a difficult question that Industries where there are
maybe natural monopolies really struggle like um utility providers would be a good example of this and frankly even like the the LI of debate that's playing out in ethereum is probably a good example where there there's a market where there's a a natural win or take all or win or take most Market structure and then obviously no one really wants to end with a monopoly so what ends up happening is some form of Regulation or whatever um and then theoretically that's supposed to mitigate the negative effects of a natural uh win or take all or win or take most Market structure but um yeah I guess I I I agree that that's not a particularly good outcome either although I will say like uh I mean I guess the way that you would measure
this is right on execution quality and if we had to you know be honest about the execution quality for onchain swappers in ethereum to date it's like okay sort of at at best so you know do you think that if there were more professional liquidity providers that there would be better execution for swappers on chain or is there another constraint that's preventing that I mean I think the the biggest constraint is just like going back it's the block like I'm happy to provide liquidity at binance if I'm a very fast firm because I can move my quotes around but um I can't right like I I think sometimes people conflate clobs versus uh just having centralized systems where you don't have this block Builder issue um so right
like clobs don't fix this problem right there's still going to be lvr there's going to be sex de Arbitrage and whether I'm an LP and an amm or whether I'm a market maker on a clob uh the guy who's building the block can hit my quotes before before I can move them so uh you know it's it's it's tough to say this is one of my pet peeves is when people think that putting a limit order book onchain rather than offchain for example is like oh like that's a solution to Mev and it's like no that that's that's the cause of Mev that's exactly that's exactly like the at the heart of what will cause Mev and I worry that it actually puts more essentially on the um on block build it puts more into the more problems into the core of the protocol right which if you have an
offchain limit orderbook maybe you sort of you handle those in the application layer and you have Mev maybe at the application layer however you're ordering them um or canceling them but I think if you're putting that into the block then you're you're incentivizing um basically the core protocol actors to get a little more involved in the application layer and you're you're sort of putting more pressure on that core mechanism yes I'm I'm curious Eugene like I with with an onchain um uh Central limit order book aren't you worried that that might just lead to pressure on salana validators to to get more sophisticated in extracting me oh yeah absolutely I think it's a a huge potential problem for the future and I think the main reason we don't see it today because there's just not that much value to be extracted combined with I guess um uh
modifying the salana validator client is uh a a pretty expensive Endeavor can we play with this a little bit then because let's let's maybe take the extreme here and then say actually moving some of this activity on chain would not be beneficial from a Mev standpoint obviously Builder centralization is a concern as well um and and maybe one of the the recent Trends also in the world of uh Dex is is moving some of the components of a DEX offchain uh so maybe we can sort of segment like Unis swap X would be a good example of this um and I would be curious maybe Doug I I can pick on you as our as our ideological champion in in the discussion thus far um I mean I guess the the benefit that you might say there is by moving things off chain in a sense you actually do
protect users um and you their orders are kept more private but on the other hand you can make the argument that then then what are we really doing here right if there's just uh there's probably a relatively limited uh Builder or solver Market that takes these offchain orders and then if it's not onchain then what are we really doing so H how do you approach the the idea of moving uh certain components of of the deck stack offchain like one major major advantage uh that really hasn't been tapped now that uh onchain systems have relative to offchain systems is that you can uh introspect kind like I guess not spect look into like where the order flow is
coming from to like a much finer deg right like someone sends an order to binance it's right like very hard to like okay what's generating that order so like for example like most lvr uh at the end of the day is really just coming from short-term dislocations on the price at binance and somebody's arbitraging it so they're very very time time sensitive right so like it would be easy to put something on chain to say okay like hypothetically right this is a this is a t order um because it's a t- WAP order we know it's much much less toxic so we can like it can get a much better price right like and it's hard to you know it's going through a kwop smart contract or whatever um right that's like very hard to do at a centralized
exchange right because I like you can't just use put smart contracts into a centralized exchange so I think that's kind of the winning approach and I think that's how onchain systems actually beat out offchain systems uh in the long term term easier said than done obviously uh in terms of moving stuff off chain we're very bullish on like co-processors and we think right like the technology is getting pretty mature where you can start doing compute not on chain but but doing it in some sort of like trust semi- trustless way uh you know making some some attestation about maybe okay this address has like hasn't been sending toxic flow over the past month or whatever um so it should get
preferential uh better execution um so right I think that kind of solves the problem where okay like there's stuff we just can't do on chain or it's very difficult to do on chain but like anyone can run the Cod processor uh or you can build like ZK proof you can so it's like still keeps that aspect of decentralization but you know it's definitely definitely not a solved problem uh that's why we're building I think in general a lot of nuance kind of gets lost and we use the word decentralized because there's so many layers of the stack there's and you know at least in my view decentralization really is a means to an end uh when I think about what is the end goal for defi it's
to move Finance on chain and the reason we want to do that is so we can have permissionless innovation in finance we can have open access we can have transparency now of course bringing things on chain we eat this massive um cost in terms of uh performance we had like me considerations and whatnot and we need to build defi in a way that is competitive with centralized exchanges and I think uh The permissionless Innovation piece or as Doug says uh sort of like putting smart contracts everywhere which we can't really do on a centralized exchange today I agree that's uh the biggest place to compete
now when I think about uh a unisoft X or some of these other offchain rfqs I do worry that it attacks the onchain liquidity a little bit too much so first of all uh we're going to be moving liquidity and moving uh price Discovery offchain I think it is going to result in better outcomes for swappers which is necessary to be competitive with centralized exchanges but the system itself also loses some degree of censorship resistance and transparency and uh permissionless access and then you can end up in some sort of death spiral where because the lp has now become the liquidity of Last Resort they end up eating pretty much only
toxic flow right like the flow that the the RFQ Market maker didn't want to get and uh yeah that in itself seems pretty centralizing where the order flow itself becomes centralized the RFQ likely has to be permissioned or somewhat permissioned for for for uh for quite a while and some of that I feel like is antithetical to uh you know permissionless Innovation Open Access and transparency I think this might be an area where both our guests agree um more than than they do with me but I think maybe to make the the case on this I think I think we already have a lot of price Discovery um including indexes and
including on amm happening offchain um and I think the key the key reason to move to an to an intent-based architecture move toward an intent-based architecture is to be able to actually incorporate a lot more of that information I think into the price Discovery process including potentially for to protect LPS and protect exes on chain I think what doug was talking about before about reflecting for example information about where an order came from um or who or who a buyer is I think that's a lot easier to do with an offchain when you have more offchain components and when you have an intent based system um and that potentially I think can be used to to potentially help help protect LPS from from toxic flow into and to help discriminate against flow I think I think um Fe boy and and Doug have written a
lot about this as well um I think I think that's it's it's potentially essential for protecting LPS but yes I would also say in from my perspective the most important thing is to be able to get swappers the best price and if you don't if you're not getting swappers the best price certainly the best place you can get onchain but in general I think to be competitive with someone like binance you're just not going to have a any um uh decks to protect anymore you're going to basically lose everybody will it will it give them the best like it gives them the best price like once you turn on rfqs and you still have LP liquidity because the rfqs can only price improve but like long term for the ecosystem if the LPS leave do they still get the best price or now the RPS can just widen out well I think what
matters long term is that um I think both you can't actually cannibalize either side because then you you'll just basically eventually lose it so I think ultimately you actually need to find an equilibrium but my argument is that an intent-based architecture like unof X potentially actually protects um liquidity providers more because you actually can can encode into that more information about where the order comes from and I think a lot of a lot of what we've seen just in sort of Next Generation designs for for dexes I think have to incorporate to some extent um more information about the swapper um and more information potentially coming from offchain yeah go ahead but but but uh right like in the existing architecture right like what's to stop the rfqs from just right like you can incorporate it
but like if you have an RFQ system can the RFQ provid right like the RFQ provider can just centrally compute yeah yeah and I I'm not I'm not trying to defend the uh RFQ systems and in fact I think again there are better there are better intent-based architectures and and ones that I think usof X is kind of designed like the usof X core protocol is not an RFQ protocol right um it's a it's an or for offchain signed intent protocol for signing for signing these orders right and RFQ is right now are how the initial prices are set but in my view that's not essential to to what to what really matters about Unis swap X I have a thought too I mean is part of this like you start to see obviously it's very early days for Frameworks like anoma but um I mean is part of the
reason here why that that some of this just isn't actually built out and some of the stuff that feels like an offchain RFQ system might actually eventually be able to be completely replicated in an onchain sense we just aren't there with a technology yet well one idea I think onchain is tough especially in a design in a that works like uh uh ethereum or salana work currently where you have a a dictatorial builder um or dictatorial proposer sorry about for a particular uh period of time I do think a decentralized RFQ system could be a very interesting system and that's something that I think um I think it's early days on this but something like Suave that flashbutt is build is is uh working on I think one of the problems they want to
try to solve with that is could we actually build a decentralized offchain RFQ system an auction how how would that how would you assure priority for whoever is offering the best execution so if you have a if you have a consensus and this is not I'm not describing Squad here specifically but just general idea just like the general theory the general idea is it's it should be easier to do a if suppose we have a decentralized protocol where we want to guarantee just uh just censorship resistance but say not we don't care as much about ordering we'll have that all solved to the execution layer the idea would be you have some like validators set and then you say okay we need two-thirds of validators to sign off on this on this set and they say the rule of the protocol is they only will if they've if
um it includes the best order that they've seen right and as a result you could then have like you know a large basically a large multi effectively of uh of validators that are then running this auction and they this by the way is part of how people think about um designs for like enshrining Mev and the and the ethereum protocol as well but I think there's other ways to do it if they were to run this auction then you potentially could have a censorship resistant auction that that finds the best price offchain um with a decentralized group but doesn't have all the costs of of um onchain Compu you don't actually have to include all the bad bits you only have this this group come to consensus on the winner but you still batch auction it would well I'm here I'm just thinking about a regular
auction but one where just the best bid is actually included ends up getting included by the um uh because just all the validators just apply this particular rule to blocks anyway it's uh I I don't mean to drive us too far down this rapbit hole but my point is if you're if you're trying to design an offchain system to run a decent a normal an auction right it's a more limited uh problem than trying than like the whole problem of trying to to put like uh run a a blockchain a synchronous blockchain right so a sensorship is a an auction and they like synchronous blockchain solve two different problems and I think there's there's a reason maybe not to try to jam the former one into this into the latter yeah so it's like you want ethereum which is very secure consensus for settlement and then you have some
sort of parallel consensus for secure and like in complete and fully composable whereas for this all we actually need is a is it's a different property that we need which is just short-term sens ship resistance okay is that I mean is that like related to Pepsi basically is that something that Pepsi would enable I'm not sure I've seen what's what's Pepsi Pepsi is uh Pepsi is bar probably pitched us or something I'm right now uh it's it's not something that's actually implemented but it barnabe from the ethereum foundation it stands for protocol enforc proposer commitments and it would allow think of it sort of like a souped up version of something like inclusion lists where
ahead of time a proposer could make certain commitments and one of those commitments could be like I'm going to commit to uh even potentially using one Builder one system like a decentralized RFQ system or or decentralized Builder like a swab or maybe they could say like I'm gonna commit to choosing the highest um you know the highest bid that I get uh for a user or something like that you could you could actually sort of in you know build that into actually the ethereum consensus so like one flavor of sorry well I mean you sorry goe no no I was going to say you could even do that on the application layer because you're intent you could say okay I only want my transaction is only executable under if this Builder is the one building the
block right so like there's a hypothetical world where there's a I wish it was an ambient Builder but Unis swap is the one with the market chair there's a Unis swap Builder and all uniswap order flow goes through or Unis swap Affiliated Builders all go through these Builders and in order to participate you have um yes but but but I I wouldn't try to jam it too much again I think into the protocol there because I think say like why why bother with who who the ethereum Builder is at all like why not just say it needs to be signed off by some by a sequencer effectively right like my order would need all everyone everyone trading on this Dex needs to sign off I don't know there there's a whole Space of of well you could just do that instead of separate ethereum transaction just
everyone submits call data and one person submits one giant transaction with the call data all in a single payload and then the application proc process yeah yeah so have like have an application specific Builder basically and my my general point is I think just the all this requires effectively I think getting a little bit out of the ethereum transaction um modality out of that Paradigm where where you have to everything every order like has to be in ethereum transaction or you can just like call this thing from any um in any ethereum transaction and get a little more into like okay like we're working with intense it's a little more flexible and we can do a little more at the application layer and in my view that's like the spirit of Unis swap X yeah um I I want to end guys by maybe trying
to give a give listeners a sense of what how you see the end game for for deck design so just to put together some of the points because it's still a little bit murky for for me so you know Eugene I heard you say that we're probably not going to onetoone copy pasta essential limit order book which is the dominant design for exchanges in trafi on crypto so that's not necessarily going to work at the same time you know I think the hope is that we still have retail passes liquidity and lping well into the future but maybe you know it's safer to assume a more professional active base of LPS even within our amm so I I would just love to get a sense of like how more concretely we see all this shaking out
and then I know everyone on this call is actually a big fan of hooks and the design space that that that opens up as well so I would love to understand how like that Innovation sort of enables maybe something that's just totally net new in terms of Dex design that we haven't even seen in trafi yeah I can answer the second question first um I think hooks are a very very interesting model and definitely open up the design space uh you're going to have just first of all much more much more of like an open market where the barrier to entry to like creating a new Dex design is a lot lower because you sort of just
have to implement uh an interface as opposed to implementing the entirety of the deex itself I think today it sort of seems like most hook based models are going to be like anchored on either an amm like unisoft V4 is or on a limit order book again that's something we've been thinking about for quite some time at Ellipsis Labs my mental model here is you have um basically programmable liquidity whether that's at the pool base level or at the the order based level some of the stuff um we were chatting about earlier on COD processes and whatnot you could imagine if the computations are super simple those could even just live onchain as well like some of this um um just in time
flow discrimination could just live at the at the order level itself uh I think the design space is super open here and there's also a lot of really really thorny questions that are going to be difficult to answer uh for example like gas griefing compute griefing uh the I think the security space opens up quite a bit as well um but the design space is super wide open and I'm definitely very interested to see what the Unis swap hooks Community is cooking up yeah um no that makes sense I think in general right like you kind of need hooks for um or or something similar to it for uh right like actually building uh more complex models where um
passive liquidity can compete with you know OB obviously right like if I'm a liquidity provider uh at NASDAQ I'm running very very sophisticated like quoters to um to provide liquidity like theoretically imagine you could just run um the best high frequency Trader quoter inside a hook that'd be that'd be pretty cool um so I think like the biggest low hanging fruit for amm right now is like the price of liquidity or the fee model has been very very simple like pretty much just uh pretty much just a flat fee per pool like some simple models but uh you can get really complex with um either changing things based on market conditions or um even more interesting
where the order flows coming from and like we've talked about that a lot and that that's really hard to do um without without Hooks and kind of the cool part is right like hooks you know this cor amm system which can be rock solid uh securing like kind of the properties we talked about before and then you can have this separate system that can be much more on The Cutting Edge about like setting setting fees and the price price of liquidity which is where you really need kind of the Innovation and then here we really have a clear argument for why we can expect onchain dexes to outperform the centralized exchanges where you really have this uh permissionless Innovation I think that's really the key here I I hadn't thought about this way before like one way to
think about hooks maybe is and sort of building up that metaphor is that it's like collocation um in the context of h50s is that you can like basically just ship your algorithm off to the to the chain and just have that run before every trade um and then yeah you're running like you know faster than the speed of light in some sense because nobody can actually um uh be again obviously there's still there's still the block time to consider and I think the limited The Limited information available on chain but I think in some sense having your algorithm collocated with the chain potentially could help you could help you in ways that there's just no way for a um like an offchain Market maker to compete yeah even better even not yeah in inside the matching engine yeah exactly right new
narrative I don't I don't know if that one will that one will uh catch on much like people don't people don't love collocation people half the people appreciate her in this podcast so yeah yeah well actually um you know not to go too far down this rabbit hole but I do think now that people have heard Michael Lewis's takes on SB maybe they're reevaluating how harsh they really should be on hft as a as a community there is this hilarious footnote in the book where where he's like but J you know James stre is one of the good hfts uh yeah anyway super funny I know we're we're starting to wind down on on time here so maybe just um if I could ask you to put on your your
Visionary caps here a little bit and just ask how you see things playing out in in broader terms just in terms of maybe even something as high level as Market structure so the mix between let's just focus on the onchain world of amm versus Central limit order books moving forward obviously maybe a little bit of that depends on the growth of ethereum versus aot salana or other high high TPS blockchains as ecosystems um and then I I actually want to close on like we're starting to get into it a little bit with with hooks but what excites me about that is an actual you know sort of something that's possible to do in a non-chain environment or with a Decks that you just can't it doesn't feel like a compromise to a centralized exchange you're just doing it because we
all share these values but something that would actually be you know that's actually a net new innovation which feels really cool so I would love to uh whoever wants to kind of take it like how do you feel view things shaking out from sort of a market share perspective and then you know are hooks the way that are hooks the hook to bring to bring price discovery on chain more or like how do you see that happening I think in the next couple of years the most clear Trends to me are one the amm and the onchain amm and the onchain order book models are going to continue to converge to some degree and the second is uh especially on the ethereum side with all of its l2s I expect to see much more fragmentation of liquidity which could
also potentially push things uh push more of the price Discovery offchain where you end up with uh for example Market maker based uh Bridges rather than tapping into the on liquidity itself that's an interesting point I'm probably broadly aligned with that um I actually yeah I I think rollups are very interesting but I think a lot of things that are being done in rollups now can be done in code processor so uh I'm still kind of bullish that there's going to be a lot of I I don't think we're going to live in a world where all activity moves to roll up so I think there's kind of demand for main net liquidity and and people want to transact on Main net even though a lot of people will transact on on r s um as
well but but I think um you know I think amm will get a lot more sophisticated about accurately pricing liquidity and um I think they'll take market share you know they still have a long long way to compete with Finance to close that Gap but um kind of the Innovation at like consensus or like Mev or like block Builder layer is uh a lot of really interesting things so if there's a chance for onchain world to overtake binance I think it's in the next few years that's an interesting inter in take D could you uhbe just to poke at that a little like why do you think people won't migrate to rollups as much is it a security concern a little bit I think the security is fine I just think um right now like if I need cheap compute kind of the only way I can do
that is on a rollup and in like ethereum World um but with co-processors um you can get much cheaper in some contexts right so or you still to do a transaction you have all that but you can do a lot of very heavy compute um offchain and you know only posted proof and that's that's fairly simple to verify so so roll Up's almost like a co-processor but like a very very like general purpose like large co-processor that's running a full version of the chain and I think what we'll see are much smaller Cod processors that just do one thing um like just price the liquidity based on you know whatever the the history the market conditions um or you know other things in lending
protocols outside dexas as well um and so right like some of that some some things that would previously have to go on a rollup because it need it very cheap compute we'll be able to offload some of that compute and operate on Main net Eugene and Doug thank you both so so much for coming on the show if folks want to find out more about ambient Finance or Ellipsis or or just follow the two of you um what's the best way what's the best way to do that yeah you can follow me on Twitter I'm at zerx [ __ ] Trader and you can follow Ellipsis Labs at at Ellipsis laabs visit our application at ambient Finance uh follow us at ambient Finance or follow me at zerx Doug feel like I've given you this shout out many
times Doug but the uh The Croc swap blog I think it's still a CR right but that the wealth of information if if anyone wants to seriously nerd out on uh dex's and there's some great empirical uh studies and and writing on there so definitely check that out too all right guys thanks this has been a super fun episode appreciate you both coming on Dan great great episode there um it's really unique to it it was cool that we got sort of the salana and Central liit order book perspective and then we had a more classical amm designer in the form of Doug so yeah absolutely where where I want to start and one thing that that stood out to me and you kind of you kind of actually gave your opinion there a little bit at the top of the episode but actually like to turn it over to you
because I'm sure you've thought about this quite a bit but where we where we shied away from a little maybe everyone was being a little a tad too polite actually on the episode but in terms of like more concretely how you think about Market structure playing out uh even between a central liit order book and an and an amm because you know to be maybe to take the the Steelman case for both sometimes I I feel like I often hear this more from professional traders who are more accustomed to Sexes but you know it used to be very popular and I'm starting to see it even more now it's like Central limit order book is the ultimate design right like this is where we're heading towards and and amm's like they're cute for now while we were we're worrying about gas and all these other
constraints but this just doesn't make much sense heard something very different um on on this episode which I heard you say like I just don't really see a cenal limit order book because as soon as there's any cost the traditional making Market making model is just not really gonna play out um probably there's a little bit of a place for both but like if you had to you know guess at the market structure of the next like five years how do you really see it playing out yeah so I think there are two really important Spectra here um both of which we touched on some in the art in the article um so one is about uh just the design space for um markets in different environments and I think one important thing and this is something
that I you know I used to be a r like a pretty radical Pro amm you know anti- Central Liber uh uh person at least on Twitter and I think especially with the development of Unis swap B3 I modulated on that a lot in part because I think oh actually we can keep a lot of the benefits that amm have but don't but we don't actually have to tie in this whole bundle that we thought was attached to amm um but we could still do it in a way where this thing is is uniquely suited for the environment right there's sort of a fitness for survival in this particular environment um that amm have on on blockchains and uh you know I think then there's there's a uh sect that I would argue with a lot back then but still do of people who say no like
Central limit books order books are just the the tileology the end state of um how markets should work and yeah I I think I think that's wrong even in traditional markets in fact like a lot of assets are actually not traded on Central limit order books right like options typically are are more often um uh traded traded with with rfqs or with over the counter or or in in other ways you know like it's typic it's not you know and real estate is not traded in central over order books for um maybe obvious reasons but like a lot of different of uh uh markets just because of differences in the assets differences in the participant what people want treasury is absolutely not not traded onal book um a lot of a lot of different assets get tra traded in different ways
that that correspond to those those characteristics and the people who are who are trading them and I think central liit books are they're popular for for a certain for certain set of equities um that's like the dominant form of uh of uh exchange but it's not like the universal way that we should trade any everything and so I think people come in and say oh obviously crypto should should be uh traded on central liid auto books um and amm are just like a like a temporary stop gap before we hit that end State I think are actually being a a historical even even with respect to how um uh markets work else and so yeah so but I think you know the idea of framing this as amm versus Central limit order books I do think it's interesting because both of them had a lot of very
nuanced takes on this in part because you know they're practical they're building these things for this environment they kind of know oh you have to make this compromise here and this different one here um and really I think what what you see with both of them is okay they're they're adapted to the environment that they've been that they've been building for um and they I think they recognize that so I think that's that's important is rather than being kind of religious about anything and I I'll admit I used to have more religion I think about this where I was like oh you know the S&P is going to all be traded on amm and I I I'd say I don't think that anymore um but I think similarly I don't think it's it's at all obvious that that um all markets will eventually Converge on on um some
particular at least Central limit order book design the other thing I think just touches on and Doug talked about it a bit is that there's there's a a related but separate distinction between passive and active liquidity and I think um it is important for Doug I think uh and for and for many people and and to some extent for for me that uh passive that it be possible for uh Ordinary People to be able to provide liquidity um uh on a you know on on Market on markets in some like fair Fairly in some sense that they can they can do it kind of alongside professionals they won't be outcompeted by professionals or maybe that they'll be able to make um to still make uh money from it I think it's I think I'd say it's and he made some good points I think it's
certainly uh very useful for a long for a long tale of assets um but I think you know that that's a view that and certainly another one that I had maybe even more strongly this was important but um I would say I think Eugene made some good points and I and I would um uh say I think it's one of the goals as we've talked about that is maybe worth sacrificing potentially for for other purposes in order to make sure that that noncustodial exchange wins for example or that swappers get the best possible price um and it's one where I think we I'm not as sure that we will end up with a long-term future where on um especially like you know the most liquid pairs it's where it's going to make sense that you have uh amateurs providing liquidity yeah I've thought about this a
lot and I I think no one would be on the side that that ideologically that wouldn't be wouldn't be a great outcome um I do wonder how much it I've been wondering more and more how much it makes sense and maybe to just I I really like how we actually started almost chronologically like why do amm exist because of this constraint in the form of gas but the the other constraint that we didn't necessarily talk about and I know you've discussed this as well with with some products that required arbitragers to come in and prick up free money today we can safely assume that we couldn't always assume that there there probably was a period of time where Market making on chain I mean that was very bizarre I don't think it was a very safe assumption to say that professionals would come in and do that
and you probably needed to rely on a more retail base and because it's crypto and because we are religious about everything as soon as it works for the the retail person this is now some some god-given right and ordained from on high and that's right I'm not 100% sure about that and I think it it almost maybe even applies to the to the longer tale where you actually do have for example like Jared from subway. eth is an Infamous example here but you actually do have um arbitrageur and you know mavic tractors that are that are taking like you know Delta risk they're actually they're actually Mark effectively Market making some of these longtail tokens um and they're like yeah they're going down and finding these and and Market making them effectively taking taking exposure
to of these tokens and this is why I think uh the best theory I've heard for why and this was from Robert Miller for why Jared from Subway became could be profitable as a uh so profitable as a me Searchers he was willing to take risks that um that other market makers weren't um but yeah he's functionally acting like a market maker you know and uh sort of a very a strange one um but in some ways in some ways uh playing some part of part of that role and I think we would see potentially even in the longer term maybe um more uh more Mev Searchers and and arbitres more sophisticated parties making markets in these longtail tokens on chain um I think the fact that token sniping um uh basically buying up a lot of liquidity uh that the moment a token
is launched um has become this this Niche area of MAV exraction um if you do that you're you're you're gonna end up taking on a risk that you might not be able to sell those tokens um and so like it it actually does it requires a somewhat more sophisticated party to do and and and a more uh risk um uh hungry for risk party uh risk tolerant party to do it um but I think we might start seeing those anyway even even without sort of like the uh am so it may you may actually end up being able to get a lot of those and then I'll just say I think even with offchain um uh you know even if it's not possible to just have a smart contract managing your liquidity it doesn't necessarily mean it's impossible to have retail liquidity provision um you could have
just like someone like open source code for Bots that do this right that provide liquidity um so I think the idea that you know just because it's it's the smart contract manages liity it's so much easier for you it's like maybe crypto enables uh passive liquidity provision in other ways where we can give you the tools to actually do that um to follow whatever strategy you want um uh offchain but again I think that's that's it's all a little speculative but I do think we're starting to see things move in that direction yeah and for for listeners I I also read when Robert put out that thread about dured from Subway and his particular strategy and if you actually we'll we'll link it in the show it's just because it's it's kind of a cool story but in in general if you're a Mev bot you need to manage inventory
most people just safely want to Wearhouse eth as inventory but I think Jared's strategy if I remember this correctly was he actually had a healthy inventory of Pepe and he was willing to take uh directional risk there he got in very early to Pepe and then he provided uh you know he basically did back run very profitable back runs with his Pepe inventory which is a super interesting strategy this might provide a use case for longtail um lending borrowing and lending because if you if you were a market maker professional Market maker who wanted to Market make these long tokens or if you're like Jared from Subway who wants to sandwich attack them um then conceivably you could hedge that Delta you could hedge the risk that you take on your inventory Risk by borrowing that token but right now you can't really
borrow those and none of the longtail lending protocols have really found product Market fit like you know like Oiler fuse like it's it Le seems to be less demand for longtail borrowing but that seems like it should provide that so if we have that primitive really nailed down maybe people could do that but it's sort of a tangent from our discussion that would be super cool you know what I actually that it was the writing it was the blog post for blend which really like nailed home there was a there was a section in there about assuming a more sophisticated supply side for blend and I was like man that is probably the right assumption I just to see it just written out like that something that had been gestating for a little while I was like that probably does seem like a pretty safe good
assumption that's right I bet this is something we'll talk about in uh more in future episodes but I do think the the exist the existence of just one side is going to be retail and the other side is going to be professionalized that as as a rule I think is has uh I think you you maybe even had something um to selling to this effect in previous recent episode but I I think it's I think it's an important um uh so often an important compromise made yeah I maybe to go off on a little bit of a Tanger but Eugene said this and I do feel that the need to like market makers will be Bridges so this was a big takeaway that I had when I I came back from EC this year um this was one of the the takeaways that I that I had which is I
think there are many different incentives out there right now for market makers to provide either temporary or sort of permanent um fixes to cross chain interrup that are very difficult today and the the phrase that I would use is the bridges they kind of or Market maker is actually Warehouse risk and that's at a high level what what Bridges do as well they solve inventory problems across two different ecosystems and environments we talked about it a little bit within the context of there's still friction obviously interoperability between different chains an intense based architecture is a way to get around that but it relies on uh market makers or or Builders or solvers or whatever whatever you want to call it standing in there and and solving that inventory problem there's
also I don't really want to get too far into the weeds here but also the you know if we end up in some sort of um if ZK is the endgame tech for ethereum and we do you know s Doug was getting into this with co-process Bur but signatures and aggregated signatures and sort of the fixed costs of uh transaction go up which is you're going to need big Builders to do that as well um but all this kind of points to this idea of market makers standing in and solving the fragmented liquidity and different ecosystems that exist today are you are you a believer in that idea as well or what do you think about that idea yeah absolutely I mean I think in general the best way to solve a problem often is just to create an incentive for it to be solved and open up a Global
competition for that um and you know I think competition can't doesn't solve every problem and it can cause often cause uh problems and in many ways Mev is a problem and uh competition is the is the cause of that problem um but but yeah in general I think a lot of of problems um uh a lot of problems can can could be addressed by just trying to say okay like what if we just assume you know that someone's will make create a profit intive for people to do it and then see if if people come in and do that and it's going to tend to lead to professionals doing it um but ultimately that that might be okay especially if it's a competitive market and we got into this a bit with Doug on the call but if you assume that if if the existing competitors were to drop out
that someone else would come in and take their place um that might be okay even if even if there's like currently some some that are winning this game because you know if they if they uh drop out someone else comes in we've seen some of this I think with uh uh with VAR various parts in Meen building and block building and liquidity provision um this sort of big tournament where Al some players may be dominant at particular times but ultimately it's so competitive that it is actually it's even if someone disappears someone else will take their place yeah I was actually listening to a podcast done by Hart lamber recently uh where he was describing some of the Dynamics of Treasury markets and there are very there are very few participants but it's actually an extremely competitive market with very tyght pricing and it's like you know an
auction that's typically run between like four participants and we we should in future episodes we'll get deep into the sort of auction Theory and some of the different designs and like how like how auctions can be run and the design decisions there but you know it's something that gets debated about about how many participants you really need to run a competitive one and I think the takeaway that at least I've had thus far I could reserve the right to change M but it could be a relatively small number yeah um I I guess just to I guess just to close out I I did want to get your thoughts on what we talked about in terms of Designing in gas constrained uh environments I know that was a big motivator for univ univ V4 even the the Singleton contract also Shi shifted the
architecture of uh ambient Finance to be based on a single contract I'd love to maybe because I think that kind of got lost in the univ V4 announcement amid the amidst the hooks um but just talk a little bit about how you you think about kind of um you know the cost of gas when you're building as as a DEX and how that informed maybe V4 yeah so the first thing I'll say is I think uh V4 is gas optimizations well I think it's um uh it's pretty important we're all kind of in like the it's it's still in the constant Factor gas optimization range and so it I think you know when you unless you get like orders of magnitude of of improvement um in that you still ultimately um you know you're shaving off some points and it's
necessary for it to stay competitive But ultimately I think it doesn't necessarily change that much about what kinds of models are competitive and that's why again I still I still think the amm um model is dominant on ethereum even even and even on ethereum rollups because just like you actually if there's any cost at all to placing orders um often is order book is a problem and that's you're not going to just like shave off enough gas to do that but yeah I think it's really important in part because you know it's a competitive game on chain um and the uh you know reducing the gas cost uh is really important for getting volume other volume it also means it also like fixes almost every other problem right or or mitigates a lot a lot of other problems lever is reduced if you reduce the gas cost uh the um amount of you
know obviously swappers uh pay less um but like yeah but like liquidity providers make more uh make more runy ultimately it's one of the few like uh kind of almost truly zero nonzero sum um optimizations you can make because you also get and you also get more volume you will you actually you know have potentially we talked about this a bit same of like dead rate loss the protocol might even make more money even if it's if you're burning less heat because you have less gas because just more volume is happening and there's more room on the chain for other stuff other uh positive activities to go on so I think it's it's one reason I think people harboring on it is it is it feels like this is an area where the tech can really advance in a way that's that's really winner take uh winner take off
but but uh everyone wins win win you know without revealing any Trade Secrets and you know have have you ever looked at salana as sort of a compelling environment where obviously the the gas cost is is much lower I don't know how much you've paid attention there or if the focus of sort of you and Paradigm is mostly still on ethereum yeah I mean I think we've looked pretty closely at salana I do think um I think it makes it makes a lot of reasonable uh trade-offs if your goal again is to is to max out throughput and I think it's it's remarkable in fact how high you can get throughput if you just say like that's that's the main thing the main thing we're going to prioritize um I think one uh in the long run I'm not actually sure and I I should maybe should have argued
with Eugene a little more on this I'm not sure it really changes the fact that you're working in ultimately this constrained environment because like eventually you're going to just fill up this synchronous environment and you're going you know in fact like for various Mev reasons you would really expect it to happen and we've seen this happen with L2 certainly is that like no matter how much you just scale um you know no matter how much you sort of turn the through pit up it's actually in the incentive of people to basically like spam your chain until um until it's full and so they will and so ultimately I think you know there's no unless you like completely change the model you're going to end up having to face these issues and I think they're kind of just like pre- dealing with congestion and of course salana had its issues with
congestion um at times and I think you know it's I think it's somewhat past those but I think if you end up with a lot of usage on a chain you will end up with with ultimately some congestion um I think almost is a law of nature just because competition will will happen until there is congestion salana has made some interesting interesting strides on their local fee Market but I think in dexes especially there's reasons why like the hot state will actually just be get congested so no matter how you how you solve it if you have a I think there's there's this kind of quadril Lemma where if you if you have permissionless access where anyone can trade on you have low transaction fees um uh and then you're just going to actually end up with uh and and you have censorship resistance then you're going
to end up with uh uh denial of service attack effectively on it because people everyone's going to be trying to trade at the exact same time I do wonder if salana ends up changing their now we're getting into discussion about but I do wonder if they end up changing their fee Market they they they already have I think uh I forget it's not maybe it's not a priority fee but it's something like a priority fee that you can that you can pay for I think paying the fee Market where you pay where it's like State specific I think is great but I think you're still going to have that problem in dex's eventually um I I think it's it may be impossible to avoid in a decentralized blockchain yeah you might be right um Dan this has been a ton of fun this this next episode we're
actually going this this was a good lead in because we talked a little bit about the a design space and intense and that's what we're going to be diving into in our next episode so um a lot of people lot of I don't I don't know if there's a lot of people out there love that but definitely the people who do are very passionate so uh if that's for you guys definitely tune in so we'll uh we'll see you next [Music] week