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

Loading player…

MEV Past, Present, and Future - Joey Zacherl

Ethereum DenverMon, Oct 9, 2023, 12:00 AM

Joey will discuss the past, present, and future of MEV and how we can maximize this value for the users who generate it. Joey Zacherl Founder, CTO Rook Joey Zacherl is the founder and CTO of Rook. He rose to prominence as the first on-chain automated market maker when he built VolleyFire and became a top searcher using 0x. Joey is an accomplished, award-winning, full-stack technology enthusiast with professional and entrepreneurial experience. He love animals, especially dogs, and enjoys playing ice hockey, card games, and RC car racing. https://twitter.com/rook

Transcript

good morning everyone how are you guys doing today welcome to Denver I've got an exciting talk for you today so my name is Joey zackrel and I'm here with Rook where we build infrastructure that enables users to capture the value uh in their transactions and so before I get started uh on the presentation I'll give you a little background about myself and it'll come full circle right into the presentation which is really exciting so um I am an engineer at heart so I have a background at engineering um Automation and I really just love building things um I spent some time doing some cyber security as well and uh uh fun facts about myself so I was the very first Market maker on ethereum on decentralized exchanges and I've actually been involved in Mev before it even had a name and before anyone was even talking about it in any sort of public forum writing any articles on it at all um and so before I got into crypto I was actually doing some automation with my hobbies and I've always liked building things and and doing fun things and uh I I made it uh I I love playing video games out of strategy games card games so I used to play a lot of Poker I made like online poker Bots and I made some uh really cool Bots and Huds for video games for like MMOs it would like Farm in-game resources and it's it's exciting how like those things transitioned really well into uh automating on the blockchain right when you think of uh you know Searchers and Arbitrage and Builders uh that stuff really all goes hand in hand um and when I first uh decided to transition my career into the uh blockchain space um I saw a huge need for liquidity so when the first decentralized exchanges came online there was no liquidity and the first handful of them uh couldn't get off the ground because a user would log into the app and try to start using it but they didn't have a trading partner and that was one of my first experiences when ethereum came out was seeing that there was no trading partner the order books were just a Barren Wasteland and that's really what motivated me to get involved um and so what is Mev I'm sure a lot of you are familiar with it um but Mev is essentially value that you can extract from block production and this could come in the form of Arbitrage front running back running rearranging transactions rearranging entire blocks um anything that you can use to extract value from other people's transactions um and in defy there is a lot of value in Mev and your transactions um have value whether you know it or not so you might just be uh performing a trade buying a token or maybe you're submitting a a transaction to the mempool and all of a sudden somebody makes money off your transaction uh just so happens that there's been about 700 million dollars being made off of transactions on ethereum and we at Rook believe that everyone deserves the value that they create from their own transactions from the Casual Traders just buying a token on one inch um to the whales who are making a million dollar trades um even D5 projects and dowels they also deserve it as well I mean there could be a dowel that say rebalancing assets in their treasury um and the the one that I find Most Fascinating is actually the blockchain service providers um they um they provide services that other people use to capture Mev but the reality is every single one of these groups are getting wrecked by Mev right a user who's just trying to buy a token um they might get sandwiched attacked um the whale um he might get back run because he makes a million dollar trade and that has Ripple effects on the amms and other people are making money off of that and then a dow maybe they're trying to rebalance Assets in their treasury other people can front run them because they pay attention to governance and they know when that's going to happen and the blockchain service providers they build these amazing tools that do amazing things but they're not getting paid when other people use their tool to make money and this number is growing right this 700 million dollar number is only going to get bigger and so where did this all begin and how did this come about so today um what I'm gonna present to you guys is essentially a timeline and we're going to understand um how many of you came about what caused it what started it what happened during this long timeline I mean we're talking many many years of evolution of Mev and then we're going to take a look at where it's going and why and so before I jump in I want to focus quickly on um Bitcoin and ethereum so with the Bitcoin you essentially have a decentralized currency and database and then ethereum took it one step further right vitalik said hey I want to create um programmable money I want to have uh smart contracts that anybody can make and deploy um and with it came this this vision for programmable money which really relies on these fundamental items here right decentralization removing middlemen and users interacting with users on the blockchain so keep that in mind as we progress here and we're going to start back in about the 2016-2017 time frame when the very first decentralized exchanges were coming online and uh the first ones were absolutely terrible um they had bad UI ux the contracts were very janky um they were not user friendly and they didn't have any liquidity ether Delta was actually the first one that gained any traction whatsoever um and um this sort of thing was incredibly eye-opening to me because I saw the potential right there's a lot of value in decentralized trade the ability for two parties to swap assets without trusting each other knowing that it's going to work exactly based on how the smart contract was designed is an incredibly powerful thing um but this actually led to a lot of very very unique uh events right so in 2017 the Ico boom was really in in full season um and this this concept of Ico Arbitrage became a thing where people would buy a a token on an Ico they would put it on the secondary Market to sell it and other people would actually buy it and it was fascinating and at first I was wondering like why would anybody do that why wouldn't they just buy from the Ico but the reality is this icos were a pain in the ass they had kyc they required you know your driver's license all this information sometimes they only supported certain countries and sometimes people didn't want to buy it from an Ico because they didn't want to have any association with it in case you know the legal situation changed in the future right so there was huge demand for people to overpay on really shitty exchanges like this one um and and then there was a lot of Arbitrage and that actually led to Market manipulation and order book manipulation so if you take a look at this order book here people would actually manipulate the order book because back in the day um this website would only show 200 buy orders and 200 sell orders so people would get smart and they would fill it with orders that would never get filled and humans couldn't Arbitrage it only bots could Arbitrage it was a really fascinating experience and there were also typo orders where people would not use the website properly and uh you know they'd put in the wrong number um and I I saw this as a huge opportunity to basically use my automation skills to provide liquidity and that was really exciting and another fun fact um the very first two uh decentralized exchange protocols I integrated with and Market made on both of them succeeded everyone that I didn't they fell flat there's a good look at how bad that UI is imagine trying to trade on that thing um so uh shortly thereafter the amm was born and amms are fantastic uh so think of an amm as uniswap if you're not familiar with them basically it's an automated Market maker and the idea here is um why have a market maker who's making uh orders buys and sells when you could just have an algorithm do it or a formula to it um and bancor initially pioneered it and then uniswap took it one step further made it more gas efficient made it simpler and easier to use and this led to massive Arbitrage opportunities because somebody would come on uh uniswap and they would try to buy a token but in the reality the best price was actually on bancor or maybe ether Delta and so a robot would come along and Arbitrage them and take money from them essentially um and you know users didn't know uh how to you know find the best price um and then this also led to look liquidity providers getting front run as well so liquidity providers would would deposit liquidity and other people would uh you know manipulate their deposit in the mempool uh that sort of thing um and then when when icos kind of started to phase out people actually started launching tokens on uniswap so now instead of having an Ico uh you know why deal with kyc and accentralized exchanges when you could just literally deploy your token right on uniswap but the reality is even with this new technology users were still getting wrecked and the UI ux was awful but it did introduce the slippage mechanic which was really cool but another way for them to get attacked in front run um so then uh around the same time we saw essentially an Mev arms race occurring um and so what happened is uh uh you know smart people who are building smart contracts and trading and trying to capitalize on this value they were um uh focusing on gas efficiency gas efficiency became king along with that came Gas Town tokens mempool became extremely valuable and actually weaponized so users who put their transactions in mempool had no idea but they were getting exploited every single day mempo became extremely valuable um that led to things like gas auctions and really at the end of the day Predators were sharpening their teeth sharpening their tools and just just destroying everybody without even knowing it all while UI ux was still terrible and in 2018 we got to see the experience of cascading Mev so the very first collateralized loan uh decentralized protocols came out and that came with a liquidation feature and the liquidation feature was really cool but that led to this interesting uh Behavior to where a liquidation would occur a massive one and some bot would Arbitrage that on uniswap or Vancouver or ether Delta and that would have these cascading effects where Arbitrage would Ripple over four five six blocks and then would just be Arbitrage everywhere all because one dude's position got liquidated um and then uh in the 2018 The Flash loan was born um and the Flash loan is a really cool feature so if you're not familiar with it basically what it is is um when you're trading you need money to trade but what if you don't have money right well you can borrow it uh perform a trade and then essentially capture Mev and then repay that loan in the same exact transaction as if nothing ever happened so it's kind of like printing money in the blink of an eye and then returning it as if it was never printed and the use cases for this are actually great there's a lot of great use cases for it but there's also some really bad use cases and people were essentially using them maliciously to um to exploit protocols and there was actually one protocol in particular that was exploited three or four times before it just died um and as you can see here so during 2020 um there were about 16 flash loan related exploits for about 100 million dollars um so flash lines are of flash loans are very powerful tools so then uh in 2019 and and still today this is being uh iterated on the Dex aggregator was born and Dex aggregators are great because it enables um users to find the best price and discover the best price and make sure they're making a good trade but what's interesting is this actually led to even more attack vectors because now if someone's got a backer on you they can also Target these Dex aggregators and also too the algorithms just weren't perfect and even today they're still not necessarily perfect so you know there's always a value that can be extracted and now the Dex aggregators also have the slippage variable which can be exploited can be sandwich attacked right so there's still more variables so it's kind of like an improvement but many many more variables and many many more attack factors so overall you know it didn't really help too much in terms of Mev um so 2019 was a a big moment here because this paper was published and this was really the first time that the Mev discussion was kind of brought to the Forefront right so it had existed for years but now it's actually being talked about and actually being thought about and actually being discussed as a problem right and so in this paper they really highlighted it um as essentially leading to consensus instability because Mev essentially incentivizes actors to reorder transactions and blocks and that could be very very bad for the ecosystem um and again this is this is the first time it was really talked about in the open um and uh that really led to the natural progression of um co-founding Rook um and the interesting thing is here the the public uh discussion was focused around um consensus instability and protecting you know the the blockchain but really nobody was looking at the user nobody gave a that the user was getting wrecked nobody at all and so that was really the heart of Rook right so I'm focused on the user I want to build something to protect the user because at the end of the day the Mev is coming out of the user's pocket but nobody was really focused on that at all right and so you obviously you want both right you want consensus stability and you want the user uh to be uh taken care of right and so the idea is um you know with Rook is we want uh Searchers which are these Arbitrage Bots to collaborate with users and work together instead of working against each other um and interesting fact uh Rook is the oldest Mev project in existence and our team is actually built from the community so a lot of our core team members were actually literally popping into our Discord one day hey this is cool I want to work on this oh what do you do and then you know the conversation starts and okay let's hire you this is perfect that's literally how our team started so in 2020 um transaction bundling became a thing and this is essentially a um you know a lower level protocol layer feature that uh enables people to conveniently reorder transactions and reorder blocks and it's a nice tight integration between the Searcher and the block validator um and the idea here was to use MAV to prevent consensus instability and this was really a direct response to the Flash Boys 2.0 Paper but the idea that that you're using Mev to protect the that layer it doesn't really help the user right Mev is Flowing you know to the block producers not the users and that's a problem so Rook is actually very complementary with transaction bundling um you know because Rook can protect you at the application layer and then you can use tools like transaction bundling at the protocol layer um and then around 2021 we actually saw um the arms race of bots progressing um and Bots were getting very very greedy and they were using very risky strategies and you actually saw Bots battling other bots so they would use some risky strategies and other Bots would exploit them and essentially take money from a bot while that bot was trying to take money from a user and oftentimes maybe the first bot was actually you know pretending to be a user you know that sort of thing and right around the same time too um Rook uh we built the very first Mev protected trading app and lending platform um and then in 2022 we launched the um the very first uh order flow auction which is really exciting and that essentially provides a Marketplace for users and Searchers to collaborate uh rather than battling against each other you work together and you have a you know a better environment um and this came with um built-in protection that is ensured that Builders or validators or any predator could not steal Mev from users um and this led to some spectacular case studies so in this example you can see here um four Searchers are essentially bidding on the right to facilitate the users transactions so the user says Hey I want to buy these tokens four different Searchers said I'm willing to pay this much to the user in order to fill his trade and then the algorithm decides who the winner is and then uh this is more recent so now we're you know in 2022 2023 right so this is within the last few months um so uh PBS was introduced along with proof of stake um where Builders can construct blocks and make bids for inclusion and then the proposers can validate them and select the highest bidder and this makes for an exciting new Marketplace um and it opens the door to a lot of new features but the problem is this doesn't really address um the user getting ripped off or you know losing out on Mev right so this bid mechanism is essentially a highway for that behavior to still occur um so it doesn't protect the user at all um and then so really at the end of the day you know if we look at today there's transaction reordering there's Mev everywhere all while the user is getting wrecked um and a lot of Mev solutions that exist today uh do not provide any value to the user whatsoever so what are we going to do about this this is a big problem right um well let's take a look uh back at the vision for programmable money the reality is the status quo of MAV does not behave this way it's you know it's not decentralized um and there are middleman extracting your value so so what do you do right there are a lot of opinions about uh Mev and about how to solve it but the reality is it may not be solvable right uh attempting to solve Mev may be the same as attempting to solve gravity and so maybe it can't be solved so if you're not going to solve it what are you going to do about it well you need to put the user first that's what you're going to do right but in order to put the user first you have to understand how we're currently not putting the user first So currently um users aren't getting the best transaction execution there's value being taken from them and in the worst case scenario they're actually being hunted and preyed upon by predator and that's bad um developers tend to not focus on the user they tend to focus on other actors um and users are not receiving the value that they create in their transaction and the reality is um from day one Rook has been focused on providing value to the user um and it's great to see other people in the industry and other projects in Industry come around to this Vision because for a long time that wasn't the case so what does it look like when you put a user first well so you are in control of your transaction life cycle Searchers and Builders they actually work for you not against you and the Mev that you create flows back to you exactly as you see here and your transaction execution is optimized for very useful things that you're going to do on a daily basis signed commitments raw transactions and token swaps and what does that look like in practice well during 2022 with our limit order feature um we did a 400 million dollars of volume and we actually returned four hundred thousand dollars in value to users um and we've found that this value scales uh with volume too which is fantastic um Running Out of Time here's some skip a little bit so um and here's an example where a whale was trading 80 million dollars um and he actually came back with sixty thousand dollars of of profit essentially he got paid sixty thousand dollars to make his trade um and so these benefits that you can give to users you can also give these same benefits to service providers right it's fantastic so if you're providing a service if you're a developer and you provide infrastructure as a service to users um you can give that as a feature to your users and that value can flow back to you and if and if this is valuable for you as a developer you can actually charge a fee for this and that fee can go on the same value stream and we call that regenerative economics because this isn't the user paying a monthly fee this isn't a subscription model it's essentially the user using this uh tool and using this feature and then as a result of that value is created and it's going back to the service provider so everybody wins um and this benefits the ecosystem because you know the ecosystem is made up of users and developers um and so we believe that everybody deserves the value that they create so we are the first ones to introduce a mechanism to benefit the users and drive value to them so over the last year um we've taken what we've learned we've scaled it up we've made it safer more efficient and more programmable and our team consists of some of the best mechanism designers in the entire industry some of the best Mev engineers in the entire industry and we are very excited to to bring these products to you guys very soon so thank you so much for today I appreciate you guys coming out and listening to the chat so get in touch with us our booth is literally right behind you right there so come chat with me come chat with the team we've got a big team here today so thank you guys appreciate it [Applause] [Music]

Automatic transcript — names and jargon may be misspelled.