Grant Application: Community-built Python SDK

Community-built Python SDK

Grant Title: Community-built Python SDK for CoW Protocol

Author:

About You:

  • Experienced 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.
  • Active Core Contributor to CoW Protocol

Grant category: Protocol Order Flow / Developer tools

Grant Description:

Problem: Builders / developers come from many different technical backgrounds. Due to the nature of web applications predominantly being written in JavaScript, CoW Protocol naturally developed a JavaScript SDK - cow-sdk - the only language in which there is a current, up-to-date SDK (a Golang SDK was written, but doesn’t seem to have gained traction, and has become dated).

Solution: Let’s tap into our developer herd out there and embark on an experiment in community-software stewardship / ownership. This grant seeks to set aside funding within Grants DAO to fund contributors to a CoW Protocol python-language SDK.

Grant Goals and impact:

  • Increase CoW protocol utility by increasing range of applications.
  • Increase CoWmunity engagement, fostering a strong developer community.
  • With many AI/BigData libraries used being written in Python, opens a potential raft of new innovations.

Milestones:

Phase one (feature parity):

  1. Contributors commit code to a cowprotocol organization repository and progressively work together in the herd to achieve feature parity with:
    a. @cowprotocol/cow-sdk
    b. @cowprotocol/contracts (hashing utilities)
    c. @cowprotocol/app-data

Phase two (maintenance):

  1. Contributors maintain the CoW Protocol Python SDK over the course of a year.

Grant Timeline:

Phase one: N/A

Phase two: From 1 year after Phase 1 complete.

Funding Request:

$5,000 for the first phase. Based on the Grants Committee assessment (and whose decision is final), the funding will be divided amongst the contributors to the Python SDK.

Once the Python SDK reaches feature parity, the orders routed by the Python SDK will become eligible for the Volume Grants Program. Funds from the Volume Grants Program (if any), will be distrbuted to original developers, and maintainers, on a ratio basis to be solely determined by the Grants Committee.

Budget Breakdown:

  • $5k: development / labor cost.
  • Volume Grants Program

Gnosis Chain Address (to receive the grant):

TBD

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

3 Likes

I support this proposal. A Python SDK will enable further developer activity and deeper CoW protocol utility.

1 Like

@mfw78 thanks for putting this grant together.
I think a Python client would be useful and can serve well for dev community building.
The risk is very limited as payments would be made only for delivered code.
I’m in support of allocating funding for this grant

1 Like

Thanks for your proposal, I agree with previous comments and support this proposal as I also think the grant goal is good, the funding reasonable and I’m curious to see devs from the CoWmunity actively participating/contributing to this Python SDK.

1 Like

FYI I’ve moved this to snapshot for voting. Sorry that it took so long, we had an issue with the snapspace.

3 Likes

Following our discussion with @mfw78 , we’ve agreed to assist with the development of the Python SDK. Contributions will be made to this public repository, where other developers can also collaborate.

1 Like

Please actually upstream into GitHub - cowdao-grants/cow-py: CoW Protocol Python SDK :pray:

1 Like

Hey folks! I’m excited to share that we’ve just merged a bunch of outstanding PRs in cow-py, the Python version of the CoW SDK! Check it out here.

Also, we’re currently working on one final piece - porting the composable module to Python. You can take a peek at what’s in the works in this draft PR.

With this, we’re nearing completion of porting the SDK to Python. Here’s what we’ve accomplished so far:

  • Interacting with CoW contracts across chains
  • Interacting with CoW OrderBook API, including signing orders and the complete e2e order flow
  • Implementing backoff and rate limiting strategies for the APIs (in case you need it :wink:)
  • Querying CoW subgraph (although it’s down right now)
  • Generating/reading AppData in orders
  • Automated testing using pytest, including an e2e test for the order creation flow (quote, create order, cancel order)
  • Implementing type hints and pydantic models to enhance developer experience
  • And probably a bunch more I’m forgetting! :sweat_smile:

Next steps include:

  • Finishing the composable module port
  • Implementing schema validation functions from the appdata module
  • Adding more comprehensive examples and documentation

We’re thrilled about the progress and can’t wait to see what the community builds with cow-py! If you’re interested in contributing or have any questions or feedback, feel free to respond to this thread, open an issue or PR on the GitHub repo, or reach out to us directly in TG @rpunktj.

Happy coding, and may the herd be with you! :cow::rocket:

2 Likes