TL; DR: Time is the worst enemy for MEV bots. Trade on SIZE to avoid many of the common MEV attacks like front-running and sandwiches.
Avoid MEV Attacks with SIZE
SIZE is a decentralized exchange that uses time to be MEV resistant. SIZE allows traders to execute trades at the 30-minute TWAP of an asset. Here’s how it works:
- Trader submits order to SIZE
- SIZE holds traders funds for 30 minutes
- At the end of the 30 minutes, SIZE gets the 30-minute TWAP from an oracle
- SIZE does a swap at this 30-minute TWAP price with zero price impact
- The traded funds are released to the trader.
Because we introduce a 30 minute delay in to the process of the swap, it becomes very expensive to conduct the standard MEV attacks against a trade using SIZE. No front-running or sandwich bot wants to take price risk for 30 minutes, and this means that trades on SIZE are safe from these dangers.
MEV and Large Trades
Maximum extractable value (MEV) and the fight for profit in the dark forest is a big area of interest for the Integral team. We built the SIZE exchange to help facilitate large trades from whales, DAOs and degens alike. When conducting large trades on chain, it is super important to be aware of the risk for MEV attacks.
If you’re not familiar with MEV, there are a ton of resources from groups like Flashbots that will introduce you to the basics. The most common attacks against traders are sandwiches and front-running. In both, a trader ends up with less of an asset than they could have without the MEV interference.
While there has been endless research on MEV and its effects, much of the relevant advice for traders has been limited to variations of “change your slippage settings”.
A low slippage tolerance setting is helpful. When you have high slippage settings, MEV bots are more likely to capture the spread between market prices and your worst acceptable order price. An article from 0x protocol showed that this effect got worse as trades got larger.
By analyzing trades of different sizes and the difference between the minimal acceptable price for the trade with the execution price, they showed that larger traders average worse slippage on almost every main trading pair. So while minimizing slippage impact is good advice, it is not always practical when doing trades on chain.
A trade that uses 1% of a Uniswap v2 pool TVL will result in a price impact of almost 2%. Read more about price impact in DeFi in our previous post: Myth or Reality: Zero Price Impact Trading in DeFi
This means that whales are caught between a shark and a hard place. When doing a big trade, in illiquid markets, whales might have to set a high slippage tolerance. But this opens up more opportunities for MEV extraction and worse trades.
One Thing MEV Bots Hate: Time
The best technique for avoiding MEV attacks might be to add an element of time in to your trades.
Most MEV bots rely on the ability to execute multiple transactions within a block. By combining and reordering these transactions opportunities for profit are exposed and exploited. But when utilizing a time variable by trading in between or over many subsequent blocks, these opportunities for easy profit are removed.
Take for example, a simple front-running MEV opportunity.
- Trader submits trade with worst acceptable price.
- MEV bot sees market price below the traders acceptable price.
- MEV bot buys at low market price
- MEV bot sells to trader at worst acceptable price and makes a profit
These kinds of attacks are conducted in a single block and with minimal economic risk. When you introduce the element of time, it changes the equation for MEV bots. An actor looking to execute this type of front-running attack over many blocks is exposed to price risk by holding one token. If the market moves against them, it could render the attack unprofitable. For this reason, most MEV stays in the realm of single block transactions.
Time is an underrated factor in reducing your MEV attack surface.
The Future of MEV
At Integral, we are building the next generation of DeFi protocols. While the first set of DeFi protocols focused heavily on the decentralized part of “decentralized finance,” we think it is just as important for mass adoption to focus on the “finance” side of the equation. For us this has meant building tools that let large traders execute in DeFi with the feature comforts that are available for high-volume tradfi traders.
It also means keeping a focus on our users and limiting negative externalities like MEV for all stakeholders in the protocol from LPs to traders.
With time, the limitations and issues of the early DeFi protocols have come to light. One of the major ones is the lack of MEV protection available for traders using Uniswap and other earlier DeFi protocols. Since then, the issue of MEV has become a hot topic, with commentary from across the space including Vitalik himself. As DeFi continues to evolve, we’ll be here developing solutions that bring the best experience for everyone.
Trade with SIZE today to get MEV resistant trading using a 30-minute TWAP at: https://integral.link/
We hope you enjoy this blog post. If you would like to learn more about this topic, here are some good twitter accounts that we think you should follow: @bertcmiller
If you would like to reach out to us to discuss it more deeply, or want to suggest a topic for us, feel free to email us firstname.lastname@example.org.