Jump Crypto: Best Practices for Understanding Mempool Transactions

As a crucial part of transactions, there have been optimizations and innovations in both the “transaction supply chain” and protocol layers, but few have focused on the Mempool layer. This article, co-authored by Jump Crypto researchers Lucas Baker, Nihar Shah, Alex Toberoff, and Suraj Srinivasan, explores how to prevent risks such as sandwich attacks in the Mempool.

Sandwich attacks are the main issue with MEV on-chain, which constitutes a significant portion of all publicly submitted transactions on the Mempool. While some services exist to privatize transactions or protect them from value leakage, the continued prevalence of sandwich attacks suggests that most users have not adopted them. In fact, most DeFi transactions are submitted directly through protocol front-ends using default execution parameters (such as a 0.5% maximum slippage on Uniswap), indicating a need for simpler solutions. One such solution is intelligent transaction structuring, optimizing the number of transactions and parameters for each transaction. This can be purely implemented at the DEX front-end, without any additional trust assumptions or changes to infrastructure.

A broader sandwich prevention effort requires answering three questions: 1) Single exchange parameters: how should mempool traders set slippage limits to minimize expected loss on a single transaction? 2) Optimal exchange splitting: within a single pool, how should mempool traders split a large exchange into multiple parts to execute across consecutive blocks? 3) MEV-aware DEX routing: in multiple pools, how should DEX aggregators consider MEV to minimize expected end-to-end loss?

We propose a theoretical framework to solve the first and second questions, simplifying the problem to a set of closed-form solutions. Firstly, we show how to set parameters for a given transaction size to balance expected losses during execution (such as transaction failures and gas costs) with extraction losses (such as sandwich attacks). Secondly, we demonstrate that, given a concave value function where slippage increases with transaction size (e.g. on Uniswap and Curve), the optimal solution is to split large exchanges into equally sized transactions executed across consecutive blocks, with specific sizes determined by the value function.

Reference: https://jumpcrypto.com/writing/understanding-optimal-swap-behavior-for-mempool-transactions/

Like what you're reading? Subscribe to our top stories.

We will continue to update Gambling Chain; if you have any questions or suggestions, please contact us!

Follow us on Twitter, Facebook, YouTube, and TikTok.


Was this article helpful?

93 out of 132 found this helpful

Gambling Chain Logo
Digital Asset Investment
Real world, Metaverse and Network.
Build Daos that bring Decentralized finance to more and more persons Who love Web3.
Website and other Media Daos

Products used

GC Wallet

Send targeted currencies to the right people at the right time.