Paper: arXiv 2406.07200
Authors: Daniele Maria Di Nosse, Federico Gatta
Abstract
Decentralized Exchanges are becoming even more predominant in today’s finance. Driven by the need to study this phenomenon from an academic perspective, the SIAG/FME Code Quest 2023 was announced. Specifically, participating teams were asked to implement, in Python, the basic functions of an Automated Market Maker and a liquidity provision strategy in an Automated Market Maker to minimize the Conditional Value at Risk, a critical measure of investment risk. As the competition’s winning team, we highlight our approach in this work. In particular, as the dependence of the final return on the initial wealth distribution is highly non-linear, we cannot use standard ad-hoc approaches. Additionally, classical minimization techniques would require a significant computational load due to the cost of the target function. For these reasons, we propose a three-step approach. In the first step, the target function is approximated by a Kernel Ridge Regression. Then, the approximating function is minimized. In the final step, the previously discovered minimum is utilized as the starting point for directly optimizing the desired target function. By using this procedure, we can both reduce the computational complexity and increase the accuracy of the solution. Finally, the overall computational load is further reduced thanks to an algorithmic trick concerning the returns simulation and the usage of Cython.
Complexity vs Empirical Score
- Math Complexity: 6.5/10
- Empirical Rigor: 7.0/10
- Quadrant: Holy Grail — high math complexity, high empirical rigor
Why this score: The paper presents advanced mathematical techniques including Kernel Ridge Regression and SLSQP for a non-linear optimization problem, but the empirical component is strong with implementation details, competition results, and computational optimizations like Cython.
Research Flowchart
flowchart TD
A["Research Goal:<br>Minimize CVaR in AMM Liquidity Provision"] --> B["Identify Challenges:<br>Non-linear Dependencies<br>High Computational Cost"]
B --> C{"Three-Step Approach"}
C --> D["Step 1: Approximation<br>Kernel Ridge Regression"]
D --> E["Step 2: Minimization<br>Optimize Approximated Function"]
E --> F["Step 3: Refinement<br>Local Optimization from Step 2 Result"]
F --> G["Key Outcomes:<br>Reduced Complexity &<br>Increased Accuracy"]
G --> H["Implementation Notes:<br>Algorithmic Simulation Tricks &<br>Cython for Performance"]
Evidence Card
What the authors claim, on what data, and who has checked it. Read from the paper's own text by a language model: every quote is verbatim, nothing was re-run. How to read this card
Proposes
The paper proposes a three‑step approach that first approximates the CVaR target function with Kernel Ridge Regression, then minimizes this surrogate, and finally refines the solution by directly optimizing the original CVaR using SLSQP.
Source sentence
For these reasons, we propose a three-step approach. In the first step, the target function is approximated by a Kernel Ridge Regression. Then, the approximating function is minimized. In the final step, the previously discovered minimum is utilized as the starting point for directly optimizing the desired target funct
Assumes 6
- Liquidity pools follow the constant‑product market maker rule (RX·RY constant). market
Source sentence
the most relevant approach is the Constant Product Market Maker (CPMM), where the price of a coin is determined to keep the product of the coin reserves, before and after the swap, constant.
- The fee paid by liquidity takers is fully absorbed by the pool and distributed to LPs. model
Source sentence
It is important to observe that the fee does not concur with the price formation but is entirely absorbed by the pool and distributed to the protocol and the LPs.
- The marginal price follows a geometric Brownian motion. statistical
Source sentence
Assuming a geometric Brownian motion for the marginal price, Cartea et al. demonstrated that these predictable losses are directly proportional to the standard deviation of the price.
- The relationship between initial wealth distribution and final return is highly non‑linear. model
Source sentence
as the dependence of the final return on the initial wealth distribution is highly non-linear, we cannot use standard ad‑hoc approaches.
Show 2 more
- A small training set (N=10) is sufficient to fit the KRR surrogate with high accuracy. data
Source sentence
We have found that even a small N leads to accurate results with a very high R2 determination coefficient. In particular, N = 10 has been used.
- The simulation engine accurately mimics order arrival and market dynamics for the challenge. other
Source sentence
The Challenge requires designing a static investment strategy that minimizes the CVaR when providing liquidity to multiple pools in a Decentralized Exchange. Specifically, the participants were provided with a simulation engine that mimics the arrival of orders in the market.
Data
- Synthetic training set for KRR synthetic unknown
Source sentence
Thus, a dataset of observations n θ(i), CVaR(i) α oN i=1 is created by randomly sampling the θ(i) points. This dataset is used as the training set to fit the KRR model.
- Challenge simulation engine data synthetic public
Source sentence
participants were provided with a simulation engine that mimics the arrival of orders in the market.
Costs
Modeled
Liquidity taker fee ϕ is absorbed by the pool and distributed to LPs; it is included in the swap equations and thus affects returns.
Source sentence
where ϕ is the LT’s fee to the pool. It is important to observe that the fee does not concur with the price formation but is entirely absorbed by the pool and distributed to the protocol and the LPs.
Finds 5
- QuantHub achieves comparable CVaR minimization accuracy to the Finatics approach while being more than 15 times faster. performance
Source sentence
The experimental result shows that QuantHub and Finatics obtain almost the same accuracy. The main difference is in computational time, where QuantHub is more than 15 times faster than its competitor.
- QuantHub’s CVaR results are better than Elagnitram’s by a mean gain of more than 4.5%. performance
Source sentence
the QuantHub CVaR results are better than the Elagnitram ones. The mean gain is more than 4.5%.
- The KRR surrogate can be minimized in a fraction of a second due to its low computational cost. performance
Source sentence
... due to the low KRR computational cost, this step requires just a fraction of a second.
- CVaR increases almost linearly with the investment horizon T, while probability of returns >5% also rises. statistical
Source sentence
... the probability of returns bigger than 5% increases as T, even if slower.
- The KRR fit achieves a very high R² (~0.995), indicating accurate approximation of the target function. theoretical
Source sentence
The goodness of the fit is proved by R2 ≈0.995.
Checked by others
Contradicted by
- A Clarifying Note on Long-Horizon Investment and Dollar-Cost Averaging: An Effective Investment Exposure Perspective
Compare the findings
This paper: CVaR increases almost linearly with the investment horizon T, while probability of returns >5% also rises.
That paper: Under stationary return processes with finite variance, extending the investment horizon does not change expected risk, expected return, or the risk‑return ratio on a per‑unit‑exposure basis.
Code
No repository by the authors found in the paper.
Extracted 2026-11-14 · same card as JSON · A language model chose these items: check the source sentence before relying on one.
Cited References (17)
- Uniswap v2 core, 2020 (2020)
- Uniswap v3 core (2021)
- Smart Contract: Security and Privacy. (2021)
- Cython: The best of both worlds (2010)
- Deep calibration of financial models: turning theory into practice (2022)
- Portfolio Optimization With Conditional Value-at-Risk Objective and Constraints (2003) — link
- \url https://defillama.com (2023) — link
- Risks and returns of uniswap v3 liquidity providers (2022)
and 9 more
- Optimization of conditional value-at-risk (2000)
- Decentralized finance: On blockchain-and smart contract-based financial markets (2021)
- Kernel ridge regression (2013)
- Numerical optimization (2006)
- QuantHub Code Repository (2024)
- Finatics Code Repository (2024)
- elagnitram Code Repository (2024)
- Predictable Losses of Liquidity Provision in Constant Function Markets and Concentrated Liquidity Markets (2023) — link
- Decentralised finance and automated market making: Predictable loss and optimal liquidity provision — → 2309.08431
1 of 17 cited works are in the corpus; resolved via arXiv source bundles, Semantic Scholar and OpenAlex. Corpus-wide: 2596 linked papers.