Paradigm's latest research: Uniswap's financial alchemy

Paradigm's latest research: Uniswap's financial alchemy

Note:

The researchers believe that even if Uniswap liquidity providers (LPs) experience losses on every arbitrageur trade, in some cases they can still perform better than simply holding coins due to volatility harvesting. In this case, the fee setting should be as close to zero as possible, but not zero, to allow for as much rebalancing as possible.

The original authors are Dave White, Martin Tassy, ​​Charlie Noyes and Dan Robinson, researchers from investment institution Paradigm, who are also seed round investors of Uniswap.

Under ruthless arbitrage, Uniswap LPs have become rich (source).

1. Problem

On October 14, Charlie Noyes posted on Twitter an issue he and Dan Robinson have been arguing about:

“For any Uniswap asset pair, what is the optimal fee? Can this optimal fee beat an unbalanced portfolio minus impermanent loss or even outperform growth?”

1.1 Background

Automated market makers (AMMs) are a type of decentralized exchange that allows customers to trade between on-chain assets like USDC and ETH. Uniswap is the most popular AMM on Ethereum. Like most asset management systems, Uniswap facilitates trading between specific asset pairs by holding reserves of both assets. It determines the price of transactions between them based on the size of its reserves, thereby keeping prices consistent with the broader market.

Anyone willing to join a pair of asset pools is called a liquidity provider, or LP for short. These people will contribute assets to both reserve assets at the same time. They will bear part of the transaction risk in exchange for part of the fee return.

1.2 Setting Problems

The asset pool provides liquidity between stablecoins and risky assets with randomly changing prices, and we also make a particularly cruel assumption that all transactions entering the pool are informed (arbitrage transactions only occur when there is a deviation between the AMM price and the normal trading price).

In other words, the entire pool will experience a loss after each trade .

1.3 Traditional thinking

At first glance, becoming a Uniswap LP would seem to be a costly mistake in this context.

Since market makers require a lower price to buy than to sell, they profit directly when the asset price does not move, and the buy and sell volumes they receive are roughly balanced. These trades are often referred to as "uninformed" trades because they are not related to short-term price movements.

On the other hand, market makers lose money when they buy an asset before the price drops, or sell it before the price rises. Therefore, one of the most feared counterparties of market makers is arbitrageurs, who only come to trade when the price changes and leave the market makers behind. Every trade executed by an arbitrageur is a pure profit for him, but a pure loss for the market maker.

Since there are no uninformed trades in our Uniswap problem setting (in fact, we assume that every trade is an arbitrage trade), LPs will obviously experience very large losses.

1.4 Challenges

However, Dan and Charlie don't think the story ends there.

They suspect that for certain underlying price dynamics, being a Uniswap LP still makes sense.

They posed the problem to Steven Shreve, a legend in mathematical finance, and then announced it on Twitter, and Martin Tassy and I independently came up with partial solutions, and then collaborated to extend the full solution to the general case.

Over the next few weeks, the four of us spent some time via Telegram discussing the results, looking for bugs, and building up our intuition, and these discussions are the basis of this post.

2. Solution

If an asset’s volatility is high enough relative to its average return, then over time LPs on Uniswap will outperform HODLers, even if all trades are arbitrage trades.

This is due to a phenomenon called "volatility harvesting": under certain conditions, by periodically rebalancing the two assets, it is possible for them to outperform any static portfolio. In this context, "rebalancing" means making trades that return the proportion of the total portfolio value held in each asset to a fixed configuration, such as 50/50.

So when LPs are arbitrageured, they essentially pay a fee to the market to rebalance the portfolio for them. In this particular mathematical context, when this rebalancing is beneficial, you want to do it as much as possible. This means that liquidity providers should set their fees as low as possible without going to zero.

This is good news for Uniswap because it means that even in a world dominated by arbitrage trading, fees can still be kept low, allowing Uniswap to remain competitive as on-chain order books grow and start offering tighter spreads.

That said, it is worth repeating that these results apply to a very specific stylized mathematical setting, where the assumptions involved are very similar to the Black-Scholes options pricing model. For mathematical convenience, we also assume a fee structure different from the one used in Uniswap production.

2.1 Comparison Standards

We evaluate different strategies by comparing their incremental wealth growth rates, which measure how quickly they compound (or lose) value over the long term.

This quantity is important because strategies that optimize it over time perform better than strategies that are almost unsure.

We compare all strategies to an “unbalanced portfolio” where half of the value is in stablecoins and the other half is in risky assets, which never changes. This is also the community standard for measuring the so-called “impermanent loss” in AMMs.

No matter what happens, the unbalanced portfolio always holds the same amount of stablecoins, which means that in the worst case scenario, when the risky asset loses all its value, the unbalanced portfolio will consist almost entirely of stablecoins and will therefore have zero growth rate in the long run.

On the other hand, if the risky asset grows exponentially, it will quickly become dominant in the unbalanced portfolio, thus growing at the same rate as the risky asset.

It is worth noting that two portfolios can share the same incremental wealth growth rate and yet perform very differently in close proximity. For example, if the risk asset has a zero growth rate, then a stake in zero-fee Uniswap will always be worth less than an unbalanced portfolio, but since neither is expected to compound or lose money over time, both will have zero wealth growth rates.

2.2 Volatility Drag

Volatility resistance during 50% loss/75% gain (source).

To understand these results, we first need to understand the concept of volatility drag. Suppose our risky asset's price either falls by 50% or rises by 75% every year, and the probability of both happening is equal.

In any given year, if we invest $100 in this asset, our expected value is (50+175)/2 = $112.5. If we simply buy and hold, the expected value of our portfolio will increase by 12.5% ​​each year, which seems like a good deal.

Unfortunately, in the real world, our profits will not be realized. If we buy and hold this security, we will eventually lose everything.

This is because compounding wealth over time can lead to catastrophic losses.

If we lose 50% one year and gain 75% the next, we will only have 87.5% of our investment (50% * 175%).

Over time, the law of large numbers will ensure that our returns are -15% per year, and we will inevitably go bankrupt.

2, 3 Wait, what happened?

If you have been trained to analyze gambling from the perspective of expected value, then there is a good chance that the previous section will seem very strange, or perhaps even completely incorrect.

In fact, a little over a week ago, we had a complete, closed-form mathematical solution to this problem, and before that I had no idea what it meant intuitively.

At its root: expected value is a theoretical quantity that measures what would happen if we replicated a given game simultaneously in countless parallel universes.

But the reality is not like that, we only have one chance per gamble, and the effects of the gambles we play are not instantaneous, but compounded over time.

We can look at it from another angle to help reconcile the math. As we repeat the (-50% / +75%) game over and over, reinvesting the money each time, only a tiny fraction of the paths are correct, resulting in astronomical returns.

Over time, these paths become a smaller and smaller fraction of all possible paths, and our chances of actually seeing one of them come to fruition shrink to zero.

2.4 The value of rebalancing

In the face of volatility headwinds, keep some of your money in reserve even when expectancy is positive. This way, when things go wrong, you lose less, which increases your compound wealth in the long run.

All of this leads to some fairly familiar concepts as far as trading is concerned. When prices are rising, sometimes it makes sense to close part of a position to lock in profits in case prices fall again. When prices are falling, sometimes it makes sense to buy the dip in order to get an expected future return at a favorable price.

In some cases, such as this one, the optimal strategy is to continually rebalance your portfolio so that you always have a fixed proportion of your wealth invested in each position, say, half stablecoins, half risky assets. This is not always the optimal balance, and generally you want the more risky assets in your portfolio, the higher their returns relative to their volatility, but we defer further exploration of this to future work.

The benefits of rebalancing for long-term wealth growth can be enormous and can mean the difference between exponential wealth growth and bankruptcy. This is true even in the context of our setup where every rebalancing transaction is unfavorably priced and creates an instantaneous loss.

2.5 Resources

Chances are you're not satisfied with these explanations and want to know more.

You can start by reviewing the Kelly Criterion, a theoretically optimal betting strategy based on these principles. A well-respected and easy-to-read book on the history and implications of the Kelly Criterion is @wpoundstone’s The Wealth Formula.

On the other hand, for a deeper dive into the mathematics of wealth growth, I highly recommend @ole_b_peters' lecture notes on ergodic economics or his article in Nature.

If you choose to do your own research, be careful; this is a poorly understood area and during my own research I found many sources to have errors that set my understanding back hours or days.

In particular, if you see someone calling for mean regression or log utility functions, I would advise you not to stop and move on. The key results in this area do not require assuming any particular distribution of returns or utility functions.

2. 6-Cost Alchemy

In this setup, when is it beneficial to be an LP, and should LPs rebalance as often as possible to facilitate rebalancing at minimal cost?

(Fees should be as low as possible, but not zero, so that rebalancing is triggered by increasingly small price changes. Dan Robinson calls this “picking up pennies in a quantum bubble.”)

However, when fees are exactly zero, all benefits of rebalancing disappear and, in most cases, LPs are worse off than if they had simply held an unbalanced portfolio.

Understanding this seeming anomaly helps shed light on the rest of the problem.

Uniswap uses a "constant product" invariant, which means that in order to not charge fees, every trade must keep the product of the reserve balances constant. We express this as

, although readers familiar with Uniswap may be more accustomed to writing it as x*y = k.

However, it turns out that in order to achieve rebalancing, the number of this product C must increase in order to provide us with excess wealth growth.

Why is C so important? We say

is the geometric mean of our reserve balances Ra and Rb. Like the arithmetic mean, the geometric mean increases as reserves increase. However, unlike the arithmetic mean, the geometric mean shrinks as reserves become imbalanced, even if their arithmetic means remain the same.

In the absence of any fees, C is constant, so transactions always result in either a larger reserve or a more balanced reserve. It never happens that both exist at the same time, so there is no incentive for wealth to grow.

However, in the real world Uniswap, or in our setting, non-zero fees guarantee that C increases with every transaction. Over time, this means that the reserve not only grows, but also remains in balance, which provides the benefits discussed above.

To see the precise mathematics of how this is calculated, see section 3.1 of Martin and my proof paper.

3. Mathematics

Having said all that, we can now answer exactly the question posed in Charlie’s original problem statement.

To reiterate, they focus on the wealth growth rate G of Uniswap-style AMMs, where the percentage rate

Affects stablecoins and volatile assets (fluctuating in geometric Brownian motion with parameters

Drift and

volatility) between markets.

3.1 LP Wealth Growth Rate

3.2 Optimal Fees and Excess Returns

As an LP, the return of holding half stablecoins and half risk assets exceeds that of simply holding coins if and only if:

In this case, LPs should set their fees as low as possible but not to zero, and they will achieve a wealth growth rate approaching

3.3 Explanation

Since geometric Brownian motion simulates compound growth, they are also subject to volatility drag, which is mathematically represented as

, the wealth growth rate is:

This means that in

In this range, becoming a Uniswap LP is more

The HODL growth rate is more meaningful.

This gives us a perspective on the results: rebalancing allows us to partially offset the volatility headwinds of the underlying assets. If there were no volatility headwinds, and the average return was also zero or negative, then the amount of rebalancing would not help. Although the rebalanced portfolio would still do better than just holding the assets themselves, we would be better off just holding stablecoins.

On the other hand, if there is no volatility resistance the average return is positive:

  1. If volatility drag causes an asset to lose more than 200% of its mean log return, then rebalancing on Uniswap won’t remove enough drag and you’re better off holding your stablecoin.

  2. If volatility drag causes an asset to lose less than 66% of its average log return, then it is not worth rebalancing on Uniswap and you are better off simply holding the asset.

  3. Within this range, being a Uniswap LP will eventually make you rich, in fact, richer than if you held an unbalanced portfolio of any stablecoin and volatile assets, including both some that will eventually become worthless and some that will go parabolic.

3.4 Proof

A preprint of the full proof can be found here. It works by modeling the dynamics of a discrete random walk and then taking behavioral limits when shrinking the step size to zero.

You can also check out my original proof for the zero log drift case and do some simulations of the problem here.

3.5 How much trust should we place in these findings?

In my personal opinion, this is very credible.

We have two independent proofs that produce the same result when the domains overlap. We also have some simulations that verify our predictions:

Simulated and predicted wealth growth rates (source).

Still, this is a very confusing area and my understanding of it has changed many times over the past few weeks. If you do find an error, please feel free to contact us.

IV. Future Work

While we hope you agree that these findings are theoretically interesting (or maddening), there is still a lot of work to be done to determine their real-world relevance.

For example, many of our assumptions could be modified or extended:

  1. How do these results translate to the multi-asset case, or when LPs can choose to rebalance in a ratio other than 50/50 like Balancer does?

  2. What happens when we no longer allow infinite transactions per unit of time?

  3. What happens when we introduce transaction costs that can even vary to reflect priority gas auction dynamics?

There are also some empirical questions:

  1. Can we estimate these parameters for securities trading in the market today?

  2. How many actively traded tokens are there that could benefit from the rebalancing strategy we described?

  3. Can we determine what proportion of Uniswap LP returns are realized in reality due to volatility gains?

Finally, and perhaps most interestingly, how can we take what we’ve learned here and use it to improve existing protocols, create a new one, or grow the DeFi ecosystem as a whole?

5. Let’s discuss

Any questions? Ideas? Potential applications?

We want to hear from you.

@_charlienoyes ● @danrobinson ● @_Dave__White_ ● @MartinTassy

Thanks to Vitalik Buterin, Matt Huang, Georgios Konstantopoulos, and Alex Evans for their comments on this article.


<<:  Hashrate Market Weekly Report (2020.11.27-2020.12.04)

>>:  USDT's market value has increased nearly 4 times this year, and fiat stablecoins are booming in the bull market

Recommend

What are the characteristics of eyebrows and nose for wealth and fortune?

Why is it said that a person’s fortune and wealth...

Seven types of women with full blessings

Everyone hopes to be a blessed person, but in fac...

What does a mole on the sole of the foot represent?

What does a mole on the foot mean? The moles unde...

The forehead wrinkles tell your fate. Are you lucky or unlucky?

1. A forehead wrinkle can tell your fate If you h...

A person who likes to eat but doesn't like to exercise

Sometimes, the most dangerous type of people are ...

Can a man with dragon and phoenix eyes really get rich through marriage?

What does a man’s dragon and phoenix eyes mean? E...

The big market sucks blood, and small mining coins fall out of favor

"The low market value of small mining coins ...

Cocktail Supplier Accepts BCH Payments

Cocktail supplier MicroBarBox recently announced ...

Do you know the origin of the mole of misery?

Perhaps most people have heard of teardrop moles,...

How to tell fortune by looking at face and ears

The ear is called the palace of adoption in the t...