0xProject / ZEIPs

0x Improvement Proposals
Apache License 2.0
91 stars 15 forks source link

Add ZEIP-28 #54

Closed dorothy-zbornak closed 4 years ago

dorothy-zbornak commented 4 years ago

Preamble

ZEIP: 28
Title: Arbitrary Fee Tokens
Author: @PhABC, 0x Core Team
Type: Standard Track
Category: Core
Status: Final
Created: 2019-03-8

Discussion: #28

Simple Summary

Allow taker and maker fees to be paid in any asset, not only ZRX.

Abstract

Add two new asset data fields to the order schema so maker and taker fees can be paid in arbitrary assets.

Motivation

Currently, most relayers take their fee via a spread instead of accepting fees paid in ZRX. The main reasons for this are better UX, lower cost and because relayers and users do not want to transact using ZRX. This ZEIP proposes to allow maker and taker fees to be paid in any asset, not only ZRX.

This also allows all relayers, not just matching relayers to take percentage fees.

Specification

Add two new fields to the order schema:

In _settleOrder() and _settleMatchedOrders(), transfer maker and taker fees to the fee recipients after transfering maker and taker assets (in case the main assets would help cover the fees).

Copyright

Copyright and related rights waived via CC0.