Grant Title: Safe Composable Conditional Orders
- GitHub: mfw78 (mfw78) · GitHub (see also rndlabs · GitHub).
- Gitcoin: https://gitcoin.co/mfw78
- Mirror: mfw78.eth
- Experience in technical systems analysis, design and implementation with a strong emphasis on risk management / gap analysis.
- Experienced technical writer in mission-critical, highly regulated, and technical industries.
- Actively independently developing with emerging decentralised technologies, including Swarm and Waku.
- safe-cow: GitHub - rndlabs/safe-cow: Gasless EIP-1271 token swaps on Cowswap - implementing EIP-1271 signature aggregation for Safe trading via Cowswap API.
- cowswap-twap-orders: GitHub - rndlabs/cowswap-twap-orders: 🐄🐮 Time-weighted average price orders for CoW Protocol - implementing TWAP orders for Safe trading via Cowswap API.
Grant category: Protocol Order Flow / Developer Tools
Problem: With the limitless options available for EIP-1271 orders, there becomes a need to develop a standard by which orders can inherit from, such as to reduce the number of contract deployments required, increase gas efficiency and smooth the UX.
For example, the recent Cowswap TWAP Orders while providing an innovative method for storing only a signature of the TWAP and therefore providing gas efficiency, this method requires a new Fallback handler for each type of conditional order.
Solution: Implement a “Conditional Order Router” Fallback handler, with Conditional Orders being summarised in a merkle tree, whose root is signed by the Safe to assert truthfulness. This method would allow limitless simultaneous conditional orders meeting innumerable use cases.
Grant Goals and impact
- Increase CoW protocol utility through composable DeFi-market unique order types.
- Reduce UX friction for multiple conditional order types.
- Implement a
MerkleConditionalOrderFallbackHandlercontract that provides stock Safe functionality, while allowing authorisation of limitless types of conditional orders.
- Update TWAP orders:
a. Add support for new Merkle Tree storage.
b. Add support for Milkman price checkers.
TradeAboveThresholdfor Merkle Tree storage (implementation of these conditional order types out of scope for audit).
- Revise the Tenderly Web3 Action to support composable conditional orders.
- Revise the
CLItool to allow creation of composable conditional orders (eg. create TWAP and
Phase 1: 4 weeks FTE.
Note 1: Full-Time Equivalent (FTE) corresponds to 40 hrs / week
Note 2: The above timelines do not make for allowances / timing associated with audit completion.
Phase 1: $10,000.
Payment terms: Half paid up-front at the commencement of each phase with the remainder paid upon satisfactory completion of code as determined by the member(s) of the CoW team.
- $10k: development / labor cost
This budget does not include any costs associated with audit by a 3rd party. It is expected that CoW would undertake the necessary steps / cost for audit. Any cost overruns associated with meeting the standards of an external audit (additional testing / code fixes) would be paid out of the development cost.
Gnosis Chain Address (to receive the grant):
Other Information: As an active member of the CowDAO Grants Committee, I hereby refrain from voting / signing on this proposal so as to eliminate conflicts of interest. In determining the timelines associated with this Grant, I have taken into consideration workloads due to my position as a Committee member, 3rd party work, and allowed appropriate buffer to ensure the Grant Committee’s continuance.
Terms and conditions: