2023 Market Sentiment and LP Behavior on Uniswap

lyrali
zelos-research
Published in
12 min readJan 3, 2024

Overview

The behavior of the cryptocurrency market is emotional. When the market is on the rise, people tend to become greedy, triggering the Fear Of Missing Out (FOMO) phenomenon. Conversely, when cryptocurrency prices decline, individuals often emotionally sell off their assets. How do we define an upward trend in the cryptocurrency market? And how do people from different backgrounds react to market fluctuations? We aim to answer these questions by analyzing the on-chain data of Uniswap over the past year. Our analysis consists of three main parts. In the first part, we will delineate the boundaries between bear and bull markets based on market performance. The second part will attempt to summarize the behavioral patterns of different users in response to bear and bull markets. Lastly, we will introduce implied volatility as a guide to user investment strategies.

The cryptocurrency market is characterized by high volatility and unpredictable price movements. Understanding how market participants respond to these fluctuations is crucial for developing effective investment strategies.

Data Description

Basic Data of Uniswap

Our statistical data is derived from the liquidity pools of usdc-eth-005 and usdc-weth-005 on Uniswap, which operate on the Ethereum and Polygon networks, respectively:

We utilize tick data to analyze the liquidity providers’ response to market sentiment in the cryptocurrency market. Our tick data and 1-minute sampled data are sourced from Alchemy’s RPC. We have developed our own Python script to download and clean the raw event data, which can be found at: uniswap-annual-review-2023

By processing the raw data (detailed in our article on data engineering: Data Processing by Zelos Research), we are able to extract user mint/burn/collect/swap data related to their positions, as well as lower/upper price data for these positions. These data points will assist us in analyzing user behavior at different time periods.

Based on swap data from the liquidity pools, we are able to calculate the Volume and Liquidity of the pools.

Additionally, we utilize Demeter to calculate the return rates of addresses (our tool Demeter is described in our article: Demeter: Best Uniswap Backtester). Our current analysis includes cash statistics, which encompass buying/selling of assets, transfers, and Uniswap v3 lp. This enables us to more accurately identify addresses with potential in the market, thereby attempting to guide individuals’ investment behavior during bear and bull markets.

For observing the overall trend of Total Value Locked (TVL) on different networks, we utilize data from Defillama. The time range for all the aforementioned data is from 2023–01–01 to 2023–12–11.

Implied Volatility

Implied volatility reflects market participants’ expectations of future price fluctuations. By treating the LP position as a combination of options, we can calculate its implied volatility in a similar manner to options. We aim to estimate market sentiment through implied volatility. We utilize Monte Carlo simulation to model price volatility (our article: the implied vol of uniswap v3 position and its analysis Framework). Using the Capital Asset Pricing Model (CAPM), we select addresses with higher alpha values each month to represent the following month. The specific methodology will be described in detail in the third section of the article.

Exploring Market Sentiment Indicators in the Crypto Market

We use the performance of Ethereum (ETH) price, on-chain transactions, and pool liquidity as examples to determine the bear and bull markets in the cryptocurrency market, and explore the volatility of the market under this categorization. By observing the Total Value Locked (TVL) of Uniswap on different networks, we can infer the general market sentiment. Ethereum and Polygon are chosen to specifically define the bear and bull markets in the cryptocurrency market.

Price trend is the most intuitive indicator for categorizing bear and bull markets. Traditional categorizations typically rely on a market index (such as the S&P 500 index) changing by more than 20%. However, in the highly liquid cryptocurrency market, high-frequency trading, high liquidity, and low gas fees also incentivize user participation. Therefore, the market sentiment indicator defined in this article is weighted by price, TVL, volume, and liquidity.

In the line chart below, we can observe that a sharp decline in Ethereum’s price around March 10th resulted in a rapid increase in trading volume, followed by a decrease in liquidity and relatively stable market performance. In June, the price decline did not lead to a significant increase in trading volume, and the price rebounded within a short period of time. During the price decline in August, both liquidity and trading volume decreased rapidly. After November, the price, trading volume, and liquidity all experienced a recovery. By incorporating volume and liquidity indicators, we can better estimate market sentiment and categorize bear and bull markets.

Since Polygon’s liquidity and volume are much smaller compared to Ethereum, we initially focus on studying user behavior on the Ethereum network. The sentiment index is calculated by weighting TVL (40%), price (30%), volume (20%), and liquidity (10%), and is represented by the scatter plot below. A sentiment index ≤0.2 indicates a negative market sentiment, while a sentiment index ≥0.3 indicates a positive market sentiment. With the sentiment index as a reference, we manually determine the neutral point for defining the bear and bull markets in 2023, and present them on the price curve.

We calculated the daily rolling volatility of ETH price using the following formula. It can be observed that during the transition between bear and bull market states, both price volatility and volume volatility increase significantly. Price fluctuations generally lead to changes in trading volume, but there are exceptions as well (in January and April), where price fluctuations did not result in an increase in buying and selling of assets.

Therefore, when the price volatility increases significantly, there will also be noticeable changes in trading volume, indicating a close correlation between market sentiment and price volatility. In addition to the weighted algorithm mentioned earlier, moving averages, RSI, and other technical analysis tools can be used to predict bear and bull markets.

Analysis of Trader and LP Behaviors

Differentiating User Returns using CAPM Model

We utilize the CAPM model to evaluate the performance and risk sensitivity of liquidity providers’ market-making strategies relative to the market. By calculating the alpha value (excess returns), we identify liquidity providers who outperform the market in both bull and bear. We consider the return of ETH as the market return rate (Rm). Risk-free rates (R0) is setted to be zero.

In the bull market, the proportion of addresses with positive alpha exceeds zero is 57.71%, while in the bear market, this proportion is 46.87%. This indicates that in the bull market, a relatively larger proportion of addresses exhibit positive alpha, indicating their ability to generate excess returns.

In the bear market, the mean alpha value is 0.106, while in the bull market, it is 0.465. The overall annual mean is 0.213. This suggests that in the bull market, the average alpha value is higher compared to the bear market, indicating that a relatively larger number of addresses show higher potential for generating excess returns in this market environment.

Under different market conditions, the linear relationship between alpha and beta demonstrates relatively weak correlations. Specifically, the Pearson correlation coefficient between alpha and beta in the bear market is 0.044, while in the bull market, it is -0.035. The overall annual coefficient is -0.064. This implies that alpha and beta may not have a strong linear relationship, and their variations may be influenced by other factors.

Bear/Bull Market LP Strategies

Next, we will examine users’ market-making strategies during bear and bull markets by analyzing upper/lower price positions, holding time, mint/burn actions.

We analyzed burn position frequency in bear and bull markets for different spot volumes. We found differences in burn position frequency between bear and bull markets. Higher burn position counts indicate proactive withdrawal of liquidity and token burning by liquidity providers. In bear markets, liquidity providers tend to adopt a more aggressive strategy of withdrawing positions, especially when market liquidity is low. However, in high liquidity situations, the frequency of position withdrawals decreases. On the other hand, market-making strategies in bull markets are more stable, with users tending to retain positions regardless of market liquidity.

We compared the behavior of addresses with alpha greater than zero in the bull market to the behavior of all addresses, as the former’s behavior may be more valuable as a reference. We used the burn time of positions to determine whether they belong to the bear or bull market and took the logarithm of the frequency for ease of observation.

By analyzing the histogram of burn time, we can draw some conclusions. Most positions have a short holding time. In the bull market, choosing positions with longer holding times may be key to achieving higher returns, mainly concentrated in the range of 150–200 days. In the bear market, wise liquidity providers opt to withdraw liquidity more quickly to mitigate the risks associated with market downturns.

In addition to holding time, we also conducted research and statistical analysis on LP’s market-making range strategy. We categorized positions as bear or bull market positions based on whether their upper bounds exceeded a percentage of the ETH price at the time of minting, and applied the same criteria for the lower bounds. By plotting the frequency distribution, we obtained the following observations regarding position price ranges.

It is evident that, for regular LPs, they tend to select larger price ranges in bear markets. This may be due to their overestimation of price fluctuations in bear markets. However, we found that LPs with higher alpha are able to more accurately estimate the upper and lower bounds of prices in bear markets, allowing them to mitigate loss risks.

Based on the analysis and conclusions from the previous figure, we further explore the relationship between price volatility and market-making range. We divide the price volatility into 20 equal segments and show the distribution of position price ranges in each segment. The following figure illustrates the relationship between the market-making range of positions throughout the year and the price volatility at the time of position minting.

We observe that the majority of LPs concentrate their market-making range around the ETH price. As price volatility increases, the market-making range of LPs tends to become wider. However, when price volatility reaches its maximum, most LPs opt for a very cautious market-making range, resulting in a relatively smaller range. Conversely, when price volatility is moderate or low, a few LPs display more boldness by choosing higher upper price bounds.

The LPs exhibit interesting behavior strategies in different volatility environments. In high volatility, LPs tend to decrease risk and choose smaller market-making ranges. In low volatility situations, a minority of LPs show more confidence and a willingness to take on certain risks by selecting higher upper price bounds.

When we shift our focus to high alpha users and analyze the different strategies they adopt in bull and bear markets, we discover new observations. In the bull market, high alpha users tend to opt for broader market-making ranges during periods of higher volatility, enabling them to better capture profit opportunities. However, in bear markets, they exercise greater caution and emphasize risk management, resulting in relatively smaller market-making ranges.

Additionally, we observe that in the bull market with low volatility, high alpha users are more inclined towards smaller market-making ranges, possibly due to their confidence in achieving stable profits. Conversely, in the bear market, they exhibit a relatively more open approach to market-making ranges and can choose lower lower price bounds to adapt better to downward market pressures.

LP’s Reaction Patterns

Based on the observations from the statistics above, we can summarize LP’s reaction patterns to bear and bull markets.

In bull markets, high-yield users tend to be more cautious and prudent. They prefer to retain positions and hold them for a longer period to achieve higher returns. Their optimistic sentiment towards the market remains stable, unaffected by market fluctuations, and they focus more on long-term investment returns.

On the other hand, low-yield users exhibit greedy characteristics in bull markets. They are more willing to actively participate in the market and allocate their funds to a wider range of market-making activities. This behavior is possibly driven by their pursuit of short-term profits.

In bear markets, high-yield users become more alert and tend to withdraw positions more quickly to mitigate the risks associated with market downturns. They are more sensitive to the market’s fearful sentiment, anticipate possible risks in the market, and take corresponding protective measures.

Conversely, low-yield users in bear markets may exhibit excessive fear and withdraw liquidity more frequently to avoid potential losses. They are concerned about market uncertainty and downward pressure, leading them to adopt more aggressive withdrawal strategies to protect their funds.

Implied vol

Unlike traditional liquidity providers in traditional financial markets, liquidity providers in V3 typically provide longer-term liquidity within a specified timeframe. As V3 positions are derivatives, it naturally leads to the question of how to extract implied volatility from them as a predictor of future market volatility. We have the following data available:

  1. Weighted position IV: Zelos describes in their article “Thimplied Vol of Uniswap V3 position and its analysis framework” (https://medium.com/zelos-research/thimplied-vol-of-uniswap-v3-position-and-its-analysis-framework-6c2c30df6444) how to extract implied volatility information from active V3 positions.
  2. Smart money position IV: By using the same calculation method, but focusing on the top 50 addresses with alpha calculated based on CAPM (Capital Asset Pricing Model), we can derive the implied volatility based on their positions on a monthly basis.
  3. ETH implied volatility index from the options market, downloadable from https://t3index.com/indexes/bit-vol/#
  4. Realized volatility: Calculated based on the minute-by-minute price data of the ETH pool, providing the daily volatility measurement.

v3 Process of Implied Volatility Calculation

The core idea is to generate a large number of paths based on volatility, calculate the value at expiration for each path, and then take the average as our expected valuation of the LP. Since there is a monotonic relationship between volatility and LP value, if the LP price is above 1, it suggests that we have not matched the correct volatility and should use a smaller volatility to generate paths. Through binary search, we can infer the implied volatility view represented by a mint action.

When we can track the implied volatility associated with a position, we would like to determine if addresses that are more profitable in the market are more sensitive to volatility. Therefore, each month we use CAPM to calculate the excess returns alpha for the top 50 addresses, which serves as the predicted address pool for implied volatility for the next month. In the following month, implied volatility is calculated for the active positions of these addresses and weighted based on liquidity. The following statistical results are obtained.

merge_iv.csv

From the chart, we can observe that alpha addresses are more sensitive to market volatility. The smart money IV (represented in red) consistently leads the overall address IV (represented in yellow) by one step, indicating that smart money is more sensitive to market volatility compared to other users.

In comparison to dvol from the options market, the implied volatility from the V3 market is closer to realized implied volatility. This is especially evident during periods of low volatility. One plausible explanation is that liquidity providers take on a short position in volatility, essentially being short the volatility itself. During times of low volatility, they tend to provide more liquidity. However, they consider exiting during periods of high volatility.

Conclusion and Future Work

In summary, we have defined a weighted method to distinguish between bear and bull markets and explored the relationship between volatility and market conditions. We have also conducted qualitative research on how users tend to invest during different market conditions. However, our study has some limitations. For example, we have only considered user strategies on Ethereum, and some statistical conclusions may not be very apparent. Market-making strategies can provide clues to predict market sentiment and even price trends.

Code

Regarding the code for this analysis, you can refer to the following Github repository: https://github.com/zelos-alpha/uniswap-annual-review-2023.

--

--