Surplus-capturing AMMs — a feasibility study
Evan: Mathematician, Data Analyst, DeFi Mechanism Design researcher. Previous research includes bonding curve controller modeling, analysis of RMM-01 LP mechanics, analysis of MEV arbitrage mechanics on POL, and cross margin risk modeling. evandekim.eth
Mohammed: Electrical/Electronics Engineer. MSc Economics focus on Asset pricing and credit cycle modeling. 5+ years in TradFi derivatives trading. Currently researching and building digital asset focused algorithmic trading/market making algorithms, PBS research and post-merge ETH testnet development (Ephemery/Holesovice).
Analytics and Integrations
The proposal builds on a thread in the COW forum about a CoW-specific form of MEV-capturing AMM. The discussion surfaced exciting prospects for AMM designs that promise to take back control of “surplus” value ordinarily captured by arbitrageurs and MEV searchers. This value can then be deployed, for example, to achieve better prices for users and an improved overall return profile for LPs than the traditional CFMM.
In the classic CFMM design, prices are updated by arbitrageurs who are paid for this service by capturing the price differential between the CFMM and external markets. Liquidity providers (LPs) effectively bear these costs of this by constantly having to accept trades at unfavourable prices, a phenomenon known to economists as adverse selection. Although these costs can be offset by trading fees, this approach to value allocation is limited in two ways:
- Linear trading fees equally impact arbitrageurs and “noise traders” who may be prepared to trade at prices favourable to LPs.
- Arbitrageurs compete only for positioning of their transactions in the block, and the proceeds of this competition goes to block producers rather than LPs. There is no room for a competitive market for updating prices.
The CoW batch auction provides a more flexible approach to delivering price information which distinguishes arbitrageurs (or “solvers”) from noise traders and permits new dimensions of competition on price discovery. On the other hand, the CoW protocol as it stands does not provide its own liquidity, and in practice most of the liquidity comes from standard CFMMs whos LPs suffer adverse selection by trading with the CoW solver.
The basic idea of this proposal is to evaluate the feasibility and impact of an approach to AMM design which custodies its own liquidity but uses the pricing discovered by CoW solvers. Such an AMM would be quite remarkable in that it would provide a way to earn yield for LPs from passive liquidity provision without exposure to adverse selection at the some time offer better pricing for CoW users. Given the power of this result, it is natural to expect that some challenges lie in its realisation.
In our view, a feasibility study is necessary because of apparent confusion about the nature of the value that could be captured by such an AMM, undefined aspects of its design, and the security implications of using the CoW solution as a price oracle for an external protoocol.
Price volatility impact on LPs studied by Milionis et al. in LVR (paper titled: Automated Market Making and Loss-Versus-Rebalancing) (https://arxiv.org/abs/2208.06046)
Presentations by authors discussing LVR further (https://www.youtube.com/watch?v=G8qxxlqvMBk) (https://www.youtube.com/watch?v=q5vyJJb-Uyw&list=PLEGCF-WLh2RK2Cym4ZeEWDOSlmirXWtZO&index=34)
Surplus capturing AMM can be traced back to research proposal on MEV-capturing AMM designs (https://ethresear.ch/t/mev-capturing-amm-mcamm/13336/22) (https://ethresear.ch/t/mev-minimizing-amm-minmev-amm/13775)
Paper provides formal specification of implementation of MEV-capturing AMM (https://arxiv.org/pdf/2210.10601.pdf)
Paper details math behind using external price oracle in standard CPMM (https://anrg.usc.edu/www/papers/dynamicautomation.pdf)
Forum proposal continues ideas on McAMMs, using fees as main tool for capturing LVR for LPs (https://ethresear.ch/t/dynamic-mev-capturing-amm-dmcamm/13849)
Propose high-level candidate architectures for “surplus-capturing” AMMs. In particular, address whether changes to CoW protocol itself are needed. Investigate security considerations, economic and otherwise, of the proposed architectures and discuss mitigation strategies.
Develop a quantitative model of the additional value that could be captured and delivered to LPs and users and measure it through empirical studies and simulations.
Deliverable A technical report outlining relevant theoretical background, design considerations, metrics, and results of empirical studies. GitHub repository containing the code used for data studies.
Impact The study will provide evidence as to whether current COW tools such as the competitive solver pricing can be utilized to build a surplus-capturing AMM in practise. It will also analyze the kind of “surplus” it would capture, its size, and the extra value users and LPs expect to receive. Thus preparing the ground for detailed design implementation.
Architecture. Specify candidate architectures (which will be used to define simulations and economic attacks). Discuss:
How prices are communicated from solver to AMM.
How LP portfolios are managed.
Security. Study attack scenarios and propose mitigation strategies. Discuss fallbacks in case of a delayed or missing oracle update.
Quantitative. Compare portfolio metrics of LPs in proposed designs with those of a traditional CFMM using historical market data. Clarify the relation of these quantities to LVR.
Quantitative. Evaluate the use of COW solvers as an oracle for an arbitrage-free price by comparing the performance of COW solvers with other approaches to computing this price.
Labor costs: 21K USDC (upfront)
Completion bonus: 180K COW (6 month vested for longer term incentive alignment)
To be disclosed to grants team
By applying for this grant, I agree to be bound by the CowDAO Participation Agreement and the COWDAO Grant Terms and Conditions.
Thanks a lot for reading and reviewing.