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 ecosystem. Ethereum.
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:
- The contract of the decentralized exchange (DEX) to access your balance token A.
- 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.
- The order is disseminated to the network so that it can be processed by the relayers.
- The counterparty accepts the order.
- The DEX contract is approved to access the balance of the counterparty B token.
- The counterparty signs the order showing its interest in carrying out the operation.
- The order is sent back to the network to be processed by the DEX.
- 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.
- The transfer is made and then transfers the tokens between the two parties at the specified exchange rate.
However, throughout this process a series of important actors intervene that make this operation possible. what are they and What is it 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. Smart contracts are small programs that run on the Ethereum network. These smart contracts they are the basis of the operation of the 0x protocol. This is because they are in charge of processing each and every one of the possible operations 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 tokens ERC-20, the smart contract created for this purpose must be used. There are also smart contracts that make it easier for us to manage 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 in the mainnet from Ethereum:
- AssetProxyOwner: 0x17992e4ffb22730138e4b62aaa6367fa9d3699a6
- ERC20Proxy: 0x2240dab907db71e64d3e0dba4800c83b5c502d4e
- ERC721Proxy: 0x208e41fb445f1bb1b6780d58356e81405f3e6127
- Exchange: 0x4f833a24e1f95d70f028921e27040ca56e09ab0b
- Forwarder: 0x5468a1dc173652ee28d249c271fa9933144746b1
- OrderValidator: 0x9463e518dea6810309563c81d5266c1b1d149138
- WETH9 (EtherToken): 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
- ZRX Token: 0xe41d2489571d322189246dafa5ebde1f4699f498
- Coordinator Registry: 0x45797531b873fd5e519477a070a955764c1a5b07
- 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.
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 spinal 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.
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.
- Helps create and manage decentralized governance. The participants of market that generate and consume exchange orders, use the ZRX token to pay transaction fees to the relayers. This creates a crypto-economic association between the actors that goes from the incentives for maintaining the network to the governance of the project 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 wide decentralization of the 0x protocol, it has a governance distributed among its parts in an equitable way. 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.