How CoWs Will Save DeFi Swaps | Felix
23 Aug 2023 · 1:24:01
Felix Leupold, technical lead at CoWSwap, talks with 0xResearch hosts Dan Smith and Sam Martin about how the protocol uses the economic concept of coincidence of wants to let users swap tokens gaslessly while protecting them from MEV. They break down CoWSwap's batch auction design as an alternative to traditional DEXs like Uniswap, and analysts Westie and Ren Kong join to unpack the early days of Friend.Tech, the Base-native app for trading tokenized social profiles.
Speakers
Topics
Transcript
due to just the fact that every order is on their individual price curve you don't have this concept of uniform price clearing you don't have this concept of you know matching people directly peer-to-peer and aggregating demand and supply and so in a hyper tokenized world with fragmented liquidity and I think we will see batch auctions um you know play out another advantage over this mechanism and yeah it's basically now up to us to to demonstrate and show how for example with amms maybe liquidations we lead that concept of having one price per token per block gives significantly more Mev protection than um than just individual Dutch Dutch Dutch orders what's up everyone welcome back to
another episode of Xerox research before we dive into today's episode I want to give a quick word from our sponsor hexins the most hardcore security team in web3 pioneering in ZK and novel cryptography hex isn't trusted by its tier one protocols such as polygon working on their news AKA VM we've also got mantle risk zero Lida one-inch new bank and more you'll hear about them more a little bit later in the show but be sure to stop by their booth at 8 32 at permissionless and don't forget to mention Xerox research when you do so you can get a discounted quote you'll hear more about them later in the show but first as always we're joined by two blockworks research analysts Ren and Westy not this time to talk about a hot seat cool Throne segment but instead we are going to Rift on Friends Tech the
thing everyone is talking about on crypto Twitter uh today's August 21st and we've got a great interview lined up with Felix the technical lead at Cal swap but again before we jump into the friends.tech talk uh I do want to shout out our conference in Austin Texas it's permission and it is the world's largest defy in crypto native conference bringing together Builders researchers investors and more people in the industry from all around the world into one place and we would love to see you there Westy why don't I kick it over to you to talk about friends Tech and what it's all about yeah absolutely I've been having a lot of fun this week but yeah basically to give an overview it's a new like social crypto site that allows users to buy and sell shares of associated Twitter
accounts or X accounts and in return you basically get access to an in-app chat with the user um it's a progressive web app that's designed for users to basically access the site via their mobile device their iPhone their Android Etc download it to their home page and that's sort of a way to uh have it feel neat like a native mobile experience while actually bypassing a lot of Apple's restrictions when it comes to their app store because they're pretty restrictive when it comes to crypto even allowing them to be on their App Store as well as you know taking a cut from potential fees as well so it sort of bypasses that and it's yeah it's taking crypto Twitter by storm
it's onboarded I think close to 100 000 accounts maybe more than 80 000 at this point um and I think a lot of that is obviously due to teasing and airdrop with points based on factors such as invite codes uh trading volume Etc and yeah they're able to onboard a ton of accounts I think as a result of onboarding some large CT accounts which then had them post about their experience was then on on board of their followers and eventually made its way to celebrities like FaZe Banks and I think people were sort of realizing you know the power of of this platform and the fact that they can earn trading fees based on how people trade their shares
and yeah it's been a crazy experience in the past week I don't know if I can pass this off the run because I know you have a bunch of numbers and like how much volume we've seen in the past week yeah so since Inception there's been roughly 32 million in shares bought 25 million in shares sold so that equates to a total trading volume of give it 60 million or so the total value of all profiles is 21 million with the top 10 profiles being worth 4.1 million uh the top profile right now is racer which is the creator of france.tech his portfolios were a cool 777 000 although he's not the highest earner
so there's probably been less trading happening on his shares but yeah it's been a wildly profitable and wildly successful protocol so far it's managed to generate 2.8 million in protocol fees apparently 56.8 million in protocol inflow and if I had to guess that's probably around 25 to 30 percent of basis total TBR so it's definitely like a significant contributor to base and there's been 1.4 4 million in cumulative transactions I don't know how much of those cumulative transactions are bought I would guess a decent amount considering every large account gets spotted or Mev immediately upon signing up but definitely still respectable
numbers nonetheless and from a cash flow perspective like a lot of people mostly large accounts have been completely raking Kobe has made 142 000 Oscar has made 98 000 racer almost 100 000 suju himself has made roughly 60 000 maybe you can pay off some of those 380 creditors with that um but yeah uh often considered as being a crazy one week I think it remains to be seen whether this sustains I think a lot of crypto natives are betting on non-crypto individuals to come on whether that's sports stars gaming Stars your models or your favorite only fans Creator whoever um but yeah exciting times
yeah it's really interesting that we've seen this so far and the the way that the accounts earned fees is kind of interesting to me so there's like a bit you know you're buying and selling shares of an account uh which don't really give you like ownership of an account in any meaningful capacity they just give you like this gated access to a really shitty private chat um but it's it's interesting that so like obviously there's trading volume that goes on with those transactions and then there's I think a 10 fee in total half goes to the protocol itself and all the other half so five percent each uh goes to the actual account so that's like how these fees actually get generated for the user so it is kind of interesting that there is like some profit mechanism uh for the Creator themselves you know I
think this is like directionally correct um I kind of my framework for this right now is this is like a great proof of concept but largely like we'll need to be heavily entered uh iterated on and what I'm battling with is like okay if this is really some like perfect be-all end-all solution why not just integrate this into Twitter form or X formerly Twitter um and like I could see them going this route now like every time I've mentioned that to someone or tweeted about it the immediate response is like oh these are unregistered Securities and like I just think that is such a middle of the curve take like like I don't know I I just don't see this getting regulated like it's a a stock of illegal ownership to the cash
flows of a business yeah I would agree with that as well it is a weird gray area for sure because I could see why someone could look at that like trading shares of an account it kind of looks like a security but I think you're right in that like the way it's actually set up obviously I'm not a lawyer but just the way that I see it is that if it's based on trading fees of the shares and not on the actual individual output of that Creator then I think it's completely fine but definitely a bad name like I think you're just inviting unwanted uh attention by by naming them shares but like this is even if you just like maybe you know you can probably draw lines to how
it does look like a true share of a business but that's just like objectively not what not what's happening here like I don't know this is just not trying to buy ownership in the future cash flows of a person it's just like buying a you know a community pass to that person uh which goes to like the you know you gotta let's dissect like what you actually get by buying a share in someone today and if you buy it a shared of an account you just get like I said there's still like a private a private chat sort of thing where it's like sort of like dming except you know if you have multiple people that own shares you can ask the the one person let's say like everyone here has a share of Westie we can all ask Westie a question in this chat but Sam you can't
see my questions and I can't see your questions but Westy can see them both and we can both see Westy's responses it's like I don't even know if that's intentional I think that's just like it's just a broken product right now and like you know I get it at launch an MVP get to Market try to get build up some hype uh see if there's even any level of product Market fit and then iterate on it which that's probably the best way to get a product out the door um but in my opinion like if they don't start trying to fix this app they're gonna kind of miss their their window of opportunity um when like you know I'm trying to want to love this thing but like every time I open the app it just something's wrong and it's a different thing every time
and I'm like all right like what are we doing here I agree with uh going back to Dan's point about it being directionally correct however I do think that's sort of like two different subset of users right there's one subset which is kind of creators right um the people who are probably using patreon today YouTube people um twitch streamers maybe and then the other subset is influences I feel like an app like friends.tech especially with it sort of fighting curve is much more suited for influences right there's a lot of people that are out there right now basically saying oh yeah why wouldn't like uh only fans Creator come
on defense attack and they can rake in a huge amount of trading fees but to me I don't think that's their business model like their their business model is dependent on the constant cash flows that they're able to generate from like your own events subscriber right um and that's kind of what they're banking on whereas if they move over you're banking on trading volume which I don't think will always be able to sustain especially for a prolonged period of time and once that Fizzles out you're just gonna be left of like no value as a Creator there however I think the alternative side of this coin is for influencers right they sort of Thrive and evolve that attention and people wanna like
collect the cloud people want to be long like whoever next the next biggest like Superstar is like imagine if you got like a up-and-coming actor like early on and I don't know I do think like there's definitely some interesting I don't know if Integrations is the right word but like real world privileges you know like if you buy a share of Brad Pitt you get to meet him for like the next uh film like red carpet you know or you get a walk through it covered with people like something city like that but yeah I think the difference between creators and influencers like it's pretty apparent for me and their sort of use case for fence style Tech I do think it'll be interesting to see how like shares or like the value of shares
respond to like real world events I don't know for example imagine like if Will Smith was on this app right and then we replayed the Oscar last year is where he slapped Chris Rock on stage and I don't know it would be hilarious you can dump his shares for one hour straight I think that would be pretty funny uh but yeah I am really looking forward to what the next wave of users that are onboarded onto fences on Tech is going to look like and I think that would be fairly telling to be honest of how sustainable this app will be I want to see the I think they've actually done a pretty good job of this is trying to abstract away the fact that eth is like even a number on your screen like the value of other people's shares is denominated on the home screen in
dollars um there's like honestly the only way you really see eth is like on your own wallet in like the Home tab or something like that or your profile tab uh but I I want to see them take that a step further like if you really want your everyday Geo to log in and start buying their friends and you know socializing on this app I think you gotta like completely remove the nominations away from it um and I even I tested something like this on my friends I was like yo like what do you guys think completely normal like non-crypto friends I was like what do you guys think about this and they're all like what the hell like they had zero interest so I also think crypto Twitter is like all these other consumer app this is our breakup moment buckle up I'm like all right like most people
probably don't want to financialize Twitter to be completely honest the funny thing is I've actually heard the opposite argument that instead of denominating in dollars we should denominate an eth because when you think back to nfts a lot of people were able to just shell out thousands of dollars because oh it's one ether a couple eth where it didn't look like you're really selling out all that much but in US Dollars terms you actually were and if people actually saw the amount that they were spending they wouldn't spend as much so there was sort of a two-sided sword to that I I would also Echo dander a little in terms of the echo chamber on Twitter um I'm not entirely sure this is a new paradigm yet I know there's been like
probably a hundred thousand active addresses but if you look at the profiles of the most number of shares held or the most number of holders like that's Kobe and he has 157 holders that's like 0.0001 of the human population like even if that number was one thousand I wouldn't think that's like very impressive in the grand scheme of like a consumer app maybe if that number was like ten thousand I'll be like okay yeah this thing has an X but 157 is nowhere close to like sort of the first actual consumer app in crypto that's gonna be widely adopted I mean to me I think the issue with with that number specifically is the the
bonding curve that they used and the fact that you have to buy a full share of someone's account in order to have access whereas if they had some sort of like Smooth bonding curve you could have like fractional ownership over these shares and I think you're gonna you would see a lot more holders of something like Kobe or like the top accounts where it costs what like two eth to buy a share which most people aren't going to throw out to a new application right but if you could buy you know 0.1 Heath of Kobe I'm sure a lot of people would do that right so I think that's one step but to me like I think this is a worthwhile experiment as a whole like yes I definitely don't think it's the end state but I think there's like two key things when it
comes to like creating a new Social Network that crypto allows to do a lot better and I think we're sort of seeing inklings of this I think one is like bootstrapping a new user base that's like the biggest issue with new social networks is how do you get like the your first user base that loves the product and gets other people on board and using crypto using like a token airdrop in this case using you know a community within CT that loves to try out new products like you automatically have an easy bootstrapping mechanism for your social network and then you also have like a second big property which is sort of uh an addictive nature to the application which we can debate whether that's like
a good thing for the users or for society but I think it's pretty self-explanatory that the apps that people use the most are the most addictive and the same way that how on like Instagram how likes and how retweets how they like sort of hit your your dopaminergic system you can think of like speculation in the fact that your account is associated like its price goes up and down like that is really addictive to users and so I think using crypto in both those ways allow it to you know flourish as social apps and so while this is not the end State I think it shows what could be possible and I think people are going to take this and iterate on it no I'm definitely not Googling
dopaminergic right now thing the next logical step here is someone creates a protocol that issues zero data expiry options on Fen stock that shares and then we run back turbo speaking briefly on like derivatives there have been derivatives that have been popping up around fence stock Tech the two major ones are Avo and Hyper liquid both of them have released friends perps which represents the total market cap of all of their profiles on friends.tech it hasn't been a huge amount of volume on Avo the 24 hour volume is 470 000 on hyper liquid the 24 hour volume is 3.6 million uh one has an open interest of 80 000 hyper liquid has an open interest
of 1.1 million but the demand too long is definitely there Evo has a one hour funding rate of 1.62 which equates to 14 000 annualized um same thing for hybrid liquid they have an annualized funding rate of five thousand six hundred percent so you are paying a hefty Hefty amount to go along right now however I I do think that it makes sense like I feel like friends I'll take will probably keep going for a bit more as long as you provide The Narrative of whatever like target audience they think is gonna come in onboard into fence attack so we'll see it seems like a relatively asymmetric trade like it seems like a
trade similar to if someone made a prep on like stablecoin market cap that should be like a no-brainer long over the long term it kind of feels like that um but yeah a positive someone else to talk about you know fractionalization bonding curves and where it might go from here I actually I think you need this super steep bonding curve to kick start things right because if Kobe was trading at like 10 or something this would have never gone anywhere and and you kind of need those like original big set of big numbers to like draw eyeballs and get that initial wave of attention mind you I definitely think you need to make it affordable for like nobody's but
I don't know not nobody but you know throwing two thousand dollars at this just to start playing is obviously not that uh lucrative or or engaging to most people uh so if you truly want a consume your app it just like needs the affordable entry barrier but that's been a notorious problem for almost every crypto game and I don't really know how to solve it because let's say you like either do fractional shares or you know you just flatten the curve extremely then that doesn't like price out whales because they just buy a larger number of of the underlying uh the units so it's still kind of hard to figure out a way where you can actually keep it affordable for new people to come in because you know let's say it only took 150 shares to hit two eth in the current uh bonding amm or the the bonding curve
well let's say you made that so it took a hundred thousand shares to get to two eth like if someone wanted to buy that much they still could so um I don't know I don't really know if there's a great solution there but that's definitely one issue that I think we need to keep kind of hacking away and solving it if you fractionalize the shares then you know wouldn't that person the Creator have to be like super super attentive to every single shareholder or like I don't even get what the argument is here to me the value of it is like being within a group of 100 people who can hit up Grace and Allen to like have a conversation you know what I mean like I feel like the value proposition at that point is completely ruined
I mean most people are going to be buying in fractionally to get exposure to the price they're not actually getting in a group chat so I think in order to do it I think that's a great point though and that if you were to fractionalize it like you'd need to have a full share at least to have access to the chat or whatever um so it allows for there to be a pricing of one share which prices you into a chat while also being able to buy like a fraction to get exposure to the price yeah this also doesn't feel that different from stock splits and Trad fire you know like most big tech companies once the stock which is a certain like ridiculous number like a thousand dollars they'll do like a six
to one or like one to six stock split uh like apple Disney all of the big companies have done that um but I do like the idea of like sure you can fractionalize it that makes it a lot easier for new participants to come in and buy shares but you still need to retain a certain amount in order to interact with the profile and I feel like there's actually a pretty good amount of customization that friend said could do there like letting the Creator or like the person choose what that number is whether that's like 0.1 if you're like not as big you're like a casual touch streamer or like 10 shares if you're like a superstar yeah no that I think that makes sense to
me um I think there's one also one narrative that kind of got misconstrued pretty quickly which was uh just the fact that somebody I think it was like bantag or whatever put like scraped a GitHub uh and put together a list of like Twitter account names linked with the funding address that got picked up by news media outlet and like circulated as oh there was a data privacy breach or something along these lines and uh that is just not what happened here and like honestly people that were taking the side uh of like oh this is like a doxing like what are you doing like you're kind of just exposing yourself for not really knowing uh how a transparent ledger blockchain works so if you fund an address with a different wallet that is
a transaction that appears on the blockchain and anybody can query at any point in time and there is forever into perpetuity as long as it's there's one ethereum node running evidence of this transaction um so it's not a it shouldn't come as too big of a surprise to anybody in the space that yes when you fund an address with another wallet people will find who that previous wallet was um so not totally surprising but for some reason that that did come up as a as a narrative but nonetheless I think there's actually two winners here uh ethereum itself and coinbase so ethereum itself is a little bit obvious but I know this was people using ethereum as money and even if you're denominating it in dollars at the end of the day the
transactional asset is still eth and this is again just putting another leg on the pedestal of the ethus money narrative and that's probably why eth is the has the value that it has it doesn't have to do anything with the profitability of its block space or things of that nature there's no DCF to run this job John charb likes to point out eth is a is be gradually becoming native internet money and that's there's a market for that and then coinbase as well they saw all this activity is happening on base their new L2 and I think that's just kind of got to get them excited if you're seeing this and you know I think they're what two a less than a month maybe three weeks into Unchained Summer and the the release of
this protocol um they gotta gotta be fired up to see this level of activity and being a consumer-based app right because eventually you got to think coinbase doesn't want to expand into more crypto natives but uh beyond that as well uh and actually right before this uh podcast so I I saw that coinbase just announced a minority stake in circle uh and they're going to be launching usdc on six additional chains uh you'd have to imagine that's Noble and base we'll be getting native usdc so expanding the coinbase Empire onto base and bringing more cash flows through those uh Reserve asset yields so pretty exciting for both ethereum and coinbase
yeah to add to your base optimism that's kind of a pun I didn't mean to do but there you go um I saw that uh bass actually surpassed arbitrum and optimism at Daily transactions just before we hopped on this call which is obviously I think like a a third to half of that transaction activity is friends.tech and I find it kind of ironic because they're doing this like on chain summer promotional movement and I don't think friends Tech was a part of that partnership correct me if I'm wrong but kind of cool to see like a Grassroots project actually take off like this for sure yeah just to add on to the data side of things um Tom Juan from 21 shares pointed out a pretty interesting metric uh arbitrum currently has a if penetration rate of
1.85 in terms of addresses that number is 1.15 for optimism that number is 0.25 for base um but if you look at how long it took each of these chains each of these chains to reach a 0.25 penetration it took average from nine months it took optimism eight months and it took base one month and I would argue market conditions are probably worse right now than when overtime and optimism first launched so it's pretty interesting to see these metrics is that metric the percentage of all ethereum addresses that have transacted on the L2
yeah number of addresses on ethereum that have transacted onto l2s yeah that's a cool stat Tom won the goat I think it's also important to note that in Q3 base has had 25 percent higher profit than arbitrum which has had I think like five percent more profit than optimism um so and that's mostly the result of uh low L1 costs uh in comparison to these other Roll-Ups and I think in the past couple days they've actually surpassed the the revenues like the transaction fees from our return optimism by like a large magnitude so definitely gaining a lot of
adoption and reaping the rewards just a quick note to go back to uh Dan's point on privacy just now I do think I have some slight privacy concerns with friends Altec considering the fact you know you need to put in your phone number to receive that 2fa code that that feels like a pretty big attack Vector especially if they're keeping these phone numbers and linking it to your profile um as soon solves are pretty common these days and the other thing is that it can tweet and comment from your Twitter account right um I feel like there is potential for some really bad things to happen there if for example like their friends Tech database or whatever server they use
gets hacked you know and suddenly you have every single one of the largest Twitter accounts and you have access to their accounts and you can tweet from them like you could cause some pretty serious Carnage there so I I would just be worried there yeah it's a good flag random you can actually revoke uh the Twitter permissions from Friends Tech and still use the app totally fine so yeah definitely good call out there and would recommend everyone doing that also we didn't share any details earlier on the the airdrop but basically it's a hundred million points that they say are going to be useful for something in the future and they're going to be distributed every Friday with the snapshot taken at Thursday at 11 59 PM UTC and like they're changing the
criteria every single week so it can't be gamed as easily and they're trying to encourage people to just use the platform as you should but again I think this is a great Testament to kind of taking a page from the the blur Playbook a little bit like incentivizing user Behavior honestly trying to get people to like break [ __ ] to be quite frankly and it's crypto native people so we're like used to terrible ux so maybe the argument and strategy here is they really just wanted to onboard us because we knew they knew we'd be super engaged in really good product testers and you know they're kind of getting the the application ready for for like mainstream usage in six months once they airdrop actually concludes so kind of an interesting strategy you know we're seeing people change up their airdrop formulas quite a bit since since blur
did their kind of mechanism a while back it's going back to another point in terms of winners I think one of the largest winners are the Mev Bots um these Bots have been sniping profile launches whenever like someone signs up so how it works is a Twitter user signs up and then as soon as that account is created and funded the Mev bot recognizes that and comes in before anyone else to buy and then after like a lot of people come in and buy because it's a big account it dumps on those buyers um looking at ax ASX and right now the largest Jada by P L is a sniping bot and he's generated
260 if in profits since launch so this guy is eating a lot um and then yeah apparently there was sort of like a quirk and basis sequencer that allowed this Mev bot to get the same block inclusion on new shares listed and apparently what happened is that the RPC provider for friend.tech was accidentally sharing their entire transaction for their mempool so you can pretty easily back on anyone else's new accounts and their shares in the same block they were created before anyone else yeah that's gonna have to get cleaned up for this to scale as well like that just feels like this dumb thing we have to
deal with but I think it was maybe fubaru tweeted this and they had a pretty decent way to at least patch some of it to some degree is like maybe for the first hour or first X time window uh wow right right after the account is created like only active Twitter followers can purchase the shares or something of that nature but definitely need to get some guard rails in place to prevent the botting of this for sure that's probably a good place to hang up the cleats and uh move on to our interview again we have a great great interview with with Felix from Cal swap today diving into the technical analysis of how that protocol works so without further Ado let's Dive Right In all right everyone we are joined today by Felix the technical lead at Cal protocol to jam on all things Cal protocol cow
swap Mev blocker uh and and the likes of the Mev the Dark Forest itself uh so Felix thanks a ton for joining us you know we tend to have a podcast that's like geared towards people that aren't aren't necessarily beginners it doesn't tend to be beginner friendly but given the the sub sector of crypto that you guys are operating within I do want to ask the question I hate the most of like can you quickly give us a like just a high level overview of what the what Coincidence of wants really are uh and what the Cal protocol is and how that kind of fits into cow swap itself the question was what are Coincidence of wants um basically a coincidence of want is an economic phenomenon where one party you would like to purchase an asset that another party wants to sell
and the other party wants to buy another asset that the first party wants to sell so we basically have this like Coincidence of people wanting the exact opposite of one another and the nice thing about this case is that those people can then trade directly with one another peer-to-peer rather than going through um either a medium of exchange such as such as money where maybe I sell my stuff for four dollars and then go to another store and buy the other thing for dollars or um in the crypto space also um you know liquidity providers amms anyone market makers that basically always provide a price for a good a um and of course take take some fee or some some some some spread for for that service
and how that ties into crypto or how that ties into to decentralized exchange exchanges in general is that um I would say maybe not the the primary um selling point of calcium which I would say is med protection but um one extra efficiency gain over some of the other solutions that are out there that are also trying to prevent um or mitigate Mev is that um you know on ethereum basically it becomes extremely cheap to create assets to create tokens um you might have you know your own project token or even the US dollar has been tokenized uh many many um many many times different tokens representing the exact same real world
asset and so this kind of Cambrian explosion of token space makes the liquidity the liquidity or the market in general very very fragmented so instead of having you know like in the traditional stock market where all your stocks are denominated in USD you on ethereum have some markets that are primarily denominated in each maybe some others in UCC maybe some are just in usct there is no common numerator and so you you have this like explosion of different markets and in order to create liquidity between all different token pairs you need these market makers that step in or amms that step in and provide stupidity however if you can take a holistic approach and let's say you know once per block get the entire um I guess preference expression of of
the world I would like to buy this for that I would like to buy this for that what you can actually do you can aggregate re-aggregate that fragmented liquidity space and find those Coincidence of ones so let's say um I want to buy you know some Euro stablecoin for a dollar stable coin and Sam wants to buy some you know Bitcoin where Bitcoin for for the dollar stable coin and maybe then you want to buy the Euro stable coin with with Bitcoin then you know even though there is no you know we in in the traditional world right now we would have to go to an amm and then each of us do that trade individually but um in a perfect Coincidence of world or barter economy or it's also sometimes called this uh we can actually trade peer-to-peer directly with one another and and in that case we
save of course the the spread that the market maker charges we save also on gas fees for updating the amms three times and then most importantly we also don't fall back to some of the other drawbacks that amms have namely maximum extractable value Mev and and basically the the problem of setting the correct slippage and not getting front run or sandwiched by these Nanobots so how they are called okay yeah and I feel like what ties closely to that is uh the concept of batch auctions and Cal swap can you kind of explain how those work and maybe it'd be helpful to walk through you know what a traditional transaction looks like for a Trader on uniswap versus someone using cow swap yeah for sure so um I mean and maybe
I'll talk about uni swap the the traditional version not not necessarily swap X which has been recently announced we can then also go a little bit into more detail on like what is the difference between those two models but traditionally if you want to trade token a for token B on ethereum you to go directly to an amm interface or maybe to a deck aggregator such as fire swap one inch for example and um say I wanted to sell token a for token B and and the the algorithm will find you the best on-chain route for your trade and we'll basically give you back a transaction that you with your metamask account will submit to to the blockchain to execute that trade now there is this asynchronous aspect to
you receiving the optimal route from whatever API you're using and you actually sending that transaction into the mempool and then that transaction getting mined and during that time prices can change and and um because of that you know either you are willing to um you know if your route is no longer available you might be willing to take that that failed transaction cost and and eat the loss and basically try again or you're actually saying well I'm fine if the price moves 0.5 against me I still want to make this trade but the key part is you commit to a specific route a specific execution path and you own the trade execution now in Koh swap um what you do is you simply sign a trade intent an off-chain message that says I want to sell token a for token B
and here's my limit price but I don't care exactly how it is executed I don't care if you wrote it through uni swap or to balancer or through Sushi swap um just you know my intent is trade token 84 token B and then you hand off that intent to a decentralized network of matching engines or how we call them solvers that compete for finding the best concrete execution path for you at the time that um you know your order is being made valid and to the point of batch auctions um you know one thing to create these Coincidence of ones um we basically don't have everybody trade individually by themselves but we aggregate you know for now um every 30 seconds roughly um trades are being you
know all the trades that are placed into the API within a 30 second window roughly are placed into the same batch down you know longer term down the line we want to have one batch per block so you know everything that happened in the last 12 seconds before the last block was after the last block was emitted uh basically becomes available for solvers to compete for in the batch option for the next book um and yeah so solvers basically find a solution to that batch of orders and the solver that is able to solve the batch optimally and we can talk a little bit about how optimalities is derived but basically it's price Improvement on your limit price receives the right to execute the batch um and also the you know that privilege
also comes with the responsibility of executing the batch so that solver that won the auction competition has committed to a price that it is able to give to the user um on chain and so everything comes to slippage tolerance comes to um you know revert costs all these kind of risks these complexities of managing your own transaction are now taken care of by a professional entity who um you know is much more like a you know Mev bot or Searcher uh capable of foreseeing price changes capable of knowing you know maybe what's happening on binance at the same time and and so can you know take care of these complexities much better than the average user can now this is getting fun because there's a lot to unpack here so uh you mentioned that you know your work solvers are
working to create or like Define Optima like how is uh the optimal solution defined here because that's ultimately what determines which swaps will get filled so let's dive a little deeper there like how can you uh what conditions need to be met that are create this optimal uh the optimal batch yeah so um basically what users place in the in the in the batch auction are just plain old limit orders and so limit order has a limit price and so that limit price is a hard guarantee that is enforced by the settlement contract um you know the system is not able to match your trade at a price that is worse worse than your limit price and that's kind of similar to when you trade on uni swap directly and you set a slippage tolerance and then an Med bot sandwiches you and basically exhausts your slippage
tolerance and you get um traded exactly at your at your limit price now the the thing on top the price Improvement on top of your limit price is what we call Surplus and surplus is basically what what solver is optimized for um and so if I am a malicious or you know somewhat you know ex value extracting solver and I want to settle you at the limit price okay I can submit a proposal for this batch that settles you at your limit price but another solver that proposes a solution with price Improvement will automatically score higher in the ranking criteria than the initial solver and the protocol will basically Grant the right to execute the the batch eventually to the highest bidding
um solver and so that option competition ensures that your limit price is not just kind of a worse price guarantee but it's also something that you know then has this incentive to be approved upon and and whatever party improves upon the most gets the right to fill you and so how is the so like this sounds a lot like the traditional Mev boost auction right where Builders are working to solve uh transactions for the proposers um and so what is the incentive for these solvers in this case like are they taking a portion of the Surplus um yeah so I think you know one thing that's actually interesting when we compare the system to Mev boost is um so so maybe
one thing that I actually didn't mention about batch auctions is that um if there's two people trading the same asset in the same batch so let's say I'm selling either for UCC and then you're selling either for usdc then the protocol enforces that there is only one price per token per batch so if we end up in the same batch we get cleared and we trade the same asset we get cleared at exactly the same price there's no concept of maybe you placed your order before mine or you know you know there's no concept of first come first served or some kind of ordering Fair ordering there's just you know uniform price clearing one price per token per batch and kind of what that achieves is it at least in our mind removes um all kinds of Med because if you think about what
is the highest paying Block in Mev boost or what is kind of what are the things that that currently Builders and Searchers optimize for is to create as much price difference as possible for the same asset within the same block because that ultimately allows the Searcher or Builder to buy the asset at the lowest price and sell it at the highest price and basically therefore make this risk-free um you know intra block profit and so in a way Searchers and solvers actually solve a somewhat similar problem but the outcome is actually completely the opposite if you're really good at solving the um the Mev boost or the PBS problem you will you'll create blocks where um you're for the same asset you'll have prices you know diverging one two three percent as
much as you can whereas on Cal swap if there's two people trading the same asset you actually need to have a uniform price clearing so no no difference between between buy and asks and so yes while the optimization problem is somewhat similar the outcome is actually completely the opposite and it leads to the fact that um unsophisticated users that don't know how to maybe you know boost their way and and get priority over others um transactions in this pseudo first come first served mechanism that is currently the public mempool which you know of course is not first come first served because you can just outbid other people but the least you know very very few people actually know how to do this this properly and so the the cow swap mechanism allows allows you to be protected uh despite you know and not
having to worry about all these games that are being played in the dark force in the in the in the mempool right now interesting yeah I like that comparison that you made there Dan with Med boost but it's ironic that you get exactly the opposite outcome like you mentioned Felix but so it sounds like you need a very competitive solver Market in order for this to probably work at its best so how does that look today is it permissionless to join the solver Network like what kind of expertise do you need yeah so um and actually then I didn't answer your question what are the incentives for the solvers right um and so in it's very purest form the mechanism allows solvers to take a cut from the uh you know optimal route that they find and basically they just
compete on who takes the lowest cut in the end um so you know if I were a private Market maker and I can buy ether on binance for uh for nineteen hundred dollars then maybe I sell it to you for 1900 and one dollar and make one dollar profit and as long as no other solver sells it for 1900 to you then I win and I can make this profit so there is like this aspect of you know potentially and its purest form of race to the bottom but it is specifically to bootstrap the solver Network and solver competition and you know now maybe with one inch fusion and unisobex a lot more participants are moving into the space but when we came out two years ago we really had to like think about okay this is chicken and egg problem how do we bootstrap that decentralized network of
matching engines um is basically what we what what the the Cal protocol token was was partially used for and we created this competition with a reward and basically solvers receive cow tokens for um yeah performing the task of finding the best solution and yeah we've strapped a network of I think today we're 15 16 solvers um which is which is quite quite good um and you know now of course with other participants entering the space we're also are thinking about maybe this mechanism needs to be changed or Revisited or maybe been reversed maybe there's even you know the the non-toxicity of the flow that goes off the tracks might make it actually worthwhile for solvers to pay the protocol
um for getting access to that order flow rather than being paid by the protocol or you know maybe some hybrid mechanism similar to eip1559 where in uh times of high demand ethereum is deflationary and then times of low demand it's inflationary so yeah we're still working on the tokenomics there but um roughly that is that is the idea on how to um yeah develop that that Network on how we put strapped it in the first place okay super interesting and I'm curious like in your mind what makes like uh they what what type of candidate is like an excellent person or entity to come be a solver is it somebody with like maybe a ton of order flows to say a DEX aggregator that didn't want to like get into this game like you mentioned Duty
swap X and uh at one inch Fusion are kind of pushing this direction but if there was another deck side guy like hey like maybe we just go run a solver on Cal swap like would that be beneficial if they're coming with this order flow Yeah we actually had a solver team which had a very good algorithm to um you know solve the optimal routing problem for all types of of um I can't make Security on on ethereum and they were thinking about creating a tax aggregator or becoming a solver and basically the advantage is you don't have to worry about the end user and user experience and building a product a front-end which is a very different job actually to being a very efficient routing or matching engine and so that team you know tapped into a cow protocol became a solver and and basically
received a lot of volume from from day one and and you know is basically now expanding to of course other other protocols as well but yeah was was basically able to to create a fully working product and business without having to worry about the um the end user and and product experience and user experience and so if you ask me kind of what is the the qualities you need I would say you know we're still figuring out kind of how to make the most of the complementaries um of the different skill sets that are needed and right now I would say you need you need kind of three three skill sets um one is an excellent knowledge of on-chain liquidity as a way to model all the different liquidity sources on chain maybe curve made uni swap maybe whatever next amm
comes out in the next couple of months and be fast at integrating those and routing optimally through the on-chain liquidity uh you also should have at least some connections or maybe even be a market maker yourself to access off-chain liquidity and you know centralized exchange liquidity maybe liquidity from other chains like Layer Two so that you can Bridge liquidity into that into that batch auction that you can Source from from other venues in order to be competitive and then at the end of the day you also should be quite knowledgeable about the um yeah well transaction life cycle and and um basically how to make sure that you set your slippage tolerance correctly maybe predict what will be the price impact on the top pools given the action that you see in the real world in the
last five six seven seconds um so having kind of that predictive uh knowledge so that you don't get your slippage tolerance exhausted and then basically yourself front run by by other bots in the system um is quite is quite important um so so what we've seen in the past is actually you know Searchers or um participants that run that run search robot operations um also do quite well in in running solvers yeah because the skill set is quite quite similar okay that makes that makes a ton of sense here and so I'm curious if I'm a solver and I create the solved route for a specific batch do I have the ability to include my own transactions in that batch because I could see a world where you could you know create this uh solved
path and then maybe there's like a background potential there um so you can include your own liquidity into your Solutions yes um private liquidity from the solver however those orders don't count as you know native Council borders so they they will not contribute to the optimization criteria so if you are sending an order on your behalf Into Your solution it doesn't count towards the the Surplus that is being computed basically the assumption is that only orders that every solver has seen and for that you know the system also relies on some data availability guarantees basically we need to have a canonical view of what is the batch and only the orders that are in the
batch visible to everyone um do contribute in the end to to that Surplus to the optimization Criterion so you can improve prices but you have to improve the prices you know for the user if you improve prices for yourself it doesn't really um make a difference in the competition okay that seems like a good protection mechanism and then you also earlier mentioned that currently the batches are running every 30 seconds or so but you want to try to Trend that down towards every block what's the barrier there like how do you get from the current state to that end state um a lot of it is a lot of it's actually technical depth in our in our infrastructure just right now um the way that you know the solvers have evolved from the very early days where
um we implemented a bunch of you know Baseline um you know text aggregator solver and then gnosis once we spawn out of nurses continue to to run those um has just you know caused a bunch of uh overhead in in when it comes to assembling the auction and then in the beginning we always thought like 30 seconds is actually fine because we want to increase the chances for these Coincidence of ones the longer we wait um the more likelihood they are of multiple orders ending up in the same batch and thus getting these like positive Network effects but we um I mean we realized pretty quickly that users are actually you know at least they want to have the choice they're quite they're quite annoyed by the the time that khalsop takes um for them to have the happy moose sound to basically
get their order um traded and and so we definitely want to move down to a one batch per block model and then potentially have order types where the user can say you know please don't match me against unchain liquidity um just leave me in there until a coincidence of once appears I'm not you know I'm not time sensitive I have like stablecoin stable coin swap that you know I'm fine if it takes 24 hours to match um but yeah so so you know I think technically just uh speeding up both the expectations on the solver side so you know some of the solvers run algorithms that don't really run well in in you know less than let's say five seconds or less than a second even although clearly it's possible looking at um Builder and Searcher algorithms to solve this problem in sub-seconds
um it's just like yeah some some something that hasn't been quite prioritized yet um but yeah we hope to get there soon so I saw you tweet a couple days ago that you think a lot of Mev problems can be solved with the application layer can you kind of peel that back an extra layer and explain why and maybe dive a little bit into uh Mev blocker when we look at kind of the most commonly talked about solution to Mev um I think you know coming from that which is coming from flashbots and you know the team has done tremendous work on Illuminating people and educating people about the problem for seeing the negative externalities and and building tools to you know at least for the excellent external externality circumvent those I think you know what what this did to the extraction itself
was probably um you know bad for the user but you know at least for the network it it it did reduce the the the other problems we would otherwise had um but but basically their focus is on building an extra Communication channel between the user the basically person owning the transaction or owning the um ultimately with Suave maybe also the intent and the validator that is actually responsible for creating the block and having a richer expression language for like you know what what the optimal block looks like rather than just this priority uh first price gas auction that that we used to have um but then if you think about where Mev actually comes from where it stems from I think it really uh stems from the
application layer and and I don't you know want to be judgmental towards towards the the uni swap mechanism but um you know at gnosis back in the day when we are looking into prediction markets we were also thinking about you know modeling markets between different outcome tokens via constant product formula and one of the things we saw was that well okay if you have um this mechanism and there's multiple trades happening in the same block then the ordering of those trades matters and as the the validator you have the ultimate control over this ordering and so you can take advantage of of of of the trades and manipulate prices and so for us it was like well you know this is not a mechanism that will be long-term sustainable and so then noses went into Dutch options and later on batch
auctions which is like how protocol um came out of but you know user is a great invention and solved a lot of problems but basically that mechanism in itself is flawed and that depth is creating the Meb and we think that you know by just having a single price per token per block and building an exchange that enforces you know at least for your exchange there's only one price per token per block you can reduce a ton of Meb um the other type of Mev that's that's currently very much um discussed is lvr loss versus rebalancing basically liquidity providers that are um trading at sale prices and getting run over by our Bots that are just equilibrating the the prices they see on binance and and therefore in you know causing a loss at
least versus um if if that liquidity provider was to implement that strategy kind of off chain themselves can also be solved by you know having one price per token per block if we can get the amms to trade as part of the batch and have them accrue Surplus just like user trades do and there will just be a single equilibrium price per token and that equilibrium price will be what the new current you know the up-to-date binance prices and not what the binance price was 12 seconds ago and the other main source for Mev I think is liquidations when uh you know some collateralized step position runs underwater then it needs to be liquidated that in and of itself is also can be modeled as a stop loss order um you know of course you need then a
reliable either Oracle or like understanding what the current price is but assuming 90 of all decks trading volume would be handled through a batch auction that settles with a uniform price clearing then that uniform clearing price could also signal that a loan is underwater needs to be um liquidated and therefore becomes liquidatable in that same batch and so you know lbr liquid um liquidations and and swap Mev for me can all be solved with um with this this type of mechanism and if we look then at what's left there I think you know there's of course still still a bunch of other sources of Med but really most of them I think can be can be can be solved by rethinking the mechanism and and
building a adapt that is not exposing this kind of extractable value and then the question is what do we really need to solve at the infrastructure layer right why do we need this extra Communication channel if it's really just for I guess you know front running a hack or some other you know very exotic types of of uh me I want to give a quick shout out to hexins as we explore today's blockchain landscape let's take a moment to recognize them as a premier cyber security provider in web 3. hexins is trusted by tier one projects like polygon including a Security review on their new polygon ZK evm mantle risk zero Lido one inch new bank and more get a deep dive into your technology stack with the most comprehensive analysis in cyber security Consulting hexins not
only uses widely known methodologies and flows but discovers and introduces new ones on a day-to-day basis with over 55 billion dollars secured they cover everything from Smart contracts to blockchain to web 2 pen tests yeah there's been nearly seven billion dollars of total value hacked in crypto's nation history so it's safe to say your team has a lot on the line don't skimp out take your security seriously and reach out to hexins don't forget to mention Xerox research for a free web 2 pen test with your partnership and reach out to hexins at hexins.io find them in the links in the show notes or reach out to them at permissionless they'll be at Booth 832 but without further Ado let's get back to today's episode okay and one of the things you mentioned there was sort of
that core principle of one price per token per block and can you I know you guys recently put out a research paper on this so I'm curious like what were the key findings like is it truly possible to build that amm that has this as a core principle and like why exactly does that uh reduce the lvr experience by LPS like I'm not sure I'm following there yeah and of course yeah sorry um let me try to back up a little bit um so the the reason that lvr basically is created or or comes comes into play is that um we only get a new ethereum block every 12 seconds and so at the end of each block once the last transaction is is included we can assume that right now
the state of all the amms on ethereum is perfectly in equilibrium with the outside state of the world right like if the price of ether is 1900 on finance then the price of either will be 1900 plus minus LP fees and gas costs but yeah let's assume no friction will be pretty much 1900 on ethereum as well but then 12 seconds pass and in those 12 seconds a lot can happen in the real world so maybe the price of binance goes up to 1905 is there some big news incorporated or even if it just goes up by one percent that might already be significant and create an Arbitrage opportunity on chain and now all those LPS are still the next block is mined and all those LPS are still stuck at the old price at 1900.
um and so me as a block Builder as a validator Whoever has control over the first transaction that gets included in the next block is actually able to access that liquidity at the old outdated stale price and move it to the new let's say binance um uh yeah by binance authored fair price of ether and so if the price moves from 1900 to 1910 let's say my uh the average price that I pay as an arbitrary roughly is 1995 on on a uni swap mm so I'm making um compared to binance I make a five dollar profit and of course in order to get that first slot I need to probably pay 99 if not
more of my profit to the validator to actually give me that slot the first the first uh the first slot in the in the block um but yeah long story short is that the the lp basically traded at 1905 although it was pretty clear that the fair price was 1910 so the lp lost five dollars the arbitrager made like the pennies and the validator got a lot of money because it was able to auction off the first slot profitably now if we assume that every token just has one price per block and that price reflects the entire or at least you know the majority of the on-chain demand and supply for that token in that block we could build an amm that doesn't trade
at the average price or according to its uh x times y equals K curve but instead also trades at the uniform clearance price and so if the batch auction decides that the fair price in our new block was 1910 then the amm would also only be willing to trade at 1910. and so even in the complete absence of any other Traders an arbitrageur would then be able to go in and say you know okay I want to trade against this amm and and so basically the amm is willing to trade anywhere between 1900 and 1910 but the way that you decide who gets to trade against the amm is not by who comes first but by who creates the highest Improvement price
improvement over the the uh the minimum price the the amm is willing to accept 1900 or then on average it would be 19005 of course but basically if an arbitruser comes in and says I want to trade against the am at 196 that's fine they can do it and another arbitrator can come in and say I want to trade at 197 that's fine they get priority because you know in car protocol we don't prioritize by who gets first but by who does the most price Improvement and so again in equilibrium arbitrators will bid themselves up maybe to 1909 and 99 Cents but the difference being the arbitrager still makes one cent nothing changed there the difference being that now no longer the validator gets the 4.99 of bribe but instead that price Improvement is forwarded to the liquidity provider the passive amm that
before was being value extracted so you know again we have the shift from value from the validators whose job is just to secure the chain and and propose blocks to the actual you know true and then at least in our minds true um beneficiary of that value or swaps it's the user for liquidity provision it's the um the lp provider and that that yeah that kind of is the the core idea of um building cow native amms into the batch auction that was an excellent description I really appreciate the depth there and so if this seems this to me seems like a very very intriguing solution uh my question is how does the how is the amm price aware of the auction like what is the connection between uh the amms like I like the input that actually goes into the
formula there and like how the auction like I guess pushes that message to the amm yeah so you model the amm basically just like another cow swap user or Trader that has a limit order but it's not a set function limit order it's basically an x times y equals K curved limit order so the amm says I'm willing to but you know and my current price is uh 1900 and for every amount I can tell you what price I'm willing you know how much for every amount out I'm uh I I tell you how much in I I want to receive so so basically I I can follow I can model my curve as a as basically a a convex limit order in a way like not a step function I want to trade 100 for you know five but it's more like if you
give me this I give you that and so this is what the amm gets modeled into the system and then it just enters into the batch as a regular participant where solvers are maximizing price Improvement and so sure I can match them at their limit price but as long as there's one honest solver that's trying to improve the price they will have an advantage over the remaining solvers and so in you know in equilibrium we end up shifting that Arbitrage value that is currently bid for the first slot to price Improvement that gets distributed to the um amm okay now this is getting even more interesting so I'm curious if you guys have built this in like a test environment or if this was something we can expect to see a launch later you
know sometime next year yeah so we are a small team and you know we already talked about one batch for block and and you know kind of the the resource constraints that we have and the technology that we have on that front so it's something that we're extremely excited about um we are we've published a research paper we've run some back tests we you know would like to um uh yeah look further into this and and build it out I think we're um currently talking to um at least one team more closely and so maybe to maybe help building this out I think you know building an amm is a lot more to it than than just inventing the the mechanism I think we can provide the batch part we can provide the contact solvers and also um talk you know have an idea of how to
solve the the mathematical problem in in some sense and give guidance there but really building a proper amm product with deposits and you know withdrawals and all the experience that goes into that is at least right now something that we're still looking for some help for but yeah I mean we are quite I I yeah we think this is a this is a promising idea and and basically looking to to to make it a reality but um yeah I can't commit to it right now yeah you can't do everything yourself in crypto you'd get spread incredibly thin if you tried but that's super exciting I did want to switch gears a little bit and just get your take on unit swap backs I mean you guys have been working on similar things for quite some time and I feel like you guys got some positive you know confirmation uh with
you know their V4 strategy I I first and foremost think it's it's great validation and and something that we've been um yeah talking for I think two years about that you know users should not send raw transactions to the public mempool that is something that is too complicated for the average user to to manage to deal with users should send trade intents and then we should have professional entities that compete for fulfilling those intents and find the best execution for users and seeing both one engine uni swap enter that game I think is is huge validation and a sign how um you know how how good of an also you know Innovation Department we we have and and now I think it's it's uh up to us to keep pushing the envelope and keep
keep innovating I think the user experience is very similar um of course you don't have the the moose sound if you trade on any swap but you're signing a message and you know you have like some mechanism that um at least and Theory guarantees you pretty good execution and I think where the two mechanisms then differ a lot is that uniswap X's Dutch order approach is I think quite good for mitigating Mev for every individual order in that it basically makes your slippage tolerance adaptable over time so the the problem like where most of the at least sandwiching or swap Mev comes from is that you know I ethereum is asynchronous
so prices might change between the time that I send a transaction out and the transaction getting mine so you know either I want my transaction to fail or I say I'm okay with some price change but um you know usually I have to say up front I'm okay with X percent price change and then you know what will that magically happen thanks to Mev is that full X percent will be exhausted and so units of X now said okay instead of defining a full X percent slippage tolerance you know from day from from zero seconds onwards um let's have an incremental service children's so you start with a price that's maybe you know at what you would expect or even slightly above what you would expect and then that price decays over time down to your maximum slippage tolerance and so as soon as some
are they called filler or some solver or some some Searcher is able to actually give you that price you know maybe pocketing a little bit of of value on their end they have an incentive to go ahead and and fill your order rather than waking everyone would have to collude to basically wait for your maximum slippage children's to be reached and then being able to extract you so it's it's a nice mechanism to to protect each and individual's users slippage tolerance the the problem with the mechanism is that it has very limited upside in that even if the price changes between blocks and you know becomes more favorable for you there's no incentive for the filler to pass any of that price Improvement onto the user
so um assume you know your current uh Dutch Dutch order price is 1902 and in the next book it will be 1901 and the price on binance goes from 1900 to 1910. then in the next block filler will come and fill you but they will fill you at 1901 even though the fair price uh would have been 1910. in cow stuff we have this mechanism where if some solver was willing to give you 19 8 1989 or even 1910 they would have won and have this incentive to to improve the price for you in uni swap X there's then still those raids whoever gets in first whoever bribes the validated the most to match you at 1901 uh we'll get the right to do so um so you have limited upside and then due to the lack of batching or even I think the the protocol theoretically
would allow a filler to to settle two orders in the same transaction if I if I read the contracts correctly but um due to just the fact that every order is on their individual price curve you don't have this concept of uniform price clearing you don't have this uh concept of you know matching people directly um peer-to-peer and aggregating demand and supply and so in a hyper tokenized world with fragmented liquidity um I think we will see batch auctions um you know play out another advantage over this mechanism and yeah it's basically now up to us to to demonstrate and show how for example with amms maybe liquidations we leave that concept of having one price per token per block um gives significantly more Meb protection than
um than just individual Dutch Dutch Dutch orders per trade I want to get your take here on a slightly different question on the same topic and you know when it comes to these order flow auctions what matters more is it the underlying Tech or is it the protocol branding because you know for example I think uh one inch has a lot less robust of a OFA than than cow swap yet it does see a significant amount of volume so I'm curious like how do you think about the trade-off there between the tech and The Branding itself yeah I mean I'm a I'm a technologist I I'm I'm probably overly naive overthinking if you build a better mechanism they will come the last the last two and a half years uh taught us otherwise like it's not just enough to uh to have a better mechanism or to you
know even have a good mechanism uh people were coming to God so but if you you know at conferences when we talk to people they they say like you know the most differentiating factor is the moo sound and and that that the UI looks super cool and yeah that's the market the market tells you what what the market wants um but uh yeah so branding um having that direct contact with the end user I think is is extremely um important for a product to be successful I think also the first mover Advantage we noticed that with math blocker quite significantly if you're the first product in the space you have um a certain advantage and then even if you change your mechanism later on to to adopt the mechanism that you see somewhere else that that might be working better and you then have kind of
that user base that is loyal to your brand loyal to your product and and I think at cow swap we still have to do a better job at really highlighting what are the key differentiating factors and why users should care and why they matter um but given the state of crypto right now branding um and convenience is definitely quite important but my hope is you know in the long run if we want crypto to grow another 10 or 100x um the better the better Tech will win I I tend to think that that last statement there is quite correct and we I think we over index on the importance of today's branding in our industry given how nascent it is and it's like okay well if we are 100x the amount of people that come into this
space uh are they all still going to go hit the uni swap front end like it's like I would tend to think not and that these like better solutions that now exist I kind of tend to capture some of that flow um but yeah it'll be interesting to see how that that Dynamic kind of spins out um but one of the other things uh kind of you know in the same realm that I wanted to hit on uh was just like the idea of the post swap hooks that are the cow hooks that that you guys have um created that's kind of gives the ability to do more than just swaps and is like what's next on the roadmap is it just continued building in that direction yeah so for cow hooks this was actually one one feature that we launched without a clear like it's a
protocol feature we launched without a very clear vision of what will be the first user-facing product to incorporate it and the idea really was that well right now the intents that users Express when they trade on car swap is a swap limit order but what if you're what if we can upgrade that intent expression language to do X then swap then do y so really having like a pre hook or a pre interaction then have your Swap and then have a post token a post interaction and just some ideas that we are looking into is well as a pre-interaction you could for example set in set set a gasless approval so for permittable tokens you could just in time
um basically then mine the the the approval before just before you trade you could unstake a token and I think there are some tokens where you first need you cannot really swap the staked version of it you first need to unstake it but then you can swap the unstaked version and restake immediately so you know theoretically you could just unstick swap restake in in a single transaction and then never have to um you know do those those steps separately I think bridging to another chain is also a very common thing that people do after a swap and so theoretically what these hooks allow you to do is say Okay I want to trade on mainnet but I want to have my proceeds on gnosis chain or in polygon or some other L2 and then um your Swap and Bridge kind of atomically in in the same transaction and the nice
thing is that you only pay gas again you only pay for that that interaction once your trade goes through you don't have to worry about um failed transactions or managing gas like you don't pay any pay in the cell token that that you're swapping with um so you know if if you have a new address and you for example and get allocated a token uh airdrop or maybe you have an old address that you already wiped and then you get like some retractive airdrop there you can you know in in theory now claim approve Swap and Bridge the proceeds somewhere else uh in one Atomic intent without needing to have any use on that on that on that account um so yeah that's on the protocol side
kind of what is possible with it on the Cal swap UI side I think things will see quite soonish is yeah the option to to gases we approve tokens and I think we're also experimenting with some bridging Solutions so maybe we'll see a way of of bridging proceeds to another chain kind of as part of the UI and but yeah we also have a grants program so for any ideas can anybody whether wants to build on top of the protocol may be on the amm side maybe on the hook side we are definitely um sponsoring teams individuals projects that they want to build on top of car swap and and really I think for Hope specifically the um the possibilities are endless and there's a lot of really cool things you can build with it nice yeah that's a good call out too we'll be sure to link
to that in the show notes we'll get it from you after the after the call but I did want to get your take too on just um the Dow to Dow side of using cow swap I know you guys have had some success there so I was hoping you could shed some light and maybe some of the other use cases that you've thought of yeah so for Dao specifically um you know one thing that that dials have have trouble with is that coupling of here's a trade I want to do and now and then you know sometime later I'm going to do that trade um so so I mean if you look at most Styles they they have they create a proposal okay we want to diversify our treasury we're going to do this trade and then there's a discussion on the on the on the proposal and then yeah maybe
somebody proposes a transaction a concrete transaction so they might go to I don't know one inch and say like okay you know what's the best way to convert eth into a steak ether right now or you know some stable coin for diversification and you know then there's a route okay cool let's use that route and then they propose the transaction and have the Dow vote on it and depending on the Dow voting periods might last from a day to a week um and so the price and probably also for sure the route and and very likely also the price will have changed and and so the Dow is really in a in a difficult situation that they can't really set you know what what slippage tolerance are they going to set um what will be the price of ether for example in a week from now nobody really
knows and if you said 10 to the which tolerance and the price goes you know five percent in your favor you can be sure that some Mev bot will will eat the entire 15 away from you so really like this this intent expression Paradigm that we introduced we thought is particularly powerful where this where there's this disconnect between having the intent and executing the intent um so another use case for that is multi-signature wallets if you have a safe or some other um some other smart contract wallet with multiple signers you know you might be sitting even if it's if it's your phone and your laptop you know it might take you a couple of minutes to to go from your phone to your laptop or you know if you're in a team setup it might take a couple of um minutes or even hours for
your other signers to wake up and sign that transaction you know the the optimal route between you proposing the transaction and then the transaction ending up on chain is huge and and things change in the time so it's much more powerful to just set an intent um basically say I want to trade that token for that other token have a um uh reasonable guarantee that you get best price execution so this mechanism that that improves um basically tries to get as much Surplus for you as possible so you can set a slippage tolerance that's actually um reasonable for Dao specifically we even had a grant proposal that introduced another module which can do a just-in-time Oracle check so if you really want to make a trade in a week in the future and you're not comfortable
setting a 20 30 slipper children's there is a technical solution to that as well called Milkman um but yeah basically this this the asynchronicity of somebody wanting to make a trade and the trade actually happening is where cow swap's intent mechanism really comes uh to play and I know I on that same note I know curve and yearn both use cow swap for like processing their harvests and fee collections is that something that they do through Mev blocker the RPC endpoint no so the um I think yarn pioneered it on um on on cloud protocol um yeah basically uh the end curve is now following Suite um yeah basically protocols can pretty permissionlessly place these types of
orders that and especially if the amounts are are relatively small there is um you know off-chain bonds that that solvers are posting in order to make sure that they're not misbehaving and so so we have like some some other soft guarantees on on best price execution which we sometimes refer to as ebbo so the whatever is the best price that can be seen on on ethereum's public liquidity so looking at balancer looking at Sushi swap you need Swap and curve although curve I think right now is not part of the ebbo star definition solvers are not allowed to to match you at a price that's worse than that and so what these product what these these dials can do is really like post limit orders that
say okay I just want to sell this token and just give me whatever the best prices for it and it really allows you to automate um the the fee harvesting process and and make it completely permissionless in in that you know anyone can trigger the Harvest it would create an order on cow swap um and then there's like this this smart order type which you know it might be uh going a little bit more too far here but um we uh we allow like a smart contract this goes a little bit back into the amm discussion we had earlier um so smart contracts can place regular limit orders just like a for B at this price but theoretically smart contracts can also place um arbitrary complex expressions of um you know I always want to have 50 of my
balance and that token and 50 of my balance in that token um and then solvers that know about the smart contract can basically use ERC 1271 so smart contract signature verification to then um issue trades on behalf of that smart contract so if it sees that a smart contract is basically imbalanced solver can say oh I know that the smart contract would like to trade and basically initiate the rebounds or initiate the the fee Harvest uh on behalf of um on behalf of of that smart contract and so you can really build completely autonomous trading agents which run um without any input from external Bots or or you know what in the past you
might have used Searchers for and put like some Mev bounty on it if you trigger this transaction then you know I'll pay you some some some uh some reward and then some Meb block will pick it up and but basically with Cal swap you can both benefit from you know best price execution as well as having this competition on what is the least amount of bribe I need to pay to um to get this straight through and and therefore have fully autonomous systems at the best possible price that's incredible yeah I loved your your viewpoints there as well and so it's cool to see that data-da relationship you know I think we should hopeful be hopeful that that continues to to grow out into the future um yeah no that's great to see and so when I it comes to maybe a bit more of a
random question here but there was a recent governance proposal cip28 to move 450 eth to the so the cow treasury core unit to earn yield what are your thoughts around treasury management as a dow and like how you have to you know manage that as um to keep the continuation of the protocol going so right now we're partnering with kapatki it was also a noses spin-off for uh treasury management and I think this works well for active treasury management so um when you know basically you're chasing you're chasing yields uh you you know the cover team is extremely reliable professional and and technically knowledgeable so it's really um you know it's an absolute pleasure to work with them
um long term I think there's certain Dow treasury operations that I would like to see more increasingly moving into these kind of autonomous smart orders as as we like to call them so not your active treasury management where you're chasing the the most safe and yet uh profitable yield I think those you know will will also still be used by or executed by professional treasury management companies but um you know if you if you want to have a certain diversification between different stable coins or different liquid staking token derivatives then you can express those as as smart orders and then basically have how protocol take care of that rebalancing for you
um and yeah I mean I think right now we're still more in the kind of active phase and and you know want to make sure that we generate as much revenue as possible also from the uh from the treasury but um I would assume us to also Pioneer and and build some proof of Concepts on how a completely passive autonomous um treasury management solution could look like yeah we are certainly in the early Innings of of daos that's that's for sure just go on any forum and you can see it pretty easily but uh Felix this has been a fantastic conversation thanks so much for for joining us do you want to share with the the people who are where where they can find you to learn more about COs Swap and you know Cal protocol in general yeah so um I mean cow dot Phi is our is our
landing page subtle Cloud advice is the user interface that is mostly used for for connecting to code protocol it's the one that has the happy moo at the end of your trade and um yeah I mean we are on we have a big Discord Community we're quite active as well I myself um F Liverpool that at Twitter on Twitter and we have at Cal Swap and at math Blocker on Twitter as well and yeah we're also going to a lot of ethereum conferences hackathons so um yeah always happy to to connect to to the community and then also to builders and then convince people to build more on on batch auctions with uniform price game yeah you guys are building some great things as well so uh yeah if there's a builder out there I hope we can connect someone to you
because I want to see a lot of these things in production so we'll be sure to include that link in the show notes as long as the other links you mentioned but thanks again Felix this is a great discussion [Music]