From CoW Grant Proposal: Development of a Balancer AMM Arbitrage Bot :

CoW Protocol is excited to offer a bounty aimed at developing an arbitrage bot that harnesses the special fee discount trades available through our settlement contract on Balancer AMMs (cf. BIP295 for context).

The discount has been applied and solvers have started taking the fee adjustment rules into account. You can find a concrete specification of the discount rules here and see existing settlements using the discount in this Dune query.

In order to boost utilisation of this discount beyond regular retail traders who trade coincidentally, the Balancer team and us would like to support the development of an arbitrage bot, that identifies opportunities when the price on Balancer with the fee discount is lower than the price on other venues (CEXs or DEXs), and places limit orders into CoW Protocol to buy tokens at the discount.

While this defeats the purpose of having mainly non-toxic flow (the arbitrageur would be an informed trader), it will boost the utilisation of pools at the discounted price and allow us to proceed to the next phase in the experiment, where pool fees should be adapted based on how many people are willing to take the other side (e.g. an arbitrageur placing limit orders that could still be filled at 0.2% LP fee would get priority over traders buying at 0.1% LP fee).

By making fees competitive on the price arbitrageurs are willing to pay in the CoW Protocols batch auction (which is settled at uniform prices for all trades) instead of prioritising whoever is willing to pay the block builder most to get a privileged position in the block, we can move the tax of CEX/DEX arbitrage MEV (knows as LVR) from validators to liquidity providers, strengthening the viability and economic incentives of the underlying AMM protocol.

Opportunity

Beyond the bounty value of $XXX, the arbitrage opportunity itself should be significant until significant competition arises.

The WETH<>Stable pool for instance is trading at a 5% non-reduced fee (1% after reduction) allowing for up to 4% of discount when being bought via CoW Swap. This means that other standard searchers won’t be able to arbitrage the pool until the price on a secondary venue moves more than 5% away from the pool’s spot price. $100k currently move the pool by ~2% leaving up to 3% ($3k) of arbitrage opportunity.

Similar opportunities arise on the GNO pool (where the discounted fee is 6bps instead of 30bps) and other pools may be enabled if the experiment turns out successful.

Work Required

We’d consider a bot successful if it has completed at least 10 profitable arbitrage trades.