Grant Title: ComposableCoW
SDK + Docs
Author: @mfw78
- GitHub: mfw78 (mfw78) · GitHub (see also rndlabs · GitHub).
- Gitcoin: https://gitcoin.co/mfw78
- Mirror: mfw78.eth
About You:
- 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.
- Previous CowDAO grants including
ComposableCoW
and TWAP Orders.
Additional Links:
ExtensibleFallbackHandler
- An extensible fallback handler forSafe
.composable-cow
- composable stateless conditional orders.safe-cow
- implementing EIP-1271 signature aggregation for Safe trading on CoW Protocol API.cowswap-twap-orders
- implementing TWAP orders for Safe trading via CoW Protocol API.
Grant category: Protocol Order Flow / Developer Tools
Grant Description:
Problem: Use of ComposableCoW
requires heavy lifting for the developer, notably they must ensure that:
- The merkle root is calculated correctly prior to setting it in
ComposableCoW
. - Proofs are calculated correctly for emission on-chain (or sending off-chain).
Developer experience further is hampered by a narrow scope of existing examples, requiring developers to have an extensive knowledge / understanding of ComposableCoW
architecture and contracts to effectively create composable orders.
Solution:
In order to smooth the above developer experience, it’s proposed to build ComposableCoW
support natively into cow-sdk
.
- Defining an interface in TypeScript for generic
IConditionalOrder
contracts (allowing conditional order developers to extend this to enable support for their conditional order type incow-sdk
). - Generation of merkle-roots using the OpenZeppelin
merkle-tree
library. - Provide an example repository for developing conditional orders that utilises the
ComposableCoW
-enabledcow-sdk
that developers may use as a template. - Write a section of documentation for inclusion in
Tutorials
section on the CoW Protocol docs.
Grant Goals and impact
- Significantly smooth the developer experience when building conditional orders for
ComposableCoW
. - Provide guidance and utilities for enabling a conditional order developer to build support for
cow-sdk
, allowing better integration into front-end / user-facing utilities.
Milestones:
- Define the interfaces to be used for the
IConditionalOrder
contracts incow-sdk
. - Integrate
ComposableCoW
merkle-root calculation routines intocow-sdk
. - Build an example repository for a condtional order type utilising the new
cow-sdk
. - Unit testing of the
cow-sdk
modifications. - Write documentation / tutorial for inclusion in CoW Protocol docs, based on the repository from (4).
Grant Timeline:
- 4 weeks FTE.
Note 1: Full-Time Equivalent (FTE) corresponds to 40 hrs / week
Note 2: The above timelines does not make allowance for liaison with the CoW Protocol team when finalising the TypeScript API for conditional orders.
Funding Request:
Total: $10,000.
Payment terms: Half paid on a successful vote by the Grants Committee, with the remainder paid upon satisfactory completion of code audit by an auditor nominated by CoW Protocol team.
Budget Breakdown:
- $10k: development / labor cost
Gnosis Chain Address (to receive the grant):
gno:0x070E0a700E36D303a0Ce3fe37976dD70974D7883
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.
Referral: N/A
Terms and conditions:
By applying for this grant, I agree to be bound by the CowDAO Participation Agreement and the COWDAO Grant Terms and Conditions