# Mixing Constant Sum and Constant Product Market Makers

Alexander Port Neelesh Tiruviluamala Emails<EMAIL_ADDRESS><EMAIL_ADDRESS>
###### Abstract

Two popular forms of automated market makers are constant sum and constant
product (CSMM and CPMM respectively). Each has its advantages and
disadvantages: CSMMs have stable exchange rates but are vulnerable to
arbitrage and can sometimes fail to provide liquidity, while a CPMM can have
large impermanent loss due to exchange rate changes but are always able to
provide liquidity to participants.

A significant amount of work has been done in order to get the best of both
constant sum and constant product characteristics. Perhaps most the relevant
to this paper is Stableswap, which has an “amplification coefficient”
parameter controlling the balance between the two types of behavior [Ego19].
Alternative approaches, such as in [AEC21], involve constructing AMMs using
portfolio value functions. However, there is still much work to be done on
these fronts. This paper presents multiple novel methods for mixing market
makers and demonstrates new tools for designing markets with specific
features.

##  1 Basic Construction

The simplest CSMM and CPMM curves are given by $x+y=k_{1}$ and $xy=k_{2}$;
here one thinks of $x$ and $y$ as being the amounts of the different
currencies in the market. For simplicity, let’s assume that $k_{1}=2$ and
$k_{2}=1$ so that both curves contain the point $(x_{0},y_{0})=(1,1)$. Note
that this means that the CSMM can be rewritten as $\frac{x+y}{2}=1$; the
advantage here is that now both curves are defined with a constant of $1$ on
the righthand side and taking combinations of the two is very easy.

For reasons that will be apparent soon, denote $A_{0}(x,y)=\frac{x+y}{2}$ and
$A_{1}(x,y)=xy$. The goal is to find a family of functions $A_{t}(x,y)$ for
$0\leq t\leq 1$ that smoothly transitions from $A_{0}(x,y)$ to $A_{1}(x,y)$.
Perhaps the easiest way is to take an arithmetic weighted mean of the two
functions:

$A_{t}^{arith}(x,y)=A_{0}(x,y)(1-t)+A_{1}(x,y)t$ (1)

Part of the reason this works as well as it does is because $A_{0}(x,y)=1$ and
$A_{1}(x,y)=1$; thus, any weighted average of the two will also be equal to
$1$.

A concrete example of this construction is seen in Stableswap ([Ego19]). In an
$n$-currency Stableswap market the initial amounts
$X^{i}=(x_{1}^{i},...,x_{n}^{i})$ of each currency are given by
$x_{j}^{i}=\frac{D}{n}$ for some value of $D$ and each value of $j$. The sum
and product of these values are then given by the following:

$\begin{array}[]{ccc}\sum_{j=1}^{n}x_{j}^{i}=D&&\prod_{j=1}^{n}x_{j}^{i}=\left(\frac{D}{n}\right)^{n}\end{array}$

The Stableswap system has a self-proclaimed “leverage” parameter $\chi$ where
$\chi=0$ corresponds to CPMM and $\chi=\infty$ to CSMM; if the quantities of
each currency are given by $X=(x_{1},...,x_{n})$ then the AMM is

$\chi D^{n-1}\sum_{j=1}^{n}x_{j}+\prod_{j=1}^{n}x_{j}=\chi
D^{n}+\left(\frac{D}{n}\right)^{n}$

The claim here is that these formulas can be represented using the above
$A_{t}^{arith}$ format. To see this, note that the CSMM and CPMM equations can
written as the following:

$\begin{array}[]{ccc}A_{0}(X)=\frac{1}{D}\sum_{j=1}^{n}x_{j}&&A_{1}(X)=\left(\frac{n}{D}\right)^{n}\prod_{j=1}^{n}x_{j}\end{array}$

Each of these equations is normalized so that the surfaces are defined by
$A_{0}(X)=1$ and $A_{1}(X)=1$. This in turn allows the defining mixed equation
to be written as

$\displaystyle 1$ $\displaystyle=$ $\displaystyle\frac{\chi
D^{n-1}\sum_{j=1}^{n}x_{j}+\prod_{j=1}^{n}x_{j}}{\chi
D^{n}+\left(\frac{D}{n}\right)^{n}}$ $\displaystyle=$ $\displaystyle
A_{0}(X)\frac{\chi D^{n}}{\chi
D^{n}+\left(\frac{D}{n}\right)^{n}}+A_{1}(X)\frac{\left(\frac{D}{n}\right)^{n}}{\chi
D^{n}+\left(\frac{D}{n}\right)^{n}}$ $\displaystyle=$ $\displaystyle
A_{0}(X)\frac{\chi}{\chi+n^{-n}}+A_{1}(X)\frac{n^{-n}}{\chi+n^{-n}}$

Thus, the Stableswap equations can be reparametrized to the arithmetic mixing
format where the relation between $\chi$ and $t$ is given by

$t=\frac{n^{-n}}{\chi+n^{-n}}$ (2)

While the arithmetic mean is a simple way of combining the curves, it is far
from the only way. Intuitively, the curve $A_{t}^{arith}(x,y)$ is just an
arithmetic weighted mean of the CSMM and CPMM curves. A common alternative to
the arithmetic mean is the geometric mean. For example, recall that the
arithmetic and geometric means of the numbers $3$ and $5$ are
$\frac{1}{2}(3+5)=4$ and $(3\cdot 5)^{\frac{1}{2}}=\sqrt{15}$ respectively.
One can define a geometric weighted mean of the CSMM and CPMM curves in a
similar way:

$A_{t}^{geo}(x,y)=A_{0}(x,y)^{1-t}A_{1}(x,y)^{t}$ (3)

This can appear more complicated than the arithmetic version, but it also
offers several computational advantages. For example,
$A_{0}(x,y)=\frac{x+y}{2}$ and $A_{1}(x,y)=xy$ are homogeneous functions of
degree $1$ and $2$ respectively, i.e. $A_{0}(\lambda x,\lambda y)=\lambda
A_{0}(x,y)$ and $A_{1}(\lambda x,\lambda y)=\lambda^{2}A_{0}(x,y)$. There are
known benefits to having a homogenous AMM curve ([TPL22]) and one can show
that $A_{t}^{geo}(x,y)$ is homogenous for all values of $t$ while
$A_{t}^{arith}(x,y)$ is non-homogeneous.

A more general construction is needed to fully describe the pros and cons of
different mixing methods. The purpose is to find an optimal balance of price
stability, impermanent loss, and ability to provide liquidity.

##  2 General Construction: Homotopy

A classical mathematical construction of a “homotopy” between two functions
$f,g:\mathbb{R}\rightarrow\mathbb{R}^{n}$ is a weighted average
$H(s,t)=(1-t)\cdot f(s)+t\cdot g(s)$ depending on some parameter $t$. Fixing a
value of $t$ gives a very precise blending of $f$ and $g$ in that each
resulting point $H(s,t)$ is exactly $100t$ percent of the way along the line
segment connecting $f(s)$ and $g(s)$. Despite their equations being visually
similar, the mixings above do not satisfy this property for a variety of
reasons; values of $t$ in arithmetic and geometric mixings are only
geometrically meaningful in this way when $t$ is $0$ or $1$. The idea of the
proceeding “homotopy mixing” is that $t$ will always represent the percent
movement from CSMM to CPMM in the above mathematical way (see Figure 1 for a
visual representation). Note that the current and initial states will be
denoted as $X=(x_{1},...,x_{n})$ and $X^{i}=(x_{1}^{i},...,x_{n}^{i})$ for
shorthand throughout this section.

This construction is best presented in an abstract setting where the number of
currencies is arbitrary, even though the focus of this paper is for 2D AMMs.
Suppose the CSMM and CPMM surfaces are given by

$\displaystyle
A_{0}(X)=\frac{\sum_{j=1}^{n}a_{j}x_{j}}{\sum_{j=1}^{n}a_{j}x_{j}^{i}}=1$
$\displaystyle
A_{1}(X)=\prod_{j=1}^{n}\left(\frac{x_{j}}{x_{j}^{i}}\right)^{\alpha_{j}}=1$

Here the $x_{j}$’s are the current quantities of the currencies in the AMM and
the $x_{j}^{i}$’s are the initial quantities. Both of these surfaces pass
through the same initial point $X^{i}$; however, it is also important for the
surfaces to share the same exchange rates at that initial state. To find the
condition for this, differentiation shows that the gradients of these CSMM and
CPMM equations are given by

$\displaystyle\nabla
A_{0}(X)=\frac{1}{\sum_{j=1}^{n}a_{j}x_{j}^{i}}(a_{1},...,a_{n})$
$\displaystyle\nabla
A_{1}(X)=\prod_{j=1}^{n}\left(\frac{x_{j}}{x_{j}^{i}}\right)^{\alpha_{j}}\left(\frac{\alpha_{1}}{x_{1}},...,\frac{\alpha_{n}}{x_{n}}\right)$

One may think of the gradient as giving the prices of the two currencies, at
least up to some common multiple. One can get the exchange rate from one
currency to another by looking at the quotient of the two corresponding
gradient values. For example, the exchange rate of exchanging the $x_{1}$
currency for the $x_{2}$ currency is given by $\frac{a_{2}}{a_{1}}$ and
$\frac{\alpha_{2}x_{1}^{i}}{\alpha_{1}x_{2}^{i}}$ in $A_{0}$ and $A_{1}$
respectively. Intuitively this makes sense, especially for $A_{1}$; as the
amount of the $x_{2}$ currency grows its value will go down and so it costs
fewer of the $x_{1}$ currency to get a particular amount of $x_{2}$ currency.
If one assumes that the $A_{0}$ and $A_{1}$ exchange rates must be equal at
the initial point $X^{i}$ then

$(a_{1},...,a_{n})\text{\thinspace\thinspace\thinspace must be parallel
to\thinspace\thinspace\thinspace}\left(\frac{\alpha_{1}}{x_{1}^{i}},...,\frac{\alpha_{n}}{x_{n}^{i}}\right)$
(4)

Note that a very natural and completely acceptable choice from a mathematical
standpoint would be to simply take $\alpha_{j}=a_{j}x_{j}^{i}$ for each $j$.
However, practically speaking it is best to normalize these values to be much
smaller in order to avoid blowups; a normalization condition of
$\sum_{j=1}^{n}\alpha_{j}=1$ helps fix this issue.

There is a very natural bijective association between the CSMM and CPMM
surfaces. More specifically, any point on the CPMM surface has a unique
corresponding point on the CSMM surface, and the same correspondence is true
in the other direction as long as none of the quantities $x_{j}$ are $0$. To
construct this:

  * •

Suppose $v=(v_{1},...,v_{n})$ is a point in the state space
$\mathbb{R}_{>0}^{n}$, i.e. where $v_{j}>0$ for all $j$.

  * •

There exists some scalar function $\lambda_{0}=\lambda_{0}(v)$ such that the
point $\lambda_{0}v=(\lambda_{0}v_{1},...,\lambda_{0}v_{n})$ lies on the CSMM
surface. In particular:

$A_{0}(\lambda_{0}v)=1\implies\lambda_{0}=\frac{\sum_{j=1}^{n}a_{j}x_{j}^{i}}{\sum_{j=1}^{n}a_{j}v_{j}}$

  * •

Similarly, there exists some scalar function $\lambda_{1}=\lambda_{1}(v)$ such
that the point $\lambda_{1}v=(\lambda_{1}v_{1},...,\lambda_{1}v_{n})$ lies on
the CPMM surface. By denoting $deg(A_{1})=\sum_{j=1}^{n}\alpha_{j}$:

$A_{1}(\lambda_{1}v)=1\implies\lambda_{1}=\prod_{j=1}^{n}\left(\frac{x_{j}^{i}}{v_{j}}\right)^{\frac{\alpha_{j}}{deg(A_{1})}}$

The correspondence is then given by associating $\lambda_{0}v$ with
$\lambda_{1}v$. This method creates a pairing between the surfaces as a whole
because one could always choose $v$ to be an arbitrary point on the CSMM or
the CPMM.

This correspondence between CSMM and CPMM state points allows for a natural
description of a smooth transition from one to the other. This method is
inspired by the notion of homotopy in algebraic topology, and therefore the
constructed surface will be denoted $A_{t}^{hom}(x_{1},...,x_{n})=1$. This
function is constructed as follows. Suppose $x=(x_{1},...,x_{n})$ is a point
on this homotopy surface for the given parameter $t$. The assumption in this
construction is that the point $x$ lies $100t$ percent of the way along the
line segment connecting $\lambda_{0}x$ to $\lambda_{1}x$. The equation form of
this assumption is given by

$\displaystyle x$ $\displaystyle=$
$\displaystyle(1-t)\lambda_{0}x+t\lambda_{1}x$ $\displaystyle=$
$\displaystyle((1-t)\lambda_{0}+t\lambda_{1})x$

Clearly if $t=0$ then $x=\lambda_{0}x$ and so $x$ must lie on the CSMM
surface; similarly, if $t=1$ then $x=\lambda_{1}x$ and so $x$ is on the CPMM
surface. Note that the 2D version of this argument is presented in Figure 1.

More generally, the only way the above equation
$x=((1-t)\lambda_{0}+t\lambda_{1})x$ holds is if
$(1-t)\lambda_{0}+t\lambda_{1}=1$ (because all values $x_{1},...,x_{n}$ are
assumed strictly positive). This equation is exactly the needed one as
original the goal was to find a function that was equal to $1$ that described
points on the surface. Upon simplifying, the result becomes

$\displaystyle A_{t}^{hom}(X)$ $\displaystyle=$
$\displaystyle(1-t)\frac{\sum_{j=1}^{n}a_{j}x_{j}^{i}}{\sum_{j=1}^{n}a_{j}x_{j}}+t\prod_{j=1}^{n}\left(\frac{x_{j}^{i}}{x_{j}}\right)^{\frac{\alpha_{j}}{deg(A_{1})}}$
$\displaystyle=$ $\displaystyle
A_{0}(X)^{-1}(1-t)+A_{1}(X)^{-\frac{1}{deg(A_{1})}}t$

Figure 1: Visualization in 2D of the line segment connecting the CSMM and CPMM
curves. The point $(x_{0},y_{0})$ is at the intersection of blue and red,
$(\lambda_{0}x,\lambda_{0}y)$ at the intersection of blue and black, and
$(\lambda_{1}x,\lambda_{1}y)$ at the intersection of red and black.

The remainder of this section is concerned with this specifics of this
construction in 2D. The parameter $t$ along with the addition of another
parameter $s$ allows for a complete parametric description of the region
between the CSMM and CPMM curves in 2D. As seen in Section 4, such a
parametrization is a very powerful tool for designing and building mixing
methods that satisfy any range of desired properties.

Before deriving any equations using the parameter $s$, denote the following
for simplicity moving forward:

$\displaystyle A_{0}(x,y)=\frac{ax+by}{ax_{0}+by_{0}}$ $\displaystyle
A_{1}(x,y)=\frac{x^{\alpha}y^{\beta}}{x_{0}^{\alpha}y_{0}^{\beta}}$

The above is a $t$-parametric description of the line segment connecting the
pair of points on the CSMM and CPMM surfaces; one can describe the original
CSMM curve given by $A_{0}(x,y)=1$ in a similar parametric way. The
$y$-intercept and $x$-intercept of this line are given by
$(0,\frac{a}{b}x_{0}+y_{0})$ and $(x_{0}+\frac{b}{a}y_{0},0)$ respectively. As
above, one can connect these two points using a line segment parametrized by
the variable $s$. The CSMM position corresponding to the value of $s$ is the
point

$(1-s)\left(0,\frac{a}{b}x_{0}+y_{0}\right)+s\left(x_{0}+\frac{b}{a}y_{0},0\right)\text{\thinspace\thinspace\thinspace
or
equivalently\thinspace\thinspace\thinspace}\left(ax_{0}+by_{0}\right)\left(\frac{s}{a},\frac{1-s}{b}\right)$

One may think of $s$ as determining the slope of the dotted line in Figure 1,
or equivalently the angle that the dotted line makes with the x-axis. Next,
suppose $(x,y)$ is some point on this curve, i.e. $A_{t}^{hom}(x,y)=1$. Given
a fixed point $(x,y)$ on the curve $A_{t}^{hom}$, one can solve for the $s$
corresponding to $(x,y)$ using that fact that $(x,y)$ and
$(\frac{s}{a},\frac{1-s}{b})$ lie on the same line passing through the origin.
In particular, the ratios of the two coordinates in each point must be the
same:

$\frac{y}{x}=\frac{\frac{1-s}{b}}{\frac{s}{a}}$

$\implies s=\frac{ax}{ax+by}$ (5)

##  3 Comparison of Arithmetic, Geometric, and Homotopy Mixings

Section 2 demonstrates a rigorous construction of a method for mixing CSMM and
CPMM curves that is more grounded in measuring the literal distance travelled
from one curve to the another than previous methods have been. This
concreteness comes with the trade-off of having a potentially more complicated
defining equation. As such, it is important to directly compare the three
above mixing methods to see and analyze all the pros and cons. The most
relevant properties are as follows: existence of a convenient parametrization,
ability to provide liquidity, whether or not the curve is exchange rate level
independent, and the amount of stability in exchange rates given changes in
currency quantity.

Mixing Type |  Equation in 2D
---|---
$\begin{array}[]{c}\\\ \\\ \\\ \end{array}$Arithmetic$\begin{array}[]{c}\\\ \\\ \\\ \end{array}$ |  $A_{t}^{arith}(x,y)=\left(\frac{ax+by}{ax_{0}+by_{0}}\right)(1-t)+\left(\frac{x^{\alpha}y^{\beta}}{x_{0}^{\alpha}y_{0}^{\beta}}\right)t$
$\begin{array}[]{c}\\\ \\\ \\\ \end{array}$Geometric$\begin{array}[]{c}\\\ \\\ \\\ \end{array}$ |  $A_{t}^{geo}(x,y)=\left(\frac{ax+by}{ax_{0}+by_{0}}\right)^{1-t}\left(\frac{x^{\alpha}y^{\beta}}{x_{0}^{\alpha}y_{0}^{\beta}}\right)^{t}$
$\begin{array}[]{c}\\\ \\\ \\\ \end{array}$Homotopy$\begin{array}[]{c}\\\ \\\ \\\ \end{array}$ |  $A_{t}^{hom}(x,y)=\left(\frac{ax_{0}+by_{0}}{ax+by}\right)(1-t)+\left(\frac{x_{0}^{\alpha}y_{0}^{\beta}}{x^{\alpha}y^{\beta}}\right)^{\frac{1}{\alpha+\beta}}t$

Mixing Type |  Equation in General
---|---
$\begin{array}[]{c}\\\ \\\ \\\ \end{array}$Arithmetic$\begin{array}[]{c}\\\ \\\ \\\ \end{array}$ |  $A_{t}^{arith}(x_{1},...,x_{n})=A_{0}(x_{1},...,x_{n})(1-t)+A_{1}(x_{1},...,x_{n})t$
$\begin{array}[]{c}\\\ \\\ \\\ \end{array}$Geometric$\begin{array}[]{c}\\\ \\\ \\\ \end{array}$ |  $A_{t}^{geo}(x_{1},...,x_{n})=A_{0}(x_{1},...,x_{n})^{1-t}A_{1}(x_{1},...,x_{n})^{t}$
$\begin{array}[]{c}\\\ \\\ \\\ \end{array}$Homotopy$\begin{array}[]{c}\\\ \\\ \\\ \end{array}$ |  $A_{t}^{hom}(x_{1},...,x_{n})=A_{0}(x_{1},...,x_{n})^{-1}(1-t)+A_{1}(x_{1},...,x_{n})^{-\frac{1}{deg(A_{1})}}t$

Table 1: The three main types of CSMM and CPMM mixings considered in this
paper. The AMM is always defined by $A_{t}(x,y)=1$. The parameter $t$ controls
the transition from CSMM at $t=0$ to CPMM at $t=1$. The top table gives the
equations in this specific 2D context; the bottom table provides a more
abstract presentation distanced from the specifics of the CSMM and CPMM
surfaces in higher dimensions.

###  3.1 Parametrization

The above parametric homotopy construction allows for the easy plotting of the
homotopy mixing curves $A_{t}^{hom}(x,y)=1$. The point
$(\frac{s}{a},\frac{1-s}{b})$ can be thought of as the base parametrization of
a line segment. As seen in Section 2, multiplying this by $ax_{0}+by_{0}$
moves that point to the CSMM curve. Similarly, multiplying by
$((\frac{ax_{0}}{s})^{\alpha}(\frac{by_{0}}{1-s}))^{\frac{1}{\alpha+\beta}}$
places the point on the CPMM curve. Thus, one may parametrize the scalar
function needed to move this point to $A_{t}^{hom}$ in the following way:

$\lambda^{hom}(s,t)=(ax_{0}+by_{0})(1-t)+\left(\left(\frac{ax_{0}}{s}\right)^{\alpha}\left(\frac{by_{0}}{1-s}\right)^{\beta}\right)^{\frac{1}{\alpha+\beta}}t$
(6)

This equation provides a convenient closed form equation for moving points
into the homotopy mixing curve. One can show that a similar equation can be
used to move points onto the geometric mixing curve $A_{t}^{geo}$:

$\begin{array}[]{cccc}A_{t}^{geo}(x,y)=&\left(\frac{ax+by}{ax_{0}+by_{0}}\right)^{1-t}\left(\frac{x^{\alpha}y^{\beta}}{x_{0}^{\alpha}y_{0}^{\beta}}\right)^{t}=1&&(x,y)=\lambda^{geo}(s,t)\left(\frac{s}{a},\frac{1-s}{b}\right)\end{array}$

$\implies\lambda^{geo}(s,t)=(ax_{0}+by_{0})^{\frac{1-t}{(1-t)+(\alpha+\beta)t}}\left(\left(\frac{ax_{0}}{s}\right)^{\alpha}\left(\frac{by_{0}}{1-s}\right)^{\beta}\right)^{\frac{t}{(1-t)+(\alpha+\beta)t}}$
(7)

In contrast, it is generally not possible find such a function with the
arithmetic curve. The problem, as seen below, is that it is not possible to
directly solve for $\lambda^{arith}(s,t)$ because doing so amounts to solving
a polynomial of arbitrary and possibly non-integer degree. While this can
certainly be approximated, doing so would be slower and less accurate than
having an explicit closed-form solution. The polynomial in question is seen
below:

$\begin{array}[]{cccc}A_{t}^{arith}(x,y)=&\left(\frac{ax+by}{ax_{0}+by_{0}}\right)(1-t)+\left(\frac{x^{\alpha}y^{\beta}}{x_{0}^{\alpha}y_{0}^{\beta}}\right)t=1&&(x,y)=\lambda^{arith}(s,t)\left(\frac{s}{a},\frac{1-s}{b}\right)\end{array}$

$\displaystyle\implies\lambda^{arith}(s,t)\frac{1-t}{ax_{0}+by_{0}}+\lambda^{arith}(s,t)^{\alpha+\beta}\left(\frac{s}{ax_{0}}\right)^{\alpha}\left(\frac{1-s}{by_{0}}\right)^{\beta}t$
$\displaystyle=$ $\displaystyle 1$

In short, the homotopy and geometric mixings have very convenient parametric
descriptions while the arithmetic mixing does not. There are several benefits
to having such a function $\lambda(s,t)$. Perhaps the most important reason is
that it allows for easy computation of quantity changes. Keep in mind that the
primary purpose of this work is to construct an automated market maker where
users can exchange currencies. A fundamental part of such a task is providing
the user with an estimate of the total cost of exchanging for a given amount
of the desired. This is non-trivial because the AMM is defined implicitly, so
efficient computation is key here.

|  |
---|---|---
|  |
|  |
Figure 2: Comparison of arithmetic, geometric, and homotopy curves where each diagram has the same value of $t$ but different curve types. Important observations include: (1) arithmetic supports a finite range of exchange rates that increases in size with $t$, (2) geometric and homotopy support all exchange rates, and (3) the exchange rate of homotopy the most stable of the three types for each fixed value of $t$. |  |
---|---|---
|  |
|  |
Figure 3: Comparison of arithmetic, geometric, and homotopy curves where each
diagram is of one type at multiple values of $t$. Important observations
include: (1) price stability decreases and impermanent loss gets worse as $t$
increases for all three curve types, and (2) curves are more evenly
distributed between CSMM and CPMM in homotopy than they are for geometric.

###  3.2 Ability to Provide Liquidity

The CSMM and CPMM curves have several important differences, but perhaps the
most significant is the range of exchange rates that each is able to support.
One of the main defining characteristics of a CPMM is its ability to provide
liquidity at all possible exchange rates. In such a market, as the quantity of
an item goes down to zero it becomes asymptotically more valuable; this item
will never be fully extracted because its exchange rate gets arbitrarily
large. In contrast, a CSMM only supports a single exchange rate; one can see
this by the fact that the slope of the CSMM curve is constant. As one might
expect, these mixed curves will exhibit behavior that is somewhere in between
these two extremes.

Another benefit of this $\lambda(s,t)$ function is that one can examine the
asymptotic behavior near the endpoints of mixed curves; such asymptotes are
related to the derivatives of the curve and therefore the range of exchange
rates supported by the AMM. For example, when $s=0$ or $1$ and $t=0$ then the
corresponding points are the endpoints of the CSMM line segment; these points
are finitely far away from the origin therefore $lim_{s\rightarrow
0^{+}}\lambda(s,0)$ and $lim_{s\rightarrow 1^{-}}\lambda(s,0)$ must be finite
for all three types of $\lambda$ functions. On the other hand, these same
limits for $\lambda(s,1)$ must approach infinity because the CPMM “endpoints”
are infinitely far away due to being the asymptotes of a hyperbola.

It is important to examine the behavior of these limits when $0<t<1$.
Thankfully, the asymptotes in Figures 2 and 3 make this more clear and show
that the following limits hold:

$\begin{array}[]{ccccc}lim_{s\rightarrow
0^{+}}\lambda^{arith}(s,t)<\infty&&lim_{s\rightarrow
0^{+}}\lambda^{geo}(s,t)=\infty&&lim_{s\rightarrow
0^{+}}\lambda^{hom}(s,t)=\infty\\\ lim_{s\rightarrow
1^{-}}\lambda^{arith}(s,t)<\infty&&lim_{s\rightarrow
1^{-}}\lambda^{geo}(s,t)=\infty&&lim_{s\rightarrow
1^{-}}\lambda^{hom}(s,t)=\infty\end{array}$

One might expect that the limits in the homotopy case would be infinite
because $\lambda^{hom}$ will describe a weighted average between a finite
value and infinity; the other cases are less intuitive without the figures.

In short, the above limits show that arithmetic mixings share the CSMM
property of not always being able to provide liquidity, and they also show
that geometric and homotopy mixings more closely resemble a CPMM in this
respect. Thus, these latter two mixings are better able to match a wide range
of exchange rates and this affects how arbitrageurs interact with these
markets.

###  3.3 Exchange Rate Level Independence for Impermanent Loss

The idea of impermanent loss is that liquidity providers for AMMs can be
disincentivized from investing due to changes in exchange rates. Suppose the
initial quantities of assets provided to the AMM by the investor are
$X^{i}=(x_{1}^{i},...,x_{n}^{i})$ and their initial prices are
$P^{i}=(p_{1}^{i},...,p_{n}^{i})$. After a period of time, the investor may
want to withdraw their percent ownership of the AMM and reclaim their assets.
Due to changes in the market state, they will be able to obtain quantities
$X^{f}=(x_{1}^{f},...,x_{n}^{f})$ of each currency and their respective prices
would be $P^{f}=(p_{1}^{f},...,p_{n}^{f})$. The initial value of their assets
is given by $P^{i}\cdot X^{i}$ and the final value of their assets is
$P^{f}\cdot X^{f}$. However, one can also consider the value they would have
had if they’d simply held onto their assets instead of investing; in that
case, their held asset value would be $P^{f}\cdot X^{i}$. The reader can refer
to [TPL22] for more details, but the equation for impermanent loss is as
follows:

$IL=\frac{P^{f}\cdot X^{f}}{P^{f}\cdot X^{i}}-1$ (8)

Roughly speaking, impermanent loss compares the relative values of investing
and holding assets. One can show that the impermanent loss is always less than
or equal to $0$ and becomes more negative as prices drift further from initial
values. In other words, the investor has no reason to provide liquidity for
the AMM unless they benefit from collection of transaction fees that cancel
out the difference in these two values.

Figures 2 and 3 demonstrate the impermanent loss curves for the mixed AMMs.
There are several aspects of these figures that are worth noting. First, all
curves demonstrate the property that impermanent loss is worse the more the
exchange rates change from the initial state at the time of investment.
Second, the curves closer to CPMM with larger values of $t$ have less severe
impermanent loss than those close to CSMM. Third, it is common practice to
describe impermanent loss in terms of exchange rates even though the above
formula for $IL$ is in terms of prices and quantities.

An AMM is “exchange rate level independent” (i.e. ERLI) if its equation for
impermanent loss can be written purely in terms of the ratios of final to
initial exchange rates of the currencies in the market. The paper [TPL22]
gives a variety of lemmas and theorems related to when an AMM is ERLI; note
that many of these statements relate to homogeneity. However, the application
of these claims to the equations of Table 1 show that none of the three
mixings satisfy this condition when $0<t<1$ and therefore none of these
mixings are ERLI.

###  3.4 Slippage and Exchange Rate Stability

Perhaps the central purpose of a platform like Stableswap is to ensure that
AMM exchange rates closely match external exchange rates when there are small
changes in AMM currency quantities. A CSMM is the best in this respect; the
exchange rate is fixed regardless of the quantities of currencies. On the
other hand, even relatively small transactions can have sizable affects on
exchange rates in a CPMM. This price stability is relevant for users of the
AMM because it helps to minimize price slippage (i.e. the difference between
the price users expect and the actual price given by a variety of factors).

It is important to keep in mind that there is a distinction between internal
and external changes in exchange rate. Stability in internal exchange rates
must be balanced with the ability to provide liquidity at a variety of
exchange rates. For example, the CSMM is completely stable with respect to
internal changes but can only support a single external exchange rate; if the
internal and exchange exchange rates don’t match then arbitrageurs will
completely drain the currency that the AMM undervalues and thereby shut down
the usefulness of the AMM. As discussed above, a CPMM is different and can
support the providing of liquidity at any exchange rate.

|
---|---
|
Figure 4: Comparison of exchange rate stability in the three mixed curves.
(Top) These images all have the same value of $t$. Homotopy is the most stable
for small changes but the least stable for larger ones. Geometric is the least
stable for small changes. Arithmetic is the most stable for large changes.
(Bottom) These images all have the same derivative for exchange rate at the
initial point. For both small and large changes, arithmetic is the most stable
while homotopy is the least stable. The arithmetic and geometric curves will
always have the same derivative here, but homotopy will be different. Note
that the value of $0.1817$ for $t$ was determined empirically for this figure.

With that in mind, the diagrams in Figures 2 and 3 show the relative
stabilities of the three mix types. For small changes in quantity at a fixed
shared value of $t$, the homotopy curve $A_{t}^{hom}(x,y)$ is the most stable
and the geometric curve $A_{t}^{geo}(x,y)$ is the least stable. On the other
hand, the arithmetic curve $A_{t}^{arith}(x,y)$ is the most stable for large
changes and the homotopy curve $A_{t}^{hom}(x,y)$ is the least. In short, each
mixing type appears to have its own unique levels of stability in different
regions of the market state. These ideas are also demonstrated in a more
direct way in Figure 4.

|  Arithmetic |  Geometric |  Homotopy
---|---|---|---
Closer to CSMM or CPMM |  CSMM |  CPMM |  CPMM
Ability to provide liquidity |  Can fail to provide liquidity |  Always provides liquidity |  Always provides liquidity
ERLI? |  No |  No |  No
Stability for fixed $t$ |  Most stable for large changes |  Least stable for small changes |  Most stable for small changes, least stable for large changes
Stability for fixed exchange rate derivative |  Most stable |  Mid-stability |  Least stable
Table 2: Summary of the comparison of the three mixing types.

##  4 Advanced Homotopy Construction

There are two important methods for creating more advanced and dynamic
behavior in these homotopy AMMs. As an example, it is possible to think of the
parameter $t$ as a function of $x$ and $y$ in order to create a non-uniform
homotopy between $A_{0}(x,y)$ and $A_{1}(x,y)$. A practical example of this
appears for Stableswap in [Ego19]. Recall that the defining equation there is

$\chi D^{n-1}\sum_{j=1}^{n}x_{j}+\prod_{j=1}^{n}x_{j}=\chi
D^{n}+\left(\frac{D}{n}\right)^{n}$

where initial values $X^{i}=(x_{1}^{i},...,x_{n}^{i})$ are chosen such that
$x_{j}^{i}=\frac{D}{n}$ for each $j$. Initially there is the equality
$\prod_{j=1}^{n}x_{j}^{i}=\left(\frac{D}{n}\right)^{n}$, but as the market
state falls out of this initial balance the equality will be less and less
exact. The proposed solution to counter this lack of balance is to dynamically
adjust the leverage parameter $\chi$. For some fixed choice of $A$, the value
of of $\chi$ is given by

$\chi=A\frac{\prod_{j=1}^{n}x_{j}}{\left(\frac{D}{n}\right)^{n}}$

When this is substituted into the above equation, the curve is now defined by
the following:

$An^{n}\sum_{j=1}^{n}x_{j}+D=ADn^{n}+\frac{D^{n+1}}{n^{n}\prod_{j=1}^{n}x_{j}}$

To get more specific with this construction, let’s take $n=2$ and turn to the
above equations as well as those for the homotopy mixing curves:

$\displaystyle\chi$ $\displaystyle=$ $\displaystyle\frac{4Axy}{D^{2}}$
$\displaystyle t$ $\displaystyle=$ $\displaystyle\frac{D^{2}}{16Axy+D^{2}}$
$\displaystyle A_{t}^{hom}(x,y)$ $\displaystyle=$
$\displaystyle\frac{D(1-t)}{x+y}+\frac{Dt}{2\sqrt{xy}}$

The above gives a fixed rule for dynamically updating the value of $t$ as the
state $(x,y)$ of the AMM changes. Substituting this function for $t$ into
$A_{t}^{hom}(x,y)=1$ yields the following curve:

$\frac{16ADxy}{x+y}+\frac{D^{3}}{2\sqrt{xy}}=16Axy+D^{2}$

As Figure 5 demonstrates, this new curve represents a homotopy between the
CSMM and CPMM where the rate of transition from one to the other is non-
uniform over the curve. Note that it is possible to solve for $t$ as a
function of only $s$, but the result is a rather complicated formula and is
not worth presenting here.

|
---|---
Figure 5: Comparison of the Stableswap non-uniform homotopy curve with a
uniform homotopy curve. The left image is the majority of the curve; the right
image is a zoomed in section that demonstrates how no single value of $t$
captures the behavior of the Stableswap curve.

###  4.1 Constructing Specific Non-Uniform Homotopy Behavior

The original definition of the homotopy mixing curve $A_{t}^{hom}(x,y)$
assumed that $t$ was a uniform constant. However, the above Stableswap
construction demonstrates that interesting behavior can appear when $t$ is
non-uniform and is taken to be a function of other variables ([Ego19]). The
purpose of this section is (1) to argue that taking $t$ to be a function of
$s$ is a naturally powerful way for designing non-uniform homotopy curves, (2)
to provide required conditions on this function $t(s)$ to ensure the resulting
curve satisfies the axioms of an AMM, and (3) to demonstrate examples of
interesting curves using this construction.

In Section 2, a method for parametrizing the family of homotopy AMM curves is
presented. In particular, a choice of values of $s$ and $t$ returns a point
$(x,y)$ according to the following equation:

$\displaystyle(x,y)$ $\displaystyle=$
$\displaystyle\left((ax_{0}+by_{0})(1-t)+\left(\frac{x_{0}}{x}\right)^{\frac{\alpha}{\alpha+\beta}}\left(\frac{y_{0}}{y}\right)^{\frac{\beta}{\alpha+\beta}}t\right)\left(\frac{s}{a},\frac{1-s}{b}\right)$
$\displaystyle=$
$\displaystyle\left(\left(\left(\frac{x_{0}}{x}\right)^{\frac{\alpha}{\alpha+\beta}}\left(\frac{y_{0}}{y}\right)^{\frac{\beta}{\alpha+\beta}}-(ax_{0}+by_{0})\right)t+(ax_{0}+by_{0})\right)\left(\frac{s}{a},\frac{1-s}{b}\right)$

$\implies\lambda(x,y)=\left(\left(\frac{x_{0}}{x}\right)^{\frac{\alpha}{\alpha+\beta}}\left(\frac{y_{0}}{y}\right)^{\frac{\beta}{\alpha+\beta}}-(ax_{0}+by_{0})\right)t+(ax_{0}+by_{0})$

This idea is further developed using the fact that $s=\frac{ax}{ax+by}$,
meaning that an entire curve is simply given by a single value of $t$. The
above introduction discusses how one can think of the Stableswap curve in this
context by taking $t$ to be a function of $x$ and $y$. However, this section
reduces the system to a single parameter by taking $t$ to be a function of $s$
directly. Of course, because $s$ can be determined by $x$ and $y$ the result
is practically no different. The advantage of this new perspective it that it
helps in designing more predictable behavior.

$\displaystyle A^{hom}(x,y)$ $\displaystyle=$
$\displaystyle\left(\frac{ax_{0}+by_{0}}{ax+by}\right)\left(1-t\left(\frac{ax}{ax+by}\right)\right)+\left(\frac{x_{0}}{x}\right)^{\frac{\alpha}{\alpha+\beta}}\left(\frac{y_{0}}{y}\right)^{\frac{\beta}{\alpha+\beta}}t\left(\frac{ax}{ax+by}\right)$
$\displaystyle=$
$\displaystyle\left(\left(\frac{x_{0}}{x}\right)^{\frac{\alpha}{\alpha+\beta}}\left(\frac{y_{0}}{y}\right)^{\frac{\beta}{\alpha+\beta}}-\frac{ax_{0}+by_{0}}{ax+by}\right)t\left(\frac{ax}{ax+by}\right)+\frac{ax_{0}+by_{0}}{ax+by}$

In the development of this paper, it became apparent that even simple
equations for $t(s)$ can sometimes fail to provide proper AMMs; the repeated
issue is that the curve can fail to be convex but it was unclear why this was
happening. The goal here is to provide a simple condition on $t(s)$ to ensure
that the resulting AMM is convex. The second derivative of this curve must be
computed to find the necessary condition because a twice differentiable
function is convex if and only if its second derivative is non-negative.

To find this second derivative, note that the above equation for
$A^{hom}(x,y)$ gives an implicit definition of the curve. In general it is not
possible to solve for $y$ as a function of $x$, but it is still possible to
implicitly compute the first and second derivatives of this homotopy curve.
For these computations think of $x$ and $y$ as functions of $s$ and use the
following shorthand for simplicity:

$\displaystyle C=ax_{0}+by_{0}$ $\displaystyle
P(s)=\left(\frac{ax_{0}}{s}\right)^{\frac{\alpha}{\alpha+\beta}}\left(\frac{by_{0}}{1-s}\right)^{\frac{\beta}{\alpha+\beta}}$

Next, denoting $\lambda(s)=\lambda^{hom}(s)$ and differentiating yields the
following:

$\displaystyle\lambda(s)$ $\displaystyle=$ $\displaystyle(P(s)-C)t(s)+C$
$\displaystyle\lambda^{\prime}(s)$ $\displaystyle=$
$\displaystyle(P(s)-C)t^{\prime}(s)+P^{\prime}(s)t(s)$ $\displaystyle=$
$\displaystyle(P(s)-C)t^{\prime}(s)-\frac{\alpha(1-s)-\beta
s}{s(1-s)(\alpha+\beta)}P(s)t(s)$ $\displaystyle\lambda^{\prime\prime}(s)$
$\displaystyle=$
$\displaystyle(P(s)-C)t^{\prime\prime}(s)+2P^{\prime}(s)t^{\prime}(s)+P^{\prime\prime}(s)t(s)$
$\displaystyle=$
$\displaystyle(P(s)-C)t^{\prime\prime}(s)-2\frac{\alpha(1-s)-\beta
s}{s(1-s)(\alpha+\beta)}P(s)t^{\prime}(s)$
$\displaystyle+\frac{2\alpha^{2}(1-s)^{2}+\alpha\beta(1-2s)^{2}+2\beta^{2}s^{2}}{s^{2}(1-s)^{2}(\alpha+\beta)^{2}}P(s)t(s)$

The functions $x=x(s)$ and $y=y(s)$ and their derivatives can now be written
in terms of $\lambda$ and its derivatives:

$\displaystyle x(s)=\frac{s}{a}\lambda(s)$ $\displaystyle
y(s)=\frac{1-s}{b}\lambda(s)$ $\displaystyle
x^{\prime}(s)=\frac{1}{a}\lambda(s)+\frac{s}{a}\lambda^{\prime}(s)$
$\displaystyle
y^{\prime}(s)=-\frac{1}{b}\lambda(s)+\frac{1-s}{b}\lambda^{\prime}(s)$
$\displaystyle
x^{\prime\prime}(s)=\frac{2}{a}\lambda^{\prime}(s)+\frac{s}{a}\lambda^{\prime\prime}(s)$
$\displaystyle
y^{\prime\prime}(s)=-\frac{2}{b}\lambda^{\prime}(s)+\frac{1-s}{b}\lambda^{\prime\prime}(s)$

One can show that the following equations hold as definitions for implicit
derivatives in this case:

$\displaystyle\frac{dy}{dx}(s)$ $\displaystyle=$
$\displaystyle\frac{y^{\prime}(s)}{x^{\prime}(s)}$
$\displaystyle\frac{d^{2}y}{dx^{2}}(s)$ $\displaystyle=$
$\displaystyle\frac{x^{\prime}(s)y^{\prime\prime}(s)-x^{\prime\prime}(s)y^{\prime}(s)}{x^{\prime}(s)^{3}}$

The equations for $x$ and $y$ in terms of $\lambda$ can be substituted in here
and result can be simplified:

$\displaystyle\frac{dy}{dx}(s)$ $\displaystyle=$
$\displaystyle\left(\frac{\lambda^{\prime}(s)}{\lambda(s)+s\lambda^{\prime}(s)}-1\right)\cdot\frac{a}{b}$
$\displaystyle\frac{d^{2}y}{dx^{2}}(s)$ $\displaystyle=$
$\displaystyle\frac{\lambda(s)\lambda^{\prime\prime}(s)-2\lambda^{\prime}(s)^{2}}{(\lambda(s)+s\lambda^{\prime}(s))^{3}}\cdot\frac{a^{2}}{b}$

Note that $b$ and $x^{\prime}(s)$ should always be positive by the
construction of the homotopy curve as an AMM. Thus, under these assumptions
the above can be distilled into a simple convexity condition in terms of
$\lambda$:

$A^{hom}(x,y)=1\text{\thinspace\thinspace\thinspace is convex if and only
if\thinspace\thinspace\thinspace$\lambda(s)\lambda^{\prime\prime}(s)\geq
2\lambda^{\prime}(s)^{2}\text{\thinspace\thinspace\thinspace for all
$s\in(0,1)$}$}$ (9)

The following is a summary of some basic examples of non-uniform homotopy
curves. These examples present a novel way to create specifically designed
behavior in the stability and overall shape of the curve. For these curves,
take $s_{0}=\frac{ax_{0}}{ax_{0}+by_{0}}$ to be the value of $s$ corresponding
to the initial point $(x_{0},y_{0})$.

  1. 1.

Denote $M=max(s_{0},1-s_{0})$. Take $K$ to be a “stability” parameter, where
$K\geq 0$ and larger values of $K$ give curves with higher price stability.
Then the following family of functions are always valid in that the resulting
$A^{hom}$ curves are convex:

$t(s)=\left|\frac{s-s_{0}}{M}\right|^{K}$

  2. 2.

Let $B$ be a “bias” parameter where $t(0)=B$ and $t(1)=1-B$. Let $T$ be a
parameter controlling $t$ at $s=s_{0}$, i.e. $t(s_{0})=T$. A parabolic
extension of this yields the following:

$t(s)=\frac{(1-2B)s_{0}+(B-T)}{s_{0}(1-s_{0})}s^{2}-\frac{(1-2B)s_{0}^{2}+(B-T)}{s_{0}(1-s_{0})}s+B$

The values of $B$ and $T$ must be chosen so that $0\leq t(s)\leq 1$ and so
that the test $\lambda(s)\lambda^{\prime\prime}(s)\geq
2\lambda^{\prime}(s)^{2}$ will hold for all $s\in(0,1)$; the equations for
this are complicated to write down, but these values can be easily verified
with simple code.

These curves are visualized in Figures 6 and 7 respectively.

|
---|---
Figure 6: Examples of symmetric non-uniform homotopy curves and their corresponding exchange rates. The parameter $K$ is thought of as a stability parameter where a larger value of $K$ forces the curve to more closely resemble a CSMM. When comparing to the homotopy curves of Figure 3, it is clear that the advantage of this non-uniformity is a much more stable exchange rate given changes in the quantities of currency. |
---|---
|
Figure 7: Examples of asymmetric non-uniform homotopy curves and their
corresponding exchange rate curves. (Left) The AMM curves demonstrate that a
high value of the bias parameter $B$ creates a curve where the behavior more
closely resembles a CSMM when the quantity of Currency 1 is higher than the
initial quantity. In addition, the parameter $T$ controls the overall
transition from CSMM to CPMM as the value of $t$ does in the uniform homotopy
case. (Right) The exchange rate curves demonstrate that the bias parameter
controls the exchange rate near the initial point. In particular, the exchange
rates to both the left and right of the initial point are lower for the
$B=0.2$ curve than they are for the $B=0.8$ curve.

###  4.2 Dynamic Adjustments to Match External Prices

One key point of this construction is that the exchange rate is designed to be
stabilized about the exchange rate of the initial point. There are other
constructions that do this as well, particularly in the area of AMMs used for
stablecoins. For example, the Curve v1 system from the Stableswap white paper
[Ego19] was designed to always be stabilized to any equal amount of each
currency; this is seen by the fact that each value is initialized to
$x_{j}^{i}=\frac{D}{n}$. The follow up paper [Ego21] for Curve v2 allows for
stabilizing around arbitrary states.

One potential function to add into this homotopy model is the ability to
dynamically adjust the stabilized exchange rate of the model. Recall that the
initial state of the model is given by $(x_{0},y_{0})$ and that the initial
internal exchange rate of the price of Currency 1 in terms of Currency 2 is
given by $\frac{a}{b}$. If the the current state of the AMM given by
$A^{hom}(x,y)=1$ is $(x_{1},y_{1})$ then the current internal exchange rate of
the system is given by the following:

$\text{current internal exchange
rate\thinspace\thinspace\thinspace}=\frac{\frac{\partial A^{hom}}{\partial
x}(x_{1},y_{1})}{\frac{\partial A^{hom}}{\partial y}(x_{1},y_{1})}$

In principal, the internal exchange rate of the system is driven by the
external exchange rate; arbitrageurs will tend to make exchanges biased toward
shifting the two exchange rates together. If the current internal exchange
rate gets too far away from the initial exchange rate then the system could
become unstable. One way to try to relieve this pressure is to update the
curve itself; one could (1) update the initial point to be $(x_{1},y_{1})$,
(2) choose new $a$ and $b$ so that $\frac{a}{b}$ is equal to the external
exchange rate, and (3) update the values of $\alpha$ and $\beta$ accordingly.

As a note before proceeding, the notion of slippage is used precisely here and
should be defined. Let $p_{1}$ denote the current internal exchange rate or
“estimated spot price”. Suppose a transaction in the AMM moves the state from
$(x_{1},y_{1})$ to $(x_{2},y_{2})$. The “actual spot price” would then be
given by $p_{2}=-\frac{y_{2}-y_{1}}{x_{2}-x_{1}}$. Slippage here is defined to
be

$\text{slippage}=\left|\frac{\text{estimated spot price}-\text{actual spot
price}}{\text{estimated spot
price}}\right|=\left|\frac{p_{1}-p_{2}}{p_{1}}\right|$ (10)

In other words, slippage is taken to be the magnitude of the percent
difference between the estimated and actual spot prices of the transaction.
This definition is used because the notion of stability for a homotopy curve
is the ability of the curve to maintain the initial exchange rate given small
changes in currency quantity in the AMM; a very stable curve should have very
small differences in spot prices when in the stable region of the curve.

Simulations show that a curve with high price stability will reduce slippage
when near the stable point but also make it more difficult for the AMM to
match the external exchange rate. The goal of these simulations was to have a
very rough approximation of arbitrageurs attempting to match external exchange
rates in a non-uniform homotopy AMM. Note that the exact parameters for this
simulation are fairly simplistic and arbitrary; however, changing these
parameters did not yield significantly different takeaways. These simulations
were run with the following conditions:

  * •

each simulation ran for $500$ time steps

  * •

the initial state was always set to be $(3000,1000)$

  * •

a randomly generated external exchange rate curve is reused every simulation
where

    * –

the initial exchange rate was set to $0.5$

    * –

the exchange rate could increase or decrease by up to $20\%$ every $80$ time
steps

  * •

$t(s)=\left|\frac{s-s_{0}}{M}\right|^{K}$ was used where $K$ was equal to $8$
times a stability parameter between $0$ and $1$

  * •

users could extract up to $2\%$ of the total amount of that currency in the
AMM with each transaction

  * •

transactions favored moving the internal exchange rate toward the external
exchange rate with a likelihood of $90\%$

  * •

the underlying curve parameters where never updated over the course of the
simulation

A future goal for this work is to create more sophisticated simulations with a
more in-depth analysis of non-uniform homotopy curve behavior.

|  |
---|---|---
Figure 8: The stabilities used were all multiples of $0.05$ between $0.05$ and
$0.95$ inclusive. Each stability was run $100$ times and the results were
averaged to create this figure. (Left) Mean-squared difference between the
internal and external rates as a function of the stability. This demonstrates
that the arbitrageurs have a harder time matching external exchange rates when
the stability of the AMM is high. (Center) The quantities and exchange rate
remain close to the initial values in the first $100$ time steps. Higher price
stability in this region of the curve means that price slippage is lower.
(Right) The homotopy curve model can support any exchange rate, but stability
is lost as the exchange rate diverges from the initial one. By time step $500$
the external exchange rate has changed too much and the stability is lost, and
this loss is more prevalent the higher this original stability was; this is an
argument for why dynamically adjusting the curve is important.

##  5 Portfolio Value Functions and Stability

As introduced in [AEC21] and discussed in [TPL22], there is an elegant
mathematical relationship between AMMs and their corresponding portfolio value
functions. For completeness, an adapted version of that work is presented
here. Suppose $P=(p_{1},...,p_{n})$ is a price vector and the AMM is defined
by $A(x_{1},...,x_{n})=k$ using the function
$A:\mathbb{R}_{>0}^{n}\rightarrow\mathbb{R}$. The value of the portfolio at
the price vector $P$ is defined to be

$V(P)=inf\\{P\cdot X:A(X)=k\\}$ (11)

The idea of this definition is that arbitrageurs will extract value from the
market by making transactions that adjust the currency balances; this process
continues until the value remaining in the market has been minimized and the
arbitrageurs can’t extract any more.

There are a couple observations to make regarding the properties of this
function. First, the use of Lagrange multipliers shows that if the function
$A$ is differentiable then $P$ will be parallel to $\nabla A(X)$; i.e. one
must find the point on the AMM where the price vector is normal to the surface
at that point. This provides a nice geometric description of the solution to
this minimization problem. Second, as pointed out in [TPL22], one may think of
the portfolio value function as being related to a Legendre transformation.
One definition of this transformation is as follows. Suppose
$f:(a,b)\rightarrow\mathbb{R}$ is a differentiable function; the Legendre
transformation of $f$ (if it exists) is denoted by $f^{*}$ and satisfies the
property that $(f^{*})^{\prime}$ is the inverse of $f^{\prime}$. Note that
convexity of $f$ is enough to guarantee that such a transformation exists. To
see how portfolio value functions and Legendre transformations are related by
an example:

  * •

Suppose $f:(a,b)\rightarrow\mathbb{R}$ satisfies the property $A(x,f(x))=k$

  * •

The value at price vector $(p,q)$ is given by

$\displaystyle V(p,q)$ $\displaystyle=$ $\displaystyle
inf\\{px+qy:A(x,y)=k\\}$ $\displaystyle=$ $\displaystyle
inf\\{px+qf(x):x\in(a,b)\\}$

  * •

In order to minimize the function $g(x)=px+qf(x)$:

$g^{\prime}(x)=p+qf^{\prime}(x)=0\implies f^{\prime}(x)=-\frac{p}{q}$

  * •

By assumption $f^{\prime}$ is invertible and therefore

$x=(f^{\prime})^{-1}\left(-\frac{p}{q}\right)=(f^{*})^{\prime}\left(-\frac{p}{q}\right)$

  * •

Denoting $\mathcal{L}=f^{*}$ for simplicity, $V(p,q)$ can be written using the
Legendre transformation:

$V(p,q)=p\mathcal{L}^{\prime}\left(-\frac{p}{q}\right)+qf\left(\mathcal{L}^{\prime}\left(-\frac{p}{q}\right)\right)$
(12)

These two notions are closely related in a broader context for more general
AMMs but that material will not be presented here.

One relevant simplification is made to the portfolio value function in [AEC21]
and [TPL22]. It is clear that $V(P)$ is $1$-homogeneous because if $\lambda>0$
then

$\displaystyle V(\lambda P)$ $\displaystyle=$ $\displaystyle inf\\{\lambda
P\cdot X:A(X)=k\\}$ $\displaystyle=$ $\displaystyle\lambda\cdot inf\\{P\cdot
X:A(X)=k\\}$ $\displaystyle=$ $\displaystyle\lambda V(P)$

Thus, it makes sense to rewrite the function in a way that extracts only the
relevant information. The reduced portfolio value function
$U:\mathbb{R}_{>0}^{n-1}\rightarrow\mathbb{R}$ is defined to satisfy the
following property:

$V(p_{1},...,p_{n})=p_{n}U\left(\frac{p_{1}}{p_{n}},...,\frac{p_{n-1}}{p_{n}}\right)$
(13)

In other words, $V$ is defined in terms of prices $p_{i}$ while $U$ is defined
in terms of exchange rates $r_{i}$ (where the $n^{th}$ currency is thought of
as the numÃ©raire) ([AEC21]). It is clear that
$U(r_{1},...,r_{n-1})=V(r_{1},...,r_{n-1},1)$ and therefore this offers the
convenience of being easily graphed in the $2$-dimensional case (see Figure
9).

|  |
---|---|---
Figure 9: (Left) Reduced portfolio value functions of uniform homotopy curves
$A_{t}^{hom}(x,y)=1$ for different stability values. Note that stability here
is equal to $1-t$; thus, stabilities of $0$ and $1$ correspond to CPMM and
CSMM respectively. (Middle and Right) Portfolio value functions of asymmetric
non-uniform homotopy curves $A^{hom}(x,y)=1$ where
$t(s)=\frac{(1-2B)s_{0}+(B-T)}{s_{0}(1-s_{0})}s^{2}-\frac{(1-2B)s_{0}^{2}+(B-T)}{s_{0}(1-s_{0})}s+B$.
The middle and right figures have $B=0.2$ and $0.8$ respectively. The value of
$T$ is given by $0.9*(1-\text{stability})+0.1*\text{stability}$. These curves
demonstrate that (1) an increase in stability causes a decrease in value and
(2) an increase in bias causes an increase in value.

As far as the mixing curves are concerned, the above Figure 9 demonstrates the
effects that stability has on the portfolio value functions. The most notable
phenomenon is the fact that the portfolio value increases as the stability
decreases. To see why this is the case, note that Figure 10 shows the
following rather non-intuitive fact; given a fixed price vector $P$, the point
$X$ where $A_{t}^{hom}(X)=k$ and $\nabla A_{t}^{hom}(X)=\lambda P$ will be
closer to the initial point $X_{0}$ when stability is lower. In other words,
one must be careful when thinking about the meaning of stability. An increase
in stability means that a change in quantity vector $X$ results in a smaller
change in the corresponding price vector $P$. Conversely, a decrease in
stability means that a change in price vector $P$ results in a smaller change
in the corresponding quantity vector $X$. Because lower stability means higher
slippage, the takeaway here is that (1) an AMM with higher slippage will tend
to have higher portfolio value functions and (2) AMMs with greater sensitivity
to user behavior are better able to hold value. Further work is needed to show
that this notion holds true in a broader context, but this and Figure 10 are
helpful in initial understanding.

Figure 10: A visual demonstration of why lower stability results in an
increase in the portfolio value function. $X_{1}$ and $X_{2}$ are the vectors
pointing to the locations on the AMM curves where the gradient is parallel to
the price vector $P$, and therefore these are the locations that minimize the
remaining value in the market. This figure shows that a decrease in stability
moves the minimizing point closer to the initial point $X_{0}$. The claim is
that the lower stability curve has a higher value, i.e. $P\cdot X_{1}>P\cdot
X_{2}$. This is equivalent to the condition that $P\cdot(X_{1}-X_{2})>0$, and
the pair of arrows in the upper right indicate that this is indeed the case
(since the angle between them is less than $90^{\circ}$).

##  6 Conclusion

This work presents a novel method for blending the benefits of constant sum
and constant product market makers. In particular, the non-uniform homotopy
construction of a CSMM-to-CPMM blend opens many doors for designing
interesting and intuitive AMM behavior. The homotopy construction gives a very
concrete geometric meaning to $t$ as the blending weight. The $\lambda(s,t)$
homotopy parametrization allows for very exact computations and prevents drift
due to rounding errors. In addition, thinking of $t$ as a function of $s$
allows for easy customizability of non-uniform curves. More investigation is
needed to see the full behavior of these non-uniform curves, but already it is
clear that the balance between stability and slippage is significant factor in
designing market makers.

Future directions for this work include a variety of possible options. There
are many designs and behavior types to consider in designing new non-uniform
homotopy markets, especially in a higher dimensional setting. There is plenty
of room for more sophistication in the models weighing the balance of
stability and slippage. Determining how to algorithmically and dynamically
adjust the parameters of the AMM could be helpful in maintaining stable
behavior even under large external price changes. Portfolio value function
behavior as it relates to AMM parameters like stability and bias should be
investigated in more depth. In short, this work lays a foundation for the
initial design of a new class of market makers with a wide variety of possible
desired behaviors.

## References

  * [AEC21] Angeris, Guillermo; Evans, Alex; Chitra, Tarun: Replicating Market Makers. March 26, 2021 (accessed November 17, 2021)
  * [Ego19] Egorov, Michael: StableSwap - efficient mechanism for Stablecoin liquidity. November 10, 2019 (accessed November 5, 2021)
  * [Ego21] Egorov, Michael: Automatic market-making with dynamic peg. June 9, 2021 (accessed November 10, 2021)
  * [EH21] Engel, Daniel; Herlihy, Maurice: Composing Networks of Automated Market Makers. August 31, 2021 (accessed November 18, 2021)
  * [TPL22] Tiruviluamala, Neelesh; Port, Alexander; Lewis, Erik: A General Framework for Impermanent Loss in Automated Market Makers. March 23, 2022 (arXiv:2203.11352)


††thanks<EMAIL_ADDRESS>
# Dynamics and frictional dissipation from walking in puddles

Chung-Hao Chen, Zong-Rou Jiang, and Tzay-Ming Hong<EMAIL_ADDRESS>Department of Physics, National Tsing Hua University, Hsinchu, Taiwan 30013,
Republic of China

###### Abstract

Liquid columns lifted on an infinite pool is a problem that has long been an
interest. However, most of the studies didn't take into consideration that the
top of the liquid column can contract. This effect is especially important
when the pulling speed is low so that the lifting process can be seen as a
quasi-static motion. In this study, we have found 3 stages when the liquid
column is lifted up.

††preprint: APS/123-QED

##  I  Introduction

Stretching a liquid column is a common phenomenon in ordinary life. Examples
such as shoes leaving a puddle, dogs or cats drinking water[1], Jesus lizard
walking on a pond[2], or even the process of roller printing[3]. Due to
academic interests and application value, systems such as a liquid column
stretched by a cylinder were studied intensely previously. The stability
condition of liquid columns was first studied in 1973 by J. F. Padday. et al.
[4] The stability condition of a liquid column formed by withdrawing a wetted
rod from a free liquid surface was discussed. Shape factor $\beta^{\prime}$
was introduced to determine the threshold height for the liquid column being
unstable. However, the physical picture behind these conditions was not well
understood.

In 1989, Ashutosh Sharma and Eli Ruckenstein [6] conducted a study on the
stability condition of a hole in a liquid sheet, which can be seen as an
inverse scenario of a stretching liquid column. By using the free energy
approach, they find out the threshold radius that determines whether the hole
shrinks or expands in a given thickness of the liquid sheet. They first
mention that the qualitative characteristics can be obtained by treating the
hole as a cylinder with the same radius when calculating free energy. However,
the relation between threshold radius and thickness is still only determined
by numerical approach as the analytical solution is only obtained in some
special cases such as neglecting gravity force. In 1997, G. Debregeas and F.
Brochard-Wyar[7] examined the threshold radius predicted by Taylor and Michael
for a liquid column between a plate and pool to expand or shrink. However,
most of them assume the top of the water column is fixed.[9] Recently in 2013,
E. S. Benilov[8] took into consideration the extra degree of freedom that the
top of water column $R_{t}$ is not fixed. However, they made a wrong
prediction and didn't study the motion in the unstable stage. In our
experiment, we not only find the threshold height $H^{\star}$ that the water
column begins to be unstable but the relation between $H^{\star}$ and cylinder
diameter $R$. Furthermore, we have found it has two different motions in an
unstable stage. 1. The Water column shrinks but keeps the shape of the surface
the same. Shrinking speed of $R_{t}$ and the neck $R_{min}$ are the same. 2.
After a specific time duration, $R_{t}$ will stop shrinking, resulting in an
even faster pinch-off of the neck. The scaling laws and self-similarity are
also examined.

[scale=0.35]experimental_setup.png

Figure 1: A water column of height $H$ is generated when an aluminum cylinder
is pulled out of the pool. While $\theta$ and $r_{t}$ denote the contact angle
and radius at the top of the water column, $r_{m}$ and $z_{m}$ are the radius
and height at its neck.

In the experiment, we observed that the boundary of the interface between
liquid and metal cylinder $r_{top}$ will only start to shrink when the lifted
height exceeds a threshold height $H\star$. In the shrinking process, the
shrinking speed of $r_{top}$ and the neck with minimum radius $r_{min}$ are
the same. When $r_{top}$ is equal to a specific diameter $r_{c}$, it stops
shrinking. The kinetic energy suddenly goes to $r_{min}$ and $r_{min}$ begin
to pinch off and form a liquid jet that penetrates into the water's surface.

##  II Experimental Setup and results

We use aluminum cylinders of 14 different diameters ranging from 1 to 26 mm.
Initially dipped in the water pool, the cylinder is raised at a constant speed
as slow as 0.5 mm/s by a stepper motor to form a water column when pulled
above the pool surface, as shown in Fig. 1. The levelness of the cylinder is
checked by the level gauge attached at its top. In the meantime, we employ a
high-speed camera with 8000 fps to capture the evolution of the column
profile.

[scale=0.43]cylinder_time_series.png

Figure 2:  The profile of the water column goes through three stages: (a)
$r_{t}$ remains fixed at $R$ as $H$ is raised, (b) $r_{t}$ starts shrinking
after $H$ reaches and is kept at $H^{\star}$ \- last for about 0.1$\sim$0.3 s,
and (c, d) $r_{t}$ appears to stop shrinking at $r_{c}$, while the column
starts to pinch off - last for about 0.004$\sim$0.006 s.

As shown in Fig. 2, the profile of the water column undergoes three stages
from being reversible in (a) to being irreversible in (b) and (c, d), which we
shall denote by stages I, II, and III. The threshold height $H^{\star}$ that
marks the transition from stage I to II is plotted as a function of $R$ in
Fig. 3 that appears to level off at large $R$. We also record how $r_{t}$
shrinks with time $t$ in stage II in Fig. 4 for three different sizes of
cylinders. The constant upper radius $r_{c}$, characteristic of stage III, is
found to increase like $H^{\star}$ when we substitute with a larger cylinder.
Their values for different $R$ are collected and plotted in Fig. 5.

[scale=0.35]H_star_vs_R.png

Figure 3: Threshold height $H^{\star}$ vs. $R$. The red solid line represents
the theoretical prediction of Eq.(3).

[scale=0.37]R_top_vs_t.png

Figure 4: The $r_{t}$ shrinks with $t$ in stage II for $R$=5, 7, 9, 11, and 13
mm. The red solid lines are fitting from the prediction in Eq.(5).

[scale=0.37]rc_vs_H_star.png

Figure 5: A wider cylinder renders larger $H^{\star}$ and $r_{c}$ values,
whose relationship follows excellently the red solid line predicted by
Eq.(20).

##  III Theoretical models

###  III.1 Stage I: reversible

An analytic expression of $H^{\star}$ is possible by optimizing the total
energy of the system with respect to $r_{t}$:

$E_{\rm total}=2\pi r_{t}H\sigma_{lg}+\pi r^{2}_{t}\rho
g\frac{H^{2}}{2}+(\sigma_{ls}-\sigma_{gs}-\sigma_{lg})\pi r^{2}_{t}$ (1)

where the water column has been approximated by a uniform cylinder, and
$\sigma_{lg}$, $\sigma_{ls}$, and $\sigma_{gs}$ are the surface tension
constant for liquid-vapor, liquid-solid, and vapor-solid interfaces. We know
from Young's formula that
$\Delta\sigma\equiv\sigma_{gs}+\sigma_{lg}-\sigma_{ls}$ is positive definite.
Therefore, the quadratic equation of Eq.(1) will bend downward at

$r^{\star}=\frac{H^{\star}\sigma_{lg}}{\Delta\sigma-\frac{\rho gH^{\star
2}}{2}}$ (2)

when $H$ is small, as shown numerically in Fig. 6. Since $r^{\star}<R$,
$r_{t}$ will remain at $R$ to avoid costing energy until $H$ is big enough to
render $r^{\star}\geq R$ and trigger an irreversible shrinkage for $r_{t}$.
The threshold value $H^{\star}$ can thus be obtained by setting Eq.(2) equal
$R$:

$H^{\star}=\frac{\sigma_{lg}\Big{[}\sqrt{1+\frac{2\rho
gR^{2}\Delta\sigma}{\sigma_{lg}^{2}}}-1\Big{]}}{\rho gR}.$ (3)

It fits nicely the experimental data in Fig. 3 with R-square = 0.96 and
explains the saturation at large $R$.

[scale=0.32]H_star_theory.png

Figure 6: Equation (1) is numerically plotted against $r_{t}$. Initially, the
system falls on the right side of the blue line when $H<H^{\star}$, and it is
energetically unfavorable for $r_{t}$ to decrease from $R$. As $H=H^{\star}$,
$r_{t}=R$ becomes sitting at the top of the red line which is an unstable
point. Any perturbation is enough to tip the balance and trigger the shrinking
process.

###  III.2 Stage II: irreversible and quasi-static

Once $H$ exceeds $H^{\star}$, the top radius of water column $r_{t}$ starts to
shrink. The shrinkage rate can be modeled by

$\frac{dE_{\rm total}}{dr_{t}}=-A\frac{dr_{t}}{dt}$ (4)

where $A$ is a phenomenological constant. Solving this differential equation
gives

$r_{t}(t)=\frac{\alpha}{2\beta}-Be^{\frac{2\beta}{A}t}$ (5)

where $\alpha$ and $-\beta$ denote the coefficients of $r_{t}$ and $r_{t}^{2}$
in Eq.(1), and the constant $B$ signifies a perturbation to tip the balance
and drive the system rightward from the unstable state at the top of the red
line in Fig. 6. Equation (5) agrees well with the experimental data in Fig. 4
with fitting parameters $A$ and $B$ that vary with $R$.

Although stage II is irreversible, we argue that it is quasi-static based on
two observations: first, the shape of the water column remains unchanged
because $r_{t}$ and $r_{m}$ exhibit the same shrinking speed and their
correlation is strongly linear in Fig. 7. Second, the contact angle $\theta$
and $z_{m}$ defined in Fig. 1 are not affected by the receding motion, as
shown in the inset of Fig. 7. As a result, we can assume the profile or $r(z)$
is still dictated by the minimization of its surface energy and gravitational
energy at each step of the way:

$E=\sigma_{lg}\int_{0}^{H^{\star}}2\pi r\sqrt{1+r^{{}^{\prime}2}}\
dz+\int_{0}^{H^{\star}}\rho g\pi r^{2}z\ dz$ (6)

By use of the Euler-Lagrange equation, we obtain

$\frac{\sigma_{lg}}{\rho
g}\Big{[}\frac{1}{\sqrt{1+r^{{}^{\prime}2}}}-\frac{rr^{{}^{\prime\prime}}}{(\sqrt{1+r^{{}^{\prime}2}})^{3}}\Big{]}+rz=0$
(7)

which cannot be solved analytically. To obtain an approximate solution, we
appeal to the constraints on $r^{\prime}$ that (a)
$r^{\prime}\rightarrow-\infty$ as $z\rightarrow 0$, (b) $r^{\prime}\rightarrow
0$ as $z\rightarrow z_{m}$, and (c) $r^{\prime}=\cot{\theta}$ as
$z=H^{\star}$. The simplest guess that satisfies all these conditions is that

$r^{\prime}=\frac{z^{2}-z_{m}^{2}}{z}\frac{H^{\star}}{H^{\star
2}-z_{m}^{2}}\cot\theta.$ (8)

Our choice of $(z^{2}-z_{m}^{2})$ over $(z-z_{m})$ to satisfy constraint (b)
is based on setting $z\rightarrow z_{m}$ in Eq.(7) to obtain

$\frac{\sigma_{lg}}{\rho g}(1-rr^{\prime\prime})+rz=0.$ (9)

From Fig. 2(b), we know $rr^{\prime\prime}\approx 20\gg 1$ so that Eq.(2) can
be further simplified to give

$r^{\prime}=\frac{\rho g}{\sigma_{lg}}(\frac{z^{2}-z_{m}^{2}}{2}).$ (10)

Comparing the coefficients of Eqs.(8) and (10) gives

$\frac{\rho g}{2\sigma_{lg}}=\frac{H^{\star}{\cot\theta}}{z_{m}(H^{\star
2}-z_{m}^{2})}$ (11)

that uniquely determines $z_{m}$ as a function of $\theta$, $H^{\star}$ and
$\sigma_{lg}$. This is consistent with the empirical finding that $z_{m}$ is
roughly independent of time in the inset of Fig. 7.

Finally, after solving Eq.(8) with the boundary condition
$r(z=H^{\star})=r_{t}$, we set $z=z_{m}$ to obtain:

$r_{t}=r_{m}+\Big{[}\frac{1}{2}-\frac{z_{m}^{2}}{H^{\star
2}-z_{m}^{2}}\ln(\frac{H^{\star}}{z_{m}})\Big{]}H^{\star}\cot\theta$ (12)

Since $z_{m}$ is a constant from Eq.(11), the linear relation between $r_{t}$
and $r_{m}$ in Fig. 7 is derived.

[scale=0.38]Rm_vs_Rtop.png

Figure 7: Both $r_{t}$ and $r_{m}$ shrink with time in regime II, but their
values appear to be linearly proportional, as verified by the red solid
fitting line from Eq.(12). Inset shows that $z_{m}$ and $\theta$ are not
sensitive to time.

###  III.3 Stage III: irreversible and pinch-off

Since stage III lasts for only about 0.006 s, $r_{t}$ appears to be stationary
at $r_{c}$. What needs to be answered is why the Rayleigh-Plateau instability
is triggered at this stage and how. We know that the pull from the cylinder,
$2\pi r_{t}\sigma_{lg}\sin{\theta}$, is not big enough to sustain the weight
of water in stage II, which is why the column has to keep shedding its load.
Since the former is proportional to $r_{t}$, while the latter is roughly to
$r_{t}^{2}$ when $H^{\star}$ is fixed, their difference decreases as $r_{t}$
shrinks. We conjecture that they become equal at $r_{t}=r_{c}$, and the
momentum to shrink that is carried over from stage II sets off the pinch-off
phenomenon.

Although the development of a singular neck in stage III is a dynamic process,
$r_{c}$ is predetermined at its borderline with stage II where a quasi-static
approximation is feasible. So we can still perform the variational method on
the potential energy to find how $r_{c}$ is decided by $H^{\star}$:

$E=\sigma_{lg}\int_{0}^{H^{\star}}2\pi
r\sqrt{1+{r^{\prime}}^{2}}dz+\lambda\int_{0}^{H^{\star}}\pi{r}^{2}dz$ (13)

where the surface energy is assumed to dominate the gravitational energy since
the volume of the water column has thinned down by more than fourfold since
stage I. The Lagrange multiplier is incorporated to make sure the water volume
equals

$\int_{0}^{H^{\star}}\pi r^{2}dz=\frac{2\pi r_{c}\sigma_{lg}\sin{\theta}}{\rho
g}.$ (14)

Using the second form of the Euler-Lagrange equation, we obtain

$\frac{r}{\sqrt{1+{r^{\prime}}^{2}}}+\frac{\lambda r^{2}}{2\sigma_{lg}}=C$
(15)

where the constant $C$ must equal $r_{c}\sin{\theta}+\lambda
r_{c}^{2}/2\sigma_{lg}$, $r_{m}+\lambda r_{m}^{2}/2\sigma_{lg}$, and $\lambda
r(0)^{2}/2\sigma_{lg}$ at the same time for $z=H^{\star}$, $z_{m}$, and 0,
respectively. Since the pool radius $r(0)$ can be much bigger than $r_{c}$ and
$r_{m}$, these three expressions can only be equivalent when

$r_{c}\sin\theta\approx r_{m}\approx\frac{\lambda r(0)^{2}}{2\sigma_{lg}}.$
(16)

Plug the expression of $r^{\prime}$ from Eq.(15) in $z=\int dr/r^{\prime}$ and
set $z=H^{\star}$ to obtain

$\frac{H^{\star}}{r_{c}}=\Big{[}\int_{\frac{r_{m}}{r_{c}}}^{1}+\int_{\frac{r_{m}}{r_{c}}}^{\frac{r(0)}{r_{c}}}\Big{]}\frac{dx}{\sqrt{\big{[}\frac{x}{\sin{\theta}+\frac{\lambda
r_{c}}{2\sigma_{lg}}(1-x^{2})}\big{]}^{2}-1}}$ (17)

which is to be solved in conjunction with Eq.(14):

$\frac{2\sigma_{lg}\sin{\theta}}{\rho
gr_{c}}=\Big{[}\int_{\frac{r_{m}}{r_{c}}}^{1}+\int_{\frac{r_{m}}{r_{c}}}^{\frac{r(0)}{r_{c}}}\Big{]}\frac{x^{2}dx}{\sqrt{\big{[}\frac{x}{\sin{\theta}+\frac{\lambda
r_{c}}{2\sigma_{lg}}(1-x^{2})}\big{]}^{2}-1}}$ (18)

where the factor $\frac{\lambda
r_{c}}{2\sigma_{lg}}=\frac{{r_{c}}^{2}\sin\theta}{r^{2}(0)}\ll 1$ from
Eq.(16). Notice that both equations are dominated by the upper limit,
$x_{0}=\frac{r(0)}{r_{c}}\gg 1$, of their second integral near which

$\frac{1}{\sqrt{\big{[}\frac{x}{\sin{\theta}+\frac{\lambda
r_{c}}{2\sigma_{lg}}(1-x^{2})}\big{]}^{2}-1}}\approx\frac{\sin{\theta}-\frac{\lambda
r_{c}}{2\sigma_{lg}}x^{2}}{x}$ (19)

where $\frac{\lambda r_{c}}{2\sigma_{lg}}x_{0}^{2}=\sin\theta$. This greatly
simplifies the integration to give $\sin\theta\ln x_{0}$ and $\sin\theta
x_{0}^{2}/4$ for Eqs.(17) and (18), respectively. Combining these two results
immediately predicts that

$\frac{H^{\star}}{r_{c}}\approx\frac{\sin{\theta}}{2}\ln{\frac{8\sigma_{lg}}{\rho
gr_{c}}}.$ (20)

which agrees well with the experimental data in Fig. 5.

During the pinch-off phenomenon, the bottleneck is found to plunge toward the
pool surface before breaking up, as shown in Fig. 2(c, d). To understand the
outcome in Fig. 8, Eq.(12) turns out to be applicable if we treat $z_{m}$ and
$r_{m}$ as the variables while fixing $r_{t}$ at $r_{c}$. This success implies
that their relationship is mostly dictated by the geometric constraints from
the contact angle at both ends of the water column.

[scale=0.37]Xm_Ym.png

Figure 8: Relation between $z_{m}$ and $r_{m}$ in stage III for $R$=4 mm. The
red solid fitting line is based on Eq.(12).

[scale=0.35]R_min_vs_tau.png

Figure 9: Log-log plot for $r_{m}$ vs the remaining time $\tau=t_{p}-t$ until
pinch-off, where $t_{p}$ is the time of pinch-off. The scaling exponent is
2/3.

It is worth checking the properties that are often associated with the pinch-
off phenomenon because, rather than self-induced, we conjecture that it is
being hastened by the incoming flow field from the shrinking motion in stage
II. The first characteristic we examine is self-similarity, which seems to be
missing in Fig. 10 because the re-scaled contours of the profile fail to
converge to a master curve. Nevertheless, the shrinkage of the neck radius in
Fig. 9 still obeys the same power law $r_{m}\propto\tau^{2/3}$ as in ordinary
water column where $\tau\equiv t_{c}-t$ and $t_{c}$ is the pinch-off time.

[scale=0.38]self-similarity.png

Figure 10: The surface contour after re scaling. No self-similarity is founded

##  IV Conclusion and discussions

In this study, we found 3 different stages of the liquid column's motion when
lifted up by a cylinder. In stage I, the top of the water column $r_{top}$ is
fixed to the cylinder's radius $R$. When $r_{top}$ starts to shrink, the
threshold height $H^{\star}$ is determined by minimizing total energy. As $R$
becomes larger, $H^{\star}$ grows linearly at first and eventually saturated
to a constant. In stage II, $r_{top}$ starts to shrink. The motion of
$r_{top}$ change with time is described. We have discovered that the shrinking
speed of $r_{top}$ and the neck $r_{min}$ should be the same, and also proved
by a theory. In stage III, $r_{top}$ stops shrinking. The relation between
$x_{min}$ and $y_{min}$ is described.

###### Acknowledgements.

We acknowledge the financial support from the National Science and Technology
Council in Taiwan under Grant No. 111-2112-M007-025.

## References

  * [1] Pedro M. Reis et al., Science, 330 (2010).
  * [2] S. Tonia Hsieh, J. Exp. Biol., 206 (2003).
  * [3] Ashwin K. Sankaran and Jonathan P. Rothstein, J. Non-Newton. Fluid Mech., 64-75 (2012).
  * [4] J. F. Padday and A. R. Pitt, Mathematical and Physical Sciences 275, 1253 (1973).
  * [5] Wuming Jing et al., IEEE, 16, 2 (2018).
  * [6] Ashutosh Sharma and Eli Ruckenstein, J. Colloid Interface Sci.133, 2 (1989).
  * [7] G. Debregeas and F. Brochard-Wyart, J. Colloid Interface Sci, 190 (1997).
  * [8] E. S. Benilov and C. P. Cummins, Phys. Fluids, 25 (2013).
  * [9] J. Su and N. J. Nigro, Int. J. Numer. Meth. Fluids, 65 (2011).