0x: The liquidity endpoint for DeFi on Multichain

Hasret Özkan
3 min readSep 2, 2022

--

0x: The liquidity endpoint for DeFi

0x is an open-source, decentralized exchange infrastructure that enables the exchange of tokenized assets on multiple blockchains.

The 0x protocol is, at its core, a set of secure smart contracts that facilitate the peer-to-peer exchange of Ethereum-based assets. The protocol serves as an open standard and common building block for any developer needing exchange functionality.

In addition to the externally-audited smart contracts, 0x also offers developer tools tailored to the ecosystem and open-access to a pool of shared liquidity.

Developers can integrate with 0x at the smart contract or application layer. The diagram below shows an overview of the 0x ecosystem, which includes applications who provide liquidity (supply), applications who consume liquidity (demand), and the multiple supported blockchains.

0x Supply & Demand

How does 0x work?

  1. A Maker creates a 0x order which is a json object that adheres to a standard order message format. It indicates what kind of asset the Maker is committed to trade. Assets could include fungible tokens (ERC20), non-fungible tokens (ERC721), or bundles of assets (ERC1155).
  2. The order is hashed, and the Maker signs the order to cryptographically commit to the order they authored.
  3. The order is shared with counter-parties.
    a. If the Maker of the 0x order already knows their desired counter-party, they can send the order directly (via email, chat, or over-the-counter platform)
    b. If the Maker doesn’t know a counter-party willing to take the trade, they can submit the order to orderbook.
  4. 0x API aggregates liquidity across all the sources to surface the best price for the order to the Taker. 0x helps traders create, find, and fill the 0x orders through the paradigm of off-chain relay and on-chain settlement. This means that 0x does not store orders on the blockchain; instead, orders are stored off-chain, and trade settlement only occurs on-chain. This unique feature makes 0x a flexible and gas-efficient DEX protocol for developers to build on.
  5. The Taker fills the 0x order by submitting the order and the amount they will fill it for to the blockchain.
  6. The 0x protocol’s settlement logic verifies the Maker’s digital signature and that all the conditions of the trade are satisfied. If so, the assets involved are atomically swapped between Maker and Taker. If not, the trade is reverted.

What can we build on 0x?

0x is an open-source project, which opens it up for anyone to freely use it as a liquidity lego in their product.

Projects can be built on 0x. In addition, 0x can also be integrated into any existing application where exchange is not the core purpose of the application. Below are some project ideas.

Taker’s example projects

  • Exchanges
  • Wallets
  • A DeFi protocol that needs liquidity and exchange to function (e.g., a derivatives, lending, or options protocol)
  • Portfolio managers
  • Prediction markets
  • Non-fungible tokens (NFT)
  • NFT marketplace
  • Games with in-game currencies or items
  • Investment strategies
  • 0x multi-chain analytics portal
  • Real-time trades panel w/ GraphQL wrappers
  • Counter/twitter bot of positive slippage returned to users

Maker’s example projects

  • Orderbook models
  • Automatic Market Makers (AMM) models
  • A market making or arbitrage trading bot

Summary

0x is so easy to use for blockchain developers. Also it solves a lot of problems and make everything easier for developers. Even if you do not know how to write smart contract you can build your dApp with 0x. Also 0x gives a lot opinions about blockchain. You can read documantation. Also you can check more examples.

See you in next article. Do not forget to follow me and clap this article. Also you can follow me on LinkedIn.

--

--

Hasret Özkan
Hasret Özkan

Written by Hasret Özkan

Software Engineer. Learn and improve like machine. (Also an entrepreneur)

No responses yet