Uniswap Labs Blog

Measuring Price Improvement with Order Flow Auctions
May 01, 2024

Research from Uniswap Labs proposes a new methodology for measuring price improvements across Order Flow Auctions (OFAs). Read the full paper here.

The Rise of Order Flow Auctions

Uniswap has been a pioneer of automated market makers (AMMs) – which have gained significant traction over the past few years. The Uniswap Protocol alone has processed over $2 trillion in all-time volume, with over 465 million swaps.

Order Flow Auctions (OFAs) have been proposed as a complement to the AMM. Systems like UniswapX, 1inch Fusion, CoWSwap, and Flashbots Protect introduce methods like batching and auctioning to optimize trading outcomes for all participants. These OFAs aim to redistribute surplus from specialized actors to swappers.

Measuring Price Improvements from OFAs

While OFAs offer a promising solution to complement the AMM, there is no clear framework for evaluating the impact of introducing these systems into DEX interfaces. Quotes offer a simple way to compare prices across interfaces in a given moment, but swaps on some interfaces often settle at prices that are different from original quotes.

New research from Uniswap Labs introduces a novel, open source methodology to evaluate and compare OFAs, focusing on Price Improvements (PI). The methodology outlined in this research can be applied across any set of trades, focusing on three key factors that impact price improvement: liquidity access, gas optimization, and priority fee settings.

One of the most distinct elements of the methodology outlined in the paper is that it does not look at price improvements of OFAs in isolation — that’s not how users interact with these systems. Instead, the methodology focuses on interfaces as a whole, assessing price execution that incorporate trades that leverage both AMMs and OFAs on a given interface.

We then apply this methodology to Uniswap and 1inch (the top two OFAs by volume and trade count) using data from the WETH/USDC pair on Ethereum mainnet (the top pair by volume).

Research Results

Our early application of this methodology using the WETH/USDC pair uncovers four key findings. Note that when using the term “interface” we are referring to systems that send user trades through either the AMM or the OFA (often depending on which gives the best price).

1. On average, swappers get better prices on the Uniswap interface than on 1inch.

By comparing to a common baseline, the research finds that swappers using the Uniswap interface see better prices than swappers using 1inch on average.

PI on Uniswap vs. 1inch

Average price improvement on the Uniswap interface shown on the left, average price improvement on the 1inch interface shown on the right. Includes both swaps sent through OFAs (UniswapX and 1inch Fusion) and AMMs (Uniswap AMM and 1inch Aggregator).

2. The Uniswap AMM still outperforms 1inch Aggregator on average.

Even when we exclude OFAs and look only at AMM data, we find that the Uniswap AMM (shown as Uniswap Classic) outperforms 1inch Aggregator on average. This may seem counterintuitive, since 1inch can theoretically send trades through any onchain liquidity source. That additional step, however, means users incur additional costs – like added gas costs to interact with multiple protocols that often results in worse price execution for swappers.

Price Improvement Factors

Total price improvement across UniswapX, 1inch Fusion, Uniswap Classic, and 1inch Aggregator highlighted in yellow. Note that the baseline shown above, while similar to Uniswap Classic, is slightly different in practice. The Uniswap Classic sample contains actual settled trades (which could happen anywhere in a block), whereas the baseline is simulated at the end of the block. This baseline is generated from a static environment, while the Uniswap Classic sample could be dynamically impacted by other onchain players (such as just-in-time liquidity providers). For these reasons, it is reasonable for the Uniswap Classic sample to have PI that is slightly different from zero. In the case above, this difference is less than 1 basis point in total.

3. For trades 50k or larger, the Uniswap interface provides statistically significant price improvements over 1inch.

While the Uniswap interface on average provides better prices for swappers than the 1inch interface, the data shows that price improvements are particularly pronounced for trades in the 50k to 200k bucket.

PI by Median Trade Size

Price improvement on the Uniswap interface shown in pink, price improvement on the 1inch interface shown in blue. Includes both swaps sent through OFAs (UniswapX and 1inch Fusion) and AMMs (Uniswap AMM and 1inch Aggregator).

4. UniswapX makes the Uniswap interface better.

The data shows that UniswapX introduced almost 5.3 bps in price improvement when added to the Uniswap interface, representing a 4.7 bps price improvement on average for users of the Uniswap interface.

Further Research

AMMs and OFAs complement one another — the AMM provides vital infrastructure for onchain liquidity, while OFAs act as an optimization offering MEV protection and the ability to tap into offchain liquidity. These systems work together in theory, but a methodology for understanding price differences across interfaces with OFAs in practice is vital. While swappers can use quotes to understand price differences across interfaces, those quotes only provide prices at a snapshot in time and some interfaces quote overly-optimistically (meaning actual execution can be worse than quoted price).

The methodology and research outlined in this paper helps to establish a source of truth as OFAs evolve and more players innovate in onchain market structures. This research is ongoing, and we're excited to keep advancing our understanding of how the Uniswap interface can bring together more market structures to continue giving swappers better prices.

Read the full paper here.