Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0x Protocol V3 #56

Closed
dekz opened this issue Oct 21, 2019 · 0 comments
Closed

0x Protocol V3 #56

dekz opened this issue Oct 21, 2019 · 0 comments
Labels
status: implemented Proposed changes have been implemented (and deployed, if smart contract) type: core

Comments

@dekz
Copy link
Member

dekz commented Oct 21, 2019

Overview

This vote concerns a major update to 0x protocol. The changes fall mainly in three buckets: the introduction of staking contracts, a new pattern supporting bridged liquidity across protocols, and miscellaneous technical improvements and new features. 0x v3.0 contracts have been audited by ConsenSys Diligence and Trails of Bits.

The new staking contracts support a ZRX staking mechanism that grant 0x market makers greater ownership in the protocol, as they provide the necessary liquidity for the markets running on the network. Market makers form pools to receive liquidity rewards and participate in governance. Liquidity rewards are sustained by the introduction of a small protocol fee, paid by the taker when filling orders. The fee is calculated as a portion of the gas price and the number of orders filled. ZRX token holders can earn a portion of liquidity rewards by delegating their ZRX to market maker pools. Learn more about ZRX staking here.

The ERC20BridgeProxy contract allows for the execution of ERC-20 transactions with assets that are locked in other contracts. The design patterns allows for DEX bridges to access sources of on-chain liquidity from DEXs like Kyber, Oasis, and Uniswap. Learn more about liquidity bridges here.

Finally, in this vote proposal, the exchange expands and improves multiple features. The most notable ones are: the introduction of arbitrary fees (previously only ZRX), idempotent order cancellations, a more different matching orders function and richer revert errors. Check out the entire changelog for v3.

Benefits

ZRX staking introduces a scalable mechanism to sustain the growth of the ecosystem, aligning incentives of token holders with the class of users that participate the most in the network.

The DEX bridge use cases powered by the new ERC20Bridge will allow projects integrating with 0x to plug into a superset of off-chain and on-chain pool liquidity, at the best price.

The improved exchange functionalities enable, among other things, relayers to introduce fees denominated in any asset, market makers to have more reliable cancellations and matching relayers to maximize their profits.

Included ZEIPs

ZEIP Description
ZEIP-31 ZRX Staking
ZEIP-42 Protocol Fees
ZEIP-47 Bridge On-chain Liquidity
ZEIP-28 Arbitrary Fee Token
ZEIP-50 Market Buy/Sell Improvements
ZEIP-40 Order Matching Strategy matchOrdersWithMaximalFill
ZEIP-59 Market operations with mixed asset data
ZEIP-41 Batch Order Matching
ZEIP-35 noThrow Cancel Order
ZEIP-32 Rich Revert Reasons
ZEIP-33 New Signature Types
ZEIP-34 executeTransaction Improvements
ZEIP-36 executeTransaction Batch Improvements
ZEIP-37 executeTransaction Cancellation and Expiration
ZEIP-61 Initial staking parameters

Important Dates

Date Note
2019-11-04 Vote Begins
2019-11-11 Vote Ends
2019-11-25 V3 Mainnet

Audit Reports

Bug Bounty

0x is offering a Bug Bounty that pays up to $100,000 for critical exploits found.

Deployed Contracts

Contract Address
Exchange
Staking
Forwarder
Coordinator
Owner

Useful Documents

Upgrade Process

Pending the result of the vote the protocol will be updated to v3. New contracts will be added to the 0x architecture. These include the new Exchange contract and the Staking contracts. The on-chain state changes take effect after a 2 week delay.

For some time, there 0x protocol will have both the v2 and the v3 Exchange contracts active. Both of these contracts will share the same AssetProxies (contracts which have approval to move the users tokens). After some time the v2 Exchange contract will be discontinued.

Owner

With this upgrade we are introducing the ZeroExGovernor contract. This contract ultimately replaces the older AssetProxyOwner from v2. The ZeroExGovernor is the evolution of the AssetProxyOwner and has a number of enhancements:

  • Custom timelocks for various functions (staking 10 days, protocol upgrades 14 days, emergency shutdown 0 days).
  • Administrative functions for the Staking contracts (adjust protocol fee, fee collector, epoch duration)

For a full list of changes the ZeroExGovernor can perform, refer to the specification. The following table has the full list of administrative functions and their respective timelock.

As part of the upgrade from v2 to v3, the Owner of the 0x protocol contracts will transition to the ZeroExGovernor contract.

@dekz dekz added the 3.0 label Oct 21, 2019
@dekz dekz pinned this issue Oct 24, 2019
@dekz dekz added vote vote-started Voting for this ZEIP is on-going labels Nov 4, 2019
@dekz dekz added protocol-transitioning Protocol is transitioning to this new state vote-accepted Vote for this change has been accepted and removed vote-started Voting for this ZEIP is on-going labels Nov 15, 2019
@mintcloud mintcloud added status: implemented Proposed changes have been implemented (and deployed, if smart contract) type: core and removed 3.0 protocol-transitioning Protocol is transitioning to this new state vote vote-accepted Vote for this change has been accepted labels Apr 10, 2020
This was referenced Apr 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: implemented Proposed changes have been implemented (and deployed, if smart contract) type: core
Projects
None yet
Development

No branches or pull requests

3 participants
@dekz @mintcloud and others