Grant Application - data pipeline for calculating trade envy of CoWAMM pools

Grant Title:

A data pipeline for calculating trade envy of CoWAMM pools


Author:

Name: Thomas Niedermayer

GitHub Username: Tommel71

Email: thomas.n71@gmail.com


About You:

My name is Thomas Niedermayer, I am a data engineer at Iknaio where my main focus is on developing Graphsense, the leading open source crypto asset analytics software and on creating analyses for law enforcement to solve large scale crypto crime cases. This year, I published a paper on detecting bots on Ethereum (Detecting Financial Bots on the Ethereum Blockchain | Companion Proceedings of the ACM Web Conference 2024), and I have written bots on the Harmony blockchain in the past. I hold a bachelor’s degree in Mathematics and a master’s degree in Data Science.


Grant Category:

Other: Analytics - to motivate solvers to utilize CoWAMM liquidity.


Grant Description:

CoW AMM pools are designed to protect against Loss Versus Rebalancing (LVR) and aim to deliver superior returns to liquidity providers. However, the current level of solver utilization of CoW AMM liquidity in CoW Protocol settlements limits the potential APY and overall success of the product. This grant seeks to address this issue by developing a robust solution to:

  1. Quantify Missed Opportunities: Accurately measure the volume and surplus not captured by solvers failing to integrate CoW AMM liquidity effectively.
  2. Automate and Scale Analysis: Automate the “trade envy” computation process for multiple token pairs across chains and make results accessible to the product team for informed decision-making.
  3. Support Product Success: Provide actionable insights to incentivize solver behavior and drive higher adoption of CoW AMMs, unlocking their full economic potential.

Grant Goals and Impact:

Grant Goals:

  1. Accurately quantify missed surplus opportunities for CoW AMM pools to optimize solver integration.
  2. Automate weekly reporting for actionable insights.

Potential Impact:

  1. Higher returns and APY for liquidity providers, improving CoW AMM attractiveness.
  2. Increased competitiveness of CoW Protocol through better liquidity utilization.

Milestones:

These are the milestones to be met:

Milestone Due Date Payment
Basic Functionality Feb 22th 2025 xDai 1250
Extended Functionality Feb 29nd 2025 xDai 1250
Deployable Project March 12th 2025 xDai 1250

Milestone 1

  • Basic Calculation Logic for a single CoWAMM pool
  • Query Dune data (price and settlement data)
  • Query data from node (helper contracts)
  • Query caching
  • Dashboard to show metrics aggregated on solver-level or pool-level

Milestone 2

  • Consider multiple CoWAMM pools for calculation
  • Allow configuration for the calculation on different blockchains
  • Allow invocation of script to update database and show most recent data on trade envy.

Milestone 3

  • Dockerize
  • Integrate into existing infrastructure
  • Allow weekly incremental data updates using GitHub actions

Funding Request:

The expected time effort for this project is 75 hours or about 3750 xDai.

Justification:

  1. Scope and Complexity: The project involves refactoring and extending existing scripts, developing automation pipelines, and scaling to support multiple token pairs and chains. Additionally, to make sure calculations are correct, testing has to be implemented on select settlements.
  2. Development and Automation: Funding will cover time and resources to build reliable and automated weekly reporting systems.
  3. Impact: The project directly enhances the CoW AMM product by increasing solver adoption, creating value for liquidity providers and the broader CoW Protocol ecosystem.

Budget Breakdown:

All of the budget will be allocated to the development of the data pipeline.


Gnosis Chain Address (to receive the grant):

0xb49CaA161850715eba7B9aDfba51BAFF2e9E3252


Referral:

I am working on this currently together with Felix Leupold


Terms and Conditions:

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

1 Like

Is someone from solver team able to weigh in on this please? @AndreaC / @solver_cow

I think the work proposed is very important. CoW AMM pools are a relatively new participant in the CoW Protocol: its LPs provide liquidity exclusively to CoW Protocol’s solvers. At the same time, the surplus provided by solvers to the LPs matters in the solvers competition (and hence in determining who wins and the rewards paid out).

Over the years, CoW protocol has developed several metrics to track/measure the quality of execution of users’ trades. However, not all these metrics are appropriate for an AMM pool. The grant aims to overcome this problem by developing a metric to track “how well” solvers and the solvers competition are treating CoW AMM pools. Also, in my view, the methodology proposed is sound.

Did you want to be reviewer? :eyes: :sweat_smile:

sure, I can do it! But the grant is based on some initial work by @solver_cow , who may be in a better position to evaluate the grant

Cool. In general, I agree with the strong need to quantify and measure the value of CoW AMM to provide clear guidance that may influence resource allocations towards CoW AMM. I signal my support of this grant and am happy to steward on the proviso that @AndreaC or @solver_cow are available to act as reviewer for the milestones.

1 Like

Is there anything you need from my side? @mfw78 @AndreaC

I think you can move this to snapshot for a vote. @AndreaC / @solver_cow can we please have a responsible person be nominated for reviewer from the solver team? :folded_hands: I’m happy to nominate myself to steward this grant should it be successful through the Grants Committee voting. Also, kindly when submitting the snapshot, please ensure that it is absolutely in accordance with the template on the forum, and ensure that the link to the T&C / DAO participation agreement is present in the snapshot :man_bowing:

1 Like

I can be the reviewer from the solver team.

3 Likes