I'm working on a smart contract that uses 0xAPI data passed in by the user to execute a number of ERC20 swaps.

I noticed that so far during my usage of the 0xAPI, when sellToken and buyToken are both ER20 (i.e. not native Eth) the value field was always 0. However in the API docs it refers to native eth being potentially used for "protocol fees".

Therefore I was wondering wether I can assume this value field to always be 0 for ERC20 to ERC20 swaps, or if not in what situations / configurations native eth protocol fees will arise.

1 Answer 1


In the past protocol fees have been enabled to pay a rebate to Market makers on limit orders. They are currently disabled, but this is the case where you would find that value field is non-zero when the trade is not using the native asset (e.g ETH).

Protocol fees are at the behest of governance, so if they are re-enabled at a point in the future you may have issues not supporting this.

These are only enabled for Native limit orders in 0x, so one work around is to disable these if the protocol fees are re-enabled using excludedSources=Mesh.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.