The 0x protocol, developed in the 0x Project, represents one of the greatest advances in the direction of creating fully decentralized exchange applications on ethereum blockchains, without being exempt from security and speed.

El protocol 0x it is undoubtedly the cornerstone of Project 0x. This protocol is designed to make distributed exchanges (or exchange houses) fully functional through smart contracts executed on Ethereum. Its development dates from October 2016, when Will warren y Amir bandeali they started this project.

The idea behind the development of the 0x protocol is design a platform capable of managing exchanges in a decentralized and secure way. Platform that must be expandable in functions, easily adaptable, scalable and secure. Well, all these properties become tangible with the 0x protocol. This means two things: first developers can create DApps that use the 0x protocol to expand their capabilities. Second, users can manage a more homogeneous and secure system to carry out their operations.

But the 0x protocol is much more than a means to facilitate exchanges. Beneath all this we find unique characteristics that make 0x a benchmark in the development of the Ethereum ecosystem.

Protocol 0x: How does it work?

The operation of the 0x protocol is quite simple. Broadly speaking, we can summarize it with the following series of steps:

  1. The contract of the decentralized exchange (DEX) to access your A token balance.
  2. The creator creates an order to exchange token A for token B. It specifies the desired exchange rate, the expiration time and signs the order with its private key.
  3. The order is disseminated to the network so that it can be processed by the relayers.
  4. The counterparty accepts the order.
  5. The DEX contract is approved to access the balance of the counterparty B token.
  6. The counterparty signs the order showing its interest in carrying out the operation.
  7. The order is sent back to the network to be processed by the DEX.
  8. The DEX contract authenticates the signature of both parties, verifies that the order has not expired and verifies that the order has not been completed.
  9. The transfer is made and then transfers the tokens between the two parties at the specified exchange rate.

However, in all this process a series of important actors intervene that make this operation possible. What they are and what they do is something we will discover later.

How is the 0x protocol constituted?

Smarts contracts 0x

The 0x network depends on various smarts contracts running on the Ethereum network. Smarts contracts are small programs that run on the Ethereum network. These smart contracts are the basis for the operation of the 0x protocol. This is because they are in charge of processing each and every possible operation in 0x. In a nutshell, smart contracts would become the brain of the entire 0x network. A brain divided into several parts, each one specialized in a specific task.

For example, if a DApp wants to perform some operation with ZRX tokens and other ERC-20 tokens, the smart contract created for this purpose must be used. There are also smart contracts that facilitate the management of wETH (wrapped Ether). All this in order to optimize the use of balances in Ethers in the decentralized exchange.

El protocol 0x nowadays is conformed by a total of diez smarts contracts. Each of them with a specific functionality. In this way, it enjoys excellent modularity and security. Below we show the complete list of 0x smart contracts arranged on the Ethereum mainnet:

  1. AssetProxyOwner: 0x17992e4ffb22730138e4b62aaa6367fa9d3699a6
  2. ERC20Proxy: 0x2240dab907db71e64d3e0dba4800c83b5c502d4e
  3. ERC721Proxy: 0x208e41fb445f1bb1b6780d58356e81405f3e6127
  4. Exchange: 0x4f833a24e1f95d70f028921e27040ca56e09ab0b
  5. Forwarder: 0x5468a1dc173652ee28d249c271fa9933144746b1
  6. OrderValidator: 0x9463e518dea6810309563c81d5266c1b1d149138
  7. WETH9 (EtherToken): 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
  8. ZRXToken: 0xe41d2489571d322189246dafa5ebde1f4699f498
  9. CoordinatorRegistry: 0x45797531b873fd5e519477a070a955764c1a5b07
  10. Coordinator: 0x25aae5b981ce6683cc5aeea1855d927e0b59066f

You can review each of these smart contracts from the block explorer Ethereum and review all its activity in an open and transparent way.

smart-contracts-0x-in-the-explorer

Relayers

Relayers are computers that run 0x software. The union of the different relayers It is responsible for the creation of the 0x autonomous network. These teams are in charge of managing the order book and orders of the off-chain network. At the same time, the relayers' mission is to provide the necessary functions for users to add, delete and update this order book through the DApps they use.

In this way, the relayers become the columna vertebral of all the RED 0x. Thanks to them, those who participate in the network can carry out their operations safely, since all the information is handled cryptographically. In addition, the relayers have the task of tracking each of the operations, so that once they are completed they are settled directly on the Ethereum blockchain through the 0x protocol smart contracts.

relayers-at-0x

The ZRX Token

The ZRX token is another critical part of the 0x protocol. This token has two well defined functions which are:

  • Help solve the coordination problem and improve the liquidity of the network. This is due to the fact that it allows creating an economic feedback loop, where the first adopters of the protocol benefit from the broader adoption.
  • It helps create and manage decentralized governance. Market participants who generate and consume exchange orders use the ZRX token to pay transaction fees to relayers. This creates a crypto-economic partnership between actors ranging from incentives to maintain the network to project governance and decision-making.

0x protocol development tools

To make it possible for third parties to adopt the 0x protocol, its creators have provided different tools for this. These building blocks help create DApps or integrate existing ones into the 0x network to use its capabilities. At this point, 0x has 0x.js a bookstore Created to build web applications using 0x potential.

The goal of 0x.js is to enable the creation of secure smart contracts on Ethereum, and to ensure that customers can interact with these smart contracts through web interfaces. This guarantees safe and easy access to decentralized exchanges, advocating their expansion and expansion.

Governance within the 0x protocol

Given the extensive decentralization of the 0x protocol, it has a governance that is shared equally among its parts. This in order to guarantee the decentralized and continuous operation of the network, in addition to guaranteeing that the decisions made benefit everyone equally.

This governance system aims to guarantee the operation and evolution of the 0x protocol at all times. Updates less than or greater than 0x are approved with the vote of those who make up the network. This model ensures that everyone participates in the destiny of the network and its future evolution.

0x-js

How much do you know, cryptonuta?

Is protocol 0x one of the most used ways in building DEX?

TRUE!

The development and success of the 0x protocol quickly made it the most widely used solution for creating decentralized exchanges focused on security, speed and ease of use by users and members of the 0x network.

Advantages of the 0x protocol

Many of the advantages provided by the 0x protocol have to do with those that it reports to exchanges of the decentralized type over centralized exchange. One of the biggest problems with centralized exchanges is that they must maintain and secure the funds of all traders on their platform. This results in a single vulnerable point which, if hacked or mismanaged, means that all of these operators could lose their funds. Hundreds of millions have already been stolen in this way, in several occasions.

Also, with a decentralized exchange like Bit2Me DEX Merchants do not need to deposit funds with a centralized entity, with which they would be required to trust. The Bit2Me DEX allows us to operate in the purchase and sale of tokens directly from our wallet. This is how DEX gives the user control of their funds at all times, eliminating this single point of failure from the equation.

At this point, 0x allows generating decentralized exchange systems in a very simple way. But not only that, it also makes it possible for DApps to integrate the 0x token quickly, allowing me to interact with the 0x ecosystem without any effort.