0x is an open protocol for partially decentralized exchange on the Ethereum blockchain. Acting as a base level protocol upon which developers can build exchange functionality into their decentralized applications, 0x represents an attempt to improve upon today’s fragmented landscape of proprietary and application-specific decentralized exchange implementations, as they currently limit the ability to realize the full potential impact of network effects. While centralized exchanges offer more seamless user experiences, they generally suffer from a single point of failure as they can be mismanaged internally and/or targeted by hackers. On the opposite end of the spectrum, completely decentralized exchanges (DEX’s) are trustless, non-custodial systems facilitating the exchange of tokens, but come at the cost of being slow, illiquid, and generally offer poor customer experiences. In its simplest form, the 0x protocol is a hybrid implementation of the two approaches that utilizes off-chain order management, which is typically administered in some degree of aggregation by parties called “relayers”, with on-chain settlement. This approach allows traders to remain in control of their funds, while eliminating the friction of managing order books on the blockchain. This approach does, however, introduce alternative challenges.
The process works by allowing market makers to signal their intent to trade a specific Ethereum asset at a certain price for a certain period of time off-chain where market takers may see and accept it. The transaction is only settled on-chain and value is transferred between accounts as a final step. The 0x team are of the conviction that open codebases have inherent competitive advantage (over those which are proprietary) in the long run, all other things being equal, and encourage relayers to share their order books with one another via APIs, to increase liquidity across the network 0x expects and therein hopefully enable the network to become more usable as relayers draw from larger pools of liquidity. 0x raised $24 million in an August 2017 token sale. 0x’s native token, ZRX, is the first ERC-20 token to be hosted on the Coinbase Pro exchange.
The 0x Cryptosystem
0x allows for transactions to be executed point-to-point or through Relayer-maintained order books. The point-to-point schema allows two parties to exchange tokens directly using their preferred medium of communication and without the need for an order book. This bilateral approach allows the maker to specify a specific taker address that renders the order useless to outside parties (a more detailed explanation can be found here). While this method is secure and elegantly simple, it likely does not provide adequate incentives for market makers to absorb the expense associated with building and maintaining an exchange operation.
To foster a liquid market, 0x enables anyone to join the network as a relayer, by maintaining an off-chain order book where makers and takers can discover one another. The 0x order schema allows relayers to broadcast orders so that anyone may intercept the order as a taker by cryptographically signing and submitting it, and added a field where arbitrary fees in ZRX can be collected and paid out to relayer owned addressed. Specifically, the taker address in an order can be left blank, which allows orders to be filled by anyone who ‘intercepts’ the order. The broadcast order process can be summarized as follows:
- Relayer cites a fee schedule and specifies an address used to collect transaction fees
- Maker creates an order (that meets the minimum fee criteria specified by the Relayer)
- Maker transmits a cryptographically signed order to Relayer
- Relayer receives the order, verifies that it is valid, that sufficient assets exist in corresponding address, that fees are adequate, and accepts or rejects the order. If the order is accepted, the Relayer posts the order to their order book
- Takers receive an updated version of the order book that includes the new order
- Taker intercepts the order by completing it, cryptographically signing it, and submitting it to the relayer or directly to the 0x exchange smart contract on the Ethereum Virtual Machine.
- The 0x exchange smart contract along with relevant 0x proxy smart contracts moves funds and settles the trade.
General Mechanism / Point-to-Point Broadcast Orders
ZRX tokens can be used by market participants to pay Relayer fees according to the fee schedule imposed by individual relayers, and will eventually be used to effectuate decentralized governance that will presumably aim to facilitate the secure integration of protocol updates.
The Cryptoeconomics of 0x
The ZRX token has two intended functions, in addition to being an expedient fundraising mechanism, it will offer both fee payment to relayers who opt to use it, and decentralized governance through voting. It is intended that 0x will be used as a payment token via which relayers extract fees for their order matching services offered to end users who thereby avoid grappling with the protocol directly and avoid sourcing counterparties to fill their orders. The extent to which the payment function will come to be realised in actual usage of the protocol is unclear, since payment can be implemented by relayers in other ways, such as taking a portion of the spread, if they so choose due to the inherently arbitrary nature of the off-chain order matching. Additionally, Coinbase have acquired one of the more prolific 0x relayers - Paradex - as a means of positioning themselves within the non-custodial DEX space. In a decision that proved controversial in the 0x community, Paradex opted not to monetize their role as relayer by charging fees in ZRX. Half of the total 1 billion token supply were made available for the token sale event and purchased by some 13,000 participants. 15% of tokens were retained by the 0x organization, 15% went to an external fund to incentivize development on the protocol, 10% to the founding team, 10% to advisors and early investors. As a result, half of the tokens are held by the company, founders and extended team, whose token compensation is subject to vesting schedules. The extent and form of 0x usage and contribution towards governance will become clear over time as the roadmap progresses.
The 0x protocol is made up of a set of Ethereum smart contracts, which by nature are immutable, meaning once their logic has been deployed to the blockchain it cannot be changed. 0x intends to implement decentralized governance by way of ZRX holder vote, so that network participants can weigh in on upgrades to their core smart contract code over time. Decentralized governance is a key part of the 0x value proposition, and with that they hope to inspire trust and usage across a wide variety of actors including relayers, market makers, takers, and dapps. Simultaneously, they need their protocol to be flexible enough to handle inevitable updates as the network grows and evolves. Lastly, they must ensure that the security of the network is maintained despite changes to the smart contracts upon which the network is built. This will involve ensuring that implementation of updates is as frictionless as possible for all the participants building and trading with the protocol. To summarize, 0x governance needs are:
- Flexible enough to upgrade core smart contracts over time to remain relevant over time
- Ensure network is secure throughout upgrade process
- Make governance a completely decentralized process so as to preserve network value proposition
- Ensure execution of upgrades are as frictionless for participants as possible
0x v. Key Benchmarks
- Liquidity available to 0x enabled relayers compared to existing (centralised) exchanges and DEXs: to observe that centralised exchanges account for the lion’s share of exchange volume of digital assets would be an understatement. This is mostly due to the high performance functionality of centralised exchanges whereby users can add orders to the books or take them off next to instantaneously.
- In the absence of privately identifying a trading partner (which is difficulty but advantageous) a trusted third party, of some form, seems the only other viable option.
- It is possible that 0x will proliferate via myriad off-chain order matching services, in addition to other projects, adopting the 0x protocol. Should many relayers opt to not collect fees in ZRX then there exists some analogy between the 0x protocol and TCP/IP.
- Compared to other protocol level initiatives relating to exchangeability and interoperability of a diverse blockchain based landscape, 0x takes a focus on DApp and relayer side innovation. Polkadot plan to generate their genesis block in Q3 2019 and will effectively comprise a parallelised system of many chains - where 0x focuses on Ethereum. Cosmos, in addition to their own blockchain and consensus mechanism, have announced intention to introduce a second token as a means of payment on their network. This serves to illustrate the diverse routes aimed at achieving smooth user experiences across a presently disparate technology landscape.
- Oct. 2016: 0x project began
- Feb 2017: 0x whitepaper released
- Mar 2017: Contracts deployed on Ethereum’s Kovan testnet
- May 2017: 0x OTC launched on kovan
- June 2017: Open sourced and security audits complete
- August 15 2017: 0x deployed on ethereum mainnet
- August 2017: Raised $24 Million via ZRX token
- July 2018: 0x Version 2 launched
Prospects and Challenges
The founding team are of the conviction that open standards tend to win over closed proprietary technologies in the long run. This seems intuitive as a possibility in the same sense that IP/TCP and similar all-pervasive protocols have to be standardized in-order to achieve mass adoption since every client on the internet constructing and operating by its own rule system for exchanging messages with others is a recipe for inefficiency. It is also entirely possible that 0x inspired smart contracts and code will come to permeate the decentralized exchange landscape with practically no association to the 0x token or team. Though, the quality of the team’s connections and position of influence is potentially an overriding consideration. Given the effect observed on 0x’s price around it’s Coinbase listing, the ZRX/USD pair jumped 17% in the hour after Coinbase announced the addition, it is quite possible 0x’s token value will fluctuate essentially independently of it’s real world utility.
We see 0x as having the following risk factors:
- Coinbases’ recent listing of ZRX significantly impacted the price of ZRX whilst inviting critique from the broader community due to concerns around conflicts of interest generated by various close relationships between members of the Coinbase and 0x teams in addition to key investors.
- Currently all exchanges, whether decentralized or centralized, have advantages and drawbacks in one or more areas across security, speed, cost of transacting and/or liquidity. While novel, it’s unclear whether 0x’s hybrid approach meaningfully solves for these issues rather than redistributing the same problems across a different exchange architecture.
- The success of 0x depends significantly upon the willingness of relayers and/or Dapps to do a great deal of work.
- Regardless of which strategy 0x Relayers choose to implement, they represent a centralized party that must be trusted.
- There’s an opportunity to front run at two different levels: the order book level, and the Ethereum block production level.
- A maker can withdraw tokens from smart contract at any time, which leaves counterparties potentially vulnerable to failed orders or fees.
- The possibility of accidental trade collision and cancelation collisions exists in the 0x network, and will increase as the network grows.
- While the concept of networked liquidity is compelling and advantageous for the growth of DEX’s overall, it’s unclear whether the incentives for relayers to pool liquidity are sufficient, and how this will play out over time.
- The process by which core protocol updates (changes to the core ethereum smart contracts) will actually be executed remains to be seen.
- Long-term incentives for the core development team are unclear.
In order for the token to outperform the market, the following would need to hold true:
- The primary use case for the ZRX token is their governance mechanism which has yet to be outlined by the team, and therefore is impossible to evaluate at this time.
- The ZRX token is built into the protocol in such a way that Relayers may use it to charge fees to traders for their service of maintaining off-chain order books, but it’s not necessary that they do so.
History, perception and viability
- Paradex is approaching their 0x implementation as a centralized order matchmaker, and not participating in a shared liquidity pool, which marks an approach other Relayers may elect to take if they feel the tradeoffs are worth it.
- Coinbases’ recent inclusion of ZRX on their platform invited critique from the broader community due to how deeply interwoven members of Coinbase and the 0x team are.