This week’s top story — Mesh with 0x

Ria Bhutoria
Circle Research
Published in
6 min readApr 5, 2019

Read the full weekly crypto recap here.

Last week, Alex Browne at 0x published a post outlining a new approach to shared liquidity called 0x Mesh. The purpose of 0x Mesh is to make it easier for relayers to establish a shared pool of liquidity relative to the current approach — the Standard Relayer API.

What is networked liquidity?

Shared, or “networked”, liquidity is one of the key goals of the 0x protocol. Networked liquidity refers to the flow of orders through a network of interconnected exchanges and dApps, resulting in a shared liquidity pool. This creates network effects by opening up and expanding the pool of buyers and sellers for relayers or dApps looking to bootstrap liquidity or a group of relayers agreeing to a fee sharing arrangement. Within dApps, it also enables fee or token abstraction. DApps can connect to 0x relayers to atomically execute token exchanges on behalf of their users. Finally, greater liquidity can yield deeper order books and tighter spreads, which attracts traders and improves their user experience.

Current approach: Standard Relayer API

0x established the Standard Relayer API to allow relayers to share liquidity and traders to access multiple sources of liquidity simultaneously. Exchanges such as Coinbase Pro (formerly known as GDAX) and Bitfinex have APIs that provide similar information. However, they are different specifications and therefore, one program that can trade on Coinbase Pro cannot be used to trade on Bitfinex without a degree of technical difficulty. 0x created the Standard Relayer API to solve this problem on the 0x platform.

Relayers that want to reap the benefits have to implement the API and set up endpoints with other relayers to access their orderbooks. This allows API end users to access shared information of 0x relayers without having to write and deploy code for each relayer API. Shared information refers to an aggregated orderbook of relayers that implement the standard relayer API.

Since launching the SRA in 2017, 0x found that the API has not been as effective at aggregating liquidity as initially expected. One challenge is that relayers have to set up an endpoint with each relayer whose orderbook they want to integrate. This creates redundant work across the network because relayers often use different programming languages and tool sets. As the network matures, however, developers will start to publicly publish API implementation code in key programming languages, mitigating these early-stage hurdles. A more pervasive problem is that there is no standardized process for discovery — with SRA, relayers need to actively seek out endpoints to connect to and find information on these endpoints (i.e. what they do or don’t support). This is currently a manual process. As it stands, relayers need reach out to liquidity providers they already know and request an endpoint.

Further, 0x found that implementing the SRA precisely according to the specification is tough. API specifications explain how an API will operate and what users can expect when communicating with it. If an API is not implemented precisely, developers cannot build applications that rely on its specified behaviors, reducing its utility altogether. These are a few reasons that relayers, traders and application developers have not been able to take full advantage of shared liquidity to realize greater network effects.

New approach: 0x Mesh

The 0x team has created 0x Mesh, a peer to peer network to address challenges with off-chain coordination needed to share orders and liquidity. 0x Mesh lowers the barrier to shared liquidity by allowing relayers to download a pre-built 0x Mesh node or even run a node in-browser*. As a result, the setup process could become much simpler, leaving less room for error.

In the new system, the 0x Mesh software is written in a single programming language (all nodes share the same codebase) and will be ready to use. All relayers have to do to connect to the network is download the software. This is an improvement over the current process where developers have to write code according to a set of guidelines (it’s nontrivial to write code that perfectly matches the guidelines, which can impact certain functions outlined in the API specification). 0x Mesh also does away with duplicative work on the part of relayers in the current SRA method.

Another advantage of 0x Mesh is that it will allow relayers to automatically connect to and discover peers. This means as soon as relayers download the software, their node automatically finds and connects to other relayers running 0x Mesh software (similar to the way a computer automatically connects to other Bitcoin nodes upon downloading the Bitcoin core software). Now, relayers no longer need to manually find other relayers to connect to (or figure out what they do and don’t support).

End users — traders, applications interfacing with the protocol, and trade data providers — also benefit in that they can now access the shared orderbook and trade data of all relayers using 0x Mesh by connecting to a single endpoint. In addition to greater liquidity of well-known assets, users get the added benefit of access to assets that may not be available on a given relayer platform but offered by others.

Down the line, 0x could extend 0x Mesh to other DeFi protocols that require off-chain coordination. One project that could benefit is Dharma, a decentralized lending protocol, which is actually built on 0x and has a similar model. In Dharma, relayers (similar to 0x relayers) host centralized orderbooks aggregating loan requests that allow borrowers and lenders to find counterparties.

0x Mesh could bring down the barriers to achieving networked liquidity and discoverability by creating a more seamless and simple process for relayers to connect to one another and for end users to plug into and take advantage of this liquidity and asset availability. It also provides a framework for addressing similar coordination problems in other use cases beyond 0x. The team intends to launch 0x Mesh on testnet in 2Q19 and on mainnet in September 2019.

Remaining challenges

While 0x Mesh makes it easier to achieve networked liquidity, the next challenge will be actually incentivizing relayers to share liquidity. Exchanges (and relayers on 0x) capture market share by growing volume. A relayer with sizeable volume, that has spent significant time and effort building up its liquidity may not be incentivized to share it with other relayers as it dilutes away a key differentiator. In the short run, because relayers are not yet charging fees, there’s even less benefit in sharing liquidity as relayers strive to gain market share.

For an in-depth look into the world of 0x and decentralized exchanges, check out our DEX report.

*Users that run their own node in-browser can execute orders without relying on a relayer or exchange. In the short term, this could be beneficial for creating markets around long-tail assets that relayers don’t support. Challenges for users of a browser based relayer include initial warm up delay, internet bandwidth and storage limitations, and performance/speed — generally, running something in-browser is slower than running a native program.

Reports, market insights, and other information (“Information”) provided by Circle Internet Financial Limited (“Circle”) or its affiliates have been prepared solely for informative purposes and should not be the basis for making investment decisions or be construed as a recommendation to engage in investment transactions or be taken to suggest an investment strategy in respect of any financial instruments or the issuers thereof. Information has not been prepared in accordance with the legal requirements designed to promote the independence of investment research and is not subject to any prohibition on dealing ahead of the dissemination of investment research under the Market Abuse Regulation (EU) No 596/2014. Information provided is not related to the provision of advisory services regarding investment, tax, legal, financial, accounting, consulting or any other related services and is not a recommendation to buy, sell, or hold any asset. Information is based on sources considered to be reliable, but not guaranteed, to be accurate or complete. Any opinions or estimates expressed herein reflect a judgment made as of the date of publication, and are subject to change without notice. Trading and investing in digital assets involves significant risks including price volatility and illiquidity and may not be suitable for all investors. Circle and its affiliates trade and hold positions in digital assets and may now or in the future trade or hold a position in an asset that is the subject of Information provided. As a result, Circle or its affiliates may be subject to certain conflicts of interest in connection with the provision of Information. Circle will not be liable whatsoever for any direct or consequential loss arising from the use of this Information.

--

--