0x Protocol
What Is the 0x Protocol?
0x (pronounced “Zero X”) is an open-source, Ethereum-based protocol for transferring tokens across different exchanges. Rather than being a single exchange, 0x provides the underlying technology that allows developers to build decentralized exchanges (DEXs), trading applications, and marketplaces on top of its standardized framework.
The protocol functions as a DEX aggregator and infrastructure layer, similar to how SWIFT provides standardized messaging between traditional banks. 0x creates a universal “language” that different trading platforms can use to communicate and share liquidity, enabling users to access orders from multiple sources through a single interface.
Founded in 2016 by Will Warren and Amir Bandeali, 0x was designed to address fragmentation in the decentralized trading ecosystem by creating interoperable standards for token exchange. The protocol supports trading of both fungible tokens (like ERC-20s) and non-fungible tokens (NFTs).
Notable projects built using 0x infrastructure include Matcha (0x’s own trading interface), Coinbase Wallet, MetaMask, Phantom, Robinhood Wallet, and Zapper.
How Does It Work?
0x uses smart contracts to execute transactions on the Ethereum blockchain. However, unlike most Ethereum DEXs that validate every new transaction order placed, modified, filled, or altered on the blockchain, 0x utilizes a hybrid approach with off-chain order relay and on-chain settlement.
Off-Chain Order Relay
Instead of posting every order directly to the blockchain (which would be expensive and slow), 0x allows users to create and share orders off-chain. These orders contain all necessary trading details—token types, quantities, prices, expiration times, and cryptographic signatures proving authenticity.
Relayer Network
Specialized entities called “relayers” maintain order books and facilitate order discovery. Relayers can be standalone businesses, integrated into wallets or dApps, or operated by exchanges. They collect, organize, and broadcast available orders to potential traders while earning fees for their services.
On-Chain Settlement
When a trader decides to fill an order, the actual token exchange occurs on-chain through 0x’s smart contracts. This ensures the security and finality that blockchain provides while minimizing the number of expensive on-chain operations.
To summarize, the process involves market makers (relayers) and takers.
- Makers – A maker typically initiates a buy or sell order, specifying their desired price and pairing. The 0x order book then finds a matching order for the maker. This process creates liquidity for the 0x protocol.
- Takers – A taker places an order that is immediately executed when it matches the maker’s order. If a prior relationship exists between them, a maker can directly send an order to the specific taker via chat, email, or over-the-counter (OTC) desks. Ideally, the immediate transaction processing removes liquidity from the protocol.