Grant Application: Railgun–CoW Protocol SDK for Private Swaps
Author(s): Auryn Macmillan, Jan-Felix Schwarz, Alex Espinosa
Experiences and qualifications:
Gnosis Guild and CoW Protocol both spun out from Gnosis, and the teams have a long history of collaboration. Zodiac is already widely used by treasury managers interacting with CoWSwap, and Gnosis Guild built a Zodiac helper contract to enable granular access control over CoWSwap orders. The Zodiac team has also built a proof of concept connecting Railgun to CoWSwap, demonstrating the feasibility of private swaps through this integration.
Grant Description:
This grant funds the development of an open-source software development kit (SDK) and supporting libraries that enable programmatic execution of CoW Protocol swaps from Railgun-shielded balances.
The proposed library will wrap existing CoW Protocol SDKs and APIs with Railgun-compatible privacy flows, allowing developers to:
- Initiate swaps from private balances
- Submit and manage orders programmatically
- Preserve privacy throughout the swap lifecycle
- Integrate private swaps into user interfaces and applications
The SDK will be released under the LGPL open-source license from day one, with public repositories, documentation, and test coverage.
As part of validation and demonstration, the team will integrate the SDK into the Zodiac app. This integration work is explicitly outside the scope of the grant and will not be funded through this proposal.
The primary outcome of this grant is a reusable, composable, and community-owned library that lowers the barrier to building privacy-preserving trading applications on CoW Protocol.
Type of Grant:
Milestone-based
Milestones:
| Milestones | Title | Due date | Funding request |
|---|---|---|---|
| Milestone 1 | Open-Source Railgun–CoW SDK | 8-10 weeks after acceptance | 50,000 xDAI (half up-front, half on completion) |
Specifics: Milestone 1 – Open-Source Railgun–CoW SDK
Estimated Effort: 8-10 weeks
Deliverables:
- Core SDK Development
- Open-source library wrapping CoW Protocol SDKs and APIs for Railgun compatibility
- Support for initiating swaps from Railgun-shielded balances
- Abstractions for private order creation, signing, and submission
- Interfaces for interacting with CoW Protocol’s order book and settlement systems
- Full Swap Lifecycle Support
- Support for major CoWSwap order types (market, limit)
- Handling of partial fills and order cancellations
- Re-shielding of received assets post-settlement
- Privacy-Preserving Operations
- Shielded balance queries for application integration
- Private approval and signing workflows
- MEV protection combined with Railgun privacy and CoW Protocol settlement mechanisms
- Testing & Documentation
- Unit and integration test suites covering core flows
- End-to-end real-world validation through integration into the Zodiac app
- Review of privacy guarantees at each lifecycle stage
- Comprehensive API and developer documentation
Success Criteria:
- Public, LGPL-licensed open-source repository available from project start
- SDK enables private CoWSwap transactions from Railgun balances
- Supports major ERC-20 token pairs
- End-to-end private swap lifecycle is functional (submit, fill, cancel, re-shield)
- Comprehensive developer documentation published
- At least one production-grade integration (Zodiac) demonstrating viability
- Successful execution of 30+ private swaps on mainnet using the SDK
Length:
Approximately 2-3 months (8-10 weeks), commencing immediately upon acceptance of the proposal.
Funding Request:
50,000 xDAI total: 25,000 xDAI upon acceptance, 25,000 xDAI upon completion of Milestone 1.
Gnosis Chain Address (to receive the grant):
0x12BEEF35025841EFccb77D6EE40df86400Fdb4bB
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.
INCLUDE NOTE TO COMMITTEE:
Please notify the Grantee of their reviewer and their steward in the thread and latest upon successful approval of the Grant on Snapshot.