Swap
API
Gasless
API
“Building a performant DEX aggregator is hard. It’s a multidimensional problem that encompasses liquidity and routing across a multitude of token pairs, DEXs, and chains. 0x v2’s deep liquidity and advanced trade routing enables Matcha to deliver serious pricing to serious traders, offering the best price 93% of the time across trade sizes compared to competitors.”
- Emanuele Lanni, Product Manager at Matcha.
Highlights
- Better prices: With 0x v2, Matcha offers the best swap price 93% of the time across trade sizes compared to competitors.
- Whale watching: Matcha saw a 16% increase in new whale traders in the 45 days following the launch of v2, generating $170M in volume.
- Optimal execution: 0x v2’s advanced order routing has led to a 7x increase in the number of trades featuring advanced routes, unlocking optimal trade execution for Matcha users.
- Eliminated allowance risk: Utilizing single-use Permit2 allowances, Matcha has reduced allowance risk to virtually 0.
What is Matcha?
Matcha is a DEX aggregator that offers the widest market coverage in the crypto ecosystem. Traders on Matcha have access to more than 7 million tokens and liquidity from 140+ DEXs, across 10 different blockchains.
Built by 0x, Matcha benefits from nearly a decade of deep DEX aggregation and smart order routing expertise.
With the launch of 0x v2, Matcha was the first to integrate 0x’s next-gen pricing engine. In this case study, we’ll explore how 0x v2 enables Matcha to offer the best order execution in DeFi.
The challenges of DEX aggregation
Launched in 2020 with the mission of building the most frictionless experience for searching and trading tokens, Matcha helped pioneer smart order routing and was one of the very first trading platforms to aggregate liquidity from multiple DEXs (15 in total to start).
Since then, Matcha has become an essential platform for trading onchain - growing to support over 7 million tokens across 10 chains with seamless gasless and cross-chain swaps, all wrapped into a simple yet powerful user experience.
DEX aggregation, like Matcha’s, initially arose to meet the challenge of fragmented liquidity with the explosion of DEX protocols in 2020. However, since then, liquidity has become only more fragmented with the arrival of a multitude of EVM L2s, even more DEXes, and millions of new tokens.
Aggregating all of this liquidity and providing the best all-in price across token pairs and sizes, especially for serious traders swapping serious size, is a multi-dimensional problem:
- “All-in” prices: Aggregators need to optimize for the best price, all-in, and not just the quoted price. The best all-in price takes into account gas, slippage, and buy/sell taxes, while minimizing revert rates.
- Deep liquidity: Liquidity is spread across hundreds of sources and chains, and new liquidity pools pop up on a daily basis. New liquidity sources need to be integrated quickly, while maintaining the overall quality of the liquidity portfolio. Missteps in sourcing liquidity can manifest in poor experiences for users, weak pricing, and lack of token coverage.
- Advanced routing: Advanced routing is the key to minimizing price impact for traders swapping serious size and delivering the best prices. And the direct route isn’t always the best route. For token pairs with limited liquidity, intermediate tokens are needed to open up deeper liquidity and ensure optimal routes.
- Comprehensive coverage: Users need to be able to swap across a multitude of EVM chains and millions of tokens. Aggregators need to support these chains with deep liquidity coverage for the best execution regardless of what chain a user is trading on.
- Buy/sell taxes: ~25% of DEX users now trade tokens with buy/sell taxes on Ethereum. They are the #1 cause of custom token related errors on Matcha. Lack of robust support leads to high error rates and a poor user experience.
Given the increasing complexity of these problems, an evolution in DEX aggregation technology was needed to meet the challenges of today’s DeFi landscape.
Serious swaps for serious traders
With Matcha focused on building the most frictionless and powerful trading experience in DeFi, 0x v2 presented an opportunity to expand their user base by delivering industry-leading trade execution and pricing to serious traders.
Matcha was the first to integrate 0x v2 in July, providing users with state-of-the-art order routing, buy/sell tax support, enhanced security, and more.
Our next-generation pricing engine, 0x v2, was rebuilt from the ground up to optimize for execution quality - identifying the route expected to deliver the best all-in price.
Optimal execution
0x’s new Argon Router utilizes a state-of-the-art algorithm to deliver the optimal execution path utilizing multiplex and multihop.
Multiplex: Splitting a trade across multiple liquidity sources. A cornerstone of 0x’s smart order routing, multiplex routing enables Matcha to tap into and split trades across 140+ automated market markers (AMMs) and professional market makers (0x RFQ). 0x RFQ provides exclusive CEX-like liquidity from sophisticated market markers to open up additional, slippage-free routes for route optimization.
Multihop: Identifying intermediate token steps which open up deeper liquidity. For trading pairs with limited liquidity, or even pairs with significant volume that suffer from thin liquidity between the buy and sell token, the ability to hop across multiple intermediate tokens, for instance going from WBTC to USDC to WETH, enables the optimal use of onchain liquidity.
Deep liquidity and advanced routing are key to getting the best prices in DeFi. Now, with 0x v2, new liquidity sources can now be integrated in hours not weeks, enabling Matcha to offer deep, continuously improving coverage across 10 chains and counting.
To showcase the power of the v2 pricing engine, every trade on Matcha now features a detailed Sankey diagram showing users the exact route the trade is taking to ensure the best price, from simple one-to-one trades to multihop & multiplex routes utilizing a score of liquidity sources and intermediate tokens, giving users deeper insight into their trades.
For example, let’s take a look at the Sankey for this $2.08M trade on Matcha. Here’s what’s happening behind the scenes:
- User is swapping MKR for USDT on Ethereum
- Overall, the swap features 23 fills across 9 liquidity sources (multiplex) and 4 intermediate tokens (multihop)
- The route uses DAI, WETH, WBTC, and USDC as intermediate tokens
- 80% of MKR is routed through Uniswap v2 on the first hops
- 0x RFQ is utilized for 11 fills throughout the course of the trade
In this example, the Matcha user is trying to trade a large amount of MKR for USDT. This pair suffers from shallow direct liquidity between the two tokens, so 0x v2 utilizes two stablecoins (DAI and USDC) and two blue chips (WETH and WBTC) as intermediate tokens to open up deeper liquidity along the way, with Uniswap v2 and 0x RFQ being tapped throughout the trade, along with 7 other liquidity sources. And all of this happens in nearly an instant.
By routing through a multitude of liquidity sources AND intermediate tokens, Matcha ensures the best price for a trade that would otherwise face significant price impact and slippage.
Just how advanced is v2’s routing?
Matcha has seen a sizeable increase in the number of fills per trade with v2, i.e. trade complexity. On v1, approximately 1.1 fills were completed per trade on average, with only ~10% of trades featuring advanced routes unlocking better pricing. With v2, the number of fills per trade has increased to 1.7, with ~70% of trades featuring both multihop and multiplex routing to find better pricing.
For serious traders
Thanks to 0x v2’s advanced routing, Matcha provides the best swap price 93% of the time across trade sizes compared to Uniswap.
Matcha really shines for serious size. For trades from $1M and beyond, Matcha offers the best prices 98% of the time. And whales have taken note.
The largest whale trade on Matcha? This $10M USDC <> USDT swap in October. As a stablecoin to stablecoin swap, this trade features a fairly simple route, utilizing no intermediate tokens. However, even a swap between tokens with deep liquidity benefits from aggregated liquidity, as the trade is routed through five different sources to provide the best price.
In the trade above, a whale swapped $5M USDC for USDe, with Matcha utilizing 3 intermediate tokens and 5 liquidity sources to make optimal use of onchain liquidity.
Powered by 0x’s next-gen price engine, Matcha has become the go to DEX for serious traders. In the 45 days following launch of v2, Matcha saw a 16% increase in new whale traders.
State-of-the-art buy/sell tax support
Until now, there hasn’t been a way to get reliable, real-time data on buy/sell taxes in order to properly support them. Custom token related errors were the #1 cause of errors on Matcha, with many the result of tokens with buy/sell taxes.
0x v2 features real-time buy/sell tax detection and calculation, minimizing errors related to custom tokens and improving the trading experience for users. With v2, Matcha is able to offer reliable buy/sell tax support and accurately surface the tax for a given trade to their users.
Since launch, Matcha has seen a 57% reduction in buy/sell tax support tickets and a 19% decrease in tickets overall.
Ready to get serious with 0x v2?
Built to meet the needs of growing Web3 businesses, 0x v2 offers the most seamless swap product for developers with optimal trade execution, buy/sell tax support, and enhanced security baked in at the ground level.
0x v2 is the next-generation trading engine for serious onchain apps. Join over a dozen teams, including Matcha, Coinbase, and Definitive, already building with 0x v2.
Test drive v2 on Matcha today.
Sign-up for a free account on the 0x Dashboard to get started.
Best price
on 93% of trades
16%
increase in new whale traders
7x
increase in advanced routes
Ready to get started?
Create a 0x account and embed swaps in your app, for free, in less than five minutes.