Grant Application: AccuMoolator - Automated Dollar-Cost Averaging (DCA) System

Grant Title: AccuMoolator

„Automated Dollar-Cost Averaging (DCA) System“

Author:

Maximilian Stahl @GiraeffleAeffle / GitHub: GiraeffleAeffle / maximilian.stahl@blockscape.network / X Giraeffleaeffle / Farcaster giraeffleaeffle

Florian Lüffe @flobrown.eth / GitHub: floberlin / florian.lueffe@blockscape.network / X flobrown_eth / Farcaster: flobrown.eth

About You:

I am a DevOps Engineer specialized in the blockchain area currently working at Blockscape Finance AG. I have experience in running infrastructure for several blockchain networks, as well as oracles ( Chainlink, Celo, StakeWise ) and indexer ( TheGraph) and also contributed to open-source code for Chainlink and StakeWise. I have also worked in a Wallet as a service product as Technical Consultant & Fullstack DevOps Engineer and as a Backend Engineer for a NFT Marketplace project. I studied electrical engineering in my bachelor’s degree and then specialized in information and communication technology.

I am backed and supported by Blockscape in this proposal. They are a validator for several Cosmos networks as well as a Lido operator and run DVT in production. They have experience with proposals due to proposing and building the Gravity Bridge which connects the Ethereum to the Cosmos Ecosystem. In the scope of this proposal I will collaborate with other Blockscape engineers to build this DCA system.

I’ve been using CoW Swap already since it was released and I’m very happy with it. Since about half a year I am also using Monerium with a weekly standing order that mints EURe into my Safe on gnosis chain. Because I always have to set up a TWAP or buy my Tokens every week manually I would like to automate this process with conditions.

For example in Germany you have 1 year of speculation period, which means when you sell your token before you held it for one year you have to pay taxes. To avoid this there could be a condition to hold the tokens for a specified time. Also you want to sell the token with profit, so the price requirement would be to sell the token when the price is higher than for when you bought it.

I’m convinced that a lot of people would be interested in such a feature and that people would be able to save money with a standing order in their favorite tokens and sell them with their set conditions.

Additional Links:

X BlockscapeLab, https://blockscape.network/

Grant Category:

Integrations and protocol order flow

Grant Description:

This project aims to develop an Automated Dollar-Cost Averaging (DCA) System, triggered by repeating EURe bank transfers, to purchase specific tokens. The mechanism ought to be designed to facilitate the establishment of DCA-plans, regardless of whether the user possesses the requisite EURe amount at the time of creation. It is essential that the necessary EURe amount is available at the moment the DCA transaction is triggered. The system would only execute the order when specific conditions are met like holding tokens for a minimum time for tax exemption, sell them at a profit, or (handle tax loss harvesting with customizable conditions).

Use the Programmatic Order Framework from CoW Swap to implement the following Process Flow:

  1. Conditions for Token Purchases:

a. Token Balance: Sufficient balance of the selling Token to be able to buy the Token you want.
b. (Token Minting Event): Data from Monerium’s API.

  1. Conditions for Token Sales:

a. Hold Period: Maintain ownership of the token for a minimum time to qualify for tax exemption.
b. Price Requirement: Sell the token only if its selling price is higher than the purchase price.

  1. Optionally Profit Handling: Automatically transfer any gains back to your bank account in EURe.

(Additional Feature: Tax Loss Harvesting

  • Customization: Ability to set specific conditions for this function as per your requirements.)

High Level Workflow Architecture:

Grant Goals and Impact:

The primary goal is to provide an easy way to DCA in and out of a Token without the need to aim for the lows and highs, that maximizes returns and optimizes tax obligations for users. This project will benefit the CoW Protocol ecosystem by enhancing user engagement and offering efficient investment strategies.

Milestones

Milestones Due Date Payment
Research, Architecture, and Core Feature Development ~ 01.04.2024 4k xDAI
MVP Front-End & Contract Development and Integration ~ 01.07.2024 15k xDAI
User Feedback & Refinement, Advanced Features and Profit Handling ~ 01.09.2024 6k xDAI

Milestone 1: Research, Architecture, and Core Feature Development

Objectives:

  • Research the system architecture, including the necessity of an off-chain service or oracle, and the potential integration with the Monerium API.
  • Familiarize with the Programmatic Order Framework.
  • Develop and experiment with a Time-Weighted Average Price (TWAP) strategy using the forked CoW Protocol repository.

Deliverables:

A core automated DCA system design capable of:

  • Implementing token purchases with EURe in defined time epochs and for different periods based on the TWAP design

  • Acquiring API credentials for Monerium and minting testnet EURe tokens

  • Propose design for a DCAOrder smart contract based on the composable CoW architecture

A detailed research report outlining the chosen architecture and the decision-making process regarding system components like off-chain services, oracles, and API integrations.

An architecture diagram illustrating the planned system, including all components and their interactions.

Based on the findings:

  1. A forked/modified design proposal of the CoW Protocol composable-cow repository with a TWAP strategy adapted for DCA.
    or
  2. An off-chain/oracle service design proposal

Time Estimate:

  • 1-2 Months

Budget on completion:

  • 4K xDAI (for research & design)

Milestone 2: MVP Front-End & Contract Development and Integration

Objectives:

  • Develop an MVP front-end interface for the Automated DCA System.
  • Ensure seamless integration of the front-end with the backend service developed in Milestone 1.
  • Enable users to easily create new DCAs and manage their existing ones.

Deliverables:

A user-friendly MVP application that allows users to:

  • Create new DCA orders with their EURe token
  • View and manage existing DCA orders

Integration of the front-end application with the backend service, ensuring smooth functionality and data flow.

Comprehensive testing documentation demonstrating the functionality and integration of the front-end with the backend.

A user guide or tutorial for the MVP, explaining how to use the interface to create and manage DCA orders.

Time Estimate:

• 2-3 Months (+)

Budget on completion:

  • 15K xDAI (for development)

Milestone 3: User Feedback & Refinement, Advanced Features and Profit Handling

Objectives:

Research and implement advanced features for the Automated DCA System, enhancing its functionality and user experience based on community feedback.

Develop a comprehensive profit handling mechanism.

Evaluate and potentially integrate additional tools or services to improve the system’s efficiency and capabilities.

Deliverables:

  • Updated/Refined UI, DCA features
  • Profit handling mechanism

Time Estimate:

• 1-2 Months (+)

Budget on completion:

  • 6K xDAI (for development & marketing)

Funding Request:

The total funding required in xDAI and COW tokens, with justification based on the project’s scope and impact.

We request 25000 xDAI for this project. It can have considerable impact on CoW swaps and Moneriums adoption because of the easier way to onboard and create a savings plan.

Budget Breakdown:

Total Budget: 25,000 xDAI

Gnosis Chain Address:

gno:0x10535e219165185FFC3c1354AC39f672100c9951

Other Information:

Opensource contributions:

  • stakewise/helm-charts
  • telekom-mms/chainlink-helm-charts

Proposal:

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

I support this proposal. Happy to take this to a vote.

1 Like

In general, this proposal looks great! The things that I would encourage:

  1. Given that this may represent reasonable on-going volume should it become successful (DCA’s are a great way to get consistent volume), I would encourage the team to look at exchanging some of the grant funds for the $COW volume grants program.
  2. An oversight prior to this being able to truly go to production and being ready for “prime-time” is that of an audit (if there are smart contracts written). This is more an implementation thing, but I’d suggest reaching out to the CoW Protocol team for a call prior to intra-milestone scoping so that this can be executed in a streamlined fashion.
2 Likes

Thank you @mfw78 for the support and the advice.

Regarding point 1, we would definitely like to look into the Volume Grants Program in detail and maybe talk to the team to better understand how it works. Based on the information we have so far, one possibility would be to change the allocation for the grant like the following:

Milestones Due Date Payment
Research, Architecture, and Core Feature Development ~ 01.04.2024 12000 COW
MVP Front-End & Contract Development and Integration ~ 01.07.2024 7500 xDAI + 23000 COW
User Feedback & Refinement, Advanced Features and Profit Handling ~ 01.09.2024 4000 xDAI + 6000 COW

This would total to: 11500 xDAI + 41000 COW

Point 2 is very good! Indeed it is crucial to audit the contracts before going into production. We will reach out to the team in time. Would the audit for the smart contracts have to be paid by the grant or would we need to fill a separate grant to ask for funds to pay the audit? Would you know the best way to reach the Cow Protocol team to arrange a meeting?

1 Like

Very interesting proposal, I agree with MFW78’s comment about potentially converting some of the funding into COW volume grant, I think it would be also mutually beneficial by bringing a real incentive to maintain the product for a longer term.

2 Likes

For the COW volume grant, you can check here : CIP-18: CoW Grants Program Renewal Proposal

2 Likes

Dear Applicant,

Thank you for submitting your grant proposal. We are eager to review it. Please be aware that due to the recent renewal of our grants program and the holiday season, we are currently experiencing a delay in our review process. This may result in an extended timeline for the grants committee to establish their procedures and provide you with specific feedback. We appreciate your understanding and patience during this time.

1 Like