0x: Liquidity API for the community

以太坊爱好者
本文约4260字,阅读全文需要约17分钟
0x v3 has been launched on the Ethereum mainnet on December 2nd, so let's see what's new.

Editor's Note: This article comes fromEthereum enthusiasts (ID: ethfans)Editor's Note: This article comes from

Ethereum enthusiasts (ID: ethfans)

, Author: Matt Taylor, translation & proofreading: stormpang & A Jian, reprinted by Odaily with authorization.

  • UPDATE: 0x v3 has been approved and will be launched on the Ethereum mainnet on December 2nd

  • first level title

  • update points

  • If approved, the 0x v3 version will be launched on the Ethereum mainnet on December 2nd after a two-week grace period!

  • In order to transfer protocol ownership to 0x market makers and incentivize them to participate in protocol governance, the ZRX equity mortgage mechanism uses ETH to provide currency rewards for market makers and provides additional ZRX voting rights to enhance system liquidity. Any ZRX holder can obtain staking benefits by delegating tokens to the market maker pool.

overview

We have developed a set of powerful bridging contracts that integrate liquidity from decentralized exchanges such as 0x, Kyber, Uniswap, Oasis, etc. Through Liquidity Bridges Contracts, 0x will be a one-stop platform that provides users with the best source of prices for popular and long-tail trading pairs on decentralized exchanges.

overview

Since the v2 release in September 2018, 0x usage has increased significantly. So far, dozens of teams have joined our ecosystem construction projects, covering non-fungible token (NFT) games, prediction markets, decentralized finance (DeFi) and other vertical fields. Although 0x is suitable for various types of markets, our goal is still to provide the best liquidity API for the rapidly growing DeFi ecosystem. Liquidity entering the 0x network has grown significantly since we expanded our market maker program in response to stagnant parts of the stablecoin market.

image description

- Average slippage per $1,000 trade in an open liquid order book more adequate)-

In the v3 implementation, we included several 0x improvement proposals for consideration by ZRX holders (ZEIP-28, ZEIP-31, ZEIP-42 and ZEIP-47). This article reviews some of the most important features of the v3 release and discusses its benefits for ecosystem development. This is our biggest upgrade since launching the 0x network in August 2017. The 0x core team is very excited about the growth of the protocol, because the v3 version will solve some of the major problems faced by decentralized exchanges, allowing 0x to provide a more powerful liquidity API for the DeFi system.

image description

- Monthly trading volume of 0x v2 version exchange contract (unit: USD) -

The 0x core team has thoroughly tested the v3 contract. Meanwhile, Trail of Bits and ConsenSys Diligence are completing an external audit of 0x v3. We will publish the report of ZRX holders before they vote. We also launched a bug bounty program for v3 contracts. Stay tuned for info on the bounty!

Voting will begin on November 4th and run through November 11th. As with the previous voting process, the 0x core team will collect cryptographically signed voting information off-chain and aggregate votes based on a snapshot of the ZRX balance at a given block height. This coordination scheme is transitional, and we will switch to a fully on-chain governance scheme when the time is ripe. If our community of ZRX holders passes this vote, v3 will launch on mainnet on December 2nd after a mandatory two-week grace period.

0x is a public infrastructure, an upgradeable smart contract system managed by protocol users. ZRX is a token of the 0x protocol, which can be used to vote for ZEIPs (0x protocol upgrade proposal) and decide the direction of 0x protocol upgrade. Market makers are important stakeholders in the 0x ecosystem, they provide the liquidity needed for the market to function, and are also directly incentivized to support proposals that generate new markets and greater trading volume.

related information:

related information:

2019 0x Roadmap (Part 4) - Equity-Based Liquidity Incentive Scheme

In order to arouse the sense of responsibility of market makers and motivate them to participate in the protocol and ecological governance process, the ZRX equity pledge mechanism will provide market makers with currency rewards and additional voting rights to motivate them to provide liquidity for the 0x protocol market operation.

While market makers are critical to 0x's long-term growth, we are not neglecting ZRX holders. Every ZRX holder can also contribute to the development of the protocol through staking and voting, and get rewarded for it. The entire ZRX equity pledge model is as follows:

For each 0x transaction, the buyer (the so-called "taker") needs to pay a small transaction fee in ETH, which is probably several times the transaction Gas fee. This fee will be remitted to the Liquidity Rewards Pool (Liguidity Rewards Pool) within 10 days (one cycle). At the end of each cycle, liquidity rewards will be automatically distributed to market makers based on their trading activity and the amount of ZRX pledged during that period. Rewards that have not been distributed (since the equity held or entrusted by the liquidity provider is not 100%) will be automatically transferred to the liquidity reward pool in the next period to continuously motivate market makers to provide market liquidity.

Market makers increase their potential liquidity rewards and participate in the protocol governance process by establishing an equity pledge pool. Additionally, market makers can maximize their share of rewards by offering competitive liquidity prices and splitting returns proportionally with stakers.

Any ZRX holder can securely delegate their tokens to the staking pool for corresponding liquidity rewards. Once token holders delegate their ZRX tokens, half of their voting power will also be held by the market maker running the staking pool. ZRX holders maximize their returns by comparing the percentage of returns that can be earned by different staking pools, and delegating their tokens to the staking pool that can generate the greatest returns.

As more and more funds flow into the 0x network, transaction fees and revenue will also increase proportionally. These new token functions also give ZRX holders the opportunity to participate in the protocol development process, contribute to the future growth of the 0x economy and obtain corresponding benefits.

We have been in talks with major market makers to inject liquidity into the 0x network as 0x v3 kicks off. We have received very positive feedback from market makers, because the ZRX equity pledge mechanism allocates incentives for all participants in the ecosystem to ensure that market makers have governance rights over the development direction of the 0x protocol and are willing to provide liquidity for the 0x network To achieve long-term growth of 0x.

text

To learn more about the ZRX stake pledge contract, please check this document. For an overview of why market makers are so important to the development of the 0x ecosystem, watch our demo video on YouTube.

secondary title

In the 0x v3 version, in addition to using the 0x network liquidity pool, DeFi projects can also access the on-chain liquidity assets of decentralized exchanges such as Kyber, Oasis, and Uniswap through bridge contracts. Developers can choose the most suitable model based on the liquidity bridge contract, and find the smallest spread for their users with the least code modification. For example, an order filled by a buyer on 0x can be either a 0x native order or an order from a decentralized exchange such as Kyber. Liquidity bridging contract DeFi developers can have both fish and bear's paws, not only can obtain the liquidity of popular trading pairs in 0x with a smaller price difference, but also obtain long-tail tokens through decentralized transactions on multiple chains fluidity.

Liquidity bridge contracts are also able to execute new types of transactions, such as: TokenSet's rebalancing mechanism, dYdX's liquidation transaction, and even the ability to buy and sell deposit contracts (such as cDai). Click here for more technical details.

These liquidity bridging contracts and all other sources of 0x liquidity assets (such as: Mesh) can be obtained through the newly launched 0x API. The 0x API greatly simplifies the DeFi developer experience by establishing an integration port to leverage both off-chain and on-chain liquidity.

Any token can be used to pay transaction fees

In previous versions of the 0x protocol, transaction fee takers (usually relay nodes) only accepted payment of transaction fees in ZRX tokens. Restricting the payment method of transaction fees is not conducive to the long-term development of the 0x network, and adds further friction to an already unintuitive transaction process, resulting in a poor user experience. In the v3.0 version, users can use any Ethereum-based token to pay transaction fees, including DAI or USDC, and can also use the token being traded or any token to pay the transaction fee to the transaction fee collector, and even Use Non-Fungible Tokens (NFTs) like Cryptokitties or Cheeze Wizards! Click here to learn more about ZEIP-28.

ZEIP-28 was proposed by Philippe Castonguay. Great to see community developers contributing to 0x's open source codebase!

  • secondary title

  • Other improvements and optimizations

  • In addition to the features above, we have made some improvements to existing features to address some specific pain points:

  • Market makers now have more reliable trade cancellation functionality available: when orders that need to be canceled in a batch include orders that have been canceled previously, the trade will no longer be errored out and rolled back, but will be processed normally. Read this article to learn more about bulk order cancellations.

  • When batch-processed transactions contain orders that cannot be satisfied, regardless of the buying and selling operations, they will not be rolled back by default and will be executed normally. See ZEIP-50 for details.

Rollbacks will contain richer error messages, making it easier for developers to deal with different failure modes and troubleshoot transactions. See ZEIP-32 for details.

common problem

The 0x v3 protocol contains two new types of callback signatures. The seller can choose not to issue the order itself during the transaction, but the buyer will issue the order. This kind of order will use a signature type in EIP1271, so that the seller can verify whether the order is within an acceptable range (price, asset type, transaction fee, etc.) without obtaining the order content in advance. For details, please refer to ZEIP-33.

The list of ZEIPs included in the 0x v3 version is shown in detail in this link.

common problem

What is the minimum amount of ZRX staked for a market maker pool?

When the market maker pool is initialized, 100 ZRX needs to be pledged first to be eligible for liquidity rewards. However, all relevant parameters can be adjusted externally through social governance.

If the v3 version is enabled, will the v2 version be deprecated?

We plan to migrate the entire ecosystem to the v3.0 protocol within 30 days of launch, and we expect the majority of liquidity to move to v3.0 within this timeframe. However, we don't want to disrupt markets that run on v2, so we will continue to run v2 on mainnet until most of the ecosystem has migrated. We will likely launch another community vote on whether to deprecate the v2 version of the protocol.

I am a 0x developer, how should I migrate my existing business to v3?

Please read our upgrade guide on Github. This guide describes the detailed process of how to migrate business to 0x v3.0 step by step.