New Ethereum talks, every Monday. The week's conference uploads by event, in your inbox.

Loading player…

Why All DAOs Should Use CowSwap and How to Use it Anna George

Ethereum DenverSun, Oct 9, 2022, 12:00 AM

Transcript

welcome everyone to this talk and thank you so much for the lovely introduction um so that's actually true we have been spinning out of gnosis last week so our project is in a way one week old at this point um yeah so who in this room has actually heard about cow swap before oh it's a lot okay that's nice okay i hope this talk is not too repetitive for you but i try to make it a little fun first and most importantly of course what is cow swap and to answer this question i first wanted to show you a couple of statistics to show that basically we launched last year in may and then about june july we started to get a lot of traction and unto this date we have almost 7 billion in trading volume and about 50 000 individual users so this doesn't really answer the question yet what cow swap is but it tells you that it is relevant and it's going to stick over it's going to stick around for a while all right but now back to the question what is cow swap kauswap is a meta dex aggregator but what does that mean hasu who probably many of you know uh from his famous podcast um about the same time when cows were blanched last year in may he he was wondering he was complaining basically saying well there used to be so many different taxes that i went out and had to check the prices on because i never knew for which token pair would get the best price um and and then the first dex aggregator launched and then he knew okay that's the place where i go to get the best price but then more dexagraters launched and the more dexa graders they're out there again you have the same problem you don't know where to go to get the best price because it highly depends on the token you're trading and the amount of volume you want to trade at the same time where you would actually get the best price and this is one of the problems that cow swap fixes so essentially if a user let's call him mr octopus goes to cow swap and places a trade kaoswap checks everywhere it checks all the existing unchained liquidity sources and it also checks all the existing dex aggregators to try to see which one offers the best price and this is exactly where your trade is going to be settled but if you think this would be everything it would be kind of boring right i mean that wouldn't be innovative if that's all if that would be everything like household would be doing so of course there's more to it so let's try to unravel this little mystery box and this mystery box essentially is a batch layer but to explain what a batch layer is and what the batch layer actually does i have a little example so let's assume you're in the denver zoo the zoo has many compounds for many different animals there's a compound for the llama and of course there's the aquarium with the octopus so the llama last week there was a little annoying bite that was throwing a ball into the compound of the llama but the llama doesn't really want to have this ball what the llama really wants is a chewing gum then there's the there's the octopus and the octopus he has chewing gum because another little annoying kid was throwing chewing gum into the aquarium the other day what the octopus really wants is basically a ball that it can juggle around on its many arms so what can mr octopus and the llama do luckily both are aware that in the zoo there is one very smart animal living there it's a unicorn and they know exactly that this unicorn is willing to get to take anything and swap anything but it is doing that for a very hefty fee it's taking 0.3 on all the assets and all the volume that it's trading but since mr octopus really wants to have the ball and the llama really wants to have the chewing gum they're very they're willing to pay this hefty price now imagine that on the way to the compound of the unicorn the llama and mr octopus they accidentally run into each other and they realize that they can directly exchange their assets with each other then of course the unicorn is going to be sad because the unicorn is not going to make a profit and it's going to cry a little bit but the llama and the mr octopus they're super happy because they make a way better deal now imagine that there's way more animals who are living in the zoo right and all of them they want to buy something and exchange it for something else so if there were to meet in a giant bazaar and just exchange the assets with each other they all wouldn't have to pay any fee to the unicorn again the unicorn is really sad but all the other animals they're really happy and this is exactly what cowsworth does it's basically this economic phenomenon of finding these coincidences of different people wanting to have what the other person is willing to sell is called coincidence of once hence the name cow swap so really what it is is this it facilitates peer-to-peer trading between between different people and yeah basically now you know exactly why cow swap is called council all right now let's take it a little bit more to the abstract level to to really understand how cow swap works um what you already know is basically that if an individual trader let's call him mr octopus is going to cow swap and places a trade he will get the best possible price that's in the market because there's this in-between layer of external parties called the solvers who will always look for the best prize possible but now the more animals actually join the party the more people at the same time want to execute a trade increasingly there is a likelihood that these trades can be directly matched together and this is the second part that the solvers do they basically check out what is the order book what are the different orders that are in the order book they try to match them all together and then only the remaining volume that can't be matched directly together is being forwarded to the unchained liquidity and this comes at a huge price advantage for our users because basically they don't have to pay the protocol fees they pay way less gas because they don't have to interact with the uniswap smart contract or whichever other underlying smart contract and they also have a reduced price impact and of course there's never going to be the perfect use case scenario where you have a hundred percent matching of the different assets there's always be always going to be some leftover amount but this leftover amount if this reduced leftover amount only is being settled on the underlying liquidity sources you still manage to save a lot of fees okay but why you're already here is basically to understand why it makes sense for daos to be using cause and what was all this animal talk okay how would you describe a dao a dao usually consists of a multisig it's very decentralized so it has many different individual owners so a multi-stick is very very secure but it comes at a disadvantage a dow is very slow so in a way a dow resembles a turtle all right now imagine you have this perfect dow you have a dow of 20 000 members you're super secure you're super decentralized but now you need to make a trade it could be that you're super risk-averse basically you want to buy some stable coins or you need to pay out a bounty and the bounty has to be paid in a different asset so you have to place a trade what do you do you have the option to do what you always do as a user you could just use whatever exchange you've been using before it could be uniswap sushi swap one inch and you basically say you basically do a normal transaction in a normal trade you you use the default slippage tolerance that's predefined and then you also commit to the execution path because this is what you do when you try it on one inch for example right you always immediately commit to which trade which pass your order is taking okay so you set up this transaction and since you're a dao you need to collect the different signatures so the raccoon is super responsible super stoked it immediately signs the monkey also is jumping on the train is like yeah let's do this transaction immediately signs but then there is the puppy and the puppy has gotten the munchies and it's going out for a midnight snack because it really wants to eat some cookies and so it completely go ignores the transaction and the dow and then it takes hours and after hours it comes finally back and realizes i have to i have to sign a transaction so it signs and executes the transaction but what happens the transaction fails the trade fails why did it fail because it waited for too long and by the two hours that it was gone the prices had changed and the limit price that the that the that data was basically setting up was no longer achievable so the trade fails and probably the dow wasted 200 in transaction fees on this failed transaction so the turtle is set here come another day the church thinks ha this time i've gotten much smarter this time i'm going to adjust the slippage tolerance i'm going to put two percent the raccoon proofs the monkey proofs even the puppy approves because the puppy feels really bad about the last time so this time it makes very sure to be on time but what happens of course the slippage is eaten away by mev bots so the dow loses two percent on the entire trade and again the turtle is sad here comes yet another day and deter things okay this time i really learned from the experience i'm just gonna transfer all the funds that i need for this transaction to an externally owned account and of course the owner of the account is a fox as you might know from the all the children books the fox is usually not a very trustworthy animal right so it might just be very tempted to steer those funds but let's assume that for the sake of this argument the fox is actually resisting its temptations and it's not stealing the funds unfortunately unfortunately it's still an externally owned account and so can very easily get compromised and this is what happens the entire funds get stolen and again the turtle is very sad what now luckily duterte was at an event in denver last week and it came across around all its old cow friends so after meeting its friends the cows decided to place the next trade on cow swap so what does it do it sets any sort of slippage it feels super super free to basically set a slippage of even 10 it doesn't worry it is also not committing to any execution pass it just says basically these are the tokens i want to trade this is the limit price i'm willing to get and that's the slippage tolerance of ten percent i'm willing to pay the raccoon approves the monkey approves but the poor puppy because it has eaten too many cookies ended up in the hospital so now the puppy is in the hospital for two weeks and it cannot sign the transaction two weeks pass and finally the puppy's out of the hospital and finally managed to sign the transaction and execute it what happens not only is the trade executed but also the entire slippage tolerance is being protected so the ten percent are not taken away because kawsaw essentially looks at the time of execution what is the slippage tolerance that is needed to at this point in time successfully execute the trade and it realizes maybe only 0.6 slippage are needed after two weeks so what it does it takes a 0.6 percent slippage it adds 0.1 slippage just because you never know and it executes the trade that means the dow still keeps its 9.

4 slippage which on any other exchange it would have lost and on top of that because it didn't have to previously commit to a specific execution path the solvers of cow swab are even at this moment of execution cross-checking again what right now is the best way of executing this trade so the dow finally becomes becomes the best possible price for the transaction that it had been trying to submit for ages finally the church is happy all right this is a little bit of a very dense slide i try to just on a more abstract level explain again how cows what works and what what was happening to the turtle trade um so what happens if a user is doing a transaction on cow swap they basically only have to sign an order that includes the limit price the slippage tolerance the expiry date and the buy in the sell token once they have submitted this order it ends up in the order book and what happens now is first of all the two things that i i had previously mentioned so first of all the servers are double checking are there any other orders in the order book that i can match this trade with and then they're also checking for the best possible execution path but again they're doing this not when the first transaction was done in the dial but only at the time of execution at this moment where the servers are trying to submit the order unchained this is where they look for where is the best path then on top of that as i explained previously the dissolvers only take the slippage tolerance that's actually needed to successfully submit the trade and then there's a few cherries on top which is that also in case that for whatever reason your trade has to be resubmitted because the price point just changed at time of execution then you so always resubmit the order for you you don't have to become active nothing and you don't even have to pay for fair transaction because it could always be that you for some reason still picked a very cheap limit price and um very cheap slippage tolerance and so the transaction fails but you do not have to pay for this and then the the last cherry basically is that your transactions are protected against mev and there's a two-dimensional protection layer essentially first of all all the trades that are directly matched peer-to-peer with the other orders that are in the order book they are fully protected against meb but then also the solvers are integrating the flashport's rpc and the eden network whenever they submit your orders on chain and they're very flexible so any other mev protection mechanism that will appear on the market the servers will be integrating those because they're also competing with each other so they also always want to make sure that they get the best possible price for you all right and then i only have two minutes left or so so some are rising first of all again on cow swap you don't have to pick a fixed execution path your slippage is protected you don't pay for failed transaction you always get the best possible existing price you do not have to hold ease because since you're only signing a transaction the gas is actually taken the transaction cost is taken from your cell token so you do not have to hold ease and pennies and now comes basically to the real usp of khalsa number one is that it makes moo always when you had a successful trade because i mean who wants to weigh around and really want one who wants to wait for the transaction to to successfully pass so you don't have to wait you just keep the sound on your computer on and at some point you hear a very satisfying sound [Music] and then the very last usp is while you're waiting for your transaction to execute you can play this little game the cow runner and that's it anna that was a very moving presentation we have time for just a few questions one question one very good question so are you tokenizing and um the the cows are up and if so how is the uh profits of the protocol um tied into the uh the price of the token all right it is a long question for 40 seconds i tried to answer it in a very short way so we did we did spin out of notices last week friday since that moment in time we do have our own product called token and actually that was a very interesting process because it was gnosis dao who voted on us becoming independent so the initiation of our dao was created by another dao pretty cool um but coming back to the question yes we have the token and oh my god 30 seconds was a short time um so the token actually has many different use cases that still have to be voted for by our own cow down now but essentially the idea is that first of all it's playing a very important part for the solver mechanism so to guarantee that solvers are actually behaving behaving correctly they have to stake the token and then basically they are getting rewarded for the efforts of always finding the best prices for the users in cow tokens and then there's some other advantages for users who are holding cow for example by holding cow in their wallet they get a fee reduction when i try it on counsel there's more but i don't know if you have time and basically we have a cow forum that also launched last week and all the different things are described in there thanks

Automatic transcript — names and jargon may be misspelled.