The Journal of Digital Assets
 Volume 1
 December 2022
 Issue 1
 Impermanent Loss and Gain of Four Automated Market Maker Algorithms
 Hyoung Joong Kim, Soohyuk Choi, Yong Tae Yoon, and Shiyong Yoo
 First Published: 05 December 2022
 Abstract  Full Text(93)  PDF download(42)
Content (Full Text)
Impermanent Loss and Gain of Four Automated Market Maker Algorithms 

Abstract 

Automated market makers are working without an order book, and they determine the price of assets automatically. It is reported that he automated market makers have the impermanent loss, which causes financial damage to liquidity providers. Impermanent loss makes the liquidity providers hesitant to deposit assets in the liquidity pool. Therefore, their participation incentive from liquidity provision should be anticipated by automatic market makers inherently. However, the existence of impermanent gain has never been reported. Impermanent gain is important to attract liquidity providers without giving compensation incentives. This study shows that for some automated market makers, impermanent gain coexists with impermanent loss. Examples showing the coexistence and conditions are provided.
Keywords: Blockchain, cryptocurrency, decentralized finance, impermanent gain, impermanent loss, market maker. 

I. INTRODUCTION 

BLOCKCHAIN[1][22]is an important building block for many applications, including smart grid [2][13], energy trading[15], vehicular device[1], cryptocurrency[23], voting[14], education system[20], identity authentication[5], and decentralized finance (DeFi). Among the applications, DeFi has grown explosively from 2020, securing credibility and liquidity. These DeFi services include lending, asset management, and decentralized exchange. An automated market maker (AMM) is a crucial part of the DeFi ecosystem, in particular, for the decentralized exchange systems. Meanwhile, AMMs rely on mathematical formulas to facilitate trading and automatically set the price of an asset or multiple assets. AMMs of the decentralized exchanges recently have replaced the traditional order book so that all trades are conducted through swaps on their liquidity pools. AMMs allow the users to buy and sell in realtime without matching orders. The buyandsell orders listed in the order book are arranged by price. Moreover, the price of the assets at an exchange is set by the matching order algorithms, such as pricetime priority algorithm or price prorata 

This research was supported by a grant of the Korea Health Technology R&D Project through the Korea Health Industry Development Institute (KHIDI), funded by the Ministry of Health & Welfare, Republic of Korea (grant number: HI19C0785). This paper is an extension of the prepublication available at [10]. H. J. Kim is with the School of Cybersecurity, and the Cryptocurrency Research Center, Korea University, Seoul, 02841, South Korea (email: khj@korea.ac.kr). S. Choi is with the SymVerse, Seoul, 02841, South Korea (email: choi@symverse.com). Y. T. Yoon is with the Department of Electrical and Computer Engineering, Seoul National University, Seoul, 08826, South Korea (email: ytyoon@snu.ac.kr). S. Yoo is with the Business School, ChungAng University, Seoul, 06974, South Korea (email: sy61@cau.ac.kr). Corresponding author: H. J. Kim Received: August 25, 2022; Revised: October 15, 2022; Published: December 5, 2022.


algorithm. It is determined by double auction. Sellers and buyers can offer market, limit, or conditional orders on the centralized exchanges. Meanwhile, the AMMs have provided the decentralized exchanges mathematical price valuation models. As those formulas are adopted, market makers are price setters, whereas traders are price takers. That is to say, sellers and buyers have no choice but to accept the price determined by the market maker. Wang[21]suggested the following requirements to be a good AMM algorithm. Constant function market maker (CFMM) needs to be convex curves or convex hyperplanes to conform to the principle of supply and demand. Another requirement is the robustness against malicious attacks, such as frontrunning (slippage) attacks [7][8]. Frontrunning is an action plan where an attacker benefits from prior access to privileged market information about upcoming transactions and trades[7]. Wang[21]also suggested the computational efficiency of the asset amount determination. Meanwhile, Hanson [9][10] has proposed marketscoring rule for the market prediction. Recently, Hanson’s marketscoring rule, the ogarithmic market scoring rule (LMSR), showed the potential of the AMM tool. LMSR is one of the CFMM and AMMs. Note that the LMSR is quite popular because of the following three reasons [17]: (1) it was the first AMM for prediction markets and decentralized exchanges; (2) it has a simple analytical form that is rather complicated than constant function market makers; and (3) it has bounded loss. Othman et al. [18] have proposed liquiditysensitive LMSR (LSLMSR) by introducing a parameter and adaptive to the market situation; they aim to make the scoring liquidity sensitive. The LMSR and LSLMSR algorithms set the price of a cryptocurrency pair by keeping the constant cost value unchanged. A logarithmic function expresses the cost. A bonding curve is a mathematical curve that defines a relationship between price and supply of assets. Bonding curve (between two assets as a pair, such as ETH and USDC, where the ETH is a cryptocurrency with price volatility, and the USDC is a stablecoin) or bonding hyperplane (for more than two assets) can be used for setting the price. CFMM [2] sets the price by maintaining the cost value unchanged (i.e., equal to a constant). Other types of algorithms, such as constant product market maker (CPMM) algorithm [4], constant sum market maker (CSMM) algorithm, and constant mean market maker (CMMM) algorithm [12], also set the price in such a way that the cost value remains unchanged over the bonding curves or bonding hyperplanes. Meanwhile, a hybrid approach called StableSwap [6] combines the CPMM and CSMM algorithms to take the advantages of both methods. Constant circle market maker (CCMM) and constant ellipse market maker (CEMM) also do similar thing. Liquidity providers supply asset pairs to the liquidity pool, and they may lose money and suffer from an
impermanent loss (a.k.a. divergent loss). Impermanent loss is the temporary loss of asset values occasionally
experienced by liquidity providers because of volatility in a trading pair. Liquidity provider’s asset value can
be increased or decreased after trading. The composition ratio of assets is changed, and, as a result, the asset
price and value are changed after asset trading. Impermanent loss occurs when the deposited asset value is decreased; it is still a loss, whether large or small. This loss is impermanent because it can only be temporary. The contributions of this paper can be summarized as follows. To the best of our knowledge, this study is the first to show that impermanent gain and impermanent loss coexist for some AMMs. Previous study has already shown that CPMM has the property of impermanent loss [12]. Meanwhile, this present study shows that the CPMM does not have impermanent gain property at all. Moreover, it was known that CSMM does not have the property of impermanent loss because the price is invariant. However, this study shows that the relative price in the CSMM is not invariant, and the CSMM has both the property of impermanent gain and impermanent loss. For the LSLMSR and CCMM and AMMs, this study also shows that both impermanent gain and impermanent loss coexist. This paper is organized as follows. Section 2 introduces realworld examples and the mathematical background of various AMM asset cost functions and asset value functions to define the value difference functions,
which indicates impermanent loss and impermanent gain. Section 3 derives the condition to obtain an impermanent gain and shows that impermanent gain can coexist with impermanent loss. Section 4 concludes the
paper with some suggestions. 

II. MATHEMATICAL BACKGROUND WITH AN EXAMPLE  
Consider an example that explains the impermanent loss or impermanent gain in an easy to understand way. There are 10 ETH and 1,000 USDT in pairs deposited in a liquidity pool (LP). In this particular AMM, the deposited token pair needs to be of equivalent value. This means that the price of ETH is 100 USDT at the time of deposit. This also means that the dollar value of the total deposit is 2,000 USD at the time of deposit since she has 10 ETH for 1,000 USD and 1,000 USDT for 1,000 USD as well. In this paper, it is assumed that one of the coin pairs deposited in the LP is a stablecoin and the other is a nonstablecoin. In the LP, there is a pair of coins $x$ and $y$ where $x$ and $y$ denote the number of ETH and USDT, respectively. Hence, the price of $x$ is determined by $P=y/x$, and the total value of the assets in the pool is given as $V=\left(\right(\frac{y}{x})x+y)=2y$.
(Case 1) In this LP, the coin price is determined by the AMM algorithm satisfying the simple equation $xy=k$ where $k$ is a fixed constant. At the initial moment, since there were 10 ETH and 1,000 USDT, $k$ is obviously 10,000 such as (10 ∙ 1,000 = 10,000). Now, Alice sold 1 ETH at the pool. Since $x$ has to be changed from 10 to 11, $y$ has to be decreased from 1,000 to approximately 909.09 to keep $k$ unchaged. After the swapping, the price of ETH has been changed from 100 USD to approximately 82.64 USD. Thus, total asset value of the LP has been changed from 2,000 USD to 1,818.18 USD. Assuming that the liquidity provider who deposited 10 ETH and 1,000 USDT did not participate in the LP, he calculated the value of his assets at the current coin price. Since the current ETH price has fallen to 82.64 USD, his asset value is 1,826.4 USD by adding 826.4 USD from his original 10 ETH and 1,000 USD from his original 1,000 USDT. He realized that by becoming a liquidity provider, his current asset value is 1,818.18 USD, but if he had not participated in the LP, it would have been close to 1,826.4 USD, resulting in a loss of 8.22 USD. The AMM algorithm of the LP is CPMM one. This loss is called impermanent loss because it does not always occur. Impermanent loss is also called divergence loss.
(Case 2) Let’s consider another example. In another LP, the coin price is determined by the AMM algorithm satisfying the simple equation $x+y=k$ where $k$ is a fixed constant. At the initial moment, since there are 10 ETH and 1,000 USDT, $k$ is obviously 1,010 such as (10 + 1,000 = 1,010). Now, Bob sold 1 ETH at the pool. Since $k$ hasto be changed from 10 to 11, $y$ hasto be decreased from 1,000 to 999 to keep $k$ unchaged. After the swapping, the price of ETH is changed from 100 USD to approximately 90.8 USD. Thus, the total asset value of the LP is still 2,000 USD. If he had not participated in the LP, his asset value would be 908 USD from 10 ETH and 1,000 USD from the original 1,000 USDT, adding up to 1,908 USD. Thus, he made a gain of 92 USD by participating in the LP running CSMM AMM. This gain is called impermanent gain or divergence gain. CSMM AMM has always been known to have zero divergence loss, but from this example it seems clear that this is not the case and positive divergence gain certainly exists. The difference between the claim that the divergence loss of CSMM is always 0 and that it can be positive sometimes comes from the difference in the definition of the divergence loss. In the above example, the initial asset value of CSMM LP and that after swapping are the same at 2,000 USD. Therefore, the difference in the asset value of CSMM LP before and after a certain swapping is always zero. If the definition of divergence loss is defined as the value obtained by subtracting the initial asset value from the asset value after swapping, it is true that the divergence loss of CSMM LP is always 0. However, in this paper, divergence loss is defined as the difference between the asset value after swapping and the value of the initial asset converted to the price after swapping. The difference of the definitions is clear; see Equation (4) in [12] and also Equation (4) in this paper. In calculating the total asset value, the former considers both the asset pairs and prices before and after the swapping, whereas the latter considers the initial asset pair and the price before and after the swapping.
(Case 3) See the same example of CPMM LP given above. At the initial moment, since there were 10 ETH and 1,000 USDT, $k$ is 10,000. Now, Carol bought 1 ETH from the pool. Since $x$ has to be chan gefrom 10 d to 9, $y$ has to be increased from 1,000 to approximately 1,111.11 to keep $k$ unchaged. After the swapping, the price of ETH has been changed from 100 USD to approximately 123.46 USD. Thus, total asset value of the LP has been changed from 2,000 USD to 2,222 USD. According to Equation (4) in [12], the divergence loss is 222 USD (i.e., 2,222−2,000) which is positive. Impermanent loss is known to be nonpositive as shown 1 Figure 1 [19], but here it is positive, so it goes against common sense. On the other hand, according to Equation (4) in this paper, the divergence loss is −13 USD (i.e.,
2,222−2,235) which is negative. This case conflicts with reports that the CPMM divergence loss is nonpositive (see Figure 1). Table 1 illustrates the mechanism by which impermanent loss occurs. 

Fig. 1. Impermanent loss for Uniswap and Balancer pools compared [19]. 

Table 1. The mechanism by which impermanent loss occurs. 

Consider a pair of two assets where ${q}_{t}({x}_{t},{y}_{t})$ denotes the asset pair with the number of assets $x$ and $y$ at time $t$. The AMM uses a cost function $C\left({q}_{t}\right)$ to set the price of cryptocurrency pairs at a trading. Suppose a liquidity provider has deposited an asset pair $({x}_{0},{y}_{0})$, where the asset $y$ is a stablecoin. Note that $y$ is considered a unit of account because it is a stablecoin; it is also divisible, fungible, and countable. Its price is unity. Then, the asset value of the liquidity provider at time 0 is given as follows: 



Composition ratio of the two assets is changed from $({x}_{0},{y}_{0})$ to $({x}_{n},{y}_{n})$ by trading two assets. One can add $\delta x$ to the pool to make ${x}_{n}={x}_{n1}+\delta x$; thus, ${y}_{n}={y}_{n1}\delta y$. Similarly, one can add $\delta y$ to the liquidity pool to make ${y}_{n}={y}_{n1}+\delta y$; hence, ${x}_{n}={x}_{n1}\delta x$. The asset value of the pair $({x}_{n},{y}_{n})$ at time $t$ is computed as follows:  


However, the value of the original pair composition $({x}_{0},{y}_{0})$ assessed by the relative price $\raisebox{1ex}{${y}_{n}$}\!\left/ \!\raisebox{1ex}{${x}_{n}$}\right.$ at time $n$ is computed as  


In addition, impermanent loss is computed from the difference $D$ of the two asset values $V\left({q}_{n}\right({x}_{n},{y}_{n}\left)\right)$ and $V\left({q}_{n}\right({x}_{0},{y}_{0}\left)\right)$, such that  


If the value of $D$ is negative, there exists an impermanent loss. Many research works [3][4][6][7][11][12][16][18][21] have tackled the impermanent loss. Scholars have tried eliminating or mitigating the impermanent loss. If the value of $D\left({x}_{n}\right)$ is positive, an impermanent gain exists. This paper introduces the concept of impermanent gain for the first time. 

A. Constant Product Market Maker 

CPMM starts from the cost function from the product of ${x}_{0}$ and ${y}_{0}$, such as  


At time $n$, the number of ${y}_{n}$ given ${x}_{n}$ is computed from the following equation  


Note that the CPMM cost function is a hyperbola. Uniswap, a decentralized exchange, uses this formula for a pricing purpose. One can add $\delta x$ to the pool to make ${x}_{n}={x}_{n1}+\delta x$; then, ${y}_{n}={y}_{n1}\delta y$. The cost function in Equation (6) is used to determine $\delta y$ by using ${y}_{n}=k/{x}_{n}=k/({x}_{n1}+\delta x)$ and obtaining $\delta y$ by subtraction such that $\delta y={y}_{n}{y}_{n1}$. Hence, ${y}_{n}$ is computed from Equation (6) as follows: 



For the CPMM, the relative price of asset $x$ with respect to $y$ at time $n$ is computed from Equations (2) and (7):  


Thus, the asset value of the pair $({x}_{n},{y}_{n})$ at time $t$ is computed from Equations (2) and (7) as follows:  


Hence, $D\left({x}_{n}\right)$ of the CPMM is computed from Equations (2),(3),and(9):  


B. LiquiditySensitive Logarithmic Market Scoring Rule 

Similarly, for the LMSR and LSLMSR, the cost function is given as follows:  


Hence, ${y}_{n}$ is computed from Equation (11):  


Thus, the asset value of the pair $({x}_{n},{y}_{n})$ at time $t$ is computed from Equations (2) and (12) as follows:  


For the LSLMSR, the relative price of the asset $x$ with respect to $y$ is at time $n$ is computed as:  


C. Constant Sum Market Maker 

For the CSMM, the cost function is given as follows:  


Hence, ${y}_{n}$ is computed from Equation (15) as follows:  


Thus, the asset value of the pair $({x}_{n},{y}_{n})$ at time $t$ is computed from Equations (2) and (16) as follows:  


D. Constant Circle Market Maker 

CCMM has been proposed by Wang [21]. For the CCMM, the relative price and the change in the asset values are computed with the given cost function as follows:  


Hence, ${y}_{n}$ is computed from Equation (18) as follows:  


Thus, the asset value of the pair $({x}_{n},{y}_{n})$ at time $t$ is computed from Equations (2) and (19):  


III. IMPERMANENT LOSS AND IMPERMANENT GAIN 

The asset value difference is a good barometer to show whether there is impermanent loss. The difference value $D\left({x}_{n}\right)$ is calculated from Equations (2) and (3) as follows:  


Equation (21) is simplified:  


If $D\left({x}_{n}\right)$ is zero, then impermanent loss does not exist. A negative $D\left({x}_{n}\right)$ denotes impermanent loss, whereas a positive $D\left({x}_{n}\right)$ denotes impermanent gain. The sign of the difference $D\left({x}_{n}\right)$ is determined by Equation (22) Theorem 1: If ${x}_{n}={x}_{0}$, then $D\left({x}_{n}\right)$ is zero, no matter what AMM is used Proof: If ${x}_{n}={x}_{0}$, then ${y}_{n}={y}_{0}$. Thus, from Equation (22), when ${x}_{n}={x}_{0}$ and ${y}_{n}={y}_{0}$, then $D\left({x}_{n}\right)$ is zero regardless of the type of AMM. 

A. Constant Product Market Maker 

For the CPMM, the CPMM AMM has the property of impermanent loss because showing that the sign of $D\left({x}_{n}\right)$ is nonnegative is easy. For the CPMM, $D\left({x}_{n}\right)$ is computed from Equations (7) and (22) as follows:  


Note that $D\left({x}_{n}\right)$ in Equation (23) is rewritten as  


Equation (24) contains a quadratic function of ${x}_{n}$ inside the square brackets. Note that the determinant ∆ of the quadratic function is zero. It implies that $D\left({x}_{n}\right)$ is convex upward; hence, its maximum value is zero. Thus, we can easily show that $D\left({x}_{n}\right)$ is always negative except for ${x}_{n}={x}_{0}$ no matter what the values of ${x}_{n}$, ${x}_{0}$, and $k$ are. For ${x}_{n}={x}_{0}$, $D\left({x}_{n}\right)$ is zero. It implies that CPMM AMM never has the property of impermanent gain. The CPMM liquidity providers always have high chance of losing money. Thus, liquidity providers do not want to provide their assets to the liquidity pool if they are not given enough incentives to offset the losses. 

B. Constant Sum Market Maker 

The number of assets for the CSMM AMMs is determined by Equation (15). The price of ${x}_{n}$ is determined as  


Here, note that the relative price of ${x}_{n}$ is varying because the relative price is a function of ${x}_{n}$, as shown in Equation (25). The range of the relative price ${p}_{n}$ is (0, ∞) because the domain of ${x}_{n}$ is (0, $k$). Thus, the price of ${x}_{n}$ is varying, and not a constant, which contradicts existing research works [12].  
For the CSMM, from Equations (15) and (22), $D\left({x}_{n}\right)$ is computed as follows:  


Note that $D\left({x}_{n}\right)$ in Equation (26) is rewritten as  


Fig. 2. Loss and gain regions of three AMMs 

Equation (27) contains a quadratic function of ${x}_{n}$ inside the square brackets. Note that the determinant ∆ of the quadratic function is given as ∆=${(k2{x}_{0})}^{2}$. The determinant shows us two important facts. The first fact is that both impermanent loss and impermanent gain coexist for ${x}_{0}$ ≠ $k/2$. The second fact is that only impermanent loss exists for ${x}_{0}$ = $k/2$. Thus, we can easily show that $D\left({x}_{n}\right)$ can be either positive or negative or zero, depending on the values of ${x}_{n}$, ${x}_{0}$, and $k$. When Equation (27) has two roots ${x}_{n}$ = $k/2$ and ${x}_{n}={x}_{0}$,both impermanent loss and impermanent gain coexist.  
Theorem 2: If ${x}_{0}$ ≠ $k/2$, then CSMM AMM has the property of impermanent gain for ${x}_{0}<{x}_{n}<k/2$ or $k/2<{x}_{n}<{x}_{0}$. 

Proof: See the paragraph above the Theorem 2. 

Observation 1: If ${x}_{0}={y}_{0}=k/2$, CSMM AMM for Equation (15) has an impermanent loss property only for all ${x}_{n}$ and ${y}_{n}$, which are both positive. 

Figure 2(a) shows that impermanent gain occurs for a set of two ${x}_{0}$ values. In this case, the asset cost function is $x+y$ = 1000, and the initial asset pair is given as ${q}_{0}$ = (10, 990), for example. The difference $D\left({x}_{n}\right)$ is given as follows: 



Thus, for ${x}_{n}$ = 10 or ${x}_{n}$ = 500, $D\left({x}_{n}\right)$ is zero, which states that this CSMM AMM system has no loss or gain at these points. For 10 $<{x}_{0}<$ 500, the CSMM AMM has impermanent gain. Note that impermanent gain is innate in this case for the given initial asset pair. In Figure 2(a), at ${x}_{n}$ = 10, zero crossing happens. Naturally, ${x}_{n}$ is equal to ${x}_{0}$. However, at ${x}_{n}$ = 500, another zero crossing happens. Thus, the lefthand side region from ${x}_{n}$ = 10 is the impermanent loss region. Similarly, the righthand side region from ${x}_{n}$ = 500 is the impermanent loss region. The middle region between ${x}_{n}$ = 10 and ${x}_{n}$ = 500 is the impermanent gain region. 

In this example, impermanent loss region and impermanent gain region coexist for all initial asset pairs ${q}_{0}$ = $({x}_{0},{y}_{0})$ except the value ${x}_{0}$ = 500. The CSMM AMM with the initial asset pair, for example, ${q}_{0}$ = (500, 500) and the asset cost function $x+y$ = 1000, there is no impermanent gain region only in this condition. The existence of the impermanent gain region depends on the type of AMM, asset cost function with different constant $k$, and initial asset pair with different values of ${x}_{0}$. 

C. LiquiditySensitive Logarithmic Market Scoring Rule 

For the LSLMSR, the value of $D\left({x}_{n}\right)$ is a highorder function of ${x}_{n}$. Therefore, the closedform solution cannot be easily derived, and we cannot show analytically whether this AMM has the property of impermanent loss or impermanent gain. Figure 2(b) shows an example of a situation similar to Figure 2(a). The asset cost function, in this case, is given as Equation (13), where $b$ = 1000. For $q$ = (1000, 1000), the value of $k$ is 2386.294632. If the initial asset pair is ${q}_{0}$ = (2, 1662.72), we can obtain Figure 2(b) that contains both impermanent loss and impermanent gain regions. Two zero crossings exist: one occurs at ${x}_{n}$ = 2, and the other one is somewhere between ${x}_{n}$ = 1154 and ${x}_{n}$ = 1156. In this example, impermanent loss region and impermanent gain region coexist for all initial asset pair ${q}_{0}$ = $({x}_{0},{y}_{0})$ for the values ${x}_{0}$ < 271. 

Observation 2: If ${x}_{0}={y}_{0}$, LSLMSR AMM for Equation (11) has an impermanent loss property only for all ${x}_{n}$ and ${y}_{n}$, which are both positive. 

D. Constant Circle Market Maker 

For the CCMM AMMs, the value of $D\left({x}_{n}\right)$ is also a highorder function of ${x}_{n}$. Therefore, the closedform solution cannot be easily derived, and we cannot show analytically whether this AMM has the property of impermanent loss or impermanent gain. Figure 2(c) shows an example of the situation similar to Figures 2(a) and 2(b).  
The asset cost function, in this case, is given as Equation (18), where $a$ = 0, $b$ = 0, and $k$ = 1002. For $q$ = (100/√2, 100/√2), the value of $k$ is 1002. If the initial asset pair is ${q}_{0}$ = (5, 99.8749), we can obtain Figure 2(c) containing both impermanent loss and impermanent gain regions. Similarly, there are two zero crossings: one occurs at ${x}_{n}$ = 5, and the other one is somewhere between ${x}_{n}$ = 85 and ${x}_{n}$ = 87. In this example, impermanent loss region and impermanent gain region coexist for all initial asset pair ${q}_{0}$ = $({x}_{0},{y}_{0})$ except the value ${x}_{0}$ = 100/$\sqrt{2}\phantom{\rule{0ex}{0ex}}$.  
Appendix A shows the condition when the $D\left({x}_{n}\right)$ has the property of impermanent loss only for the asset cost function ${x}^{2}+{y}^{2}=k$. Based on this simple case, we can derive the condition having both impermanent loss and impermanent gain property. 

Observation 3: If ${x}_{0}$ = $\frac{k}{\sqrt{2}}+a$, and ${y}_{0}=\frac{k}{\sqrt{2}}+b$, then CCMM AMM for Equation (18) has impermanent loss property only for all ${x}_{n}$ and ${y}_{n}$, which are both positive. 

IV. CONCLUDING REMARKS 

This study reviews four constant function market makers: LSLMSR, CPMM, CSMM, and CCMM. For the first time, this study showed the existence of impermanent gain mathematically and computationally thorough experiments. This paper showed that CPMM has impermanent loss property only. Meanwhile, LSLMSR, CSMM, and CCMM can have both impermanent loss and impermanent gain altogether. For a specific condition, they have impermanent loss property only (see Observations in the previous section). Even though an impermanent loss exists in CPMM AMM, this market maker attracted a large amount of total valued locked (TVL) and leads the decentralized exchange markets. Liquidity providers want impermanent gain rather than impermanent loss. The existence of impermanent gain will be fully exploited in the future DeFi systems. However, impermanent gain also has the problem. Liquidity providers want to withdraw the assets from the liquidity pool when impermanent gain occurs. When liquidity providers encounter impermanent gain, the liquidity provider earns extra profits in addition to the deposited assets. Thus, the liquidity providers are motivated to leave the pool, taking advantage of the assets they deposited and the kind of windfall profit that comes from impermanent gain. Meanwhile, impermanent loss makes the liquidity providers passive in joining the pool as they lose by depositing the asset, whereas impermanent gain makes the liquidity providers take extra profit and leave the pool. However, liquidity providers may prefer impermanent loss to impermanent gain. Whether liquidity providers will prefer impermanent loss or impermanent gain will be the subject of important research. A study on the attitudes of arbitrage traders in a market where impermanent loss and impermanent gain coexist would also be interesting. It is well known that impermanent loss exists, but that impermanent gain is not. The reason is probably because the definition of divergence loss was not correct. In CSMM LP, it seems that further research has not been carried out by accepting the divergence loss as zero according to the wrong mathematical definition. Therefore, it seems that studies on divergence loss for LSLMSR LP, etc., with more complex formulas have not been conducted. Since the existence of impermanent gain has been proven through examples in this paper, it is hoped that further research on impermanent gain will proceed in the future. 

ACKNOWLEDGMENT 

The authors would like to thank the anonymous reviewers for their time and effort to improve the quality of the paper by providing constructive comments. 

REFERENCES  


APPENDIX A 

For the CCMM asset cost function ${{x}_{n}}^{2}+{{y}_{n}}^{2}=k$, $D\left({x}_{n}\right)$ is given from Equation (21) as follows:  


The condition that $D\left({x}_{n}\right)$ is to be zero is given as  


where  


and hence,  


The lefthand side of the equation is a fourthorder polynomial open downward, whereas the righthand side is a quadratic polynomial open upward. Thus, the following three possibilities exist: 1. When both side polynomials do not meet, then the righthand side polynomial has larger value for all ${x}_{n}$, and thus, $D\left({x}_{n}\right)$ is negative. It means that the AMM has the property of impermanent loss only.
Hyoung Joong Kim is currently a professor at Korea University, Korea and the president of the Korea Fintech Society. He received his Ph.D. in Control and Instrumentation Engineering from Seoul National University, Korea. His main research areas are cryptocurrencies, decentralized finance and fintech security.
Soohyuk Choi is currently the CEO of SymVerse, a crypto company in Korea, and president of the Korea Blockchain Startup Association. He received his Ph.D. in Economics from Northwestern University, USA.
Yong Tae Yoon is currently a professor at Seoul National University, Korea and head of the Electric Power Research Institute. He received his Ph.D. in Electrical Engineering from MIT, USA.
Shiyong Yoo is currently a professor at ChungAng University, Korea. He received his Ph.D. in Applied Economics/Finance from Cornell University, USA  