# Understanding Uniswap Returns

In the previous article we looked at the impact of price variations on the value of liquidity held in a Uniswap exchange. We found that, from the perspective of a liquidity provider, any price change would cause a reduction in the value of the stake, relative to holding the original assets. Consequently, in the short term, such losses could be greater than the fees received as a reward for supplying liquidity to the exchange.

This complicates analysis of potential future returns. Given the price dependency, we can’t really model Uniswap as providing some fixed or average rate of return on a liquidity stake. Instead, we need to find a price-independent way to think about the stake and the exchange itself, and then derive returns from this.

This article will look at how we can apply a price-independent measure to get a better sense of activity on the exchange and devise a model with which to estimate expected returns for liquidity providers, based on historical data. We will then consider how these returns might be valued by liquidity providers who start with only one of the two tokens traded on the exchange.

# Measuring Liquidity Pool Growth

To find a price-independent measure to understand Uniswap pool size, growth, and transaction volume, we need to look at the trading formula at its heart. Uniswap depends on the “constant product” principle to govern trading — that is the *product* of the two liquidity pools should be the same after a trade as before (excluding fees). The Uniswap price is given by the *ratio* of the two liquidity pools. The constant product is therefore price-independent.

However, as we saw in the previous article, we generally need to find the square root of this number in order to calculate useful things. The square root of the product of two numbers is in fact an average of those numbers, known as the geometric mean (GM). It turns out to be a useful measure of the size of Uniswap liquidity pools. We will find we can apply the GM of ETH and Token values in many sitations in the context of Uniswap. It is given by the following formula:

`GM = sqrt(eth_value * token_value)`

Although Uniswap applies a “constant product” (or equivalently, “constant GM”) principle to govern trades, trading fees are excluded from the constant product calculation and added to the liquidity pool. Consequently the liquidity pool (GM) size will grow as trading occurs. This happens without issuance of new liquidity tokens, and so the value of existing liquidity tokens will always grow, in GM terms. This is the mechanism by which fee income is returned to liquidity providers as a reward for supplying value to the system.

The current measures available on uniswap.info only measure the sizes of the individual liquidity pools, but of course these can fluctuate with price. Price-dependent measures are not a good way to understand how fast the pools are growing, and whether the today’s transaction volume is bigger or smaller than some time in the past when prices were different.

However we can see what this growth looks like excluding the impact of fluctuating prices, by looking at the value of liquidity tokens on the ETH-DAI exchange, measured in terms of the GM of the ETH and DAI they can be redeemed for.

As the chart above shows, the GM value of liquidity tokens for the ETH-DAI exchange has grown at a fairly consistent rate since the exchange’s launch on 2 November 2018. The red line represents an exponential growth model with an annualised growth rate (‘alpha’) of 11.26%. This model seems to be a fairly good fit for the data — if we linearise by taking logs of the data and the model we get an R² value of around 0.997.

This is interesting because it implies that the growth in trading volume and fees paid on the exchange has closely matched the growth in liquidity pool size, even as the liquidity pool has grown from a GM of 421 (30 ETH and 5,900 DAI) when the exchange was launched on 2 November 2018, to a GM of 17,890 (1,613 ETH and 198,385 DAI) on 14 February 2019 — a more than 40-fold increase.

# Calculating Actual Returns

Of course, liquidity providers don’t care about the growth in the geometric mean of their stake. More likely, they are interested in the value of their stake as measured in one of the two tokens on the exchange. Sticking with the ETH-DAI exchange, we’ll look at what happens when we measure the value of a liquidity stake in DAI only (i.e. under the assumption that we can convert the entire ETH side of the stake into DAI at the current price). First, we’ll do this in the same way as in the previous article, where we calculated the “impermanent loss” by making a comparison between someone supplying *X* ETH and *PX* DAI to the Uniswap ETH-DAI exchange, and someone holding those same amounts. Under these conditions, we get the following formula for liquidity provider returns.

Here, *G* is the growth in stake value, *R* is the ratio of prices between the supply and withdrawal of liquidity, α is the growth rate (which we calculated above to be around 11% for the first few months of the ETH-DAI exchange), and *t* is time. At time *t=*0 this formula reduces to the same formula we had for *impermanent loss* in the previous article. On the other hand, if the liquidity withdrawal price is the same as the liquidity supply price (i.e. *R*=1) then we are left with a straightforward exponential growth, and α becomes the real rate of return.

If α were to remain constant at 11% for the next year, we could use the formula above to calculate that a user supplying liquidity to the ETH-DAI Uniswap exchange at today’s price of 123 DAI would be in profit as long the ETH price after a year is in the range 47 DAI to 320 DAI. More generally, we can plot out this function in terms of the price ratio *R. *Assuming a continuous liquidity pool growth rate of 11%, the curves plotted out below represent the return to a liquidity provider at *t*=0, *t*=1 and *t*=2.

As the liquidity pool grows from added trading fees, and liquidity token value continues to increase, the curve on the chart above keeps moving upwards. Accordingly the price range within which the liquidity provider is in profit widens.

# Comparison with Holding a Single Token Type

The above scenario assumes that potential liquidity providers already have quantities of both ETH and DAI which they can choose to supply as liquidity or simply HODL. This analysis makes sense for understanding the results of supplying liquidity in isolation. However, in reality it is more likely that a potential liquidity provider has a quantity of only ETH or the ERC-20 token traded on the exchange.

Let’s consider the case of a potential liquidity provider currently holding only ETH, and considering whether to:

- continue to hold ETH only, in the hope of profiting from an expected future price rise, or
- trade half of the ETH for another token such as DAI, in order to supply liquidity on Uniswap.

The value of the stake will vary according to the ratio *R *between the current ETH price and the base price (that is, the price at time *t=0*). The following formulae express the relative value *V *of the stake under each strategy at time *t*.

Let’s compare these strategies by plotting the formulae against price ratio between liquidity supply and withdrawal. In the chart below the “HODL” strategy is plotted against the value of a Uniswap liquidity stake obtained by first swapping half of the ETH to DAI (neglegting fees and slippage). The red, yellow and green curves correspond to to the value of the liquidity stake at times *t=0*, *t=1* and *t=2, *assuming an annual pool growth rate of 11%.

We can see then, that even without receiving any fees, a liquidity provider to the Uniswap ETH-DAI exchange has reduced exposure to ETH price fluctuations, when compared to holding only ETH. This results from the square root relationship between stake value and price ratio (*R*).

The income from trading fees essentially offsets the curve, ensuring that liquidity providers are in a net positive position compared to holding ETH for all values of price ratio from 0 up to some limit, which can be seen as the points at which the Uniswap curves cross the HODL line on the chart above.

As in the previous analysis, the maximum price ratio at which the liquidity provider is in profit relative to HODL will continuously move to the right as the value of liquidity tokens increases. This reduced exposure to ETH price combined with income from liquidity fees may therefore be an attractive strategy for conservative ETH holders looking to earn a return while reducing risk from falls in the price of ETH.

Of course, this still requires that ETH-only holders go through the steps of acquiring a suitable quantity of DAI before they can supply liquidity to the exchange, either by trading on an exchange or opening a MakerDAO collateralised debt position. When the liquidity provider withdraws their liquidity from Uniswap they will also need to sell one half of the liquidity stake to return to a single-token position.

In future it may be possible for liquidity providers to use a “single token supply” function to add liquidity from a single token to a Uniswap exchange in a single transaction. This function would use the exchange itself to perform the intermediate step of trading half of the stake in order to obtain liquidity tokens. A corresponding “single token withdraw” function could do the same thing in reverse.

# Reasoning About Future Growth Rates

The models above are based on an assumption of a continued annual growth rate α of close to that observed during the first 3 months of Uniswap’s operation, around 11%. As mentioned previously, this growth rate has been very consistent in those 3 months despite massive changes in liquidity pool size, and this may give us moderate confidence in extrapolating this growth rate into the near future.

To understand why this rate might change in future however, we should consider what type of trading activity actually occurs on Uniswap, and how this activity is affected by external factors such as ETH volatility and general trader interest, and internal factors — in particular the liquidity pool size.

Arbitrage is the easiest use case to evaluate. One of the interesting features of Uniswap is that with no order book, the only way the price can move is through trading. As the price in the wider market changes this inevitably leads to arbitrage opportunities. Accordingly, a certain volume of arbitrage trading on Uniswap, and hence fee income is, in practice, guaranteed. The expected volume of arbitrage trading based on historical price movements can be simulated. A quick look at Binance data from November-January seems to suggest that fees from arbitrage may result in liquidity pool growth rates in the range 6–7%, even if no “real” trading is conducted on Uniswap. Whether this is true in the longer term depends on volatility in the ETH-DAI trading pair.

Fees resulting from other use cases are much harder to model or predict. Certainly, interest seems to be growing, with other projects beginning to take notice of Uniswap, for example, Kyber recently integrated Uniswap as a liquidity reserve.

The question is really about which will grow faster: Uniswap liquidity or trading volume?

*As ever, thanks to **Hayden Adams** for continued input and discussion on all things Uniswap, and to **Conlan** for making Uniswap data available through an **API**.*