This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

A Tick-by-Tick Solution for Concentrated Liquidity Provisioning

Corinne Powers [email protected] Gadget Capital
Abstract

Automated market makers with concentrated liquidity capabilities are programmable at the tick level. The maximization of earned fees, plus depreciated reserves, is a convex optimization problem whose vector solution gives the best provision of liquidity at each tick under a given set of parameter estimates for swap volume and price volatility. Surprisingly, early results show that concentrating liquidity around the current price is usually not the best strategy.

1 Introduction

Consider the setting where capital is provisioned via an automated market maker (AMM) across a set of liquidity pools, i.e., ticks, where each tick earns fees in exchange for acting as counter-party for swaps that occur within a specific price range. Each tick may already have liquidity provisioned to it, and fees are distributed pro rata amongst liquidity providers.

To provision liquidity to a tick, a liquidity provider must add a specific combination of tokens depending on the current state of the AMM. (While it’s possible for a liquidity pool to support swaps between baskets of two or more tokens [Ang+21], we consider an asset-stablecoin pair.)

For the purpose of tick-by-tick provisioning, this usually takes the form of “100% asset” or “100% stablecoin” depending on whether the tick price range is above or below the current price, respectively, with an asset-stablecoin combination at the current price. As the asset price moves, the combination and value of a tick’s reserves also changes.

In general, it seems clear that provisioning liquidity to ticks near the current price is expected to earn more swap fees. As price bounces up and down, swaps are pushed into and through neighboring ticks and contribute to earned fees. In fact the more concentrated the provisioning within a tick, the larger the allocation of earned fees.

On the other hand, as prices drop a tick’s reserves depreciate, making it more expensive to re-balance. This risk is higher for positions that are more concentrated. Intuitively, there is a balance to strike between earning fees quickly under concentration and keeping ticks active longer under dispersion.

There are other contributing factors as well. For example, ticks already saturated with liquidity will have lower return on investment for a fixed amount of trade volume, due to the pro rata fee distribution. And one may wish to incorporate their predictions about price volatility and swap volume to focus liquidity where they think it will return the best yield.

In this work, we look at two ways to provision liquidity. The first aims to capture the most fees using a portfolio of single-tick ranges, introducing the reader to tick-by-tick provisioning and solving for the exact solution. Next we study the more relevant problem of maximizing returns (net of earned fees and depreciated reserves) which we show is a convex optimization problem.

We’ve framed the problem to accommodate ticks drawn from any protocol, fee tier or network, which are consolidated into a “candidate tick set” that are considered for provision.

2 Background

There is sizable literature in recent years that focus on automated market makers. A common thread is their relationship to limit orders books, call and put options [LK23], and the performance gap lost to arbitrageurs [Mil+23] using tools from Black-Scholes options pricing [BS73].

Tools from convex analysis have been used to study the general case of constant function market makers, as shown in [AC20] and [AEC21]. And to show how automated market makers can be extended to handle many types of swaps [Ang+21].

The interested reader may turn to the “Related literature” section of [Mil+23] for a thorough background on these topics.

We direct our work to an audience of liquidity providers, for whom earned fees is an important part of their objective.

3 Provisioning Problems

In deriving our approach to tick-by-tick provisions, we make the following assumptions:

  • Provisions remain in place for a fixed period of time,

  • No liquidity is added or removed by any provider during this period,

  • There are no transaction costs to open, close, or rebalance provisions,

  • There exist largely deep order books and alternative markets, obviating the risk of price manipulation.

Under these assumptions, the value of a portfolio of tick-by-tick provisions after a fixed period of time will depend only on the AMM state, trade volume, and latest price.

Maximum revenue.

Consider the optimization problem,

maximizei=1naixixi+bisubject tox0,𝟏Tx=d,\begin{array}[]{ll}\mbox{maximize}&\displaystyle\sum_{i=1}^{n}a_{i}\frac{x_{i}}{x_{i}+b_{i}}\\ {}\\ \mbox{subject to}&x\geq 0,\qquad\mathbf{1}^{T}x=d,\end{array} (1)

where ai,bi0a_{i},b_{i}\geq 0 for i=1,,ni=1,\ldots,n and d0d\geq 0. This is the maximum revenue liquidity provisioning problem for AMMs with pro rata distributions and tick-level pools. For each tick ii, parameter aia_{i} is estimated revenue earned from fees over a fixed time period, and bib_{i} is current liquidity. The parameter dd is the total value to allocate across all ticks. The variable xix_{i} is the value of reserves provisioned to tick ii, and xi/(xi+bi)x_{i}/(x_{i}+b_{i}) gives the fraction of remitted fees (revenue) granted under that provision.

Solution method via water-filling.

The solution to problem (1) is

xi=max{0,aibi(ubi/ai)},i=1,,n,x_{i}=\max\left\{0,\sqrt{a_{i}b_{i}}(u-\sqrt{b_{i}/a_{i}})\right\},\qquad i=1,\ldots,n, (2)

where uu is determined by the condition

i=1nmax{0,aibi(ubi/ai)}=d.\displaystyle\sum_{i=1}^{n}\max\left\{0,\sqrt{a_{i}b_{i}}(u-\sqrt{b_{i}/a_{i}})\right\}=d. (3)

(The proof for this can be seen in Appendix A.1.) The left hand side of equation (3) is a piece-wise linear increasing function of uu, with breakpoints at bi/ai\sqrt{b_{i}/a_{i}}. So the equation has a unique solution which is readily determined.

This solution method is called water-filling for the following reason. We think of mounds of earth on patch ii with height bi/ai\sqrt{b_{i}/a_{i}} and width aibi\sqrt{a_{i}b_{i}} that form a landscape, and flood the region with dd total water so that its surface height is uu as shown in Figure (1). The volume of water above patch ii is then the optimal value xix_{i}.

Ticks with large predicted revenue, aia_{i}, will see proportionately more water allocated at a faster rate as the surface level rises. Meanwhile, a large amount of existing liquidity, bib_{i}, is a hurdle to clear before accepting a smaller rate of return on investment, i.e., a worse level of diminishing return.

uuiibi/ai\sqrt{b_{i}/a_{i}}aibi\sqrt{a_{i}b_{i}}xix_{i}
Figure 1: Illustration of water-filling algorithm for Problem (1). The height of each region is bi/ai\sqrt{b_{i}/a_{i}} and the width is aibi\sqrt{a_{i}b_{i}}. The region is flooded to water level uu which uses a total quantity of water equal to dd. The amount of water above each patch is the optimal value xix_{i}.

Maximum return.

Now consider an variation of Problem (1) that includes an additional term,

maximizei=1n(aixixi+bi+cixi)subject tox0,𝟏Tx=d,\begin{array}[]{ll}\mbox{maximize}&\displaystyle\sum_{i=1}^{n}\left(a_{i}\frac{x_{i}}{x_{i}+b_{i}}+c_{i}x_{i}\right)\\ {}\\ \mbox{subject to}&x\geq 0,\qquad\mathbf{1}^{T}x=d,\end{array} (4)

where ci0c_{i}\geq 0 for i=1,,ni=1,\ldots,n. This is the maximum return liquidity provisioning problem, where cic_{i} is a scaling factor for tick ii’s return of reserves in expectation over price, i.e., cic_{i} is the expected value of tick ii’s reserves one time period after provisioning one unit of capital (e.g., $1). If ci<1c_{i}<1 (ci>1c_{i}>1) then tick ii’s reserves are expected to depreciate (appreciate), and the sum, icixi\sum_{i}c_{i}x_{i}, is the expected total value of reserves across all ticks.

We refer to (a,b,c)(a,b,c) as the market conditions, dd as the total capital, and xx as the optimal provision.

Solution method via convex optimization.

Problem (4) is a convex optimization problem [BV04] because the objective is concave maximization and the constraint set is a (scaled) probability simplex. Using the identity x/(x+b)=b/(x+b)1-x/(x+b)=b/(x+b)-1, Problem (4) is equivalent to

minimizei=1n(aibixi+bicixiai)subject tox0,𝟏Tx=d,\begin{array}[]{ll}\mbox{minimize}&\displaystyle\sum_{i=1}^{n}\left(\frac{a_{i}b_{i}}{x_{i}+b_{i}}-c_{i}x_{i}-a_{i}\right)\\ {}\\ \mbox{subject to}&-x\preceq 0,\qquad\mathbf{1}^{T}x=d,\end{array} (5)

which is the standard form of a convex problem.

Therefore a global solution can be certified to a given level of accuracy. Also, software tools and computational solvers are widely available and relatively easy to use in practice. It is possible for liquidity providers to iterate quickly using this approach under changing market conditions.

Figure (2) walks through the steps of solving Problem (4) using cvxpy [DB16], a Python embedded modeling language for convex optimization problems. The software performs best when parameters aa, bb, cc, and dd are scaled to have values near 1, rather than, say, values near 1 million. We offer tips and approaches for estimating these parameters from historical data and market intelligence in Section 4.

import cvxpy as cp
\par# specify parameters and variables
a = cp.Parameter(n, pos=True)
b = cp.Parameter(n, pos=True)
c = cp.Parameter(n, pos=True)
d = cp.Parameter(pos=True)
x = cp.Variable(n, pos=True)
\par# set parameter values
a.value = fee_by_tick
b.value = liquidity_by_tick
c.value = reserves_return_by_tick
d.value = total_capital
\par# construct the convex optimization problem
obj = cp.Minimize(
cp.multiply(a, b)@cp.inv_pos(x+b)
- c@x - cp.sum(a)
)
constraints = [cp.sum(x) == d, x >= 0]
prob = cp.Problem(obj, constraints)
\par# solve
best_return = prob.solve()
best_provision = x.value

Figure 2: A code snippet from a solution to the maximum return provisioning problem implemented using the cvxpy software package.

4 Parameter Estimation

Current liquidity by tick, bb, is known.

The amount of liquidity provisioned to the current tick usually appears as a state of the AMM.

Additional processing may be required to transform net liquidity changes from neighboring ticks into an absolute value, but the result is typically easy to verify using online tools such as ‘info.uniswap.org’ for Uniswap V3 ticks.

Use swap volume to predict aa, future fees by tick.

As evident from the water-filling solution to Problem (1), swap volume, as well as price volatility, plays a significant role in the optimal provision. There are two important aspects to swap volume: shape and size.

One approach to swap volume estimation uses signals processing techniques for non-parametric fitting. For example, denoise a (centered) 𝐑n\mathbf{R}^{n}-valued signal over TT time periods in order to uncover a latent (possibly dynamic) market signal, whose noisy estimates are observed at every time period.

Another approach is to fit statistical models, either jointly over shape and size, or separately. For example, fit a Gaussian shape to centered and scaled tick-wise swap volumes taken from a range of time periods. Then scale by total swap volume averaged over multiple time periods.

One may incorporate market intelligence into estimates. If an upcoming event is expected to drive higher trade volume (not only higher volatility), then estimates derived from historical data may be manually adjusted to reflect the anticipation.

There is a particular type of data processing step that is frequently needed for proper calculation of historical swap volume by tick. Swaps that start in tick ii and end in tick jj generate swap volume that appears in tick ii, tick jj, and all ticks in between. It is possible to determine exactly how much volume is swapped by each tick using details about the AMM, such pre- and post-swap price, as well as liquidity for every tick along the price path.

The final step is to scale tick-wise swap volume by the tick’s fee tier, which is known. Fee tiers are usually 1, 5, 30, or 100 basis points, passing that fraction of total swap volume on to providers as fees earned for their service.

We may consider candidate ticks from pools with different fee tiers, e.g., ticks associated with ETH-USDC swaps for pools with 0.05% and 0.3% fee tiers. For each fee tier, swap volume by tick will be different, and of course the fee multiplier will be different.

Use price volatility to predict cc, expected return of reserves by tick.

For any tick, its return of reserves, ri𝐑+nr_{i}\in\mathbf{R}_{+}^{n}, is a deterministic function of asset price and invariant under time and price path. Consider the two examples of Uniswap V3 ticks illustrated in Figure (3), which are displayed on a log scale for clarity.

0 current tick higher tick in rangelower tick in rangelog rir_{i}
Figure 3: Log return of reserves for two ticks from a Uniswap V3 pool. One tick is active at a higher price ( ) while the other is active at a lower price ( ).

Reserves provisioned to a “higher” tick start out as only asset, and increase in value while the price rises until the tick is in range and asset is swapped for stable. Meanwhile reserves provisioned to a “lower” tick start out as only stable, and maintain constant value while the price drops until the tick is in range and stable is swapped for asset. For both, asset value shrinks as price drops, and hits a ceiling as price rises.

Notice that the expected return, cic_{i}, for tick ii depends on next period price, which is a random variable with mass function p𝐑+np\in\mathbf{R}_{+}^{n}. So

ci=pTri,i=1,,n.c_{i}=p^{T}r_{i},\qquad i=1,\ldots,n. (6)

And so the sum i=1nci=pT(i=1nri)\sum_{i=1}^{n}c_{i}=p^{T}\left(\sum_{i=1}^{n}r_{i}\right) is expected value of a portfolio after one time period if each tick is provisioned one unit of capital (e.g., $1).

By definition, volatility is the standard deviation of pp, the next-period price, multiplied by the square root of the number of time periods in, say, a year. A common model for price is geometric Brownian motion, i.e., one assumes log price returns are iid Gaussian so that the model is straight forward to fit using historical data.

Finally, it is possible to consider a candidate pool of ticks from protocols with different swap criteria (e.g., constant product- and constant sum- market makers) because rir_{i} may be tailored separately for each tick ii.

Models for volatility and volume should be consistent.

It’s possible for swap volume by tick to have a different shape than the distribution of prices after one period. This may be due to a number of factors, such mid-period events, concentrated liquidity, order book depth, and more.

Yet there are some swap volume curves (e.g., low entropy concentrated volume) that are inconsistent with price change curves (e.g., high entropy price dispersion) even under highly manipulative conditions. Or swap volume may be centered around a price that’s different from the center of future prices. Solutions to Problem (4) where parameters aa and cc are generated from inconsistent volatility and volume models may look strange, even though the objective is properly optimized.

5 Experiments

We begin with a qualitative test for the purpose of exploration. Consider the setting where dd capital may be allocated across ticks from a candidate set, Ω\Omega. The current price is pp and the provisions will be held for a time period of TT days. To estimate aa, determine the standard deviation of swap volume data from the previous TT days, and center a Gaussian with that standard deviation at the current price. To estimate cc, use implied volatility, η\eta, to generate of distribution of where prices will be after TT days.

In our experiment, dd is $1 million, TT is 7 days, and Ω\Omega is the set of ticks for the ETH-USDC pair with 0.05% fee from Uniswap V3 on Ethereum. The price pp was $2780 on February 16, 2024, and so ticks were limited further still to the range of $2500 to $3060, or ±10%\pm 10\% of the current price. We choose implied volatility η=80%\eta=80\% because it appears to be roughly the 7-day moving average of implied volatility estimates from options data across various trading platforms. We used the ‘web3.py’ software package to pull liquidity, price, and swap volume data directly from the Uniswap V3 protocol.

Refer to caption
Figure 4: Given current liquidity, the optimal tick-by-tick provision is concentrated in the well closest to the current asset price.

Figure (4) illustrates liquidity, bb, already in the pool as well as provisions, xx, in green. First, notice that there are no provisions at the current tick. Rather, almost all liquidity is provisioned to ticks in the $2830 to $2980 price range. One reason for this is there is a drop off in liquidity at that range, implying a larger portion of fees for the same amount of capital. Second, we notice that the amount provisioned to each tick tapers off as the price gets larger. Presumably the rate of tapering depends on the trade-off between price volume and volatility.

Refer to caption
Figure 5: On the left, historical swap volume (yellow) and predicted swap volume (purple) share the same standard deviation and total size but take different shapes. On the right, reserves provisioned to the current tick have the most value to lose.

We consider these two effects in Figure (5). On the left, previous swap volume is shown in yellow. Even though the yellow historical data not appear Gaussian in shape, the purple distribution centered at the current price is our estimate of future volume, which is proportional to aa. To the right is the expected return on reserves, cc, under the assumption that asset prices following geometric Brownian motion with implied volatility determined by the market. Notice that the greatest loss occurs at the current price. Among ticks with the most at stake (i.e., ticks at, or above, current price) it also has the least to gain.

Refer to caption
Figure 6: From left to right, the total capital available to provision across all ticks increases from $200k to $10m. Under optimal provisions, the total liquidity now available in the pool is shown above while the tick-by-tick provisions are isolated below.

Now consider the setting where we may choose how much total capital, dd, to provision. Figure (6) illustrates the shape that tick-by-tick provisions follow as more capital is allocated to the pools. The top row illustrates the overlay of new provisions to current liquidity, and the bottom row shows only the tick-by-tick provisions as determined by Problem (4). From the top, it’s clear that provisions continue to seek a larger portion of fees by piling more quickly into wells. We call this the ‘fee-chasing’ effect. We also notice a bi-modal shape emerging as dd increases. We say this is due to the reserves ‘loss-avoiding’ effect, which scales linearly in dd and thus becomes more prominent at large values. To our knowledge, this phenomena is new to the community of liquidity providers.

Finally, we wish to understand how the performance of tick-by-tick provisioning compares to that of single-range provisioning, where provision are equally distributed across ticks and centered around the current price. For good measure, we consider the delta-neutral version as well, where a short position equal to the value of reserves across all assets in ticks is opened to remove asset exposure at the current price.

Consider the setting where the tick-by-tick model is fit to data from the previous SS days. Then market behavior is simulated for TT days before the positions are closed. The new value of reserves and earned fees determines performance. This process is repeated every RR days.

Table (1) shows the results of this experiment for a single range tick spanning ticks at ±10%\pm 10\% of the current price, where T=S=7T=S=7 days and R=4R=4 days. (We use block numbers to identify the beginning of train and test periods.) This experiment roughly covers data from January 1, 2024 – February 16, 2024, and corresponds to a period of roughly 30% growth in the price of ETH.

The results show that, for this set of market conditions, tick-by-tick provisioning performed better in expectation but performance fluctuated more each week. The single range strategy benefited from upside exposure in the underlying asset, which hurt the performance of the delta-neutral approach. The authors conclude that further testing is needed to compare the performance under different market conditions. Meanwhile, the results appear to be promising.

Train block Test block Tick by tick Range ±10%\pm 10\% Delta-neutral
18943206 18993312 4.24% 4.50% 0.49%
18971817 19021923 4.00% 4.48% -1.11%
19000435 19050541 1.69% 3.86% -2.57%
19029031 19079137 10.63% 5.25% -8.56%
19057636 19107742 8.67% 5.30% -6.25%
19086319 19136425 7.38% 4.96% -6.66%
19114856 19164962 3.55% 4.79% -5.97%
19143467 19193573 1.1% 3.80% -3.71%
mean 5.16% 4.62% -4.29%
std 3.17% 0.54% 2.89%
Table 1: Compare the results of tick-by-tick provisions to a ±10%\pm 10\% single-range position, also with a delta neutral hedge. Deploy and rebalance $1 million on a weekly basis from Jan 1, 2024 – Feb 16, 2024.

6 Discussion

Tick-by-tick provisioning offers a different way to think about programming liquidity to the decentralized economy. There are competing effects that are unique to liquidity providers, and we use vector and convex math, rather than financial greeks (e.g., delta, theta, gamma), to strike this balance without leaving money on the table. We also separate out the effects due to price volume from those due to volatility. In our experience, these two effects are often conflated.

There remain many open questions and the need for further results in order to determine how best to utilize the framework. To name just a few,

  • What does a multi-pool tick provision look like? In what capacity are multi-fee provisions optimal and are there any fee tiers missing?

  • How sensitive are the provision results to changes in estimate of volatility and volume? What more can we say about the empirical relationship between volatility and volume?

  • How does just-in-time liquidity (JIT) fit in? Rather than initialize a far away tick now, can we provision the liquidity when the price moves closer? How close? If everyone’s doing this, what does it mean for our current liquidity parameter, bb?

  • Is this approach delta neutral? If we look at the change in return with respect to the change in price, what shape does it take?

  • How else can we interpret the avoidance around current price? Is there a connection to LVR [Mil+23]?

  • What else can we do when Uniswap V4 is released?

Most of all, we’re excited by the prospect of the wider implications of these ideas. Could it be possible that optimal provisioning is not actually centered around the current price? If so, what would that mean for the community? Could this drive deeper liquidity to decentralized markets?

Appendix A Appendix

A.1 Water filling method for maximum revenue solution

(The following proof is a direct extension of an example given in [BV04] on page 245, and so the wording may be similar.)

Recall the maximum revenue problem (1). Using the fact that x/(x+b)=1b/(x+b)x/(x+b)=1-b/(x+b), the objective can be rewritten as

i=1naibixi+bi.\displaystyle\sum_{i=1}^{n}\frac{a_{i}b_{i}}{x_{i}+b_{i}}. (7)

Introduce Lagrange multipliers λi𝐑n\lambda_{i}\in\mathbf{R}^{n} for the inequality constraints x0x\geq 0, and a multiplier μ𝐑\mu\in\mathbf{R} for the equality constraint 𝟏Tx=d\mathbf{1}^{T}x=d. Then the KKT conditions are

x0,𝟏Tx=d,λ0,xiλi=0,i=1,,n,aibi(xi+bi)2λi+ν=0,i=1,,n.\begin{array}[]{c}x\geq 0,\qquad\mathbf{1}^{T}x=d,\qquad\lambda\geq 0,\\ {}\hfil\\ x_{i}\lambda_{i}=0,\qquad i=1,\ldots,n,\\ {}\hfil\\ -\frac{a_{i}b_{i}}{(x_{i}+b_{i})^{2}}-\lambda_{i}+\nu=0,\qquad i=1,\ldots,n.\end{array} (8)

Note that λi\lambda_{i} is a slack variable and can be eliminated, leaving

x0,𝟏Tx=d,xi(νaibi(xi+bi)2)=0,i=1,,n,aibi(xi+bi)2ν,i=1,,n.\begin{array}[]{c}x\geq 0,\qquad\mathbf{1}^{T}x=d,\qquad x_{i}\left(\nu-\frac{a_{i}b_{i}}{(x_{i}+b_{i})^{2}}\right)=0,\qquad i=1,\ldots,n,\\ {}\hfil\\ \frac{a_{i}b_{i}}{(x_{i}+b_{i})^{2}}\leq\nu,\qquad i=1,\ldots,n.\end{array} (9)

Focus on the last inequality. Invert the terms and take the square root,

xi+biaibi1ν,i=1,,n,\frac{x_{i}+b_{i}}{\sqrt{a_{i}b_{i}}}\geq\frac{1}{\sqrt{\nu}},\qquad i=1,\ldots,n, (10)

then substitute u=1νu=\frac{1}{\sqrt{\nu}} to get

xi+biaibiu,i=1,,n.\frac{x_{i}+b_{i}}{\sqrt{a_{i}b_{i}}}\geq u,\qquad i=1,\ldots,n. (11)

The new KKT conditions are

x0,𝟏Tx=d,xi(uxi+biaibi)=0,i=1,,n,xi+biaibiu,i=1,,n.\begin{array}[]{c}x\geq 0,\qquad\mathbf{1}^{T}x=d,\qquad x_{i}\left(u-\frac{x_{i}+b_{i}}{\sqrt{a_{i}b_{i}}}\right)=0,\qquad i=1,\ldots,n,\\ {}\hfil\\ \frac{x_{i}+b_{i}}{\sqrt{a_{i}b_{i}}}\geq u,\qquad i=1,\ldots,n.\end{array} (12)

We can directly solve these equations to find xix_{i} and uu. If u>bi/aiu>\sqrt{b_{i}/a_{i}}, the last condition can only hold if xi>0x_{i}>0, which by the third condition implies that x=aibi(ubi)x=\sqrt{a_{i}b_{i}}(u-b_{i}). If ubi/aiu\leq\sqrt{b_{i}/a_{i}}, then xi>0x_{i}>0 is impossible, because it would imply ubi/ai<xi+biaibiu\leq\sqrt{b_{i}/a_{i}}<\frac{x_{i}+b_{i}}{\sqrt{a_{i}b_{i}}}, which violates the complementary slackness condition. Therefore, xi=0x_{i}=0 if ubi/aiu\leq\sqrt{b_{i}/a_{i}}. Thus we have

xi={aibi(ubi/ai)u>bi/ai,0ubi/ai.x_{i}=\left\{\begin{array}[]{ll}\sqrt{a_{i}b_{i}}(u-\sqrt{b_{i}/a_{i}})&u>\sqrt{b_{i}/a_{i}},\\ 0&u\leq\sqrt{b_{i}/a_{i}}.\end{array}\right. (13)

or, more simply put, x=max{0,aibi(ubi/ai)}x=\max\left\{0,\sqrt{a_{i}b_{i}}(u-\sqrt{b_{i}/a_{i}})\right\}. Substituting this expression into the condition 𝟏Tx=1\mathbf{1}^{T}x=1 we obtain the water-filling condition,

i=1nmax{0,aibi(ubi/ai)}=d.\displaystyle\sum_{i=1}^{n}\max\left\{0,\sqrt{a_{i}b_{i}}(u-\sqrt{b_{i}/a_{i}})\right\}=d. (14)

References

  • [BS73] Fisher Black and Myron Scholes “The pricing of options and corporate liabilities” In Journal of political economy, 1973
  • [BV04] Stephen Boyd and Lieven Vandenberghe “Convex Optimization” Cambridge University Press, 2004
  • [DB16] Steven Diamond and Stephen Boyd “CVXPY: A Python-embedded modeling language for convex optimization” In Journal of Machine Learning Research 17.83, 2016, pp. 1–5
  • [AC20] Guillermo Angeris and Tarun Chitra “Improved Price Oracles: Constant Function Market Makers” In Proceedings of the 2nd ACM Conference on Advances in Financial Technologies, AFT ’20 ACM, 2020 DOI: 10.1145/3419614.3423251
  • [AEC21] Guillermo Angeris, Alex Evans and Tarun Chitra “Replicating Market Makers”, 2021 arXiv:2103.14769 [q-fin.MF]
  • [Ang+21] Guillermo Angeris et al. “Constant Function Market Makers: Multi-Asset Trades via Convex Optimization”, 2021 DOI: 2107.12484
  • [LK23] Guillaume Lambert and Jesper Kristensen “Panoptic: the perpetual, oracle-free options protocol”, 2023 arXiv:2204.14232 [q-fin.PR]
  • [Mil+23] Jason Milionis, Ciamac C. Moallemi, Tim Roughgarden and Anthony Lee Zhang “Automated Market Making and Loss-Versus-Rebalancing”, 2023 arXiv:2208.06046 [q-fin.MF]