CoW Protocol allows “Smart Orders”, that is on-chain orders with arbitrary validation logic that is executed at settlement time. One application
This would allow users to place stop-loss orders, selling positions on certain tokens when the market price goes below a certain threshold, i.e. the “stop price”.
Furthermore, this can be implemented entirely externally to the core protocol and would provide a good starting point for future CoWmoonity “Smart Orders”.
TODO: Can probably have a better introduction, I don’t know what other information is useful for a grant RFP.
An initial stop-loss order type that only supports ChainLink oracles has already been implemented and deployed here: https://gnosisscan.io/address/0x0a5851524e638edf1652010c7e6fb50c81d70977. A version that supports custom “price oracles” is being developed and will be provided by the CoW development team. Effectively, implementing the actual order Solidity code is outside the scope of the grant.
The grant would specifically cover the work to create a Safe app for using these stop loss orders. Notably the Safe app is required to: