CoW DAO Profile picture
Apr 4 10 tweets 3 min read Read on X
CoW Protocol's team has been made aware of an instance of surplus shifting that negatively impacted a trader on CoW Swap while positively (though unfairly) impacting LPs on CoW AMM.

The team has investigated what happened. Read below for more info and next steps.

A 🧵
The specific transaction in question is a CoW Protocol batch where a solver included liquidity from a CoW AMM pool as part of their solution.

You can see the transaction here: explorer.cow.fi/tx/0x924533688…
In this instance, the right to execute the batch was won by a solver that provided a worse-than-expected price to the CoW Swap trader, while giving more surplus than expected to the CoW AMM pool, and winning the right to execute the batch within the solver competition.
This is an example of what we call "surplus shifting" – an issue that we've come across in other contexts in the past.

Generally, CoW Protocol takes an unfavorable view of surplus shifting as we don't think that it maximizes fairness for users.
CIP-11 explicitly states that intentional surplus shifting is not allowed, and introduced a test in order to detect such cases.



It also gives CoW DAO the capability to reimburse users if a violation of this test takes place.snapshot.box/#/s:cow.eth/pr…
CoW Protocol's EBBO rule ("Ethereum Best Bid and Offer”) also states that traders must get at least as much as they could get on a major public AMM (e.g., Uniswap, Balancer, Sushiswap), when routing via (multiple) 2-hop paths that touch some so-called base tokens.
The team also introduced CIP-52 to allow CoW DAO the ability to reimburse users affected by EBBO violations.

You can read it here: snapshot.box/#/s:cow.eth/pr…
The core team has been working on upgrading the batch mechanism and will soon post a CIP that proposes switching to a fair combinatorial auction mechanism.

This upgrade should address a number of known issues, including surplus shifting, more systematically.
In summary: surplus shifting is a known, though rare, issue, and we are actively penalizing solvers and reimbursing users when it happens.

Once an investigation has been completed, CoW DAO will take appropriate steps to resolve this instant.
While the core team has built a robust set of tools to monitor and prevent surplus shifting, refinements are in progress to eliminate this from happening in future.

A detailed forum post that explores this issue further can be found here:

Thank moo!forum.cow.fi/t/recent-surpl…

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with CoW DAO

CoW DAO Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @CoWSwap

Nov 26, 2024
Over the weekend, we were alerted to the possibility that some CoW Protocol trades were falling victim to a multi-block MEV attack.

We were aware of this attack vector, and were monitoring settlements periodically, but – before this weekend – we deemed it unlikely to happen because of it's risky nature (for the attacker).

TL;DR – the identified issue is being addressed and CoW Protocol will continue to be free of (even rather novel forms of) MEV.

🧵
To recap, @AgentChud suspects that an attacker is monitoring CoW Protocol's public OrderBook API, buying tokens once an intent to buy them is broadcast, and selling the tokens after the original trader's intents are settled a few blocks later.
It's hard to tell how successful this type of attack is. We could not verify the $200k number, as there is a lot of noise regarding provenance, and the attacker used a separate contract to pay gas to builders:

👀etherscan.io/address/0x761d…
Read 6 tweets
Nov 9, 2023
CoW Swap is excited to announce the launch of an entirely new class of orders. We call them Programmatic Orders. ✨

Programmatic Orders execute automatically, in perpetuity, according to the conditional parameters you set.

Let's dive in. 🤿
Everyone loves trading on CoW Swap. But to make interesting moves, traders need to monitor the market manually & sign new txs for every order they want to make. 🙄

Without a higher degree of automation, executing complex trading strategies in DeFi is nearly impossible.
But starting today, developers can use CoW Protocol's Programmatic Order Framework to create *any* order type they can imagine.

Stop Loss? Sure. DCA? Get more creative!

Let's do some collateral position management and TWAP in to top ourselves up.
Read 7 tweets
Aug 17, 2023
🚨🚨

TWAP orders are now available on CoW Swap! (Call us CoW Twap!)

TWAP orders let users split their trades over time while benefiting from CoW’s signature MEV protection & best prices.

Available for @safe wallets today.

Learn more: blog.cow.fi/cow-swap-launc…
Time-Weighted Average Price (TWAP) orders allow you to split a large order into many smaller orders that execute in parts over a specified period of time.

Split your order up into 2, 5, 20, or even 100 parts over an hour, 2, 12, 24, or more! TWAP orders are fully customizable.
Why use TWAP orders?

TWAP orders smooth out market fluctuations, reduce the need to set higher slippage tolerances, and spread out the price impact of your trades.

All with CoW Swap's signature benefits, including MEV protection, price surplus, gasless trading, and more.
Read 6 tweets
Apr 5, 2023
CoW Swap, in collaboration with @beaverbuild and Agnostic Relayer, is proud to announce MEV Blocker. MEVBlocker.io ⛱️

MEV Blocker is a free RPC endpoint that *pays users* to protect themselves from MEV across a wide variety of use cases in DeFi, NFTs, and dApps.
MEV Blocker works by routing all transactions through a network of searchers that is structured to block frontrunning and sandwich attacks.

Searchers bid to backrun transactions coming from MEV Blocker, and MEV Blocker sends 90% of the profits to users (10% goes to validators).
Before MEV Blocker, there was no way for everyday Ethereum users to profit from backrunning – so, to put it another way: MEV Blocker is a free service that pays its users for doing what they would normally do otherwise. 🤑
Read 8 tweets
Feb 7, 2023
Last night, a hacker exploited an external solver and used it to drain the settlement contract, which held 7 days worth of protocol fees.

Users are not affected since we never hold user funds (!)

Neither Cow Swap is affected: The solver's bond will pay for all damages.

A 🧵👇
CoW Swap engages in a so-called "solver competition": external parties who compete to find the best execution route for our users.

Each solver has access to the settlement contract which usually stores collected fees over a one week period (before being used to reward solvers).
Since solvers have access to the settlement contract & its fees, solvers are only added to the competition once they set up a bonding pool that can be slashed by CoW DAO in case of malicious behaviour.
Read 8 tweets
Nov 23, 2022
Price disparity created by current AMM designs is the root cause of MEV.

We are now seeing MEV impact LPs through LVR, but CoW Native AMMs (aka surplus-capturing AMMs with a single price clearing) can protect LPs while giving better prices.

forum.cow.fi/t/cow-native-a…

🐮🧵
Is LPing on AMMs profitable?

It turns out, it's not!

But, what if LPs could capture revenue by executing trades from retail users, arbitrageurs, & others at the same uniform clearing prices, following the idea of "one price per token per block"?

Liquidity providing in AMMs exposes retail 🧑‍🌾 to a form of MEV called "loss versus rebalancing" (LVR), which is defined as the cost incurred by AMM LPs for providing stale prices to arbitrageurs against the prices provided by external market prices.

Read 11 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(