Systems: 0x Synthesis

Systems: 0x Synthesis

July 22nd, 2022
This post is the second part of a 2-part perspective on the Web3 company 0x, completed jointly with Justin Cullen. The top-level TL;DR is that we study 0x from a systems thinking perspective.
We start by analyzing the 0x system itself in Part 1 and then go on in this part to synthesize 0x within the broader system - Web3 Order Flow. Comments, questions, and claims of “you’re wrong” can be sent to any of my inboxes.

Synthesis

TL;DR: We ask where 0x fits into the larger system that is Web3 Order Flow. 0x itself is a tech stack whose foundation is the 0x Protocol hosted on Web3 blockchains. To most of the Web3 community, the defining 0x service is the liquidity aggregation provided by the 0x API. The group 0x Labs builds some of this stack, including the 0x API, but other companies also take part. This includes Trader’s Swap SDK and DexKit’s white label products.
We try to understand this system in-depth with a focus on the role of decentralized liquidity aggregators (”DEX Aggregators”) and how they will evolve as businesses. There’s an apt comparison between them and travel aggregators like Sabre, which we refer to throughout the synthesis.
 

 
The speed run story of Web3 is that society has rebuilt most of finance as a shadow system called DeFi. This happened year by year, piece by piece, and the result is an impressive interconnected system of composable parts.
Of central importance is the system handling Order Flow, within which is a subsystem of Aggregators. The Aggregators are responsible for efficiently connecting available Supply with Demand, a key role in any marketplace. One large player within the group of Aggregators is 0x. They, like the other Aggregators, are dominantly used by developers wanting to give their users the best prices and liquidity options. This doc understands 0x from the perspective of its role as an Aggregator in Web3 Order Flow.

Web3 Order Flow.

Here’s an enumerated list of Order Flow components. See below for a graphic.
  1. Human interfaces for executing a trade, crucial for accessing Web3 markets. Examples include Matcha, Fractional, and Opyn.
  1. Computer interfaces for executing trading, used for for automated trading. Examples include Pionex, 3Commas, and CryptoHopper.
  1. Tooling for trades that make market understanding and order book viewing more tenable. This is what Bloomberg or Google Finance provide to TradFi. Examples include Parsec and Dextools.
  1. Portfolio views showing a wallet’s holdings. This isn’t crucial to order flow but is part of the system because it integrates order books for information. Examples are Zapper and Debank.
  1. Social trading that interoperate with social media technology as a different source for order flow, such as Nested, Mask.io, and Trader.xyz.
  1. NFT Marketplaces to access NFT order flow. Today, these are largely collector’s items but in the future may represent productive assets. Examples include games with their own markets like Gods Unchained, but also horizontal destinations like OpenSea and Coinbase NFT.
  1. Option platforms providing order book flow for on-chain option contracts. These include Dydx, Opyn, and DefiSaver.
  1. Wallets interoperating with these services but also themselves connecting users directly to order books. These include Sequence, Zerion, and Metamask.
  1. Exchanges serving as the primary sources of volume. There are many spread across chains, exemplified by decentraliced exchanges like Uniswap, Pancakeswap, and Curve and centralized ones like Coinbase and Binance.
  1. Aggregators that make the system more efficient by connecting available Supply with incoming Demand. This includes the 0x API (used by Matcha), 1Inch, and Paraswap.
 
The Aggregator role can be broken down further. There’s liquidity aggregators for developers (0x, 1inch, Kyber, Paraswap, and Totle), liquidity aggregators for consumers (0x, 1Inch, Kyber, Paraswap, and Octofi), aggregators to combat miner extracted value (KeeperDAO and Cowswap), and stablecoin aggregators (mStable). Unidex aggregates for DeFi in general while Reservoir and 0x both aggregate NFTs, although Reservoir is designed for that purpose.
 
 
notion image
 

The middlemen in Web3 Order Flow.

For Order Flow to function properly, at least one middleman needs to exist. A couple of example middlemen in other industries are Spotify and Sabre. Spotify aggregates the record labels’ supply of music on one side and the end users who want to listen to the music on the other. Sabre aggregates the supply of airlines’ routes one side and the user interfaces like Kayak from whom end users purchase.
These two examples highlight that the middleman that users talk to could be different than the one that the providers talk to. In Web3 Order Flow, users perceive that the middleman is the UI from whom they are purchasing, and the liquidity sources perceive that the middleman is the exchange with which they interact. These could be different.
If neither middleman existed, then every user would be integrating with every liquidity source. Assuming sufficient demand from end users, someone will notice this repeated friction and build a third party product to bridge the two. That’s exactly what service these middlemen provide and why they are realized in every marketplace.
But are both the trade UI and the exchange middlemen necessary, or could they be combined into a single player that speaks to both end users and the liquidity sources directly a la Spotify? No, they are not both necessary; we could have a service that performs both. However, those services do have different functional expertises. The trade interface wants to be a slick UI for humans performing both simple and complex trades. The liquidity sourcing wants to aggregate from many different sources, not just those that sign up on a single website’s UI. In other words, it wants to be an API call from any source that has available capital. Observe how Uniswap’s UI is being used less than in the past relative to their volume, even though its role as an exchange middleman has not suffered. This is because there are lots of good swap interfaces now that provide more utility than just going to Uniswap’s home page.
It’s challenging to unite these services as one because the surface area of each is large. Aggregator APIs require coordinating well with both Supply and Demand, while trade interfaces require devoting most resources to building a fantastic human-facing experience.
Compare to Stripe’s purchasing interface, which relies on a standardized experience paying with credit cards (name, address, cvc, date of expiry). The Web3 trading experience is in flux still; wallet technology is rapidly developing, new assets with different needs (e.g. options) debut frequently, and there are adversarial forces trying hard to extract value from user swaps.
That 0x built Matcha (released June 30, 2020) is intriguing. It is a well-made interface that can be whitelisted (as seen on Fractional). While core development will continue on 0x in order to grow and ideally entrench its position as a favored middleman, their demonstrated ability to create an attractive UX for trading bodes well for their ability to capture the cut that channels to the middleman.
💡
One comparable system is in flights. A large aggregator is the Sabre Global Distribution System run by Sabre Corporation. It sources from the liquidity providers, such as airlines, hotels, travel agents, etc, and then provides that order book flow to incoming requests from interfaces like Kayak, Google Flights, Expedia, etc. Sabre itself did actually make the user-facing website Travelocity back in 1996, which was then bought by Expedia in 2015. In other words, they tried to do both but were outcompeted by others who just focus on the interface.
 

What about centralized exchanges?

Centralized exchanges (CEX) like Binance and FTX loom over this discussion because they have built tools and interfaces for all parts of the marketplace. By aiming to control the entire experience, they are combining both expertises. Sometimes, these exchanges work with aggregators, like how Coinbase does with 0x, but this is mostly not true; neither Binance nor FTX appear to feed 0x directly, although their market makers may be pseudoynmous Makers/Takers on 0x.
We do not dive too deeply into CEXs in this post. While the DEX and CEX markets are not distinct as assets can be traded between the two systems without friction, they do seem to operate in shadow worlds with different needs from the rest of the Web3 Order Flow world. 0x and its competitors, the Aggregators, will source from anyone that wants to provide to them. For the time being, the biggest CEX players are choosing to not provide that liquidity. This is in line with their generally operating outside of all decentralized services. Consequently, we consider them out of scope for this discussion.

Who competes with 0x?

Given how many different functional areas exist that all use 0x’s services, any one of them can be served by others for the same aggregating and order flow functions.
Their main competitors are the other aggregators. Of these, the most advanced are 1Inch and Paraswap. All three of 0x, Paraswap, and 1Inch are roughly at feature parity, with 1Inch arguably more advanced given how long it’s focused on this problem and how large is its warchest ($175 million Series B announced in Dec 2021). According to 0x, they provided the lower cost swap 7/10 times back in Oct 2020. We did not test that for this post.
Like 0x, neither 1Inch nor Paraswap charge any fees to users. Devs are also not paying for access. 1Inch has an affiliate program with referral bonuses but today makes most of their money off of positive slippage. Note that 1Inch and Paraswap include 0x in the sources from which they aggregate, and it does not appear that 0x includes them in theirs. The fact that none of them are charging though means that there is no market cost to this. It doesn’t appear that there would be any major effect if this was disabled.
In terms of aggregate volume, we see in the charts below that 1Inch has the lion’s share, with 0x the clear second, and then Paraswap. 1Inch’s share of the market has only increased in the recent downturn. Note that these charts exclude ETH wrapper pairs because they distort the numbers for what is effectively a wash trade.

More on market leader 1Inch.

1Inch’s more advanced features include gas reduction, separate KYC pools on 1Inch Pro, and both price (limit orders) and non-price triggers (transact based on oracle reports of elections).
It also has a popular program offering gas refunds for staking 1INCH that was just extended. There is a sliding scale, where staking 100 coins gives a 25% refund and staking 100k coins gives a 100% refund (up to $10k per month). This is the only utility of the 1INCH token and only reason to stake it outside of voting. In effect, they are paying users (in 1INCH) to keep their token staked and reduce sell pressure.
That can work as long as the amount they are paying is low relative to how much they earn. Currently, the only earning that we are aware of is off of positive slippage. When there is a surplus post trade because the market moved in favor of the trade, 1Inch keeps that surplus and distributes it to its treasury and to rewards for user referrals.

Why are people using 1inch over 0x?

There’s something to be said for 2nd mover advantage.
A history of 0x is that it was birthed in 2016 in order to be the infrastructure for token trading. It was initially funded with an ICO (Initial Coin Offering), which were popular for a brief second in an earlier cycle of Web3 until the market recognized that most of them were scams and regulators stepped in. That’s not to say 0x is a scam, just that it’s been around for a long time.
Their first blog post (Feb 2017) never mentions the word aggregator. Their third blog post (Sept 2017) describes how many decentralized exchanges (DEXs) are building on top of 0x and how those DEXs will best centralized exchanges (CEXs). While the prediction hasn’t come true yet, with DEX volume being roughly 15% of CEX spot trade volume, it’s also the case that 0x has become an Aggregator of DEXs more than the infrastructure underpinning them. Their next post (Dec 2017) reoriented their focus around “[creating] the most robust, modular and accessible piece of infrastructure for peer-to-peer exchange on the Ethereum blockchain.”
Flash forward to Jan-Mar 2019. They laid out a roadmap in three parts reorganized around the following aspects. This roadmap lead to pursuits like the peer-to-peer 0x Mesh, now deprecated in favor of the 0x API.
  1. Supporting just ERC20s is insufficient for their goals. For example, ERC1155 support was necessary because it was rapidly gaining traction.
  1. For integrating Relayers, nodes and containerization is better than HTTP specifications.
  1. Layer two development is moving fast and 0x was trailing this next phase of the market.
  1. They need to redesign their smart contract development approach because the status quo approach was too costly to maintain and audit.
  1. Multiple assets are being traded in each swap and 0x wasn’t set up to do this well.
  1. Building a product when responding to community improvement proposals (ZEIPs) is much different than normal product building.
The modern 0x wasn’t early 2020. This began with the 0x API in January that “aggregates liquidity from 0x Mesh and other decentralized exchange networks like Kyber, Uniswap and Oasis, and uses smart order routing to find the best prices for you”. It was followed in late June 2020 by the Matcha debut, a trading UI with 0x’s aggregation services under the hood.
October 2020 brought 0x API v1, which was built to “offer the best prices after accounting for transaction costs.” For the first time, they explicitly described their aggregator competition and on what metrics they were competing. In the figures below, we see them overtake Paraswap around this time, although 1Inch is still very far ahead in terms of market share. It’s still a nascent market at this point, with the growth explosion still to come in Feb 2021.
💡
This is all to say that 0x went through many cycles of development before hitting upon DEX aggregation as their call to action. In contrast, 1Inch was birthed in May 2019 at an ETHNYC hackathon with the explicit goal of being a DEX aggregation protocol.
1Inch kept adding pieces for two years until in April 2021 they announced the 1inch Network consisting of five distinct components: Aggregation Protocol, Liquidity Protocol, DAO, Labs, and Foundation.
They fueled their growth with market giveaways and other partnerships that increased their visibility to consumers in a way that 0x’s initial focus dissuaded. Contrary to early 0x, they were consumer facing rather than developer facing from the get-go, and this quickly brought early volume.
Also contrary to 0x, they had three years further understanding what was necessary in the space to build the right protocol at the exact time it was needed. Crypto in 2016 (when 0x started) looks very different from Crypto in 2019 (when 1Inch started), and so were market needs. 1Inch built the product the space needed then. 0x understood what was needed at least four months earlier than 1Inch’s debut hackathon, but 0x had to shift a bigger boat in order to reorient their product and couldn’t immediately offer the DEX aggregator service like 1Inch did.
Today, 1Inch is more developed with respect to consumer offerings, has a much bigger warchest, and their token has utility. This together snowballed into a larger market share than other aggregators. The above graphs show this well, with the ups and downs of three players jostling for market share, and today having a Gorilla (1Inch), a Chimpanzee (0x), and then a third fringe player (Paraswap).

If 0x (1Inch) stopped, would it help or hurt 1Inch (0x)?

These products are, for the most part, interchangeable. However, the competition has helped users a lot. There is an argument to be said that their rates are at zero because they’ve been engaged in a price war with each other. Their services are definitely worth paying for, and the comparable industries suggest as much, but right now they are trying to land grab and so they charge a minimal amount. If one or the other didn’t exist, I suspect that they would add a small surcharge and no one would bat an eye except future potential competitors.

Competition in trading interfaces.

There are many trading interfaces, with DexKit being a strong competitor. What is Matcha’s advantage? It started with vertical integration with the 0x API, which means that it can potentially advance faster with respect to features than other white-label interfaces. Over time, that may lead to brand recognition due to expanded volumes and word of mouth, which is a primary goal for a trusted part of the user front-end experience. They also can sell developers on them having immediate integration with 0x without any further effort on their part. Will that be enough to become the trusted plugin?
Metamask Daily Swap Fees $ on the left side, as well as cumulative total on the right side.
A behemoth in this space is actually Metamask, the wallet provider. They’ve grown exceptionally fast in terms of users, from 0.5m to 11m in the last two years. They’ve also made a cumulative $400m since April 2021, shown in the chart above. Their position stems from controlling the wallet experience for the user and then adding on a swap interface from which they take an outrageously large 0.875%. Under the hood, they also aggregate from 0x, 1Inch, Paraswap, and Uniswap, and so they really are just the interface on top. Due to their privileged position controlling the aggregate demand from users, they get the largest pound of flesh from each swap. In other words, they own and monetize the customer relationship. Matcha doesn’t sit in this privileged position and needs to fight for user eyeballs without that benefit.
Daily volume comparison between Matcha, Cowswap, and Metamask interfaces. It can be pretty noisy.
Daily volume comparison between Matcha, Cowswap, and Metamask interfaces. It can be pretty noisy.
The source of volume for the Metamask interface. Roughly 20-25% of it comes from the 0x API.

How does this value chain evolve?

Below, we show a Wardley Map charting Web3 Trading from the perspective of the end user. Wardley Mapping is described well in this video and this tutorial. The premise is that it’s important to have a map when you’re exploring a territory. A map, as opposed to a diagram, can portray movement or evolution. Both how the world is and how it will change is revealed in a map. It also enables discussion where participants can point together to parts of the map. It is not meant to be a precise arbiter of the territory, as all territories are shifting and maps are just an approximation. When you look at the map below, be aware that we chose the placement of the points qualitatively using our best judgement and not from a formula.
A Wardley Map is split into four sections on the x-axis: Genesis, Custom, Product, and Utility. The y-axis shows the value chain according to end users (the paying customer) where the higher end is more visible and consequently is driving higher per-user value. Every component (e.g. “TokenSwapUI”, “Relayer”) starts in Genesis and, with sufficient demand, moves to the right. At some point, it may become a settled commodity upon which future components build; these components do not change very much. An example is the standardized simple TokenSwapUIs. On the other hand, Wallets are products that can be rented by end users and developers. The user needs are changing a lot and so must the wallets to keep up with the market.
notion image
Here are six observations from the above map:
  1. Many of the aggregation functions have pushed to the right. These include TradeRouting, Relayer, and both Price and Quote aggregation. This has made it much easier to build everything else in the space, like the professional view or white-labeled SwapUIs.
  1. Both Options Trading and NFT Trading are being custom built and are not yet products, but they will surely progress to that state given the large demand. That space will become product rentals just like the SwapUIs, resulting in OptionsTrading and NFTTrading white labels. Over time, these likely will unite as a single rentable product offering all three. It may even be called “Matcha”.
  1. The on-chain order book is still in the custom phase. 0x isn’t building it, and we are not sure who is. Does it even matter though? Do people care that their orders are on-chain? It would be much more expensive, but there may actually be advantages for some external reasons.
  1. The UIs are near the top of the value chain. Further, that space will not concentrate anytime soon because of the custom needs for important assets like NFTs and Options. Consequently, We expect there to be a flux in that market given changing user and developer needs. This follows from new app categories attracting new types of users.
  1. The aggregators are far down the value chain and all of their services are productized by now. We expect less change and instead consolidation as the lower revenues squeeze out competitors and market volume concentrates. In a market with entrenched liquidity, it is easier to build a UI and connect to aggregators than it is to build a capable aggregating service. To do so, a new service would have to either win over the big sources or get lucky with a new one that grows massive. But the latter is difficult because exchanges get more attractive to users with size.
  1. Discovering new assets, regardless of fungibility, is a custom affair still. If you know of a service offering this as their product, I’d love to know about it. There are players like TheGraph offering some through their subgraphs, Metamask offering lists for ERC20s, OpenSea offering feeds of NFTs, but no one appears to be doing this as their central service and everyone needs it. Monitoring for new tokens and token activity is such a requisite that demand should eventually push this into being a Product.
💡
In the evolution of the space, it is likely that the aggregators will intermediate all of the DEX volume. Uniswap’s giant share of the market may persist, but it’s unlikely to not be at the behest of the routing algorithms. It’s too much in the user’s favor to use the routing algorithms instead. We see this fear expressed on Uniswap’s governance forums where, in the midst of a discussion about the Uniswap fee, it was said that “[Speaker] can’t imagine that any further restrictions on liquidity such as a fee switch would help us in competing as a whole against other AMMs when it comes to DEX aggregators. Therefore, I think a technical analysis needs to include how a fee switch could affect our competitiveness on DEX aggregators as well.”

Discussion and concluding questions.

The six charts below show per-chain liquidity over the past 30 days by source percent on July 10th, 2022. These were sourced from 0x’s metabase dashboard. In 2016, five of these chains didn’t exist and the sixth, Ethereum, was much more fractured than the 39% dominated by Uniswap today. The 0x bet is that the more fracturing the better, but that is not how liquidity sources will ultimately settle. While the number of chains may expand and contract over time, the sources on any given chain should consolidate because more concentrated liquidity leads to better prices for end users.
That being said, on Ethereum, ~34% of the 0x volume comes from liquidity provided directly by the 0x protocol via the order book and RFQ systems, delineated ”0x Native”. This is what backs the limit, gas-less, and OTC trading components of Matcha (only available on mainnet currently). More precisely, it’s everything making use of the 0x exchange contracts and not just simple on-chain swaps sourced from DEXs. The latter is mostly pass-through.
The 34% volume number is great for 0x if the total is actually a lot of volume. Is it a lot of volume? The per-chain volume from June 2022 looks like the following, sourced from another of 0x’s metabase dashboards (bottom right, under “0x API Volume 6m, across chain”):
  • Ethereum: $2.74bn
  • Polygon: $285.49m
  • Optimism: $67.86m
  • Fantom: $29.38m
  • Binance Smart Chain: $70.86m
  • Avalanche: $27.25m
If $2.74bn is passing through just mainnet 0x in June 2022, which is even down from $4.98bn in May 2022, and 34.2% of that is passing through the special features of 0x Native (limit, gas-less, and OTC trading), then that means $643m is taking advantage of the differentiating components of 0x relative to non-aggregators. Very positive indeed.
 
notion image
notion image
notion image
notion image
notion image
notion image
 
 
What will decide the aggregators when the space consolidates? There are too many competing pools of capital and too many people to serve, so there must be some aggregation for users to make sense of offerings and for swaps to competitively reach those users. We argue these are the necessary traits:
  1. Large set of diverse volume. The more volume you have, and the more diversity therein, the higher the likelihood that new sources add to that pile and the lower the rate you can offer end users. These effects snowball.
  1. Both Supply and Demand trust you. This is important because so much of what the underlying service aggregators provide is opaque. Doubt in this core technology can spread quickly across the industry.
  1. Fast offering. This is important because there is an expectation that the smart routing should be done without delay.
  1. Inexpensive. No one wants to pay middlemen a large cut. That’s how you get new middlemen or novel technology to reroute around you.
 
💡
Returning to the airline market, observe that it continues to expand and contract, although much less with each iteration than in the past. Supply of flights comes from airlines like Delta and American, while demand for flights comes from groups like Expedia and Booking. This could have evolved to where only demand pays aggregators like Sabre for the right to use the service. It could also have evolved to where only supply pays Sabre for access to demand. Both sides pay Sabre. Supply pays Sabre to promote their flights and upsell premium offerings. Demand pays Sabre for fast inventory retrieval. Could 0x or the other aggregators reach this position in the market?
 
Today there are three players positioned well to be an oligopoly as the space matures. None of them charge end users; they have diverse sources of volume; supply and demand trust at least two of them (1Inch and 0x), and their offerings appear to be fast enough. What would distinguish them? How plausible is it that they capture most of the order book flow by being a) the most efficient aggregator and b) the preferred interface for end users? Could this end up as a monopoly business?
One facet to consider that is different from aggregation in Web2 is that there is an additional layer of stickiness in the smart contract. Companies rarely substitute SAAS APIs once integrated. It does happen, but it’s not a minor decision. This decision is even more material if the service has been integrated into a smart contract because of the risks and [audit] costs of upgrading that contract. If 0x, or any aggregator, can get their contract into other contracts, then it’s unlikely to ever be replaced.
With respect to how they make money, we reiterate that none of these players are making any money off of fees today; that’s all been turned to zero and it’s unlikely to reverse given competitive dynamics. Today, 1Inch makes money from positive slippage, but that could also plausibly go to zero in a price war and be difficult to revert.
I suspect that in the future they will make money from supply-side kickbacks. Just like the airline aggregators, even if the best price computation is fixed given the objective (find matching flights / maximize tokens), they can make bank from the supply-side by being the aggregator of choice and then sending liquidity your way. This is because people would prefer to use the most capable aggregator rather than search every service.
Will they also make money from the demand side of the market? It won’t come directly from end users because no one would want to use the fee-pushing aggregator when there are comparable aggregators with no fee; it just feels bad as a user. Again, just like Sabre’s position vis a vis the search engines, once the space of trading aggregators consolidates enough, the service becomes table stakes for the interfaces to incorporate. At that point, you could envision the aggregator charging for access and then the interfaces trying to pass on that cost to end users. This would either be done all at once in a cartel fashion by the ologopoly of aggregators or piecemeal when one of them introduces a feature that is expensive to maintain and can justifiably charge for it.
 

 
Special thanks to Sam Whitmore, Ren Lu, Avi Fein, and Dino for helping with this, as well as Brent and Amir from the 0x team.