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

OTC Orders #90

Open
dekz opened this issue Aug 24, 2021 · 1 comment
Open

OTC Orders #90

dekz opened this issue Aug 24, 2021 · 1 comment

Comments

@dekz
Copy link
Member

dekz commented Aug 24, 2021

Summary

This ZEIP introduces a new order format, termed OTC orders, to the 0x V4 protocol. OTC orders are a slimmed down version of the existing 0x v4 RFQ order format, designed to reduce gas usage at the cost of certain functionality offered by the other order types. OTC orders would not replace RFQ or Limit orders, but rather coexist with the existing order formats in the protocol.

Type

CORE

Motivation

OTC orders are designed to be more gas efficient than the existing v4 order formats (RFQ and Limit), particularly for meta-transaction execution. Currently, meta-transaction trades must go through the MetaTransactionsFeature, which can perform an internal call to fill an RFQ order. An OTC order can be executed by a specified relayer directly via the OtcOrdersFeature if it is signed by both the maker and taker.

There are some trade-offs between OTC orders and RFQ orders. We expect OTC orders to be cheaper than v4 RFQ orders to execute, but OTC orders cannot be cancelled, nor can they be partially filled more than once.

Specification

https://github.com/0xProject/protocol/blob/development/contracts/zero-ex/contracts/src/features/OtcOrdersFeature.sol

Rationale

Metatransactions allow a third party to submit a transaction on behalf of a user. This feature decreases the costs associated with submitting these types of transactions, greatly reducing operational costs. We anticipate the gas to be approximately 80-90k on Ethereum.

Implementation

This proposal would register the functions exposed by OtcOrdersFeature to the 0x Exchange Proxy. The 0x V4 architecture allows features to be added and upgraded. No change is required for integrators, as no existing functionality will be updated.

Designated team

0x Labs

Notes

The change has been spot-checked by Consensys Diligence

@mintcloud
Copy link
Contributor

Voted on https://0x.org/zrx/vote/zeip-90

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants