Uniswap Labs Blog

Introducing the UniswapX Protocol
July 17, 2023

By Hayden Adams

Since the first version of the Uniswap Protocol launched in 2018, onchain trading has exploded to support millions of users, hundreds of use cases, and $1.5 trillion of trading volume on Uniswap alone.

To grow onchain trading and improve self-custody swapping, we're excited to announce a new permissionless, open source (GPL), Dutch auction-based protocol for trading across AMMs and other liquidity sources.

Today, we're rolling out an opt-in beta for the protocol on the Uniswap Labs interface, available for Ethereum Mainnet and expanding to other chains and the Uniswap app in the future. You can review the code here and read the full whitepaper here.

Over time, UniswapX will improve swapping in several ways:

  • Better prices by aggregating liquidity sources
  • Gas-free swapping
  • Protection against MEV (Maximal Extractable Value)
  • No cost for failed transactions
  • And in the coming months, UniswapX will expand to gas-free cross-chain swaps.

Next-level aggregation

Onchain routing is an increasingly important and complex problem. Innovations in onchain trading have led to an explosion of liquidity pools. New fee tiers, new L2s, and more onchain protocols fragment liquidity. And we expect thousands more customized pool designs will be built on Uniswap v4, making routing even more challenging. But as liquidity sources grow, continuing to offer competitive prices requires manual integration and significant ongoing maintenance and effort.

UniswapX aims to address this by outsourcing routing complexity to an open network of third-party fillers who then compete to fill swaps using onchain liquidity like AMM pools or their own private inventory.

With UniswapX, swappers will be able to use the Uniswap interface without worrying whether they're getting the best price and transactions will always be transparently recorded and settled onchain. All orders are backstopped by the Uniswap Smart Order Router, which forces fillers to compete with Uniswap v1, v2, v3 and, once it launches, v4. Check out examples of how UniswapX can work for users here.

UniswapX Swap Flow Diagram

Gas-free swapping — and no cost for failed swaps

With UniswapX, swappers sign a unique offchain order, which is then submitted onchain by fillers who pay gas on swappers' behalf. Because swappers don't have to pay gas, they don't need a chain's native network token (e.g. ETH, MATIC) to trade or pay anything for a failed transaction. Fillers price the gas fee into the swap price, but can lower transaction costs by batching multiple orders to compete for the best price.

Users still need to pay gas under specific circumstances, such as for the initial token approval of Permit2. Additionally, native network tokens need to be wrapped when selling, which costs gas.

MEV protection

MEV is one of the biggest issues facing onchain swapping today, resulting in worse prices for swappers.

With UniswapX, MEV that would be left on the table to be captured by an arbitrage transaction is instead returned to swappers through improved prices. UniswapX also helps users avoid more explicitly extractive forms of MEV: orders executed with fillers’ inventory cannot be sandwiched, and fillers are incentivized to use private transaction relays when routing orders to onchain liquidity venues.

Next: UniswapX goes X-chain

Later this year, we'll launch a cross-chain version of UniswapX that combines swapping and bridging into one seamless action. With cross-chain UniswapX, swappers will be able to swap between chains in seconds. Swappers can also choose which assets they receive on the destination chain, instead of a bridge-specific token. More detail on cross-chain UniswapX's design and benefits are available in the whitepaper.

Launching UniswapX on the Uniswap Labs’ interface

UniswapX brings ideas and models from across DeFi and digital markets to a new system, built with the same principles of security, self-custody, and community that have made Uniswap the most trusted brand in DeFi.

UniswapX is an immutable smart contract built to be fully permissionless. No one, including Uniswap Labs, can modify or pause the contract. The earliest fillers are standing by to ensure appropriate auction starting prices and quick order execution, and we expect the filler network will expand quickly with user adoption. To join that ecosystem as it develops, click here.

Consistent with our commitment to security, ABDK extensively tested and audited the code, and we're offering a bug bounty. Swappers always maintain self-custody of their funds. Assets are only transferred out of their accounts once the order is executed and they've received proceeds from their trade.

Just like the Uniswap Protocol, UniswapX contains a protocol fee switch that can only be activated by Uniswap Governance (Uniswap Labs doesn't participate in that process).

We're incredibly excited for this next chapter. You can stay up to date via Twitter, Discord, and our blog.

Related posts