Grant Application: Research on Sandwich MEV Impact On CoW Protocol

Grant Title:

Research on Sandwich MEV Impact On CoW Protocol

Author:

EigenPhi

contact at eigenphi dot com

About You:

As a technology company focused on analyzing and researching transaction data on the blockchain, EigenPhi is committed to providing the best analytical tools for tackling emerging financial problems in the blockchain world with state-of-the-art data science approaches. Especially when it comes to economic attacks on protocols, our analysis based on real-time liquidity - token flow data - will allow us to draw transparent and credible conclusions and assist in effective decision-making.

We have launched a token-flow-oriented data platform, eigenphi.io, with dashboards covering the main MEV types (Arbitrage & Sandwich), Lending, Liquidation, and Flashloan, and EigenTx, an on-chain transaction analysis and visualization tool to improve the efficiency of data analysis for professional DeFi users.

To further leverage the value of our tools, we use them to investigate the problems DeFi protocols concern and specific cases that occur, and we expect to benefit stakeholders and interested parties as a result.

Additional Links:

Website: eigenphi dot io

Twitter: search “EigenPhi”

Grant Category:

DeFi Data Infrastructure.

Grant Description:

We propose to research Sandwich MEV’s impact on Cow Protocol.

Sandwich MEV has been one of the shadiest attacks on daily crypto users. In 2018, Vitalik warned us about it. After the Merge, chefs of sandwiches took some time to adapt to the new block-building supply chain. Now they have found their foothold again.

During the past 30 days on Ethereum, based on our data, the volume of Sandwich MEV-involved transactions has reached $7.3B. Among those 82.5K sandwiches, crypto traders have lost $4.7M to the chefs.

EigenPhi has done MEV-related research on Uniswap V3 and Curve, the first of which won the 1st price of Unigrant #19. And the one about Curve was commissioned by the protocol itself. Both reports have studied the impacts of Sandwich MEVs, which were considerable regarding their volumes and victims’ loss. All can be found at: MEV Data | EigenPhi|Wisdom of DeFi

Since CoW Protocol doesn’t have liquidity pools, no arbitrages are happening here compared with other DEXes like Uniswap and Curve. However, solvers of CoW still have a chance of being exposed to Sandwich MEVs, because their trades have to be done in other DEXes, which have been targets of Sandwich chefs since 2018.

That being said, CoW’s features, including trades matching and batch auditing, provide possibilities for minimizing traders’ losses due to sandwiches. We’d like to deep-dive into the data of past Sandwich MEVs to reveal the trends of such on CoW and compare the result with Uniswap and Curve.

Grant Goals and Impact:

Our goal is to reveal the trends of Sandwich MEVs on CoW and compare the result with Uniswap and Curve.

The study will focus on the following:

  • Revenue of Sandwich MEV searchers by attacking CoW Protocol Solvers

  • Profit of Sandwich MEV searchers by attacking CoW Protocol Solvers

  • Cost of Sandwich MEV searchers vs the cost of attacking regular DEX users

  • Frequency of Sandwich MEVs, including daily trend and correlation with the price change.

  • Top Contracts using CoW: Exploited vs. Non-exploited.

Milestones:

  • Submit detailed agenda

  • Submit full report

Grant Timeline:

  • Detailed agenda: 3-5 workdays

  • Full report: 15 workdays

Funding Request:

$1,200

Gnosis Chain Address (to receive the grant):

0xa0De50Bf5704E35201305fd5893913877e3108C2

3 Likes

This looks like an interesting proposal and may provide information useful in future marketing campaigns. I am interested in the views of the other committee members.

2 Likes

Hey @bryanzk welcome to the forum and thanks for submitting this proposal!

It is important to note that users are not affected by MEV as solvers commit to the exact buy amount before the batch is settled onchain. So essentially solvers are the ones affected by MEV.
Today, solvers are still unable to define their own submission strategy…
Still their slippage tolerances and pools selection might impact the MEV per solver.

I was wondering about:

Can you please explain those two points?

I have few things that I think will be interesting to explore:

  • per-solver stats:
    • $ value of MEV extracted
    • frequency of MEV attacks
    • average size of MEV
    • type of MEV
  • General stats:
    • Daily, weekly ratio of extracted value vs total traded volume
    • comparison of fee revenue, solver payouts and extracted value
1 Like

Hi @middleway.eth ,

Thanks for the questions.

Let me elaborate.

This one is about the cost of attacking CoW solvers per Sandwich V.S. the average cost in general per Sandwich MEV.

We can do it by week and by month.

We will setup a constraint about the contracts using CoW: used frequency and exploited frequency.

For example.

Contract A: Used 100 times and exploited 10 times.
Contract B: Used 15 times and exploited 9 times.
Contract C: Used 1 time and exploited 1 time.
Contract D: Used 1 time and exploited 0 times.

I would say that the report should not take Contracts C and D into account. What kind of constraint would you like to see? And how would you set them? Please feel free to comment.

Regarding:

The first 3 can be done without a doubt. And for the moment, there is only Sandwich MEV can happen on solvers. If we find out JITs, we will definitely point it out in the report.

The first one can be done easily. About the 2nd comparison, do you still want to set up the time frame as daily and weekly?

Thanks again!

1 Like

Super interesting report to have! I am all in favor having this report done so that we can compare how often do Solvers of CoW Protocol get MEVed, vs users in general in others DEXes. After the reports on Uniswap and Curve, I am eager to see the final result.

That said, I do agree with @middleway.eth to iron out the details and specifics of the data to look at.

Looking forward to the outcome.

2 Likes

In general, I’m in favour of gathering the data and reporting on this. For the implementation of the report, I think it’s prudent that methodology, and any scripts / spreadsheets be made open source so that the results of the report are independently verifiable.

2 Likes

Great proposal and I agree with Mfw78’s requests about the methodology.

1 Like

@mfw78

We are definitely happy to share our methodology and data sets that we use to generate the report once it’s done.

If there are any particularly interesting ones you wanna know, please feel free to lets us know.

1 Like

Thank you so much for passing the application, guys!

As promised, here is the detailed outline. Please feel free to leave any questions below.


Introduction

Key Takeaways:

Conclusion of the whole reports

1. Overview of the sandwich MEV impact on CoW Swap

  1. The percentage of CoW Swap trades that have been attacked in 2022

We will provide an overview of how many trades have happened through the CoW Swap protocol and the percentage of trades that have been attacked by sandwich MEV.

  1. The total extracted value that sandwich attackers have gained from CoW trades

  2. The comparison of the sandwich percentage of CoW Swap versus that of Uniswap and Curve. (by counts and volume)

2. Revenue of Sandwich MEV attackers by attacking CoW Swap trades

  1. Revenue trend throughout the whole year in 2022

  2. Revenue comparison

Compare the revenue that attackers extracted from CoW Swap, with the fee revenue and solver payouts, in each month throughout the year 2022.

3. Sandwich MEV frequency analysis

  1. Daily observations trend of sandwich MEV attacks for CoW Swap trades in 2022

  2. Correlation of Sandwich MEV daily observations and market fluctuation.

4. Cost and profit of sandwich attackers that attack CoW Swap trades

  1. Cost monthly trend in 2022

  2. Cost-revenue ratio in each month

  3. Profit monthly trend in 2022

  4. Profit distribution of CoW Swap sandwich attackers

5. Sandwich Volume analysis

  1. Volume monthly trend

  2. Attacker’s volume distribution

  3. Victim’s volume distribution

6. Detailed investigations on sandwich attackers on solvers

  1. The value that has been extracted from each solver (victim)

  2. Counts of solvers that have been attacked each month

  3. Top 10 solvers that have been attacked by sandwich MEV

  4. Investigations on whether there are solvers that avoid MEV

7. Detailed investigations on the exploited protocol by attacking CoW Swap trades

  1. Top 10 exploited protocols by attacking CoW Swap trades(by counts and volume)

  2. Investigation on the protocol that was least exploited by sandwich attackers (by the percentage of trades)


That’s it. Leave your comment or anything else on your mind!

1 Like

Looks like a well thought out outline. I look forward to reading the report.

Sure, no problems. After the report is compiled, if you can make all scripts / notebooks as applicable publicly available in a GitHub repository, as well as the compiled report please :smiley:

@mfw78 Absolutely, we will release them after finishing the report.

1 Like

Hi Guys,

Here are some updates on the report.

We’ve finished the required research based on the outline above and submitted it to MasterCow. After reviewing, we agreed that adding 1inch and Matcha for comparison would provide more benefits, including:

  • Comprehensive understanding of the sandwich MEV impact on aggregators.
  • Proof of CoW Swap’s advantage of Sandwich MEV minimizing.

To extend the report, EigenPhi asks for an extra $1.5K with the plan as below:

  • Upgraded data, including 1inch and Matcha with the same metrics as Part 1
  • 15 business days to deliver the extended research after the vote is passed.

Please feel free to leave your feedback.

Thanks.

1 Like

Adding 1inch and Matcha is a good idea for comparison purposes.

Please note: Any extra payment required for this additional work would have to be ratified by the Grants Committee. I look forward to reading their views.

1 Like

I am in full support in adding 1inch and Matcha to the report. This way we can give users a comprehensive view of both AMMs, aggregators vs CoW Swap / Protocol.

Because of this, it makes sense to extend the grant, and also the payout and from my side I am in full favor of doing this. That said, as @netrunner.eth mentions, we would have to make another snapshot for the committee to vote on it.

Thank you for all the effort @bryanzk :slight_smile: !!!

1 Like

I’m in support for funding the addition that was suggested.
We will add the current grant payment to March payment cycle.

Looking forward to have a new grant application for the report extension.
Shouldn’t be too fancy but a new post with the outline of work and funding request.
I think you can then quickly proceed to a snapshot vote for final approval.

2 Likes

Hi!

I am a core contributor to Curve and I helped commission the report on MEV at Curve: 10M Revenue Drain in 5 Months: MEV impact on Curve | Research | EigenPhi

I recommend EigenPhi to do this research, and I have some additional recommendations:

Eigen phi is definitely well-equipped to deal with this research topic. However, I ask you to raise the research duration to more than 15 days. This topic should take 1 month, half a month for the initial draft and the other half for a back-and-forth review process.

There should also be one researcher from CowSwap assigned to follow up and review the initial draft.

Thanks,
Fiddy.

2 Likes

Please let us know when you estimate the draft to be ready for back and forth review :pray:

1 Like

Thank you very much for the good words!! @fiddyresearch, you’ve been very helpful during the period we did the research on Curve!

1 Like

Roger! Let me get the details from the data team. @middleway.eth

2 Likes