0xProject/ZEIPs

0x V4

Closed this issue · 1 comments

Summary

Implement 0x order settlement natively into the Exchange Proxy pipeline, which will become the canonical 0x v4 protocol.

Type

CORE

Motivation

In this ZEIP, it is proposed to integrate native orders settlement into the Exchange Proxy as an additional feature, de facto replacing 0x v3 native settlement and graduating the Exchange Proxy contracts pipeline to the canonical 0x v4.
These contracts have been live since approximately August 2020 and have evolved since then to accommodate more and more functionalities that surpassed 0x v3 in efficiency and features. It is currently used by Matcha, Metamask, Zapper.fi, DexKit and others.
Apart from having been battle-tested and audited, the main advantages of such an upgrade are:

  • gas cost improvements: 0x v4 is approximately 30% cheaper than v3 when aggregating RFQ orders, and 60% when filling them directly. It is approximately 10% cheaper than v3 in open orderbook.
  • upgradeability: it is possible to add or upgrade specific features or functions without having the change the interfaces of the contracts.
  • DeFi readiness: this version of the protocol allows for efficient aggregation of liquidity. It also allows custom in-trade asset transformers and pluggable liquidity provider routes for onchain sources.

Specification

Forum discussion here
Comprehensive specifications are hosted here
https://0xprotocol.readthedocs.io/en/latest/index.html

Implementation

The team proposes to register the new settlement exchange to the Staking Proxy contracts in order to start collecting fees for limitOrder orders. This will de facto connect the new Exchange Proxy settlement into the 0x network.

We tentatively set the vote kick-off for this ZEIP for Sat Jan 16th, to be ended on Sat Jan 23rd.

Designated team: 0x Labs

0x Labs has implemented the protocol according to https://0xprotocol.readthedocs.io/en/latest/index.html into https://github.com/0xProject/protocol.
Consensys Diligence audited the code

Implemented