In this report, we peel back the curtain on how 0x RFQ delivers better prices through Swap API 46% of the time compared to AMMs for pairs where it’s available. In analyzing how 0x optimizes for best price execution, we determine which liquidity models work best for which markets, dive deeper into the structural advantages of RFQ, and demonstrate why enabling RFQ in Swap API ensures the best executed prices for your users.
Optimizing for best executed price
Swap API aggregates liquidity from 100+ sources. These sources include the top Automated Market Makers (AMMs), as well as exclusive liquidity from professional market markers surfaced through 0x RFQ.
Swap API’s smart order routing searches all of these liquidity sources to optimize for the best executed price. Meaning that whenever a user makes a trade from Token A to Token B, they should be getting the highest amount of Token B factoring in the cost it takes to execute the trade.
This is an important distinction because when trading on decentralized exchanges there are a range of variables that can alter the price of a trade, such as slippage, gas fees, and price impact. Many DeFi applications today only show quoted prices, which do not incorporate slippage and can drastically differ from the executed price. What you see is not always what you get.
As DeFi has continued to evolve, this problem has gotten more and more complicated. Liquidity sources, including open orderbooks, automatic market makers (AMMs), and RFQ, have continued to grow in number and complexity.
Each of these liquidity models have their strengths and weaknesses; this piece will be looking specifically at RFQ. Given that Swap API optimizes for best executed price, it is agnostic to what liquidity is used - no preferential treatment is given to any one source.
We can break these differences and their impact on pricing into three components:
- Different liquidity models have different methods of pricing assets
- Different transactions have different expected slippage
- The more complicated it is to complete the trade, the higher the cost to execute it
In this report, we’ll explore RFQ in terms of these components to better understand how it is able to open up additional avenues for trade route optimization and deliver better prices 46% of the time compared to AMMs for pairs where it’s available.
Different liquidity models have different methods of pricing assets
Let’s start by mapping DEX liquidity models to token pairs. We can think of the categories of trading pairs as falling on a correlation spectrum:
Category 1 (pegged pairs) is made up of pairs like USDC-DAI, USDT-USDC, etc. that are nearly perfectly correlated by design.
Category 2 (non-pegged pairs) is made up of some of the most highly traded pairs - the “household names”: WETH-DAI, WETH-WBTC, etc. These assets are frequently in price discovery.
Category 3 is our long tail. It’s made up of the rest of the lesser-known assets.
Over the past 90 days, Swap API trading volume is broken down as follows:
Between AMMs, orderbooks, RFQ, and other more niche liquidity models, it turns out that different liquidity models work best for different types of token pairs because of their correlative or non-correlative nature.
Professional market makers (MMs), which provide liquidity through RFQ, have sophisticated strategies to predict which way the market is heading in the short term - the better they are able to do this, the better they are able to mitigate their operational risks, which in turn allows them to offer more competitive prices while remaining profitable.
Category 2 encompasses low-correlation trading pairs often in price discovery. Sophisticated market makers bank on their predictive ability which is exactly why they are extremely well-suited to serve category 2. This category is where sophisticated market makers compete heavily with AMMs.
For this same reason, AMMs are well-suited to serve categories 1 and 3. AMMs are powered by “passive” liquidity that doesn’t leverage any advanced predictive ability. Category 1 lends itself well to AMMs because these pairs are designed to correlate nearly perfectly, sophisticated market makers have no edge in their predictive ability as compared to the average retail trader.
💡 What does this mean for end-users? RFQ is a liquidity source designed to be the most competitive for the most highly traded pairs.
Different transactions have different expected slippage
Beyond predictive ability, we also have to factor in structural advantages favoring RFQ: AMMs suffer from price impact, sandwich attacks, and more, drawbacks that RFQ doesn’t suffer from.
When RFQ is enabled, every time an end-user requests a quote on a Swap API-powered app, the API pings professional market makers while also checking the prices of the 100+ AMMs it aggregates. Swap API takes the RFQ quote and uses it, alone or in combination with other sources, if it will provide the best executed price for the trader.
The structural advantage of RFQ is that this quote is ‘custom’ for the trader.
In addition to being custom to each trade, the rate of exchange defined by the quote is enforced on a smart contract level such that it cannot deviate from it. Meaning that there will be no price impact or slippage.
Compare that to a transaction with a typical AMM, the rate of exchange is defined by the amount of assets in the liquidity pool which can deviate depending on what transactions come before or after each trade. Any transaction modifying the state of the same liquidity pool you’re targeting will result in a slightly different price than the one you were quoted. In other words, slippage.
In just the past year, MEV bots have extracted over $473 million from traders. MEV bots attempt to extract as much as they can from AMM trades, increasing the realized slippage. Slippage is only visible after trade settlement and typically goes unreported to the end user.
Swap API features Slippage Protection, which incorporates slippage statistics into its smart order routing algorithm to determine when it’s safer to route trades to RFQ liquidity to avoid MEV-induced slippage.
💡 What does this mean for you? Protect your users from MEV attacks and slippage with RFQ, where quoted price = executed price. Period.
The more complicated it is to complete the trade, the higher the cost to execute it
Gas fees are an inescapable part of interacting with blockchains. “Gas” is a unit that essentially measures how much computational work is required to execute a specific action on a blockchain. Different transactions can have different levels of complexity, which can impact how much gas a transaction consumes.
RFQ transactions are designed to be the most efficient action that can be taken on 0x Protocol. Below is a table comparing the gas costs associated with WETH <> USDC trades of differing trade sizes for RFQ orders vs. the most popular AMMs though Swap API.
As we can see, RFQ is more gas efficient than Uniswap and Curve for all trade sizes, in some cases up to 70% cheaper. How? Simply put, RFQ trades require less computation to execute than the typical AMM trade.
💡 What does this mean for you? RFQ orders are more gas-efficient than AMMs, helping your users save on transaction costs.
RFQ By the Numbers
How does this understanding of liquidity models and the advantages of RFQ map to the reality we see represented in the data?
In the chart below, we can see that RFQ is consistently beating all other liquidity sources for pairs where it’s available, delivering the best prices for 46% of trades over the last 90 days.
Now how does RFQ perform when breaking down transactions by the categories we mapped out earlier? Below is a chart of RFQ’s share of Swap API transactions over the last 90 days for the categories mentioned above.
Category 1 consists of the top 5 pegged pairs (USDC - USDT, DAI - USDC, WETH - wsETH, cbETH - WETH, stETH - WETH). Category 2 consists of the top 5 non-pegged pairs (the "household names": USDC - WETH, USDT - WETH, WBTC - WETH, USDC - WBTC, DAI - WETH). Category 3 encompasses all other trading pairs.
Here we can see that RFQ is providing the best price 77% of the time for top 5 category 2 pairs, which account for a quarter of all trading volume on Swap API, beating out all other liquidity sources. An interesting trend to note is that while AMMs are well-suited to serving category 1 pairs, RFQ is still winning 36% of the time for the top 5 pegged pairs over the past month.
Breaking it down by volume, RFQ is providing 26% of all liquidity served for category 2 pairs via Swap API. We can also see from the chart above that RFQ’s share of category 2 volume has been steadily growing over the last 90 days, reaching a single-day high of 76% in September.
Let’s take a look at how RFQ performs by trade size. Below is a chart of RFQ’s share of category 2 volume by trade size over the last 90 days. We can see that RFQ performs extremely well for small trades, accounting for 89% of all category 2 volume for trades less than $100. RFQ has also served 48% of volume on trades between $100 and $100k and 22% of volume on trades over $100k.
Deliver the best prices with RFQ
Swap API aggregates liquidity from 100+ sources to find the route expected to yield the best executed price. Deeper liquidity and greater diversity of sources means better pricing for end-users.
Each of these liquidity sources, whether that be orderbooks, AMMs, or RFQ, has its pros and cons. As we’ve seen, different liquidity models have different methods of pricing assets and are better suited for some trading pairs over others. On top of that, execution efficiency and slippage risk varies between sources.
With protection from MEV attacks, zero slippage, and highly efficient execution, RFQ isn’t just your average liquidity source. Enabling RFQ opens up additional avenues for trade route optimization and ensures that the best prices for users are available directly in your app.
Ready to tap in RFQ liquidity?
If you’ve already integrated Swap API, turning on RFQ liquidity is as simple as providing a takerAddress in your /swap query. Check out our quick tutorial to get access to RFQ liquidity in less than 5 minutes.
New to 0x? Sign-up for an account on the 0x Dashboard to tap into RFQ liquidity today.
Contents
Subscribe to newsletter