speaker
stringclasses
2 values
text
stringlengths
4
3.11k
A
If you look at the original Xbox games, the graphics sucked. And then if you looked at the late stage Xbox games, graphics were like orders of magnitude better. But it was the same hardware. How did that happen? It's because the software got better. And so this is the software of Ethereum layer, improving what we can do with the hardware layer of Ethereum.
B
Hey, bankless nation, we've got a new show format for you. This one's short, punchy. The deepest dive into a crypto rabbit hole that David and myself are exploring. These are our takes. Take them or leave them. 25 minutes max. It's gonna be our punchiest episode ever. Right, David?
A
God, it's pretty ambitious. If they were gonna do this in 25 minutes or less, it would be a first.
B
Each of these episodes will focus on one specific theme. On today's episode, we're talking about an article that David published recently in the Bankless newsletter. It's called a hitchhiker's guide to riding an MEV bot. David, why'd you write this article? Why is this topic important?
A
Yeah, because every once in a while, we go down collectively, the crypto world goes down the crypto rabbit hole, which we're all carving out, and then we find something new. We find something while we're digging in the crypto rabbit hole. And what we have found recently is this, what the world of the MeV industry of crypto is calling intense. Intense as in, I intend to do something. And the idea here is that this brand new, fertile field that we've just unlocked could be real big. Real big. And the why this is such a big deal and why this, why I wrote a whole entire article about this, is that an intent, in theory, inverts the relationship that the average Joe swapper on Ethereum, the average on chain swapper, has with the MEV vertical right now, there's an adversarial relationship with swappers, and MeV. MeV wants to eat up the value of all the swappers, and the swappers wants that to. To not happen. And then, with intents, we actually can make these people be on the same team and actually get them to collaborate and cooperate, which is part of the bull case of crypto, is learning how to align incentives. And so intents is a mechanism for swapping that aligns incentives between swappers and mev. That's the big idea. And that is the thing that we have potentially discovered while we are going down the crypto rabbit hole.
B
I completely agree. This rabbit hole goes deep. So we're going to begin exploring it in today's episode. But first, we disclosed nothing big or specific in this episode. Both David and I hold ether. Uniswap X is a subject of today's episode. Uniswap has previously been a sponsor on the Bankless podcast. This is my time to remind you that we are long term investors. We're not journalists. We don't do paid content. There's a link to all bankless disclosures in the show notes at all times. Before we begin, we also want to thank the sponsors that made this episode possible. A hitchhiker's guide to riding an MEV botanical. Okay, David, what's the big idea here?
A
So I use metaphors when I write. I think it's the best way to explain some of this stuff. And so I start this article with this metaphor of Ethereum as just one gigantic ocean of liquidity. If there's like one activity that we do on Ethereum, it's swapping tokens, like ethereum. If you want to be ultra reductive and kind of make a jab at Ethereum, you'll just call it like one gigantic dex. Like, that is what ethereum is. It's just, it's just an exchange. It's like, it's a marketplace for marketplaces. So it's like a meta dex. Like, you can host many dexes on ethereum, but really, ethereum just is a place to swap tokens and assets. If you really want to dumb it, dumb it down.
B
The term ocean is kind of interesting too, because ocean implies some depth, right? You can have more shallow parts of the ocean. You can have deeper parts of the ocean. I.
A
Yes, there's that. Yeah. And that relates to this term called liquidity, right? And we all know what liquidity is in crypto. It is just the how deep market, like, order books are on an exchange or how much assets are in a uniswap liquidity providing position. There's this, like, fundamental relationship that, like, at a very deep level, that water and liquidity and assets and markets all have with each other. And it's why, it's why we use the words liquidity. That's not a coincidence. It's because liquid people, way back when discovered that there's a relationship, a pattern between, like, actual water and the liquidity of market structures. And so this is why I call Ethereum a reservoir of liquidity. It holds a bunch of liquidity in uniswap amms, in like, you know, God forbid, ether delta, once upon a time, zero x, and actually the originator of off chain order zero x. And now we have uniswap, right? Curve is another reservoir. So I think of curve as like a very big lake, or maybe a curve is an ocean. Uniswap is also another ocean. We got velodrome, which is a smaller, little tiny ocean on a layer two. But really with you, summate everything. Ethereum is like the earth with all of its oceans put together. And in order to navigate across this landscape of Ethereum, if you view the Ethereum as a landscape, which you ought to, because like every single contract address or your Ethereum address is a destination and in order, and then you also have tokens inside of your addresses, and each of those tokens have addresses, little destinations, all across this world. And we need sometimes to do our transacting, we need to go from place a to place b, from token contract address a to token contract address b. And this is what the activity of swapping is. You're going, you have USCC in one contract address and you need to turn it into another token, or ether, which is at a different contract address. So, like, for putting this into metaphors, we actually need to travel across Ethereum's liquidity pools. Pools of liquidity. And we actually need to do something. We need to make a transaction to get that job done for us. And this is like starting to set the scene for like, what is this big meta structure of Ethereum, but we have these liquidity pools with different assets all over Ethereum, and then we have to go across these pools in order to get our jobs done. And that's kind of where I start off this article with this metaphor.
B
Yeah. And you are using. So if you picture Ethereum as this ocean of liquidity, right. In the rest of this article, this kind of resonated with me. You use this metaphor of ships and you say this at the beginning as swappers on Ethereum, we're about to upgrade our ships, moving from gas guzzling clunkers that blast through the swells to sleek yachts. Oh, yachts that stealthily send you where you need to go without disturbing the waters. You've got this image here, and on the one side it says on chain Dex trade. And this looks like some sort of, I don't know, standard ship that is going through the ocean. It's a tugboat or something. There's a massive amount of wake is just both pushing the back of it.
A
It's like a bulldozer going through the water, just like pushing the water around it, just leaving a massive wake. It's got this messy pipe that's just burning oil at the back. It is just brute forcing its way through the water. Yeah.
B
All right. And you're calling that the on chain dextrade, which is. Now. That's where we live.
A
That's the icons meta of things.
B
Yeah, I use uniswap. That's an on chain dextrade. So you're saying that's like a big freaking tugboat?
A
Yep.
B
And then you've got this other side juxtaposes, you say, off chain, signed order. I don't. I have no idea what I'm looking at. But this looks like a stealth yacht. It's making. It's going through the ocean, but it's making very little waves, very little movement, not much wake. And you're calling that the off chain signed order. It looks like also that the scene is at night, so something stealthy is implied here as well. So why this metaphor? Why are you painting this picture?
A
Yeah. So both of these images are actually made with mid journey, just to aesthetically please.
B
Really?
A
Yeah.
B
I could tell the second one was. I didn't know the first one was.
A
Yeah, the first one definitely was. Well, think about how big all those wakes are. I think the prompt was, like, metal heavy tugboat with massive wake or something like that. Okay, so I was. So, actually, can you pull up another tab and type in c shadow ix 529.
B
C shadow.
A
Yeah. Okay, see, shadow ix 529. Yeah. Oh, Ix stands for what was this thing? Okay. Okay, so now. Now type in f f 117 Nighthawk. You can just do f 117, f.
B
One, one seven Nighthawk. Okay. F 117.
A
Mm hmm. Yeah. So this is stealth. This is a stealth fighter. Famous stealth fighter. Right. Developed by Lockheed Martin. They have all the ship. This is a plane. This is a jet. This is a stealth jet, one of the first stealth jets ever. And the angles on this ship are meant to absorb radar and also not leave awake. And so they also were charged with building this navy sea shadow ship, which is, like, kind of the same version, but as a ship, and it's built in this way. That is, a, it absorbs radar, so you can't see it, and b, also doesn't leave a wake because it's like, it's great if it doesn't show up on radar, but if you could just see the wake of this ship that it leaves behind, the white Cherney waters behind it in its path, then, like, all of your stealth technology goes to nothing if you just leave a wake. So it's also built in this way to cut through the water. So that you can't detect it as it goes from point a to point b, and then on the other. And that's supposed to be in contrast to, like, this tugboat, which is, like, I don't give an f, just, like, get out of my way, liquidity. I'm pushing you aside, and I'm brute forcing my way. And so these represent two different strategies from crossing for crossing Ethereum's waters. And now, remember, Ethereum doesn't do, like, doesn't have an army, and so you're allowed to do as much mev as possible, which is why, like, you know, in the normal world, we have, like, armies and militaries to protect us. But in the Ethereum world, which doesn't have an army and anything is fair game, we actually need to be more adversarial and how we choose to cross its liquidity oceans, because there's no army to protect us. And so we all need to develop strategies that are protective of our payloads, which are our swaps.
B
Ooh, these. These metaphors, these analogies are starting to stack up here. Okay? But so before we continue on that, we'll park this idea of two different ships. An on chain dextrade. Messy, huge, like, wake. It's just pushing the water out of its way. Off chain signed order. Stealthy, sleek, cutting through water, uh, below radar, undetectable. But what is an off chain signed order? We know what an on chain dextrade is, okay? That's where you go to uniswap. You make a swap. It's all on chain. You could, everyone could see it. What is an off chain signed order? And what does that have to do with what we were talking about in the intro? This word, intents.
A
Yeah. So an off chain signed order stands in contrast to an on chain dextrade. So an off chain signed order, it's actually pretty similar to an on chain dextrade, except that you don't actually execute it as a transaction. And because of that property, you can construct your transaction differently than if you had on, like, uniswap or sushiswap or curve or anything. That's an on chain dex trade. So, with an on chain dex trade, you put in certain parameters that are, like, fixing, fixing variables in your transaction, because if you don't fix them, then the mev bots come and eat them, right? So, like, with our tugboat, who's just, like, bulldozing through ethereum's liquidity, it's. A lot of things are hard coded into them, because if they're not, then the mev monsters will get in and eat that transaction up. And so, like, what am I talking about here? We want, we have token a, want token b. We are setting like, hey, we're only accepting 3% slippage, and then we're also going to go through this route. And so uniswap actually as a product, and so does sushi swap and anything that has an order router, an order router. Think of that as like loading up your ship, your tugboat, your slow, heavy tugboat, with like a predetermined path through ethereum's liquidity pools to get from point a to point b. And so you're saying this is my path, and I'm only going to allow for 3% slippage to get there. We're hard coding all these parameters in, in order to make sure that, like, when we get across this path, that mev monsters only ate like 3% of our transaction, or 2%, whatever we set our slippage to. But these are parameters that we're all encoding into our transaction to protect us. It's like adding panels to our ship, big metal panels to our ship, and it actually, every single parameter that we hard code is also an additional gas cost. And that's just what it takes for individuals to get across ethereum. If they are going to construct their own ship using an on chain dextrade, we need to get across somehow. So we got to build our own ship. And that's what uniswap and any order router does when they help us make a transaction that is an on chain dex trade. We are basically custom building our own ships. An off chain sign transaction is very, very, is like the inverse of this. And so all you're doing when you sign an off chain intent and off chain just means that you're not actually going to execute this as a transaction. You are going to, with your private keys, sign a transaction, but not broadcast the transaction with an intent.
B
So no gas?
A
No gas.
B
You just signed transactions.
A
Yeah. So, like, you can take an ethereum transaction that you would broadcast to the mempool, and then you can just sign it and not broadcast it to the mempool, and that becomes an off chain signed order. So, like, an off chain sign order is like a precursor to a transaction that's on chain, but it does not become a transaction on chain by you. And so what do you do with this off chain signed order? Is that you just state your intent. I have 2000 USDC on the ethereum layer one. I would like one ether on the Ethereum layer one. Or I actually would like one ether on optimism, or arbitrum or zksync or whatever. You just sign what you want and your minimum amount of desired tokens on the other side. And so you're saying I've got 2000 USCC and I will accept no less than one ether, and anybody who can service this is free to take this transaction and execute it.
B
So that's why we call these intents, right? It's an intent. So I intend to provide 2000 USDC in exchange for one ethereum. And you kind of broadcast that. You're not broadcasting that on chain. You're broadcasting this to all of the MEV bots.
A
You're broadcasting it to the mev stack, which is usually the thing that you're trying to hide from, but instead you just actually tell them what you want. That is the big unlock.
B
Who's in the MeV stack? What is the.
A
All the monsters. So you have me, you have MeV arbitrageurs, like liquidity pool balancers, sandwich attackers. Um, you've got like just DeX arbitrageurs. So if two different pools on Uniswap and Sushiswap are unbalanced, then they'll reorder, reorder. It's the entire spectrum of possible arbitrage opportunities are encoded into MeV bots on Ethereum. Around Ethereum. They're like this swarm of things around Ethereum that make sure that everything inside of Ethereum is maximally efficient. So like, when you say, like, what is it? It's like is everything that is relevant to markets.
B
It's the hive. It's whoever can make a profit, whether these are like market makers or bots or some combination, anyone who is willing to make a profit on this exchange here, right?
A
And part of this stack is it's probably becoming very, very verticalized. So market makers and mev bots are probably collapsing into the same vertical, for example. So this just turns into a vertical of like, the, the efficiency checkers of Ethereum markets. So like, if anything is disturbed in Ethereum, then they will rebalance it. And this is why we go back to this metaphor of liquidity and disturbing. Or here's a word, dislocating pools. Dislocating Ethereum's pools or liquidity is like when you take 2000 USDC out of the Uniswap pool and you put it into the Uniswap ether pool. Like you're taking, you take water, scoop it up out of one pool, and you dump it in another pool, because you just made a trade. Well, all of a sudden, you've dislocated Ethereum's pools, and that is, like, signals to the MeV boss, like, ooh, chaos disturbances. I need to go consume that chaos and rebalance the pools because of. That's what arbitrary arbitrage is. So this is why the tugboat, that's, like, blasting its way through the waters of Ethereum, because it's just a super inefficient ship. It, like, attracts every single mev bot under the sun, because it's creating imbalances in its wake. That's why you don't want to leave a wake, because you attract Mev bots. And so all of these custom built ships that we're making, when we make a transaction on Uniswap or sushiswap, we're just using, we're making, like, a one time ship to get us from point a to point b, and it's, like, super messy and heavy and laden and gas inefficient, because we have to layer on all these MEV protection mechanisms or else we'll get eaten. And so this is what MEV bots do. They rebalance dislocated pools. And this is why there's this antagonistic relationship between on chain dex trades and MEV bots, because MeV bots abhor chaos. They want to absorb that chaos and turn it back into order. And that order is an efficient market.
B
This is kind of cool. Going back to that example, if you have 2000 USDC and you want one ether for that, so say you broadcast your intent to this bot network, as you're saying, to buy one eth on optimism. Using 2000 USDC, you start your offer at 2010 USDC, and ratchet the order increments downward to 2000 USDC. With this, a million ships appear to inspect your offer, all in a standoff with each other. The order begins at 2010 USDC. But that's ludicrous. ETH isn't worth a 10th of a penny more than 2003.75, where in some other market that's trading.
A
I'm just making these numbers in this scenario.
B
Yeah, of course. And this process goes. Goes down until some, you say to some bot finds the price point at which it wants to fulfill this order, and then suddenly pop out of the swarm. A single ship emerges, darts forward, grabs the payload, and stuffs it inside of it, and zips off to the horizon to fulfill the job. What was the execution price in these made up numbers? Examples? 2004.31 cents. All the MeV bots update their price model for ETH. And now we have the market price of ETh. It's $2,004.31.
A
So I'm glad that this, like, little scenario that I made up made sense to you, because I actually effed up and got the numbers wrong. It should actually go up, not down. And so I should have said, like, we start the price at $1,990, and then it increments upwards until a bot actually fulfills that. But, like, the idea is that you actually get the idea. So, like, here's the idea. This is the dutch auction. This is the part that Uniswap X has brought to the intense landscape, is this idea of a dutch auction. So what is a dutch auction? It's like you start selling something and you start really high, traditionally. So, like, saying you're selling a widget for 10,000 units, and then you start incrementing down, like, 10,000 units, 9000 units, 8000 units, until someone buys it. And the person that wants it the most that is going to pay the highest price is going to buy it first. And that's what the elegance of a dutch auction. So this is what we're doing. This is what Uniswap X is doing with its off chain signed orders. And so it creates an off chain signed order that is also imbued with a dutch auction in Ithoodae. And so swappers want the best price. And using a Dutch auction, we can naturally find the MEV bot that is the best, most suited MEV bot for that one particular job that is better than all the other MEV bots for that one particular job, to fulfill your order at the best possible price. And the mechanism that allows for this is by not actually hard coding and entering this on chain, but allowing this to be just broadcasted across the landscape of MEV bots and saying, hey, I have this desire for this thing to happen. I will pay the minimum amount necessary according to the most efficient Mev bot that can execute this order to get this job done. And so you invert the relationship between Mev trying to eat you and Mev being a service provider for you.
B
You've got this analogy of, like, pauly tradies from dune riding the sandworm here, and you say, instead of fighting Mev bop monsters, we ride them. Basically, what you're doing is you're using all of these sandworms, essentially, and you're using them for your own purposes, when normally they just want to eat you and steal your lunch instead. You're kind of harnessing the power of these things to give you the best price on a trade. And that's all uniswap X is essentially. So what are the implications of this, David? How does this change the landscape? It seems like now we can start to fulfill these types of orders off chain. Does that have an impact on how much liquidity is actually on chain? Does that create a stealth, non mempool style transaction market? Is this good? Is it bad? What are the implications of scaling? How many transactions per second can this thing support? Have you given any thoughts to these things?
A
Uh, there's so, yeah, there's a number of like 2nd, 3rd order consequences. I think the easiest one to understand is that you actually don't need to, um, spend gas anymore. Um, the gas cost of your transaction just comes as a spread. And so it's just part of the USDC that you pay to buy your ether. You're just going to get a like a slightly less amount of ether because the gas cost is a part of the calculus that the MEV bought does when they are looking at your order. But the point is, if you're just trading two tokens that aren't ether, you will trade tokens and the ether balance in your wallet will stay the same because you are not the one spending gas. The MEV monster is the MEV bot is gas is spent an equivalent amount. Actually, less gas will be spent per transaction because we don't have to load up all of those hard coded parameters in order to get this done. And so the average swap on Ethereum is actually going to become more efficient because of this. And that's the first reason why the average swap on Ethereum will become more gas efficient. The second one is that part of the competition for MEV bots is to actually aggregate intents. And so say you intend to buy one ether for 2000 USDC and someone else is meant to intend to sell one ether also for U 2000 USDC. In the current example of in the current meta, you would have both buyer and seller line up at the Uniswap desk and they would each take their bucket and scoop liquidity out of the US EC pool and put it back into the ether pool. And then the next person would come and they would take the same size bucket and they would take it out of the ether pool and put it back into the USCC pool. Both cost gas, both got armed by MEV bots, and both happened in two separate transactions that were both on chain. If they were both intents instead of on chain signed orders, an MEV bot would be able to match these two orders together and just like cancel each other out and almost like no gas cost between the two of them, because they can each, they just can just pay each other. And so, like, all of the aggregation of intents can kind of like, you know, like, remember in algebra where you have like, things above the line and below the line, and you like, cross off the variable above the line and below the line, if they're equivalent variables kind of like that, that's what you can do with intents, because they haven't settled on chain yet. So an MEV bot can aggregate many, many, many different intents together, and they can cancel. A lot of the coincidence of wants between intents out before going on to Ethereum and settling up in one gigantic settlement that disturbs a bunch of liquidity pools. So instead of having 10,000 transactions disturb Ethereum's liquidity pool 10,000 times, an MEV bot can aggregate 10,000 intents, cancel out, like, most of them, and then just disturb Ethereum's liquidity pools in aggregate of the 10,000 transactions, which would be like, I don't know, one 100th the amount of disturbances across Ethereum's liquidity pools that would otherwise be the case. Does all of that make sense?
B
It does, yeah. You say this in your article with intents. A lot of the complexities between cross chain liquidity, chain swapping, and bridge selection are all choices that will be made by the technical back end service providers, by essentially, these MeV bots are making that choice, am I reading that correctly? And all users have to do is hop on the ship and enjoy the ride. So this makes this multi chain ecosystem a lot easier for users to navigate. This really shifts the role of, like, what I thought, what we thought collectively, under the old paradigm, bridges were for, right? Because then you don't need bridges for as many things, do you? As long as you have kind of the trustless bridge between Mainnet and a roll up, that's kind of the bridge you need to preserve. A lot of the moving of assets from one chain to the other can happen in this MEV bot world, in these off chain orders with these intent based orders. Is that right?
A
Yeah, 100%. So it really puts the synchronicity back into Ethereum, where every single layer two is an asynchronous network. But the MEV bots work to make them all synchronous networks once again. They synchronize the state, the state of liquidity across all of these layer twos and people experts are, you know, work for margins in order to get that done. And so these are like this, this off chain meta of off chain MeV bots is like this other part of Ethereum that's not actually the Ethereum protocol. It's not the state of Ethereum, but it's the swarm, the swarm of MEV that makes sure that all of Ethereum's liquidity and state is synchronous across chains, even if there's like a few block, block time delays between any individual chain.
B
Okay, so what does this paradigm shift, I guess, in closing, really, really mean moving forward? I think there's more to unpack in this rabbit hole, and we certainly haven't unpacked everything today. I think a lot of the bankless episodes in the future will be sort of going deeper down this rabbit hole. Obviously, order based exchange, like exchanges are going to trade are going to change, right? So less on chain sorts of orders and transactions, more off chain. We've already talked about bridges. It seems like these off chain orders aren't subject to the constraints of transactions per second on Ethereum mainnet or roll up either. So we have like, do we have like infinity transactions per second out there? There's also a conversation about, like centralization. You know, is this kind of a centralizing force? Is this sort of, are we losing the transparency of our on chain markets? What do you think we have to unpack still in this intense based conversation?
A
Yeah, the convergence of this, these players, these off chain players, is like the convergence between MEV experts and market makers. So, like tech and capital, how these landscapes converge is going to be interesting, how much we can actually squeeze into one of these things. So, like I said, you could put like 10,000 intents together and then compress them down with efficiency and computation. Off chain computation, aka your cpu and some market maker, MeV bots, house, office, wherever. So like, yeah, you can, you can get a lot of scale out of this. One of the cool ways that tech scales, to use another metaphor, the original, if you look at the original Xbox games, the graphics sucked. Then if you looked at the late stage Xbox games, graphics were like orders of magnitude better, but it was the same hardware. How did that happen? It's because the software got better. And so this is the software of Ethereum layer, improving what we can do with the hardware layer of Ethereum. And so we're scaling transactions per second in a pseudo way, in a roundabout way, that way, through intents, by allowing 1000 intents to come together and represent the same size of what would have ultimately been just five or six normal swap transactions. Um, so that that's a whole other rabbit hole is like, what kind of scale do we get out of this thing? Um, the lay, how layer twos, uh, relate to this, and how fast can the mev swarm sync up a layer two to a layer one, um, is another vertical to explore. Uh, and I bet you there's so much more. It's a very large field.
B
It it totally is. And I think there's a lot of investable opportunities that, um, that you could find here around sort of how the MEV supply chain, the block builder supply chain, is going to completely change how all of these orders are going to be aggregated, what this means for the future of exchanges. If you actually want to go use intents. Today, I don't think uniswap X is.
A
Live, but it's not live by default. You can go and set it to live, and you can make some trades on uniswap X.
B
There's, of course, cow swap as well. That's a swap cow fi. That's basically when you put a transaction, when you put an intent in, that's actually the MEV bots that are fulfilling, that are filling that transaction. So you can see how it works that way. So a lot more on this in the future. David, is there anything else you'd end with, or did we, did we cover it here?
A
I'm sure there's going to be more articles that are continuations of this, and so stay tuned for that.
B
Hope you liked the episode Bankless Nation. We've got some action items for you, including David's article, a hitchhiker's guide to riding the MEV bot. There's also some episodes that we've done previously on Uniswap X, one with Dan Robinson that you absolutely, you have to go check out. We'll include those in the show notes. As always, gotta let you know, crypto is risky. You could lose what you put in. But we are headed west. This is the frontier. It's not for everyone. But we're glad you're with us on the bankless journey. Thanks a lot.
README.md exists but content is empty.
Downloads last month
36

Collection including MasaFoundation/bankless_Davids_Takes_A_Hitchhikers_Guide_to_Riding_an_MEV_Bot