Author:
@bleu @yvesfracari @ribeirojose @mendesfabio
Experiences and qualifications:
bleu collaborates with companies and DAOs as a web3 technology and user experience partner. We developed multiple grants with CoW Swap and other teams. The ones that are more related to this project are:
cow-shed module of the @cowprotocol/cow-sdk. This module was created to help developers to use CoW Shed to create permissioned hooks.Grant Description:
Category: Core Infrastructure & Developer Tooling
As described on this RFP, the CoW Protocol ecosystem currently relies heavily on Ethers.js v5 for its blockchain interactions. This grant proposal aims to not only upgrade to Ethers.js v6 but also to fundamentally restructure the SDK architecture to be more composability with framework-agnostic base packages with EVM adapters. We propose a comprehensive overhaul that includes:
app-data and contracts packages, ensuring framework-agnostic base packages. This means that we will remove the current dependency of ethers v5 of the business logic.A demonstration of this architecture with some methods implementations can be found here.
The impact extends beyond mere technical upgrades – it will foster broader adoption of the CoW Protocol by allowing developers to integrate the protocol using their preferred tools and frameworks.
Type of Grant:
Milestones based grant.
Milestones:
| Milestone | Duration | Payment (15k xDAI + 10k COW vested) | | --- | --- | --- | | SDK Refactoring | 2 weeks | 5k xDAI | | New adapters and CoWSwap Integration | 2 weeks | 5k xDAI | | Deployment and Documentation | 2 weeks | 5k xDAI |
This milestone focuses on refactoring the SDK packages while maintaining ethers v5. We will implement a modular package system that separates reusable logic from blockchain interactions. The work will continue with this demo structure, implementing proper tooling, and ensuring all existing functionality works within the new architecture (with test replication). This milestone includes refactoring the app-data and contracts packages into the new structure, setting the stage for future adapter implementations. Considering the demo structure, we want to deliver on this milestone the following packages:
cow-order-bookcow-app-datacow-tradingcow-abi (includes part of the contract logic)cow-shedcow-composablecow-common (includes part of the contract logic)cow-configcow-order-bookcow-subgraphcow-tscow-order-signingcow-sdk (exports all the other packages)cow-sdk-ethers-v5 (includes part of contract logic)The second milestone centers on creating the viem, ethers v6, and wagmi adapters and integrating the selected ones on the CoW Swap application. We will implement comprehensive testing for the new adapter and update all CoWSwap-related projects (including explorer and other sub-projects) to work with the new SDK architecture. This will include:
cow-sdk-ethers-v6cow-sdk-viemcow-sdk-wagmiThe milestone concludes with a fully documented, tested, and production-ready system supporting all three adapters. We will update the existent SDK docs to cover new packages (core, adapters, etc), and provide thorough migration guides for existing users.
This phase includes creating integration examples for each adapter, implementing end-to-end testing across all supported libraries, and preparing the entire system for production deployment. This stage will also include the update of the tutorials on the Learn website.
Length:
Estimated start date: between april and may of 2025
Estimated final date: 6 weeks after the start date
Funding Request:
We propose that milestone payments be released upon each milestone’s approval. The budget includes the hourly rates of a developer during the execution and a project manager on a need basis. The xDAI part of the budget shall be paid after each milestone’s completion (5k xDAI per milestone, summing 15k xDAI) and 10k COW shall be vested over 1 year to cover diluted maintenance and related costs for the same period.
Gnosis Chain Address (to receive the grant):
0x554866e3654E8485928334e7F91B5AfC37D18e04
Other Information:
Terms and Conditions:
By submitting this grant application, I acknowledge and agree to be bound by the CoW DAO Participation Agreement and the CoW DAO Grant Agreement Terms.