DeFi's Multichain Future with Zaki Manian from Sommelier

13 Oct 2021 · 57:03

Zero Knowledge host Anna Rose talks with Zaki Manian about Sommelier, his project for automating strategies around complex DeFi protocols like Uniswap V3. They discuss how Sommelier aims to let average users access sophisticated liquidity management tools, Zaki's vision for a multichain DeFi landscape, and how the space has evolved since his earlier work at Tendermint.

Speakers

Topics

Transcript

[Music] welcome to xero knowledge i'm your host anna rose in this podcast we will be exploring the latest in zero knowledge research and the decentralized web as well as new paradigms that promise to change the way we interact and transact online [Music] this week i chat with zucky manion a long-standing member of the cosmos community and the co-founder of the iclusion validator in this chat we explore his new project sommelier and how they aim to develop strategies to better use the more sophisticated emerging d5 projects like

uniswap v3 and how this would allow an average user to actually benefit from these new powerful tools we chat about his vision for multi-chain defy and how the space has evolved over the last few years but before we start in i want to let you know about zk hack a multi-round weekly online event consisting of workshops and puzzle solving competitions this is put together by the podcast and the zk validator and is supported by a group of fantastic sponsors it will kick off a weekly cadence starting october 26th think hackathon meets ctf meets dark force round-based competition there will be a leaderboard and prizes and deep dive learning sessions with the best teams in the space this is the event that we're putting

together this fall and i hope you will check it out if you're interested do head over to the website now and sign up if you've already signed up we will be in touch with you shortly with more details about the event i also want to thank this week's sponsor enoma anoma is a multivariate and multi-variable bartering protocol that enables bartering among n parties of arbitrary assets including nfts all with zero-knowledge privacy enoma makes large-scale settlements extremely efficient as the design of anoma's state machine is not based on step-by-step execution model and it removes the requirements of double coincidence of wants or direct matches i've added a link to co-founder awa's twitter thread in the show notes where she goes into more detail about

this project quick note we did have adrian on the show back in june in case you want to learn more and since that recording the zk validator has become an investor in the project so be sure to stay tuned for anoma's first public test net in which you will be able to play with enoma's proof of stake intent gossip matchmaking layer and custom validity predicates also check anoma's code base on github and just a note the team building anoma is hiring so if you're interested in finding out more check the links in the show notes for their jobs so thank you again inoma now here's my conversation with zuki [Music] so today i'm here with zucky manion the co-founder of sommelier cosmos core from the validator inclusion welcome

back to the show zucky it's great to be back as always this is my favorite show it's my favorite podcast yes this is the third time you're on the show i think it was like two years ago we did an episode mostly focused on your work at inclusion i believe like validation and cosmos you were on another episode this year where it was like a combo episode all about the cosmos stargate upgrade um but today we're going to be focusing on your new project sommelier yes cool so yeah but why don't you tell us a little bit what you've been up to um if you want we could even start in on that like what is sommelier and also like how does

this in any way connect to the other work you've been doing i'd love to hear like your journey to this kind of yeah absolutely let's talk about let's talk about the journey that has brought sommelier to this point um so i think one of the questions has been you know i probably have had this opinion for a very long time which is like what is the cosmos stack um uniquely for on and how does it fit in to this like ecosystem of blockchains and i've sort of been less excited about sort of building another ethereum um it's been you know i think that that

dream of building like building another ethereum building a better ethereum has been kind of very pervasive and there's certainly you know people in the cosmos ecosystem who have that dream but that's never been my dream my dream has always been i've been very fascinated by this idea that chains could compose together um that there are going to be different chains which have different strengths and weaknesses um and we can actually sort of meld them together in order to build like more complex systems and that's always been what's what's exciting to me and similier is a sort of manifestation of that vision sort of manifesting sort of post defy summer um

which is kind of like where i'm at right now um and it's funny you know we just finished mainnet in new york which you know was this sort of interesting conference it was for me was my first conference since the beginning of the pandemic it's very interesting to me like going to these conferences and seeing like all of these new generations of people who come into the blockchain space and i'm kind of the elder generation of people who like built like consensus protocols and l1 infrastructure and like you know that layer of the system um i'm wondering like the first episode that we did was all about as far as i remember it was like all about occlusion and being a validator and all of that so i'm curious like

what is the relationship you saw me as a new project is this a related project does it come out of your work doing validation or do you feel like there was other influences that prompted this i mean a big part of what we're trying to do in similier is we are trying to show how validators can move up the value chain uh interesting like that's a big part of it because d5 d5 changes the nature of validation um i think that's like one of the like biggest sort of views that we have in some of the a project that i have a view in general whereas like really the business of doing

of just you know executing the consensus protocol is sort of fairly commoditized right um and so what you actually are seeing more and more in sort of the emerging validation business is more intersections between defy and validation and so you know one example i could point out would be like lido where you have this like community of validators but like what they're building is fundamentally like you know a staking derivative a look a liquid-staking primitive and how it interacts with ethereum d5 and sort of the validation part of you know validating e 2.0 is more of a

implementation detail of how this like larger system of a financial primitive that you know is designed to be you know sort of uh based on eats too staking but is essentially supposed to be you know one for one equivalent to eat and may someday displace eath as the unit of account inside of the ethereum ecosystem so it's this idea of like building up the stack like the actual validation i mean this came up like what was it like two years it was like i think some of tyron's work this idea that like the staking derivative of a staked token could actually potentially undermine the strength of the network if the liquid token started to offer better rewards in the d5 market i remember that

being like a worry and it sort of sounds like there's validators or validator-like entities that are starting to try to bridge that maybe or like try to make sure that they can continue to balance this out correctly so you know it's like one of the things that you just generally see is right it's like again the validator market is evolving you know if you look at like sort of the primordial cosmos validator set from the beginning every one of them has gone in different directions you know like certus one who is like one of the earliest independent validators was acquired by jump trading in some sense like that was obviously going to happen but like that is like very clearly like look one of the formative and most highly skilled

validators in the system has already been acquired by like what is primarily a market-making and trading firm and then you have bison trails who was also acquired by coinbase yeah bison trails was you know acquired by coinbase figment has raised lots of money um is part of like a bunch of like protocol dev grants and they have also have a fund you are seeing the early validators all migrating into these different parts of the stack um and similar is really saying validators can facilitate a marketplace of sort of defy data feeds that can be executed on different chains where there

is defy activity happening and will facilitate accessibility of the increasing complexity of d5 um we are still in the early simple era of d5 but we are starting to see a transition into this more complex world and similiae is trying to build a set of primitives for that more complex world of defy that leverages the increasing capability and skill sets of validators and like still provides like sort of democratized access to d5 primitives and protocols i think the biggest risk you know right now that i see to sort of democratize access to d5

it'll be cut off for regulatory reasons and more that as sort of natural protocol competition sort of continues to move like interacting with these protocols becomes so complex that people are like well i just can't keep up and it's all institutional players who are able to um and so in many ways what similier is trying to do is build a decentralized liquidity management institution which is kind of where the name comes from tell me about the name isn't that the wine guy at the restaurant oh yeah yeah yeah sommelier is there to help a consumer um you know navigate the complex world of wine and sort of get the best out of

their experience got it and so this is like the curator the person who's going to like lead you to the best you can deploy your liquidity in the way that gets you the best experience got it what we are trying to do is we're trying to build an architecture that facilitates this um i do wonder though like you know we just talked about sort of this the validators moving up and starting to build out more tools having been a validator does it position you differently than had you been like a new d5 project that's just coming on like do you see any sort of learnings or anything that you kind of brought with you in the design of this this is what i would kind of portray as the sort of asymmetric advantage of the similarity

team is you know a number of us who are building sommelier run validators you know jack runs a validator i run a validator um you know we have people in the team we have people who are data people who are d5 people we run like a phenomenal amount of infrastructure in the project and one of the things that is like sort of notable among like sort of again this like generation that is certainly coming to this project is the infrastructure is all provided for them um and they're trying to figure out what is it that can be built on top of everything from you know indexing protocols like the graph you have all of these like uh frameworks that exist you have smart contract

execution environments and a lot of defy has been about what can you execute assuming these pieces of infrastructure by sort of having this team that is sort of a little bit more used to building infrastructure from the ground up we're attempting something that is a little bit more challenging in the defy space and i think if we're successful important got it i to like link this to cosmos itself too you were talking about like this cross-chain-ness like some of the a helping you deploy liquidity but is it cross-chain does it live across a bunch of places and it's like this stand-alone entity or does it live on top of an existing network the core logic of simulated is truly

cross-chain okay and that's like one of the things that i think is fun and exciting and challenging about what it is that we're building i.e we are building a truly integrated system in which there is a part of it that lives on right now evm chains and ethereum itself but we want to scale out to all of the l2s and it's relatively doable to do this but you know the scalability work that we announced recently with mystinlabs is all about ensuring that we have enough scaling in the cosmos stack to support you know a large number of different evm execution environments so like but this is what's cool is it's like the unique skill set of the som team is able to allow us to do this

which is provide a user experience that is if you are a liquidity provider who's interacting with som you don't experience interacting with a cosmos chain you experience interacting with ethereum or another other evm okay going back to this so underneath it is it kind of like a zone it is a zone it is an l1 okay it's an l1 it's a zone would you see this as like a bridging zone so again the bridging functionality is an implementation detail you know what is the user experience that someone experiences interacting with sommelier which is they experience there are a set of sellers on their ethereum environment that they're in

they say i want to provide liquidity into um this uniswap v3 you know pair with this strategy i want to provide uh liquidity into this ave contract with this strategy and then from their point of view they're just putting money into a smart contract they're putting resources into a smart contract and behind the scenes the validator set is you know ensuring that like data continues to flow into the system that there is fault tolerance that there is a marketplace of data providers uh those data providers vote on the next updates the actions that the smart contract will take and then the bridge

ensures that those actually get delivered and executed on the ethereum side is it sort of like all of these evms though you'd have a bridge between the evm chains or evm compatible chains and a theater yeah so like one of the millions one of the things that is so there's this bridge technology that has been gestating in the cosmos for years that we are using which is called the gravity bridge and you know we're not the only ones using it um injective has it running in production right now we have it running in production right now um there are a bunch of other chains that are adopting and watching with the gravity bridge technology it's sort of again it's the cosmos strategy of we build like a foundational piece of

technology and then it manifests in a bunch of different chains for a bunch of different applications that is sort of core to my nature as a builder in the space that i like to build things that way um so one of the things that about the gravity bridge that i think is very cool is it was designed from the ground up to be agnostic about what evm it's connected to okay because we always anticipated that there would be lots of evms to connect to and lo and behold there we are you know that's why we picked the gravity bridge for sommelier and like why we've invested in it we've been a big part of helping sort of build the gravity technology for the last 18 months because we wanted to be able to be agnostic about what evm

we ended up deploying it to understood as it stands like do you plan on using ibc as well to interact with other zones or is this not currently because it sounds like it's very evm focused it's very much focused on like the existing d5 stack that tends to live on evm compatible chains you know what does similian need in order to um in order to kind of what is it a a good target for a similarly a execution environment um so again right now sommelier is not concerned with doing any sort of defy execution i.e having liquidity you know people trading et cetera on the similar aging okay it's focused primarily on

being a marketplace for data that is flowing through somalia to execution somewhere else i see just to like answer your question about how we think about ibc what we need is there to be sort of the higher end of complexity of d5 protocols to sort of start existing i.e where there are there are multiple knobs to turn when you're providing liquidity if the system is still in its in sort of the earlier stages of d5 evolution it's not really compelling to add similar as a layer understood does it have something to do a little bit with this like almost like uniswap v2 versus uniswap v3

like uniswap v2 being quite simple and maybe we're starting to see parts of that or like maybe more simple d5 projects we see this in cosmos now or in different zones but you're not made for those you're not made for like the kind of easy like if it's very easy then maybe it's easier for the user to just use that the easy definitely that goes we don't add a lot of value okay but you might be more useful for the complex stuff i mean the only example i have in my mind because we had them on the show at some point was like uniswap and v3 and how that was like a more complicated product we view v3 and we view this as the direction d5 will be pushed by competitive price i see

and i think you can see that you know sushi swap announced trident which we are very excited about which has this concentrated liquidity capability that unisoft v3 also pioneered and basically just the natural competitive pressure of d5 is going to push the world of users towards that and the problem we see sometimes with that what you just said earlier in this episode the more complicated it becomes the less the kind of average defy user or like not very sophisticated du5 user can actually benefit from these things it's more likely they're going to like lose gas fees they're going to not be able to work these strategies unless they had a team maybe

or a lot of funds i don't know i don't know which one you need more but what you end up needing is like you need engineering and data teams okay um is really what it is is you as a uniswap v2 user there were only two decision points right i'm talking about in the liquidity provider rule okay the liquidity brighter role in the unit swap v2 world it was like i can either put my liquidity in and i can take it out that's that's the extent of the decision now the question is in the uni swap v3 world it now becomes a much more interesting question of i can provide liquidity at different price ranges i can have

as a sort of portfolio of positions i can own multiple different price ranges where i'm providing liquidity and each one of these is going to have different performance characteristics and now my question is how do i make a decision like how do i make a decision about this the reality of the situation is there are some simple decisions that users can make that can be guided by data and we offered that as like an initial sort of business intelligence tool uh on top of unisoft b3 that we called pairings um which was sort of just guiding people into like here's a good liquidity range that you might be able to to pick and like honestly like users did pretty well with that in the market you know we had

about 10 million dollars of liquidity deployed via the pairings app and people generated about a million dollars of just fee returns nice using the pairings product you know pairings was just sort of our initial stab at building something on top of v3 and learning about it while we continue to build out you know the the seller's products on top of v3 and we are going to be launching shortly probably i would say our current target is october um we're going to be launching a number of now validator managed data feed managed unit swap p3 products but it's just like the amount of stuff we've had to build like we are running custom subgraphs that are

extracting custom data feeds that are going into a data warehouse we have a data science team that is analyzing it we are constantly evolving that whole piece and picture um and then there's like a bunch of fundamental research about economic primitives because i'm pretty convinced that like the long run actual that if you like for instance don't have the ability to put and call options in addition to liquidity ranges you can't actually build a market making position on top of unisoft v3 that is robust [Music] and so it's just like continuous r d is like is kind of the story and if you're an end user you're just like i can't do any of this stuff right

it's like the best strategy for an end user today is like hey like i would be buying either like a thousand dollars and i would be selling eat at five thousand dollars and i'll stick that range in and it will not be optimal from a feed generation point of view but you know it does get me earned me some fees and allows me to be essentially like earn yield on being wonky the first time i heard about the project the splash across the screen or the headline was something about impermanent loss and like ending in permanent loss and i kind of understand from what you described sort of how that was understood but like do you actually see it as like actually

ending it or minimizing it maybe or just like helping with strategies i would say that like what happened was so like our first target about what we were building this infrastructure on was unit swap v2 and so we were building on top of unison p2 we were like happily building on top of unison v2 we knew that like some v3 thing was coming and didn't have any details you know everybody was keeping all the details pretty close to their vest and then the v3 paper came out and we made sort of this decision um right when the v3 paper came out that we were going to just pivot entirely and um and and sort of focus on v3 now since then our scope has broadened because of

two things one is v3 and things like it and how to manage liquidity on it is an r d like rabbit hole um they're powerful it's very powerful but it's also like there's just so much to learn and there's so much research to do and there's so much like general work to do um we were launching ave and compound based sellers in addition to our v3 based sellers and you know is our prediction that our v3 sellers will be our highest tbl sellers probably not like we think will probably generate most of like the biggest tvl sellers maybe are avi and compound sellers which are a bit more like well-defined and well-understood systems whereas like v3 is very much

like an ongoing r d project that we are like participating would you almost say you're still developing your own internal strategies for this we are going to launch systems and we're going to want strategies and we are going to say that this is represents like kind of the state of the art of our current r d but to say that like we have come to something that is like steady state or optimized completely yeah it's hard for me to foresee what v3 type world steady state might even look like i think there's still so many open questions it is a continuous and interesting r d project and we will continue to invest in that r d

but you know we view our scope as much broader than just building you know a v3 rebalancer in what you're saying it's making me think a little bit of like yearn but then you mentioned this tvl sellers this maybe will help me understand a little bit more about like what's actually happening because with urine there are strategies but you're like investing into a smart contract that's doing behind the scenes a lot of like kind of defy trades with the liquidity tokens or governance tokens selling that for you kind of giving you a cut saving you gas fees and we talked about like different strategies happening under the hood in your case it's not using necessarily the governance tokens is it returning funds to people you said before it was more focused on like data so i'm just curious like what

are these sellers how does it actually work yeah so i would say the biggest way that we are differentiated from what yearn is doing is if you look at yearns tvl urine's tvl is highly focused on strategies that are basically optimized yield farms they will optimize your yield farm they will optimize your stablecoin yield farm for you so that you are just generating um the fees the reason like why a urine is generating these fees for you is because one they're sort of whitelisted into certain advantageous yield forms to begin with which is

basically biz dev work um and then there's this cascaded sequence of actions that are complex and have to be sort of densely built together and urine just does an extraordinarily good job of putting those pieces together but they are also fairly like static and stable right um like a good urine strategy basically doesn't evolve over time the strategy is basically like fairly static it's fairly stable typically returns sort of tend to tail off as more capital gets invested into a specific strategy and what similier is trying to do is do things that require sort of a lot more dynamic adaptation

which is not urine strength urine strength is like stable predictable really high quality composability um like you will compose these yield farms together um and uh in a ways that's very advantageous to you and so far you know similar is right now looking less at like you know yield farming and governance tokens as our source of of a sort of alpha and more like we can like turn the knobs on this d5 protocol in the right ways to give you maximum like sort of capital efficiency fees and utilization

and maybe minimize going back to that impermanent loss is that still a thing or the extent to which impermanent loss is a thing in sort of the concentrated liquidity world actually comes down to how you use it so if you provide sort of wide band liquidity you do incur intermittent loss over that range yeah um but it's also bounded right so like you know the thing is is that like if you provide liquidity over like the 1000 to usdc to 5000 usdc range if you go below a thousand dollars you will be entirely in eth um okay and if the price of heath goes above five

thousand dollars you will be entirely in usdc yeah so the the nature of impermanent loss is different the rebalancers actually have a far more thorny problem which sort of doesn't manifest in the v2 world which is the need um if you want to provide liquidity over a narrower range you decide to provide liquidity where you know ethan's from like two thousand five hundred to two thousand eight hundred dollars then eath goes to three thousand and so now if you wanna move your liquidity from like 2500 to maybe like 2 800 to 2 900 you're not changing the inventory of

assets that you hold um you're still only holding usdc i see but you're changing the liquidity that you're provided over yeah i remember i mean we did do an episode on uniswap v3 and i remember learning a little bit about those ranges i haven't actually had a chance to look that closely at them um it does seem like a beast of a machine that i just haven't yeah it's a fun thing to use though um cool you know again like we have lots of people who've been very nicely earning fees um using the tooling that is available now this idea is is that you incur cost really when you cross the spot price uh yeah when you move your liquidity across the spot price that is this

rebalance cost this cost of crossing the spot price and like having to buy new inventory of tokens is the cost that sort of represents the crux of the r d that everyone is doing on unit swap v3 which is how do you manage that got it that has become the thing that doesn't have a sort of yet a term that is sort of widely accepted in the industry but has been a thing in market making forever which is like the cost of crossing the spread austin we need a different word it's just not yeah it's not in permanent loss anymore it is the cost of crossing the spread

and as people try to figure out all of these like you know you're starting to see this type of concentrated liquidity protocol emerging it's emerging in the perp market in decentralized settings it's emerging in like the sort of hybrid amm lending markets like what uh sushi swap is doing with uh trident and bento box and it's emerging where ever uniswap b3s pop up and you know now that you have more permissively licensed concentrated liquidity that like sushi swap has built with uh trident it's gonna pop up everywhere um and so you know there's just this like sort of general title wave that's coming um

it's really fun to build all that stuff i don't know like i don't have as much of a desire to build an automated market maker or decks myself but i really like building on top of them i find them just like utterly fascinating to like money legos do you feel like you get a bit of a better sense for their like real world game breakdown like how it actually works how the simulation is actually working kind of yeah yeah you learned so much about how they work um that to a certain extent i think to a certain extent like the teams that are building them are somewhat divorced from this reality uh interesting they get feedback from you know all of the market

makers and everyone who are trying to use them so i want to take one step back because there's a word that you've used a couple times i want to kind of go back to the seller part of something like like would i put money into something that you do something and then you give something back or am i using something from sommelier and then i put my money somewhere else this is what i'm not clear on there's a set of sellers okay each seller is like a product so you know the seller will provide liquidity into uniswap or like usdc on unisoft v3 but who is the seller is the seller the user the seller is a smart contract under here oh okay so it's not the end user the seller's

smart contract got it and liquidity is aggregated across many users who get liquidity shares um and you know it's particular to the seller there might be some rules about when you can withdraw when you can add either you know different things have different rules you know to sort of again optimize for returns but the idea is you know it's very much you know it's the uniso v2 like experience right it's like i put my money in uh i have a liquidity share i can redeem that liquidity share for a set of underlying assets and that is the seller user experience with some constraints are they depositing that though into individual sellers are they doing it

through you you as a user pick the sellers that you want um do you have a ui or something that like we have an ad liquidity ui to work on the some of the l1 do you need to have something like tokens so if you're using the l1 um the l1 is like you know you can run a validator you can participate in governance that decides what new sellers are going to be deployed um you can help shape which data feeds are driving which sellers i understood this sort of governance activity is all moved onto the l1 and that you need some tokens to really be an active participant okay and you know right now you know the holders

of some tokens are like some validators a bunch of like initial project contributors a bunch of vcs like those are the those are the current token holders but we want to now that we've launched mainnet that now it gives us the opportunity to sort of expand on the token holder supply as we get into the sort of end of the year cool i'm just thinking like going back to that you're an example like urine is adapt smart contract on ethereum and then the governance is also a smart contract on ethereum in your case sommelier is a smart contract on evm and ethereum like evm compatible chains and ethereum and then there's a separate chain where the governance is actually happening and i guess there's data feeds and this is where like the bridging

would happen but there's no token feeds is there this is a little bit of the cosmetic critique of like ethereum d5 is because you don't have something like the gravity bridge like governance in ethereum frequently has to be executed via a multi-sick uh and it depends on the protocol on ethereum but like frequently it's like the governance doesn't actually execute its will itself um yes it's more like a signal and like one of the things that we've been like really wanting to do with the gravity bridge technology is really make

like execute your governance on cosmos and the validator set just executes the will of governance on the evm chain like directly divided got it but that doesn't happen yet yeah what would need to happen on the ethereum side for something to be executed though so what we do is we deploy uh what is called a logic contract that's what i'm debugging like right now um there's avi encoding nonsense um that i'm trying to figure out uh i've got the whole thing printed out and i can see what bytes are diff are wrong and i'm gonna figure out why but i think hopefully by the time this episode is out i fixed that and uh we

are gleefully executing arbitrary smart contracts on ethereum from cosmos hub governance very cool how does things like mev affect what you're doing like mev on different chains these like special you know strategies to either democratize mev or remove or like minimize mvp like does that impact in any way your strategies or the way that you're like building this product or the data yeah i mean we as an industry are still like trying to grapple with l1 mev um as a whole but interoperability which has been you know a point that you know has come up a lot in this sort of flashbots and med

research community is interoperability is going to create like a whole new layer of mev in the system the tricky pieces with similar are both we have to mitigate mev where we're executing um which is a you know an ongoing project and we want to make sure that the mev what mev there is on the cosmos chain is actually aligned um so that like validators can't manipulate the operations of sellers in ways that are advantageous to them and they're aligned with you know i'm not gonna lie this is gonna be tricky i thought mev on proof of stake chains wasn't such an issue though okay so if you are running a proof of

stake chain that offers finality um avalanche cosmos chain solana et cetera the worst thing that can happen with meb is consensus and stability right it's where like the mev battle goes on between the different consensus nodes and they're actually like no like they fork the chain to try and figure out and this is sort of the worst case scenario for med uh you know people call it the time bandit attack where like you oh yeah you see an mev opportunity that someone else mind and then you try to mine it yourself in sort of modern proof-of-stake chains that is less of an issue because you have finality you know someone will get slashed for trying to

do that um it's you know in change with slashing you know it requires a huge fraction of the validator set if you were trying to succeed with it all of these things but you still have mev issues around deciding what transactions to censor and what transactions to include in any given block and there's some really exciting work that the osmosis and anoma teams have been spearheading on the cosmos side about using like encrypted transactions you know there's basically like two things that can be done in a proof-of-stake setting and these things are interesting because again they like go to the power of cosmos to build

customized l1s uh and environments like cosmos avalanche et cetera that like support this idea of building custom l1 because you need new services at the l1 layer to to fully mitigate um or to like to provide these services of mev mitigation because having sort of native randomness or having native encryption and decryption primitives um where like the validators are all being sent encrypted transactions which are opaque to them which they then include and only later you need the valid intercept like form a threshold key and decrypt them yeah these kinds of things are really the power of having sort of native l1

anti-mev services in the system and like this is why we built cosmos you know i think probably the first time we started talking about mev was like 2014 so like you know and cosmos was built for this world yeah it really was it was like built for this world of like competing d5 protocols interoperability consensus level attacks fault isolation between consensus systems like this is what we built for and it's really exciting to start to see it like manifesting in reality and you know similar is a piece of that picture but you know that's the joyous thing of having been working in this space for so long you know i've contributed and put so many ideas out there and so many

things are being built by different people who i've worked with in the past who are like trying to solve like all of the different aspects of this sort of complex holistic system and so i get to focus on similier and like somewhat narrower constrained problems at but you know it's just it's really fun there's been a lot of work put into it so i actually got a chance to speak with dave from osmosis just yesterday and told him that i was interviewing you and he actually gave me a few questions so i'm actually going to ask some of his questions if you're up for it the first one's about kind of touching on the mev and unispot v3 and then the others are a little bit more cosmos focused but one of these questions was like what do you think about flash alpene as a new

mev problem with uni v3 on other chains and i'm guessing he's meaning like the l2s okay so first things first this is what i mean about the final form of concentrated liquidity being really unknown right and this may end up being the final form of constitutional equity and it's like building some stuff around this is an active project inside of sommelier right now i gotta chug through a bunch of bugs before i can start building some stuff wait do you want to create the flash alpine or like what part are you building so one of the things that we do at sommelier that's a part of our process is every single idea that we have we first build like a single ethereum address

version of it just to like see how it works okay um it's only after we've kind of run it for a couple a little bit of time is just like that we try to like build it as a distributed system um so we so we typically build prototypes as a distributed system i talked about earlier about this like rebalance cost the sort of overwhelming thing that hangs over you know providing liquidity and you swap b3 type setting so what is the world in which that rebalance cost essentially is nearly negligible the world in which that rebalance cost is nearly negligible is you see in the mempool a trade coming in you provide one tick of liquidity exactly where that trade is going to

land because you can calculate all of this you provide one tick of liquidity there and then you would draw it in the same block or the end of the block like where you could do like a flashbots bundle of justice right um you know that like bundles the trade with putting in the liquidity executing trading and taking the liquidity out and like this you know your inventory has now changed in a very predictable way you know from a user's point of view this is great this is not like a sandwich attack this is you get lower slippage than you thought you know you get better prices than you expected on the trade but gas prices being what they are on ethereum l1 you know this has happened this has been

done we've seen this in the real world but it really only works in like north of a million dollar trades and that's like a relatively large and infrequent trade size so you see that people have done experiments with this but nobody has really nobody seems to be doing this like on a regular ongoing basis on l1 but on l2 gas prices are cheap mev is figured out it's like a wild west mev because it's not well right now you have a sequencer most of the l2s have a single sequence oh yeah um there's like only one position to do mev and you know you're gonna do what they're gonna do with it um and so the other thing that would be really tricky if this turned out to be the sort of dominant modality of unit swappable 2

is it's going to make the whole routing world like because most trades through amms are not done like directly on the unit swap interface they go through one inch they go through cow swap they go through um i think matcha matcha is the zero x product you have these routers and the routers are looking at what is the liquidity available for the trade and then like routing to the slippage but if this like flash lpng thing takes off you don't actually know because it's not on chain how much liquidity is actually available anymore and you know it's sort of like an interesting question about like whether or not this

ends up being this the sort of steady state at which anything operates um and that would be a tricky thing to also to decentralize um because you know you have a lot of you know just latency for a centralized player is is a huge advantage there though i don't think it's impossible to decentralize that it's sort of an interesting question of whether or not um but like right now what we have we have one system that does concentrated liquidity it's running in a high gas environment with most of its liquidity in a high gas environment and so we know we have three months of data about what that looks like that's it that's like that's what we know right now um and the future is concentrated liquidity in low gas

environments in a lot more places and like you know not in a crazy bull market um like bear markets will occur so we still have a lot to learn and this is why these things are such a interesting research and development project we just said that like on the actual other chain or on the l2 the mev is not an issue but like where is the issue of this is the mev as you're bringing it back onto the l1 after a flash lp like no way no there's no issue here this is not a problem this is like basically a good thing okay flash lp is not an attach flash lping is i delivered the user exactly what they

want which was a better price um than they were expecting to get you know i wanted to go buy some some tokens it turns out they were on sale i got a better price than i anticipated um flash opening is amazing uh for users it sort of poses these challenges to how amms are integrated into the rest of the ecosystem and we haven't even really started to explore those challenges because of the way um because of the way uniswap v3 um is operating only in this like high gas world right now um but as we start seeing it in concentrated liquidity from sushi swap and from uni swap in these low gas environments now suddenly like what does this even

look like but then it also like poses these challenges for the ecosystem because one inch that wants to do is like you know you want to sell some heat for usdc it wants to look at all of the different amms it could possibly route to and other systems that are not amm based and get an idea of what price would be best but if there's a flash lp you don't actually know like because it's not yet on chain how much liquidity you actually have access to for the trade so it's going to make all of these systems like behave in different ways if this is what the sort of final state of or like what the next state of concentrated liquidity in low gas environments looks like got it but like also you know the other thing to point out is that like in the

most sort of extreme version of this scenario like also everything rebalancing all rebalancers are obsolete like rebalancing becomes completely obsolete because there is no strategy that you can engage with a rebalancer that is going to beat out flash liquidity okay i have two or three more questions again from dave um so yeah another one was what does the future of cross chain trade routing or aggregators look like would you need hops or not kind of it's sort of been an interesting question as to like again what does this look like in its final form and it also is a question of how do people use ams you know one of

the things you could build like sort of on top of the sommelier stack and people are building on top of other stacks is this idea of routers like i want to buy some sushi tokens or like some uni or link or whatever i want to not only ask the question what amm on the current l1 that i'm on or current l2 that am i on offers the low best price but can i look at the entire world factor in like all of the l1s look at the entire internet of blockchains that has emerged i don't mean just cosmos i mean like all of everything polygon avalanche solana all of these things and say including execution cost you know gas costs moving over bridges

all of these things you know what is best for me but frequently people trade into tokens because they want to do something like you know it's like i want to buy some near tokens and steak gum like i did this recently i bought some newer tokens on sushi swap moved them over the rainbow bridge and i staked them um and so routing of trades is like something that's like i think a fairly constrained problem and potentially manageable but now if you want to consider like an entire workflow like that you know if i was doing that workflow and like i end up with near tokens on like avalanche i'm like no this doesn't help me because like i need to go back over the bamboo bridge like

i have to come across two bridges like this wasn't good um i think like one of the tricky things that is going to be there is like you have to consider entire workflows in these sorts of solutions and i don't know how effective that's going to be um and this is where a thing like cross-chain order routing via something like natively built in is like an ibc protocol which is something that like we've been thinking about in cosmos for many years is like potentially like the right way of doing this because you can like plug into the protocol exactly like what you want from an entire workflow point of view like i want these tokens

traded and then delivered to this chain because i want to use them for part two of my workflow and potentially you know things that are expressible in the cosmos world you could program into like an agora type chain or a cosmos type chain like the entire workflow you know just like okay step one step two step three step four and that's all like all programmatically executed and that's kind of what the world that we've been building for for a very long time um and you know it's it sort of seems within grasp now but like yeah so you know this is one of the reasons why we didn't build like a trade routing protocol for sommelier

because it's like it's unclear how to think about that in terms of like the entire workflow today what are the cross-chain privacy guarantees that in general folks should be aiming to design this is very on brand for this show but like yeah holy smokes a heart problem um like the best we can do right now is like you can have these like privacy zones right and by that i mean like maybe a cosmos zone but just like conceptually like you have these private domains but these proven domains you see what goes into the private domain you see what comes out of the private domain and

one of the things that's important in general when you're constructing these systems is to actually give people reasons just to like sort of hold funds in the private domain for a longer period of time and so you're starting to see a lot of that being applied uh in things like enoma and penumbra in the cosmos ecosystem and maybe in other ecosystems that i don't know about so you could like lp or stake privately also inside of penumbra you can do similar things inside of a noma that you know gives you more sort of temporal variability of how long people stay in the private space hmm but this i think this question really is focused more on this cross chain like

the zone being private is cool but like is there a way to do it across i was talking with henry de valence last night about this what he thinks and i think i agree with this is there's this like fundamental trade-off so one of the properties of cosmos that it we really value is this idea of like what we call fault isolation i.e like osmosis can experience some sort of catastrophic chain failure and halt like you know why this fault et cetera like what we saw with solana recently but like the rest of the cosmos ecosystem keeps going like and doesn't care um like you know wiveness is preserved across many blockchains and we get

resilience against faults from that and um you know that fault isolation property is at odds with any sort of cross-chain privacy um i think in a very deep way that you can either have fault isolation or you can have frosty and privacy and it's like maybe a dial that you can turn back this again this is this is henry's phrasing really that i'm stealing but i think it's the correct answer to the problem hmm what about sommelier itself do you want to have any sort of privacy tech in there or is it almost also antithetical to what you're trying to do oh no it would be so it would be a huge advantage to the system if we could have like strong correctness guarantees while

preserving privacy as long as possible because it would make it harder for people to front-runners yeah you know the system at sort of maturity has a huge front-running problem um because what like what we want to have is preserve decentralization which requires multiple validators inputs before anything gets executed on the chain but like you can foresee what those validators are likely to do all the inputs are being gathered and like run ahead of them and execute it so we have this huge front-running problem um to what we're doing with sellers um where privacy is the solution the only plausible answer that i really see there is enclaves uh like sgx type things no i'm saying this for on behalf of my

zk focused audience here but okay so you think that's the only way to do it you couldn't do it cryptographically maybe maybe i realize i'm supposed to not have an opinion here but it's tricky right um enclaves offer some like appealing properties that are like really hard to get in other ways and you know in terms of having like computing over encrypted data um and so i do think that like that may be where we end up um for something like sommelier but yeah i'm interested in that um i think we are inevitably going to have to do privacy tech inside of sommelier um the long run but like right now i'm

mostly looking in the enclave direction cool well thank you so much for coming on the show and exploring sommelier with me i have a way better understanding of what this is and um also i think it was kind of nice to hear also like the evolving vision for this kind of inter-chain communication space how it looks now versus how it looked maybe like two years ago yeah so thanks again yeah i mean we are just at the beginning of entertain communication right it's so early we were like assume l ones are boring now and like interchain communication is where it's at uh like five years ago um but like over 2022 2023 like we should probably have like most of the l ones that we're

gonna have for a while um we are as always are in sort of cosmos and my work trying to be forward-looking but you know excited to keep building cool well thanks again and i want to say thank you to the podcast producer tanya the podcast editor henrik and to our listeners thanks for listening [Music] you