Add Stop Limit Orders on V4: Call for Feedback

Stop limit orders is a type of order available on V3 protocol version but not on V4, with specification available here: 0x-protocol-specification/stop-limit.md at master · 0xProject/0x-protocol-specification · GitHub

This post aims to gauge community interest on this topic to drive a more detailed proposal to be funded by 0x DAO. Please give a upvote or leave a comment

What is your thoughts? Could this type of order be widely used by the community and traders?

2 Likes

I’m in support of this

1 Like

This could be a good opportunity for enriching the orderbook trading offer, I support this as well

Of course more features == good, but I think a quick breakdown of what could be gained from v4 having stop limit orders VS v3 stop limit orders would be helpful. For some people who aren’t totally familiar with 0x, it would be appreciated. I’m still quite confused at the differences between all the 0x versions.

2 Likes

There wouldn’t be much of a difference from v3, except perhaps v4 stop limit orders would be more gas efficient.

There hasn’t really been any usage or demand for v3 stop limit orders. While more features are always nice in the long run, I would consider these questions first before implementing them in v4:

  1. Are there other features that can be prioritized which would drive more volume / usage?
  2. Are there are known applications that plan on integrating stop limit orders if implemented?
  3. Does the marginal benefit of stop limit orders outweigh the increased attack surface and maintenance costs of implementing them in the v4 contracts?
1 Like

This post is to answer 1 and 3 raised questions, to check the sentiment and likehood of community/integrators using this advanced feature. If there is no demand or interest on the topic, we simple put the proposal in hold till a more number of interested people check about it.

Regarding question 2, I am available to integrate this feature on the apps that I develop, but if a bigger integrator like Matcha or Defi Saver shows interest on this, we will be able to overcome the first question.

Regarding costs of implementing 3, could 0x Labs share an estimation how much it costed for 0x V3 integration this kind of feature, I don’t know the exact figures on it.

Regarding costs of implementing 3, could 0x Labs share an estimation how much it costed for 0x V3 integration this kind of feature, I don’t know the exact figures on it.

It was fairly straightforward to implement in v3 since we simply used the StaticCallProxy to call into an extension contract. The StaticCallProxy was stripped out in v4 due to limited use and for efficiency reasons. It could definitely make sense to bring it back as a new order type in v4, but that would increase the attack surface a bit and require an audit (probably $30-50K).

There is also an ongoing cost of monitoring these orders and filling them when they hit their stop limit. Presumably some arb bot(s) would do that as long as stop limit orders get enough volume, but someone may need to bootstrap things with their own implementation.