A look at 0x fee model

Currently, the protocol fee is 70k * gas_price.

After the recent block gas limit increase, the prices became manageable, but it might be only a temporary solution, eg. the blockchain will get clogged again.

Also, with ETH price at 3.5k and gas at 70Gwei, a basic swap is still $15 in gas and $15 in protocol fees. If by any chance ETH goes to 10k and gas price to 200Gwei, we’re again talking about $250 for a single transaction.

The current “flat rate” model is good for big traders and terrible for small traders. Every day various users, especially small traders, keep asking on Discord about their limit orders not being filled (happening due to gas/protocol fees). A simple idea for better fillability is to adjust the protocol fees and charge differently depending on the trade size.

The fee would be

min(gas_dependent_fee, 30bps)

(30bps taken from the top of my head).

First, I am aware it’s not obvious, or even not possible, to reliably compute 0.3% from a ZRX-BAT trade. Also, even if the fee can be computed, it still needs to be transported to the Treasury and converted to WETH – not easy and costly as of now (maybe can be extracted as “extra gas”?). Thus the first step would be to have this in ETH-denominated markets, which constitute the majority of 0x volume.

Secondly, a deeper look into the market is needed. I have no idea what the bots arb against – I’d expect, maybe incorrectly, someone in 0x ecosystem (Periscope?) to know this stuff. Then perform even a naive analysis.

Take, for example, 1k random snapshots of 0x Mesh (there are 12.5k orders in the mesh as of now, so it’s 12.5M orders in total which can be parsed in seconds) and 1k snapshots of potentially “arbable” sources (Binance, Coinbase, Uni?). Then compare how many orders can be arbed with different fee models and how much protocol fees can be extracted. Even if the total amount of fees collected doesn’t change, the extra orders filled would result in happy customers and potential networking effects.

I am most certainly over-simplifying the case, but curious about the opinions.

1 Like

Thanks for posting @robpal ! I agree this is something that should be looked at and that the analysis could also be used to inform a larger, overall tokenomics review.

If anyone in our community has the skills and motivation to work on something like this, please reach out! :pray: This type of work could also be eligible for grant funding (once the proposal is approved).

Open orderbook is still transitioning to using the 0xv4 limit order type. Look for that to help the gas cost per trade.

It’s brutal when gas costs go upwards of hundreds of Gwei because it prices out small trades completely in many cases. We’re definitely still in the middle of scaling Ethereum so bear with us. Things will get better. Fast forward ~26 days after this post and gas prices are back down to ~20 Gwei. It’ll certainly fluctuate for the foreseeable future until Ethereum scales.

There have been a lot of 0x protocol fee discussions happening behind the scenes. Stay tuned and feel free to contribute ideas. It definitely doesn’t make sense to have a protocol fee for small trades as the gas cost to pay the fee inhibits the trade’s small value by a large amount. Example: why pay gas to pay a fee when you only want to swap $1,000. There are certainly some changes coming to the protocol fee and how it is paid. 0x is still brainstorming the best way forward.

At KeeperDAO, we’re dramatically upgrading the user’s limit order experience. I recommend checking it out. We offer rewards to user based on the arbitrage captured by keepers (bots) when filling a user’s limit order. We have a lot of plans for the future, with features like providing insight into your limit order’s execution → approx when and at what price will it execute, and through what path, etc. This is all powered by the 0x protocol.

1 Like