0
0
Daily Brief

A Hitchhiker's Guide to Riding an MEV Bot

David's Take on the latest innovation hitting DeFi.
0
0
Aug 14, 202310 min read

Dear Bankless Nation,

Welcome to David’s Takes, where every single week I drop a take in the Bankless Newsletter. Last week, I wrote about all of the aligning stars behind crypto exiting its developmental phase and entering its era of maturity, stability, and mainstream acceptance.

This week, we’re going to dive into a more narrow topic. If you listened to the recent podcast with Dan Robison about the new meta for DEX trades or swaps in DeFi, this take will dig deeper into that line of content.

This piece today is one gigantic metaphor. If you want a more technical explanation, definitely go back and listen to the episode I just mentioned, but even if you haven’t, I think you’ll still get a lot of intel from this piece. Let’s dive in!

-  David Hoffman

David's Take: Riding an MEV Bot

Bankless Author: David Hoffman | disclosures

Ethereum is a reservoir of liquidity.

If there’s one activity that Ethereum does extremely well, it’s being a massive exchange for digital assets. We don’t call it a ‘settlement layer’ for nothin’ – different DEXs, different tokens, different reasons to trade… but the vast majority of activity on the Ethereum L1 is to simply swap tokens.

As Ethereum has developed, the strategies and mechanisms for swapping tokens have evolved. From EtherDelta, to 0x, to Uniswap, to where we are now… there has been an ever-growing number of ways to get the same job done.

All we need to do is go from Token A, to Token B, but in today’s Ethereum we are presented with more possible routes to getting that job done than we know what to do with. What’s worse, is that incorrect navigation through Ethereum’s oceans of liquidity attracts sea monsters who punish you for choosing a suboptimal route.

Bankless Nation, as swappers on Ethereum we’re about to upgrade our ships – moving from gas guzzling clunkers that blast through the swells, to sleek yachts that stealthily send you where you need to go without disturbing the waters.

Let’s “dive” in! 🏊‍♂️

Upgrading Ships

As our transactions pass through Ethereum’s liquidity, they disturb its waters. We imbalance the pools. We cause disturbances on the surface, where price is discovered, and where onchain monsters can track our movements.

In the image above you’ll see two different kinds of boats, each representing a specific strategy for optimizing how you navigate Ethereum’s liquidity and swap tokens at the best possible rate.

On the left, we have your typical onchain DEX trade.

You input the token you want to sell, fill in the token to buy, set the amount, and specify the amount of slippage that you’ll receive. You input all of this, and your DEX front-end specifies a route for you to follow, codifying it into an immutable transaction. You need to adhere to this route strictly to protect yourself from MEV bots, and you’ll eat up plenty of gas as your ship intensely blasts through Ethereum’s pools of liquidity.

But on the right, you have an ✨offchain signed order

We’ll break down exactly what this means further down, but if the onchain DEX trade is a slow, heavy, wake-leaving, pool-disturbing tugboat, then an offchain order is a sleek, streamlined, stealth ship. It cuts through the water while leaving no wake. It can’t be tracked, and it’ll get you and your payload from point A to B without anyone knowing how you got there.

If you want to avoid the monsters, don’t disturb the water… leave no wake!

Image: Polestar

If you’ve ever read the oft-referenced essay “Ethereum is a Dark Forest” from the folks at Paradigm, you’ll know that Ethereum is not the safest place – thar’ be monsters!

Attracted by the disturbances in liquidity pool balance, MEV monsters ascend, consuming the disorder that our transactions leave behind as they produce a rebalanced pool. These monsters crave balance. If the waters of Ethereum aren’t perfectly still, then there’s an arbitrage opportunity for some bot somewhere to satisfy.

Bankless Nation, what if I told you there was a different way to cross Ethereum’s waters? What if, instead of bogging ourselves with heavy, slow machinery to protect ourselves, we chased a different strategy? Let me introduce you to the new meta of offchain signed orders.

Offchain Signed Orders, aka “intents”

Offchain signed orders employ a completely different strategy for navigating Ethereum. Offchain orders aren’t transactions - you don’t broadcast them to Ethereum.

Instead, you simply note the asset you want and the chain you want it on, and broadcast that request to the offchain world, declaring “I want these things to happen, and I’ll auction off the right to be my service provider to the lowest bidder.” Upon hearing of said opportunity, a marketplace of vessels descend upon your position, inspect your proposal, and wait for the terms they’re interested in.

UniswapX produces offchain signed orders with Dutch auctions embedded in them.

So, say, you broadcast your intent to buy 1 ETH on Optimism, using 2,000 USDC… but you’ll start your offer at 2010 USDC and ratchet the order increments downwards 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. Every single captain worth their salt knows that that is the current state of Ethereum’s liquidity pools. The ships wait, as the proposed price slowly falls over the moments…

$2,009… $2,008… $2,007…. All of the bots wait for their moment to strike, to grab the payload, and to deliver it to the other side of Ethereum.

$2,006… 2,005... and then, all of a sudden, pop! Out of the swarm, a single ship emerges, darts forward, grabs the payload, stuffs it inside of it, and zips off into the horizon to fulfill the job.

The execution price? $2,004.31. All MEV bots update their price model for ETH: ETH is now $2,004.31.

Meanwhile, our transaction is safely contained inside this random ship that just picked us up on the docks. There are a few things different about this ship than the ships we are used to. First, it doesn’t leave a wake. It’s not disturbing the surface of the water. The other MEV monsters can’t detect it.

THANKS TO METAMASK PORTFOLIO

No more waiting in line: the “Buy” feature in MetaMask Portfolio lets you instantly convert your money into crypto using top providers. Embrace the speed and convenience of our direct-to-wallet on-ramp and go from fiat to DeFi with ease.

Second, we’re not even on Ethereum. Our ship isn’t onchain. It’s an offchain signed order, and being an offchain signed order fundamentally inverts the relationship between swapper and the MEV monsters. And that ship from earlier, the one that executed the order for an unexpectedly high price? That was an MEV bot. You used an offchain signed order to pay for a ride across Ethereum on top of an MEV sea monster.

You turned a threat into a service provider.

Instead of building our own ships to navigate Ethereum, we simply hire a ride from a pre-existing ship that has been shaped by the massive evolutionary forces that exist inside the MEV space. We use the free market to discover the best ship for the job, all inside of a single Ethereum block.

By codifying our intent into an order (not a transaction), we created a protective shield around the body of our transaction, and said to the world of MEV bots: “you can do anything to me that you want… so long as you don’t penetrate this shield”. Then, using a dutch auction, we slowly contracted the diameter of the shields until the smallest margin of the transaction body was outside of the protective shield. Once enough margin is exposed, the most efficient and effective MEV monster snapped it up before any other MEV bot could get to it.

Instead of fighting MEV bot monsters, we ride them!

Image: leywad/deviantart

This is why offchain signed orders will likely become the new meta for swapping in Ethereum. Rather than working against MEV bots, we can instead work with them by operating inside the same plane of dimension in which they live. No longer will we have to build computationally heavy, encumbered transactions.

We will now let the free market discover the right ship for the right job.

Finishing Thoughts

This ‘new meta’ for swapping on Ethereum opens up a bunch of new doors for opportunity. We are seeing the landscapes of onchain order routing, offchain MEV, bridges, and market makers all converge together into the same space. Competition will be fierce, and the winner will be the average joe swapper.

The intent-based order meta also deals a significant blow to UX challenges that the multi-L2, multi-chain landscape bring. Ethereum made a compromise in its rollup-centric roadmap: achieve scale, preserve decentralization, but create asynchronous state across asynchronous chains. It’s fantastic for allowing 10,000 networks to bloom, but produces challenges when trying to abstract away these cross-chain-complexities to the end user.

With intents, a lot of the complexities between crosschain liquidity, chain swapping, and bridge selection, are all choices that will be made by the technical backend service providers. All the users have to do is hop on the ship and enjoy the ride. The psychological burdens of the above choices go to the service providers who are scraping for pennies. Intents will ultimately become a large piece of the puzzle to solving Ethereum’s fractured state across asynchronous chains.  

There’s also the conversation around transaction welfare. Intents are great for individuals, but they become even better when their benefits compound.

In the most ineffective world, every swapper trading on the ETH USDC Uniswap pool would line up in serial order, and rebalance the pool according to their trade. User 1 would add 50 USDC and take away some ETH, User 2 would take away 2000 USDC and add some ETH, person 3 would make their swap etc. etc., and then everything would become bundled into a block and that block would be processed. At every instance of every trade, every swapper would pay gas for rebalancing the pool.

With the intent meta, intents can be aggregated together, and the relevant AMM pool would only have to be rebalanced once, while many user trades can simply cancel each other out, without having to disturb the pool. This is the innovation behind CoW Swap, one of the original creators of this intent-based model. Once the entire meta around onchain DEXs moves to intents, the entire landscape of Ethereum swapping will be able to grow more efficient because trades will be able to be matched against each other before ever making it onchain.

*A special thanks to Hasu for help reviewing this piece.


MARKET MONDAY:

Scan this section and dig into anything interesting

*Data from 8/14 4:30 pm EST (DeFi Index = $DPI, NFT Index = $Blue-Chip-10)

Market Opportunities 💰

Yield Opportunities 🌾

What’s Hot 🔥

Money reads 📚

Governance Alpha 🚨

Token Hub: OP 📈

Analyst: Jack Inabinet

We are reiterating our rating of OP as bullish

Catalyst Overview:
With the recent success of Base, Coinbase has made it abundantly clear to traditional companies that sequencing transactions is a viable income stream. Base is an L2 built on the OP Stack, a modular blockchain framework from Optimism. We have chosen to reiterate our rating of OP as bullish in anticipation that Coinbase’s adoption of the OP Stack standard will likely serve as a source of inspiration for future entrants.

The Optimism ecosystem will only benefit from a quickening influx of development teams, who (like Coinbase) may contribute towards the development of the OP Stack and/or kick back a percentage of their revenues to Optimism public goods funding.

Conduit is a rollup-as-a-service provider that will make it easy for those following in Coinbase’s footsteps to deploy an OP Stack chain in just a few clicks. It was leveraged by Zora to deploy their OP Stack L2 and could become a convenient enterprise chain solution for companies who want to enjoy the benefits that come with owning their own transaction layer that settles to Ethereum, but require technical support.

Price Impact:
OP has already outperformed much of the market and is one of the rarified tokens that has outperformed ETH during 2023. We anticipate that this trajectory will continue and anticipate OP to perform well on a going forward basis against both Ethereum and the broader rollup sector.

See more ratings in the Token Hub.

Meme of the Week 😂

Not financial or tax advice. This newsletter is strictly educational and is not investment advice or a solicitation to buy or sell any assets or to make any financial decisions. This newsletter is not tax advice. Talk to your accountant. Do your own research.

Disclosure. From time-to-time I may add links in this newsletter to products I use. I may receive commission if you make a purchase through one of these links. Additionally, the Bankless writers hold crypto assets. See our investment disclosures here.

Account Light mode Log Out