The Natural Philosophy of Uniswap V3

BytomDAO
BytomDAO
Published in
13 min readJun 22, 2021

Abstract: Uniswap V3 not only has a complicated structure of its own principles, but its LP market-making characteristics are also more unpredictable. We selected and analyzed the practical thinking and experience of some professional quantitative market makers on Uniswap V3, and explored the factors that influence LP’s market-making behavior and the evolution of advanced market-making strategies. Furthermore, we hope to discover the essence of the integration of the centralized market maker DEX and AMM to open a broader boundary.

Professional LP

There have been a lot of articles that have deconstructed the core logic of Uniswap V3 in detail from the principle and code level, but more importantly, it should be the analysis of the new market-making characteristics of Uniswap V3. In this regard, we were surprised to find that there have been many professional quantitative market-making agencies silently contributing a lot of research content and practical strategies, and even a quantitative agency proudly announced that it has achieved twice the performance of market-making profit of Uniswap V2 by relying on advanced strategies on V3.

Before Uniswap V3, any LP on AMM/DEX had only one behavior-”Invest and hold for a long time.” To a certain extent, LP only belongs to crypto whales. Just as “All tactics are meaningless in the face of the crush of absolute power”, any strategy is pale in the face of betting on huge amounts of funds. The emergence of Uni V3 put an end to this long-standing pattern. Crypto whales will face a new game of frantic encirclement and suppression by “hungry wolves”. These “wolves” led by professional quantitative market-making institutions will call for larger private funds with generous profit feedback, form a powerful machine gun pool, and rely on superb “tactics” to completely seize most of the procedures from the mouth of the crypto whale. The more sophisticated “wolves” will continue to adjust positions to avoid risks such as the Impermanent Loss (IL) that AMM hates.

LP is getting professional, tick/range mechanism of Uni V3 can magnify a small amount of funds onto a virtual AMM curve, which in fact gives LP that has small amounts of capital with high leverage. While amplifying capital with high leverage to earn high returns, LP will also face severe risk management challenges. Whether they can manage high risks under high leverage is an important indicator of LP professionalism.

Against volatility

There is a view that “V3 LP is essentially shorting volatility”-”Most of the liquidity is concentrated in the middle, and it does show the characteristics of liquidity concentrated near the market price. It reflects that V3 has lost resistance to price fluctuations in exchange for the efficiency of capital use. In other words, V3 is essentially empty volatility in exchange for more royalties. Similar to option products, sell volatility and get royalties” [2]. Indeed, after reading the basic principles of Uni V3, the first reaction LP should try to gather most of its funds in a very small range (Range) near the current exchange rate point. Because if you don’t do this, there will always be more radical or more professional LP doing this, and everyone will squeeze the profit margin to the extreme, which depends entirely on their own unique capital efficiency advantages or strategic advantages.

As shown in the figure above, if you only have $1,000 in funds, in traditional V2, you can only make a market with $1,000 in funds, and you can get commission income based on the percentage of the pool. But in Uniswap V3, you can exchange risk (volatility) for leverage (capital efficiency). For example, if you choose a blue strategy, that is, if $1,000 is gathered within the 50% fluctuation range of the current exchange rate point, you will get 4 times the capital efficiency. It is equivalent to having $4,000 in market making within this range; choosing the purple strategy and gathering $1,000 in the 1% fluctuation range around the current exchange rate point, you can obtain 175 times leverage, which is equivalent to $175,000 in market making. This is very scary. It seems to be said that this is the same as stud’s own part of the funds in the centralized exchange.

Whether it is an irrational radical LP or a rational LP with a well-thought-out strategy, they will do everything they can to counter the volatility of the trading pair in the face of profit temptation. The figure above shows the depth distribution of the first USDC/ETH trading pair in V3 TVL. The amount of “smart money” is concentrated in the 50% fluctuation range, while the middle tail has only a relatively small amount of funds. The figure below shows in the WBTC/USDC trading pair, almost all of the capital was concentrated near the handicap, and there was even a “fault” in the middle and tail.

The source of this difference is the quantitative market maker’s prediction of the future volatility (realized volatility) of different transactions based on data and models. The volatility of BTC will be more stable than that of ETH, and the maximum instantaneous decline of BTC will also be smaller than that of ETH. If you look at the depth distribution map of all V3 trading pairs, you will find that it shows left-right asymmetry, anti-normal distribution (spikes), discreteness, and other characteristics, which seem to be very similar to the depth map of the head centralized exchange (there are also views that “ With the gradual maturity of LP market-making participants, it is speculated that the depth of LP distribution in the future will show a similar option holding situation, that is, most of the current market participates in the judgment of prices. This also means that the vast majority of TVL currently on V3 comes from professional market-making agencies. Even in the current situation when the exchange demand of real users is weakening, V3 can still create transaction volume and fee income by creating an efficient game between professional market makers, just as V3 held a super league for professional institutions. At the same time, it also brings an unprecedented trading experience to ordinary users, just like who can guarantee that most of the trading volume in the current head centralized exchanges don’t have data cheating.

In order to better understand the dynamic balance between volatility, preset price range and return, we assume a basic ideal situation: all LPs have the same initial capital amount, and the price range can be set freely, but it can only be set once, Whether it is the LP with the smallest setting range that will eventually get the most benefits. In the article [3], a similar scenario model is given and the results are fitted.

From the above figure, it can be roughly felt that the narrower the interval may not be the most profitable, but it is more obvious that the larger the interval is, the faster the return will decline; under the assumption that only one setting is allowed, the asset may experience relatively large fluctuations. The current exchange rate directly jumps out of the narrowest range, so that this part of the LP no longer enjoys the fee income. Therefore, in actual situations, being able to actively monitor exchange rate changes is the core professionalism proposed by V3 to LP, but does it mean “still choosing the narrowest range, as long as it can monitor exchange rate changes in real-time and quickly adjust to the new narrowest range”. This involves the risk and cost of the narrow interval and the replacement interval. Especially on Ethereum, each reset interval will bring about a non-negligible GAS cost problem. Perhaps the cost of an adjustment can be offset in front of the overall benefit, but in terms of probability, the narrower the interval, the greater the fluctuation, the higher the reset frequency, the cost becomes non-negligible, and even severely consumes the overall benefits in exchange for a narrow range. Here is also a fitting graph in [3].

The above figure shows that the replacement cost was significantly consumed at the narrowest interval, so the overall income is not better than the 15% interval range setting. In actual situations, the professional market maker LP will also find a balance between the narrow range and the replacement cost. For example, a strategy with a project will fix the upper limit of the daily reset frequency. The reset occurs not only when the exchange rate jumps out of the range”. In the fiercely competitive market-making competition, even if the exchange rate is still in the set range, it is no longer in the center of the range, and there is an offset. If you don’t go in time adjustment, this offset will cause the next revenue reduction phenomenon, especially the narrower the interval is set, the more obvious the revenue declines after each offset from the center point (this is the ratio caused by the virtual amplification mechanism of Uniswap V3 influences). Therefore, in theory, a narrow interval will definitely bring frequent reset operations. If Layer 2 solves the V3 GAS problem in the future, it can be expected that the battle around the narrow interval will become more intense. The cost problem can be solved, but the risk problem inherently persists.

Magnified impermanence loss

Uni V3 actually amplifies the impermanent loss of LP: V3 can amplify the number of funds of LP through the virtual curve, which will also cause certain end assets to be completely traded at a lower average price (losing the protection of the traditional constant product curve exponential increase). To give a rough example, put 1 ETH and 2500 USDT on V2. If the exchange rate rises by 50%, the impermanent loss will be 2.02% of US$6,250 (US$126.25); on V3, it can be enlarged by 4.16 times. Put 1 ETH and 2500 USDT, a 50% increase will directly cause ETH to be emptied, and in the end, only about 5561 USDT (the average transaction price of ETH sqrt(3750)*sqrt(2500)=3061) is left, and the impermanent loss is 689 US dollars, a loss ratio of the amplitude to “50/50 hold” is 11% (the amplitude of impermanence loss), and the ratio to “Uniswap V2” is 9%. It is very obvious that most LPs are believed to be unacceptable (calculation refer to tool [4]).

Therefore, compared with the cost of replacement, it seems that the risk problem is more prominent and cannot be eradicated to warn the market maker LP:

(1) Timely monitor and adjust quickly to avoid zeroing certain assets;

(2) The wide interval is better than the narrow interval;

(3) Wide range for large funds and narrow range for small funds.

Judging from the tool simulation in the above figure, it is difficult for APR of trading fees to make up for the impermanent loss. While LP is fighting against volatility, don’t ignore the importance of mean reversion, and don’t lead yourself to zero and cannot return.

An article [5] from the perspective of on-chain data analysis also confirmed that arbitrage activities on V3 are extremely active — —

“As shown in the table below, since its inception, the largest robot has accounted for 15.5% of Uniswap V3’s total transaction volume! Since the launch of V3, this address alone has generated 3 billion dollars in transaction volume. In addition, the top 5 arbitrage robots are about accounted for 22% of the total transaction volume, much greater than the level of V2. In the same period, the top 5 arbitrageurs accounted for approximately 11.2% of the total transaction volume”

The magnified impermanent loss should become one of the biggest stumbling blocks for LP in their rival. Compared with the volatility, the biggest impact is the degree of maximization of returns. While pursuing the core strategy of “narrow range, central symmetry”, it is difficult to achieve mutual complementarity with “mean regression”. Shifting the center means IL occurs, and crossing the “grid” means IL is finalized and irreversible. LP should not focus on the rate of return when choosing the price range but should set risk parameters around the “average return of exchange rate” as much as possible. Under this large basic setting, continue to refine the strategy and pursue short-term returns maximized.

In theory, although LP will continue to move their positions following the current exchange rate changes, this will not be the behavior that all LP take. It depends on their respective perceptions of income. Therefore, arbitrageurs will still seize a large amount of low-cost assets. , which is the impermanent loss. What’s more interesting is that these arbitrageurs can immediately become LP (unilateral market-making) in the next range after grabbing a large number of low-cost assets. If the asset can continue to rise, this part of the asset will return to the higher exchange rate translates to the other end, forming self-fulfillment within the system of arbitrageurs.

If making a vivid analogy: an excellent commander should outline the short, medium and long-term all-round force deployment. First of all, in the long-term strategy, with the constant response to changes, to ensure that the main force will not be consumed by impermanent losses, extreme market conditions; no matter what kind of quantitative forecasting model is used if it can detect short-term fluctuations, treat it as, in an independent battle, the forces of units below the “regiment” are quickly assembled and gathered. Even if a loss occurs, there is still room for “repair and rest” in the future. The commander can divide the large corps into a large number of gradient guerrillas. When the BTC is 40,000, 50,000, 60,000, and 100,000 US dollars, they will invest heavily in a column. Even if a certain unit is troubled by impermanent losses, it also realizes the “infinite grid” as strategic deployment.

The characteristics of liquidity placed in V3 are:

(1) If the current exchange rate point is within the set range: if the exchange rate point happens to be in the middle, the two assets will be deposited at the same value ratio, if not in the middle, the different ratios will be deposited together, according to the V3 logic calculation;

(2) If the current exchange rate point is outside the range: only need to deposit liquidity at one end.

This feature is very interesting. If you only have one asset, you can be in a shorter range. As time moves, the point moves to the near future, and you can automatically obtain two assets without traditional trading fees and this process also gains benefits through market-making. In fact, for LP it is a useful magic weapon, and the “forces” that can be deployed can go to a certain interval in the future to hedge losses.

Unknowingly, I discovered Uni V3’s like method of war. Its philosophy is “I have provided the basis for 36 strategies, and you can play as you like”. Perhaps the complex implementation architecture of V3 will not be directly copied by other AMM projects (not so easy), but the mode of V3 can be truly resurrected, allowing DEX and centralized exchange to climb on top of each other. Other AMM/DEX projects also need to provide services on their respective platforms. In the past, they needed to be decentralized to complete their operations. Now they can be strategically linked with V3 to greatly reduce costs. If it goes further, AMM financial management can link some user funds on V3 to expand the overall benefits of platform users.

To be continued

In the first half, we hope to clarify several important considerations that affect V3 LP market-making, especially to avoid the exhaustion of “end liquidity”. At present, it is difficult to have an objective point of maximizing profit, because the game is always changing. Some will focus on the short-term fee income maximization, and some will rely on the medium and long-term infinite grid to passively follow the maximum return. In any case, if you have the skills to control risks and losses, you will always win in the game of maximizing returns. Based on this understanding, we can continue to in-depth research and analysis of professional high-level strategy models, and we will not leave it alone, so as to judge and simulate whether these strategies are effective and the risk points. TVL, an important indicator of traditional DeFi, may gradually fade in the new generation of AMM. In the future, V3 may start a “strategic battle for high ground”. Many other quantitative market makers in AMM or DEX projects have the opportunity to interact with V3 and look for To a more superior strategy to serve its own DEX platform. We will continue to share in the second half — —

Forecasting and choosing opportunities, what kind of quantitative strategy models and risk control models will exist, introduce Charm and Lixir, how to obtain higher Alpha, whether you recognize it or not, MOV SuperTx (funded AMM) is indeed very advanced;

There are some interesting features, such as the implementation of a strategy similar to covered call (put) options based on the V3 kernel, and the range of V3 LP tokens will be more suitable to become stable collateral (some projects are integrated into CDO);

V3 may have huge system risk points (extreme market conditions, lightning loan attacks, liquidity faults, trampling and slippage);

For those order book DEX (such as 0x, Kyber) that rely on quantified market makers for market-making, can they completely rely on the V3 kernel to rebuild, thereby reducing the integration and maintenance costs of market makers.

Quote:

【1】https://finematics.com/uniswap-v3-explained/

【2】https://www.chainnews.com/articles/634355857976.htm

【3】https://www.8btc.com/article/6636668

【4】https://defi-lab.xyz/uniswapv3simulator

【5】https://www.8btc.com/article/6641244

【6】https://www.chainnews.com/articles/435395096072.htm

--

--