Hi @charlesndalton, thank you for putting together this grant proposal.
As a member of the grants committee, I just wanted to inform you that we are finalizing a document with the final structure of the grant, and will share with you for comments early next week.
One question: I see a reference to a typescript SDK: “Test suite for the smart contracts as well as for the SDK around it (typescript components etc).” This hasn’t been discussed thus far (at least with me). Perhaps someone from the committee could expand?
Let me try to clarify what we mean by this sentence:
Test suite for the smart contracts as well as for the SDK around it (typescript components etc).
In regards to test suit for the smart contracts, it expected to have such contracts unit tested. From what we have been able to see in your github (milkman/test_cancel.py at main · charlesndalton/milkman · GitHub for example) you have already performed some of these tests. To mark this deliverable as completed, the grants committee expects to have at least >95% of the smart contract unit tested.
In regards to the Test suit for the SDK, it expected to have some python code that demonstrates using the contract for an actual trade. In other words, an end-to-end test that showcases how the system is supposed to be used & work. This test should be through enough to demonstrate that the systems works as expected.If this is not clear, happy to set up a call to discuss further.
After all the comments back and forth, its finally the time to signal if the grant moves forward. For this, I would ask both the @cowgrantscommittee and @charlesndalton to read the final text of the grant here.
Additionally, it is needed the grants committee and charles signal that the proposal is moving forward via the following poll.
Should CoW Grants fund CoW Grant Proposal 2 - Milkman Smart Contracts?
@charlesndalton it would be greatly appreciated if some progress updates are posted to this thread, especially if there’s any significant progress achieved, or delays hit. (But any update is good)
Core Milkman contract is done and milkman bot is in workable state. Both have been integration tested on Goerli.
The core Milkman contract is pending audit by Nicholas, and then hopefully Frederico once Nicholas is done.
G0 audit is scheduled for November 14th.
Unit tests are passing for the UniV2 price checker, the Curve price checker, the Chainlink price checker, and the UniV3 price checker. A meta price checker that uses multiple price checkers still to be done.
Another community update (I figure every ~2 weeks is a good rhythm, someone can tell me otherwise if not):
Docs are there now for both Milkman (how to use it) and the Milkman bot (how to run it)
Meta price checker is done, and all price checkers have been refactored to make them more modular. 72/72 tests currently passing
Milkman bot is pretty close to done. All of the logic is there, just tests need to be added
Unfortunately, it looks like we might not be able to have a Balancer price checker, at least for initial launch. The problem here is that to be EIP-1271-compatible, we need isValidSignature to be view, but Balancer’s queryBatchSwap is non-view. UniswapV3 has a similar problem but I was able to find a ‘static quoter’ which returns prices from a view function; I’m engaged with Balancer, and it looks like this doesn’t exist here. If it were ever added though, it should be easy to add the Balancer price checker.
Some changes to core Milkman contract, such as requiring that requestSwapExactTokensToTokens is only called on the ‘root’ Milkman and cancelSwap and isValidSignature are only called on ‘order contracts’ (EIP-1167 clones)
No major security issues found
I expect Adam from g0 to publish a report
Some changes were made to the cow.fi endpoints, Milkman and the bot have been adapted to these changes and are passing integration tests
Logic to estimate fees in python integration tests
Logic to estimate fees in Milkman bot
Going to prod is dependent on the EIP-1271 changes in cow.fi being pushed out of barn and into prod – I expect that Milkman can go to prod within 1-2 weeks of this
Hey @charlesndalton, would love to get another update!
Excited to see this fully shipped
Also would like to know if when should we start evaluation before completing the second payment?
Everything should be ready for review / evaluation. For completeness, here’s a more in-depth status on each of the parts:
Milkman contract: 100% final, etched into Ethereum stone @ 0x11C76AD590ABDFFCD980afEC9ad951B160F02797
Price checkers: done and deployed. This includes price checking for Uniswap V2, SushiSwap, Uniswap V3, Curve, Chainlink, and multiple of those at the same time. Deployment addresses are listed here: milkman/DEPLOYMENTS.md at main · charlesndalton/milkman · GitHub.
Milkman bot: stable and working in production, so far hasn’t encountered any issues with the swaps that I’ve thrown at it
Python SDK: deployed to PyPi @ milkman_py 0.1.1
So we’re in a good spot. Given that price checker, the bot, and the SDK aren’t as unchangeable as the core Milkman contract, I expect future improvements and additions.