Proposal: Limit and Stop orders


Trading with leverage is mostly a short term approach because of the increased risk.
Every professional short term trader is using some kind of capital protection, most commonly a stop loss.

Meanwhile human traders are not online 24/7 so Limit orders are essential to not miss market opportunities or take profits at a given level.

These tools are mandatory for professional trading and technically are more important than new markets for mass-adoption.


Create the functionality of limit and stop orders.


I´m aware that a blockchain cannot execute code on condition. Instead every execution needs an entity to initialize the transaction. Just like in the early days of yearn, this feature can be managed off chain as a quick-and-dirty solution. So the “Orderbook” is off-chain and executed by a bot if conditions are met and is controled by the perp team for now. (Or by a partner that is compensated in PERP and has experience in trading systems. Alameda research immediately comes to my mind.)

Going forward there has to be a decentralized solution. Keeper is one of these approaches and widely used already. However, my understanding is that keepers will be compensated for every “job”, aka action they take. So whenever a limit/stop order is executed by a keeper, they would want compensation.

I´m using the protocol so I´m familiar with the gasless signing process. Can this signing process include a small fee on execution by a third party? The idea is that the keeper gets the rewards from within the protocol, thus the fees come from the balance of users and can be quite small. Not sure about the deep technicals though…

Let´s find a solution!

There is a bounty for this:

That´s great, thanks for the heads up! It says it was claimed by someone already. But I don´t see the feature implemented. What does that mean?

It means someone said he is capable to implement this feature and proved the meaningfulness of his approach to the team. Once he implements the feature bounty will be paid

@DeFiChad Yes the grantee is working on it right now.

Thank you both for the explanation. Sounds good!