[Paper Review] FairPoS: Input Fairness in Permissionless Consensus
This paper proposes a novel, optimal strategy called the 'Dagwood sandwich' to maximize Miner Extractable Value (MEV) in constant-product Automated Market Makers (AMMs), such as Uniswap. By strategically inserting multi-layered transactions—swaps, deposits, and arbitrage moves—before and after user actions, the adversary extracts up to $5,700 from a single user sequence, outperforming traditional swap-only front-running by 14%.
Automated Market Makers (AMMs) are decentralized applications that allow users to exchange crypto-tokens without the need for a matching exchange order. AMMs are one of the most successful DeFi use cases: indeed, major AMM platforms process a daily volume of transactions worth USD billions. Despite their popularity, AMMs are well-known to suffer from transaction-ordering issues: adversaries can influence the ordering of user transactions, and possibly front-run them with their own, to extract value from AMMs, to the detriment of users. We devise an effective procedure to construct a strategy through which an adversary can maximize the value extracted from user transactions.
Motivation & Objective
- To formalize the MEV game in constant-product AMMs, where adversaries reorder, insert, or drop transactions to extract value.
- To address the gap in existing research that only targets swap transactions, by extending MEV extraction to deposits and redemptions.
- To construct an optimal, multi-layered transaction sequence that maximizes profit across all AMM transaction types.
- To demonstrate that prior heuristics fail on complex user transaction sets involving deposits and redemptions.
- To provide a generalizable framework applicable to miners, roll-up aggregators, and flashbots-enabled transaction bundlers.
Proposed method
- Proposes a layered transaction strategy—'Dagwood sandwich'—involving three distinct transaction layers: pre-swap, user action, and post-arbitrage.
- Uses the constant-product invariant (x × y = k) to model AMM reserves and compute exact token amounts before and after each transaction.
- Constructs a sequence where an adversary first performs a reverse swap (paying τ1 to get τ0), enabling the user’s deposit by adjusting reserves.
- Inserts a final arbitrage swap to profit from the altered reserves after the user’s deposit and swap.
- Optimizes the strategy by excluding user redeem transactions when they reduce profit, based on reserve dynamics.
- Applies the strategy to a composite user transaction set including swap, deposit, and redeem actions, proving optimality via formal modeling.
Experimental results
Research questions
- RQ1Can a general, optimal strategy be constructed to extract MEV from all types of AMM transactions—swaps, deposits, and redemptions—simultaneously?
- RQ2Why do existing heuristic-based MEV extraction techniques fail on transaction sets involving deposits and redemptions?
- RQ3What is the maximum extractable value achievable through a multi-layered sandwich attack that manipulates AMM reserves across multiple transaction types?
- RQ4How does the inclusion of deposit and redeem actions in the attack sequence affect the total profit compared to swap-only strategies?
- RQ5Under what conditions is the Dagwood sandwich strategy optimal, and how does it scale under real-world constraints like block size and fees?
Key findings
- The Dagwood sandwich strategy extracts $5,700 from a single user transaction sequence involving a swap, deposit, and redeem—14% more than swap-only attacks.
- The strategy successfully enables a user’s deposit by first performing a reverse swap, which prior heuristics cannot do due to directional mismatch.
- The approach outperforms classical front-running by exploiting the interplay between multiple transaction types and reserve dynamics.
- User redeem transactions are excluded from the attack when they reduce profit, demonstrating strategic selection based on economic impact.
- The method is formally proven optimal under the assumption of fixed token prices and no transaction/swap fees, providing an upper bound on extractable value.
- The framework is applicable to real-world MEV extraction mechanisms such as flashbots and roll-up aggregators, where transaction bundling is feasible.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.