CIP: <to be assigned when moved to phase 2>
title: Increasing liquidity for COW token via programmatic order framework and FM-AMM
author: Haris Angelidakis, Andrea Canidio, Felix Henneke
status: Draft
created: 2024-01-09
Simple summary
We propose that the DAO allocates 10M COW to increase COW/ETH market liquidity. To avoid price impact, half of the COW contributed will be slowly sold for ETH using a programmatic order. The ETH collected and the remaining COW will then be used as liquidity in a Function Maximizing AMM (FM-AMM): a new type of AMM accessible only by solvers trading via CoW Swap settlement contract. Our research shows that FM-AMM has unique benefits because it eliminates LVR (the excess profits arbitrageurs earn at the expense of LP in a regular AMM) and sandwich attacks, which are currently responsible for the vast majority of MEV on Ethereum. From the DAO’s viewpoint, contributing liquidity to an FM-AMM is equivalent to running a passive investment strategy, which can be helpful for treasury management.
Motivation
The lack of liquidity in the markets for COW tokens deters potential investors, who may be concerned about price volatility and price impact if they need to sell their COW. To address this concern, we propose to:
- use our programmatic order framework to slowly sell COW for ETH at market price whenever such price is above a certain threshold,
- use the ETH acquired together with additional COW tokens to seed a function maximizing AMM (or FM-AMM, see our research paper here), which will then continuously supply liquidity to the COW/ETH market.
According to our research, contributing liquidity to an FM-AMM is equivalent to running a passive investment strategy: FM-AMM automatically trades to allocate half of the portfolio’s value to each asset (any other sharing rule can also be implemented). Passive investment strategies are the most common strategy to reduce risks and are the dominant way to invest in traditional financial assets. For example, more than 50% of US shares are held by ETFs implementing passive investment strategies. Therefore, an additional benefit of this scheme is that it introduces an automatic treasury management solution for CoW DAO. Finally, if successful, the scheme can also serve as a template for other DAOs who may need to provide liquidity for their token while automatically managing their treasury.
This proposal aims to test the mechanism at a reasonable scale. If the test is successful, we may request additional funds to scale it up further.
Specification
We propose that the DAO allocates 10M COW to a dedicated SAFE. Using a programmatic order, every day, the SAFE checks whether the price of COW is above a given threshold (to be determined based on the market condition when the proposal is implemented). If the answer is yes, the SAFE creates a partially fillable limit order to sell 20.000 COW for ETH on behalf of the DAO. The proceedings are forwarded to the smart contract charged with running the FM-AMM. As soon as the order is executed, 20.000 COW are also forwarded to the FM-AMM. Hence, every day on which the price of COW is above the threshold, FM-AMM receives 20.000 COW and an equal value in ETH. If the market price of COW is always above the threshold, then the initially allocated amount will be disbursed over approximately 9 months.
FM-AMM will start contributing liquidity to CoW Swap batch as soon as its TVL is sufficiently large. The exact implementation of the FM-AMM will be determined at a later stage, and will probably change as its TVL increases. At least initially, we plan to follow an initial prototype available here. In it, the smart contract pulls the price of COW from an oracle and then chooses the amount of COW to sell x by solving
max_x {(X-x)(Y+p*x)}
Where p is the price of COW in ETH (from the oracle), X and Y are FM-AMM reserves in COW and ETH, respectively. FM-AMM then creates a partially fillable limit order to sell x COW (or sell p*x ETH). Solver competition then determines the price at which this order is executed.
This implementation does not require any change for CoW protocol, nor for solvers. However, it implicitly assumes that the liquidity in FM-AMM is small relative to the market, and hence the oracle price is a good estimation of the price in the solver competition. But if FM-AMM is large, then its decision to trade will have an impact on COW price. Hence, the price before FM-AMM trades (as determined by the oracle) may be very different from the price determined contextually to FM-AMM trading (as determined in the solvers’ competition).
A more sophisticated implementation can eliminate the dependency on the oracle, by asking solvers to propose a sell amount x and a buy amount y (both of which can be negative) for FM-AMM. The winning solver is the one providing more surplus to FM-AMM, where surplus is here calculated as:
(X-x)(Y+y)-X*Y.
We note that already now, certain order types require solvers to specify both sell and buy amounts (i.e., partially fillable limit order). Hence, the above implementation differs from the already supported order types primarily in the way surplus is calculated. We believe it can be easily included in our current infrastructure, but the exact details will be determined at a later stage.