Grant application: Safe App for creating milkman orders

Grant Title:

Safe App for creating milkman orders


Author:

@bleu @yvesfracari


About You:

bleu collaborates with companies and DAOs as a web3 technology and user experience partner. We’re passionate about enhancing the interaction between blockchain and web3 users.

Our team has developed applications that enable seamless interaction with the Balancer Protocol’s smart contracts. Additional details about these apps can be found in the links provided. We are thrilled to be partnering with CoW protocol and consider this project a crucial milestone toward achieving our objectives.


Additional Links:

We already developed several tools for the Balancer protocol, like a Pool Simulator dashboard, Historical APR dashboard, and Twitter/Discord bots. We also built two projects that are more similar to this grant proposal:

  • Pool Metadata App: This tool allows easy and on-chain management of pool data to be integrated directly into Balancer’s frontend.
  • Vault Internal Balances Manager: An application to manage tokens in the Vault’s internal balance which is accessible here.

Grant Category:

User interface and user experience (UI/UX)


Grant Description:

As described in the RFP, the milkman contract can defer the choice of the limit price from order initiation (pre DAO vote) to order execution time (solver settling the trade). This is useful for DAOs that want to trade a large amount of tokens without being exposed to MEV.

This grant will include all general requirements described on the RFP (all relevant parameters definition, transaction batching, order deployment history, milkman order cancelation) and defaults (frequency and start times). To the order deployment history feature development, we’ll also develop a subgraph to track Milkman contract events. For the bonus requirements, we’re open to ideas but we already thought on:

  • Determine the most suitable price checker: Since we want to suggest the price checker more updated we would suggest the one with the largest liquidity locked in the price checker protocol. To check the liquidity, we would query this from each main DEX protocol (Uni, Balancer, Sushi, and Curve) subgraphs.
  • Determine if TWAP is preferable: Compare the amount that it is being sold/bought with the available in the market. If the amount is larger than the percentage threshold, we would recommend a TWAP. Since each pool type implements its own swap curve math, which needs more or less volume to move its price, we thought of clustering the pool types into two types (the high and low volatility pools). Higher volatility pools will have a lower threshold compared with lower ones.

Grant Goals and Impact:

With this grant we aim to boost the milkman use, facilitating the process of DAOs to use the milkman orders. This should facilitate the overall process and attract more volume for the protocol.


Milestones:

Please identify the key milestones that will help track the progress of your grant. Use the provided table as a summary and expand on each milestone description and deliverables below.

Milestone Due Date Payment
UI design + basic infrastructure 1 week $2000 USD
Single order creation 2 weeks $4000 USD
Order history and cancelation 1 week $2000 USD
Transactions batching 1 week $2000 USD
Price checker oracle 1 week $2000 USD
TWAP oracle 1 week $2000 USD

UI design + basic infrastructure

Figma designs of the relevant components, pages, and user flows of the app. We’ll share the progress and get feedback as we go.

We’d also prepare repos/deployment of the app to make it easier to get feedback from the CoW team along the process.

Single order creation and cancelation

Functional app with the ability to create or cancel a single Milkman order with all relevant parameter definitions and checking. The checks will include:

  • Token in and out implement ERC20 interface;
  • The address connected has the amount specified;
  • Price checker is one of the verified addresses for each chain.

At this point, the app will connect to Milkman and safe multi-sig wallets.

Order history

Querying all connected address orders and their status. For this, we will also build a subgraph to track the milkman contract events. For orders not executed yet, the user will be able to cancel the order. The user will also be able to filter the orders by tokens or search by address.

Transaction batching

Ability to batch multiple order transactions to swap multiple tokens or create TWAP or DCA orders. For the TWAP order, the start time and frequency will have default parameters (open to discussion if we follow the one proposed on the RFP) and the user will be able to customize it.

Price checker oracle

Our proposal to meet the bonus requirements involves introducing a heuristic that recommends a price checker to the user. The assumptions underlying this heuristic will be displayed on the user interface, while still allowing the user to choose a different price checker. As described in the grant description, we have already thought of one strategy, but we remain open to suggestions and willing to test alternative approaches.

TWAP oracle

Like the last milestone, this one is the rendering of a warning when an order is more suitable to the TWAP strategy. Our idea of implementation is described in the grant description and are open to suggestions or testing multiple approaches.


Funding Request:

The grant total is $14000 USD. This funding also covers the maintenance of the app for 6 months.


Budget Breakdown:

The budget includes the hourly rates of a developer during the execution, and a designer and project manager on a need-basis. It also includes the diluted maintenance costs for 6 months. Additionally, the funding covers the expenses incurred during the deployment process.


Gnosis Chain Address (to receive the grant):

0x554866e3654E8485928334e7F91B5AfC37D18e04


Other Information:

  • We’re open to revenue-share counterproposals to cover maintenance and improvements after the 6-month mark, but would need to understand the model;
  • All the code will be open-source from day 0. We’re open to feedback during PRs as well;

Terms and Conditions:

By submitting this grant application, I acknowledge and agree to be bound by the CoW DAO Participation Agreement and the CoW Grant Terms and Conditions.

2 Likes

Thank you for your proposal. The commitment to making the code open-source from the outset is commendable. I agree that this may increase the milkman contract’s utilization, which could drive increased volume to the protocol. I am signalling my support for this proposal in principle, but I am keen to hear the perspectives of the other grant committee members on this.

3 Likes

Thanks for sharing your thoughts @netrunner.eth ! Looking forward to receiving more feedback from the committee.

1 Like

New version of the application. Feel free to send more feedback.

Grant Title:

Safe App for creating milkman orders


Author:

@bleu @yvesfracari


About You:

bleu collaborates with companies and DAOs as a web3 technology and user experience partner. We’re passionate about enhancing the interaction between blockchain and web3 users.

Our team has developed applications that enable seamless interaction with the Balancer Protocol’s smart contracts. Additional details about these apps can be found in the links provided. We are thrilled to be partnering with CoW protocol and consider this project a crucial milestone toward achieving our objectives.


Additional Links:

We already developed several tools for the Balancer protocol, like a Pool Simulator dashboard, Historical APR dashboard, and Twitter/Discord bots. We also built two projects that are more similar to this grant proposal:

  • Pool Metadata App: This tool allows easy and on-chain management of pool data to be integrated directly into Balancer’s frontend.
  • Vault Internal Balances Manager: An application to manage tokens in the Vault’s internal balance which is accessible here.

Grant Category:

User interface and user experience (UI/UX)


Grant Description:

As described in the RFP, the milkman contract can defer the choice of the limit price from order initiation (pre DAO vote) to order execution time (solver settling the trade). This is useful for DAOs that want to trade a large amount of tokens without being exposed to MEV.

This grant will include all general requirements described on the RFP (all relevant parameters definition, transaction batching, order deployment history, milkman order cancelation) and defaults (frequency and start times). To the order deployment history feature development, we’ll also develop a subgraph to track Milkman contract events. For the bonus requirements, we’re open to ideas but we already thought on:

  • Determine the most suitable price checker: Since we want to suggest the price checker more updated we would suggest the one with the largest liquidity locked in the price checker protocol. To check the liquidity, we would query this from each main DEX protocol (Uni, Balancer, Sushi, and Curve) subgraphs.
  • Determine if TWAP is preferable: Compare the amount that it is being sold/bought with the available in the market. If the amount is larger than the percentage threshold, we would recommend a TWAP. Since each pool type implements its own swap curve math, which needs more or less volume to move its price, we thought of clustering the pool types into two types (the high and low volatility pools). Higher volatility pools will have a lower threshold compared with lower ones.

Grant Goals and Impact:

With this grant we aim to boost the milkman use, facilitating the process of DAOs to use the milkman orders. This should facilitate the overall process and attract more volume for the protocol.


Milestones:

Milestone Due Date
UI design + basic infrastructure 1 week
Single order creation 2 weeks
Order history and cancelation 1 week
Transactions batching 1 week
Price checker oracle 1 week
TWAP oracle 1 week

UI design + basic infrastructure

Figma designs of the relevant components, pages, and user flows of the app. We’ll share the progress and get feedback as we go.

We’d also prepare repos/deployment of the app to make it easier to get feedback from the CoW team along the process.

Single order creation and cancelation

Functional app with the ability to create or cancel a single Milkman order with all relevant parameter definitions and checking. The checks will include:

  • Token in and out implement ERC20 interface;
  • The address connected has the amount specified;
  • Price checker is one of the verified addresses for each chain.

At this point, the app will connect to Milkman and safe multi-sig wallets.

Order history

Querying all connected address orders and their status. For this, we will also build a subgraph to track the milkman contract events. For orders not executed yet, the user will be able to cancel the order. The user will also be able to filter the orders by tokens or search by address.

Transaction batching

Ability to batch multiple order transactions to swap multiple tokens or create TWAP or DCA orders. For the TWAP order, the start time and frequency will have default parameters (open to discussion if we follow the one proposed on the RFP) and the user will be able to customize it.

Price checker oracle

Our proposal to meet the bonus requirements involves introducing a heuristic that recommends a price checker to the user. The assumptions underlying this heuristic will be displayed on the user interface, while still allowing the user to choose a different price checker. As described in the grant description, we have already thought of one strategy, but we remain open to suggestions and willing to test alternative approaches.

TWAP oracle

Like the last milestone, this one is the rendering of a warning when an order is more suitable to the TWAP strategy. Our idea of implementation is described in the grant description and are open to suggestions or testing multiple approaches.


Funding Request:

The funding is divided into:

  • Upfront:

    • Criteria: Grant approval by snapshot voting
    • Payment: $4k USD-equivalent at the time of payment;
  • App production deployment:

    • Criteria: App approved by the grant committee
    • Payment: $4k USD-equivalent at the time of payment + 65k COW vested over the next year following completion;
  • Volume Based Program:

    We request to participate in the Volume-based Partner Reward Program. With this, we can receive more COW if we achieve the program volume goals.


Budget Breakdown:

The budget includes the hourly rates of a developer during the execution, and a designer and project manager on a need-basis. It also includes the diluted maintenance costs for 6 months. Additionally, the funding covers the expenses incurred during the deployment process.


Gnosis Chain Address (to receive the grant):

0x554866e3654E8485928334e7F91B5AfC37D18e04


Other Information:

  • All the code will be open-source from day 0. We’re open to feedback during PRs as well;
  • To achieve the Volume Based Program, CoW will provide support in market and growth actions.

Terms and Conditions:

By submitting this grant application, I acknowledge and agree to be bound by the CoW DAO Participation Agreement and the CoW Grant Terms and Conditions.

3 Likes

Based on the current proposal and retrospective works, I am signalling my support. I look forward to the views of the Grants Committee.

2 Likes

Thanks! I just created the snapshot proposal as well.

2 Likes

Given the significant iteration that has been done on this proposal, and incentive alignment, I signal my support.

Should the committee vote in favour, a kind reminder that updates on the progress should be done here on the forum for public visibility.

2 Likes

We’re thrilled to announce that the grant has been successfully completed and is now live on Ethereum. We apologize for the lack of updates here on the Forum, but rest assured that all progress has been diligently reported on Discord. Additionally, we’re currently in discussions with CoW’s marketing team to amplify the reach of the app. To access the tool, click here, or for a look at the code, click here. Furthermore, you can find an overview of the app in this video, and all the test results are available in this spreadsheet.

We want to express our gratitude to the grant team for their unwavering trust and support. We’re very excited to continue contributing to CoW, as evidenced by our proposal to develop a Safe Stop Loss App. Furthermore, we’re currently in discussions with @mfw78 to also contribute to the community-built Python SDK.

2 Likes