How to use decentralized options to hedge AMM’s impermanent losses? Learn about FinNexus option portfolio strategy

How to use decentralized options to hedge AMM’s impermanent losses? Learn about FinNexus option portfolio strategy

Loading

The general option agreement hedging strategy can be combined with the automated mining strategy in AMM to provide strong protection against the risk of impermanent loss.

Original title: “How to use FinNexus decentralized options to hedge against impermanent losses”
Written by: Ryan Tian, ​​Co-founder and CFO of FinNexus

DeFi has brought revolutionary changes to encrypted finance, but at the same time it also brings more risks. The impermanence loss in the AMM liquidity pool is one of the pain points that plague many liquidity providers and project parties.

The impermanence loss comes from the decentralized AMM transaction mechanism. How to hedge the impermanence loss through the decentralized method? Is there an encryption product that can solve this problem?

FinNexus’s decentralized option provides the answer.

The decentralized cross-chain options platform created by FinNexus pioneered the design of a peer-to-peer option trading model, concentrating all liquidity in a mortgage pool, and acting as the counterparty for all options trading. At present, FinNexus’s General Option Agreement (FPO) v1.0 has officially launched Ethereum and Wanchain, and has been operating stably, becoming a powerful tool for hedging the impermanence of the AMM liquidity pool.

In the following content, we will discuss in detail how to use FinNexus decentralized option portfolio to solve the problem of impermanent loss.

What is impermanence loss?

Before understanding the impermanence loss, we need to master some basic concepts and models.

AMM

AMM stands for automatic market maker, which is different from the order book transaction account book of traditional centralized exchanges. It is that decentralized exchanges rely on specific algorithms written into functional contracts on the chain to price assets. Now, there are many AMM projects on the market, such as Uniswap, Sushiswap, Curve, Balancer, Bancor, DODO, etc. Compared with the traditional central exchange (CEX), we generally refer to them as decentralized transactions with AMM mechanism (DEX). In DEX, each trading pair has its own dedicated liquidity pool, and Balancer even allows the creation of a trading liquidity pool that supports multiple tokens at the same time.

The liquidity pool automatically provides liquidity for asset transactions. In other words, if users want to sell or buy tokens, they do not need to find and match counterparties themselves. The transaction fee income generated in the transaction is shared by the users who provide liquidity and is automatically allocated to each user’s address. The specific amount is determined by the user’s share in the liquidity pool.

XYK model

Although the liquidity pool concentrates all liquidity and is shared by all users, the AMM mechanism behind each liquidity pool may be different.

The XYK model is the most famous and widely used AMM mechanism in decentralized exchanges. For detailed information about the XYK model, I have done relevant analysis before, and interested users can click this link to visit. The representative projects of the XYK model are Uniswap and Sushiswap, both of which have locked up more than $1 billion in funds on November 20, 2020, ranking the top 2 of all DEXs.

The XYK model is also called the “x ∗ y = k market maker” model. According to this equation, if a user creates a market-making liquidity pool through this contract, it holds x X tokens and y Y tokens. Under this model, the value of the constant k always remains unchanged, that is, x ∗ y = k constant. In the pool, the total value of the token X and the token Y is always in the same state, that is to say, in the liquid pool, the value composition ratio of the token X and the token Y is 1:1, and the transaction is between X and Y After it is generated, it causes a change in the number of tokens in the pool, which will affect the relative prices of token X and token Y accordingly. It should be noted that, according to this model, the ratio of the number of tokens X and token Y in the liquidity pool is the relative price of the two transactions in the pool.

Assuming there is no transaction fee, then users can buy and sell tokens by changing the position on the x*y = k curve in the figure below. If you move to the right, the amount shifted to the right is the number of tokens X sold by the user. This part of the Δx number of tokens X will enter the flow pool; and the number of tokens moved downward in the vertical axis direction corresponds to the token Y obtained by the user The number of Δy tokens Y will be withdrawn from the liquidity pool due to transactions.

How to use decentralized options to hedge AMM's impermanent loss? Learn about FinNexus option portfolio strategy

Therefore, according to the XYK model, the product of the number of tokens X and token Y remains unchanged, that is, x1 * y1 = x2 * y2 = (x1 + Δx) * (y1-Δy) = k in the figure above

For example: if a liquidity provider adds 40,000 DAI and 100 ETH (total value of 80,000 USD) to the pool, assume that the price of ETH is 400 DAI at this time. Constant k = 40,000 * 100 = 4,000,000

Assuming that there are no transaction fees, a user wants to sell ETH and buy DAI, so he sells 5 ETH to the liquidity pool. There are now 105 ETH in the pool. According to the XYK mechanism, k remains constant at 4,000,000. Therefore, the number of DAI in the pool becomes 4,000,000 / 105 = 38,095.24. The ETH seller gets 1904.76 (that is, 40,000-38,095.24) DAI in return. The price of ETH in the liquid pool becomes 38,095.24 / 105 = 362.81 DAI. The real ETH exchange price sold to the seller is 1904.76 / 5 = 380.95 DAI.

How to use decentralized options to hedge AMM's impermanent loss? Learn about FinNexus option portfolio strategy

Impermanence loss

concept

Impermanent Loss (IL) is the loss suffered by the liquidity provider in the AMM liquidity pool. After users provide liquidity to the liquidity pool, if the relative price of the invested assets changes, which is different from the price when the assets enter the pool, impermanent losses will occur. The greater the change in asset prices, the higher the impermanent losses suffered by liquidity providers. However, if the asset price fluctuates and returns to the relative price when the asset entered the pool, this loss will disappear. Therefore, we call this loss “Impermanent Loss.”

The impermanent loss in the liquidity pool is the value of the asset after it enters the liquidity pool, compared to the loss generated by the comparison of the two if the total value of the corresponding asset is held without entering the pool. It is not the total loss of net assets measured in US dollars, which is different from the financial performance evaluation of traditional financial securities investment portfolio behavior.

Generally, in a representative standard liquidity pool, the liquidity provider needs to provide two assets at a contractually constrained ratio, and usually one of the assets is more volatile than the other. Uniswap’s DAI / The ETH 50/50 flow pool is an example, and the Uniswap documentation briefly introduces this.

example

Continuing the above example, in the absence of transaction fees, the value of 1 DAI is $1, and the market price of ETH converges to its price in the liquidity pool.

How to use decentralized options to hedge AMM's impermanent loss? Learn about FinNexus option portfolio strategy

In the T2 period, the difference between the value of the token not in the liquidity pool and the price of the token in the liquidity pool is the free loss (IL).
IL = $76,281- $76,190.48 = $90.52

In this example, the impermanence loss does not seem to be serious. But the fact is that if the token price changes sharply in either direction, the impermanence loss will become even greater. In other words, entering the pool to provide liquidity is far better than doing nothing and just holding assets.

In the figure below, the blue line is the value change when the user only holds 100 ETH and 40,000 DAI, the yellow line is the value when they are put into the AMM liquidity pool at a ratio of 1:1, and the difference between the two lines is the impermanent loss .

It can be found that when the price of ETH deviates from its price in the pool entry period, whether the price rises or falls, IL will increase. The greater the price change of ETH, the greater the IL. If transaction fees and mining incentives (if any) are not enough to compensate IL, then the liquidity provider will suffer losses, and the liquidity provided by the pool will not be worth the loss.

How to use decentralized options to hedge AMM's impermanent loss? Learn about FinNexus option portfolio strategy

How to derive IL mathematically

According to the same logic mentioned above, according to the ratio between the price of the asset when the user provides the process and the current price, we can use the following formula to calculate the size of the impermanence loss. For the specific derivation process of the formula, please click this link to visit.

How to use decentralized options to hedge AMM's impermanent loss? Learn about FinNexus option portfolio strategy

LR represents the ratio of impermanent loss (this ratio is the ratio of loss relative to holding only two assets), p1 and p2 are the relative prices of assets in T1 and T2 respectively.

How to use decentralized options to hedge AMM's impermanent loss? Learn about FinNexus option portfolio strategy

How to use decentralized options to hedge AMM's impermanent loss? Learn about FinNexus option portfolio strategy

Although the asset price rises or falls, it will lead to impermanent losses, but the price drop will lead to greater risks. If the price drops to close to 0, the impermanence loss ratio will be close to 100%, which is why some digital currencies provide AMM liquidity and the risk is relatively high.

How to hedge against impermanence losses

Perpetual contract

Perpetual contracts are a common tool to avoid the risk of spot price changes, especially for the spot crypto market. However, based on the above analysis, we can see that the losses suffered by the liquidity providers in the AMM pool are bidirectional and non-linear. As long as the price changes, IL will be generated. Perpetual futures, as a tool for hedging linear risks, cannot effectively reduce the risk of two-way fluctuations, thereby protecting the interests of liquidity providers.

Option

Options are an ideal tool for hedging IL risks.

Option profit and loss distribution

The profit and loss of options is not linearly distributed. Unlike perpetual contract holders, option buyers have only rights and no obligations. This means that when the market moves in an unfavorable direction, they can choose not to exercise, and the maximum loss is the option premium paid, but if the market changes in a favorable direction, the potential gains are theoretically unlimited. The figure below shows the changes in the profit and loss of put options and put option holders as the price of the underlying asset fluctuates.

How to use decentralized options to hedge AMM's impermanent loss? Learn about FinNexus option portfolio strategy

As shown in the green part of the figure, when the price of the underlying asset fluctuates in a favorable direction and the option holder makes a profit, there is a linear relationship between the profit and the price change. We can use different transaction prices and quantities of options to match different options Combine them to counteract the nonlinear changes in IL.

Option cost

The option buyer/holder only needs to pay the option fee, without locking any other collateral/margin in the contract, and will not face liquidation risk. The option buyer only needs to pay a certain fee, that is, the option premium, which is used to obtain the right to buy or sell the underlying asset at the agreed price in the future. The option premium is the only cost of the option buyer in the transaction. For hedging impermanent losses, users may need to purchase out-of-the-money (OTM) put options and call options. The exercise price of an option is one of the key factors in option pricing. The price of out-of-the-money OTM options will be much lower than at-the-money (ATM) options or in-the-money (ITM) options, which can reduce the IL hedging cost of liquidity providers.

How to use options to hedge IL risk

Basic logic

The IL curve has some convexity. Hedging the IL risk is to make the curve as horizontal as possible. Ideally, it should be close to the red line below after hedging.

How to use decentralized options to hedge AMM's impermanent loss? Learn about FinNexus option portfolio strategy

In order to achieve effective hedging, the profit and loss of the option needs to completely offset the profit and loss of IL, as shown in the blue curve below. Achieving this goal is a huge challenge, but it is possible to achieve a similar hedging effect through a combination of call and put options. Below we discuss possible option strategies and combinations.

How to use decentralized options to hedge AMM's impermanent loss? Learn about FinNexus option portfolio strategy

Hedge IL with a set of call/put options

By adopting the strategy of buying wide-span options, that is, holding both call options and put options of the same underlying asset, we can offset IL to a certain extent. The specific principles are as follows.

How to use decentralized options to hedge AMM's impermanent loss? Learn about FinNexus option portfolio strategy

Take a group of call options and put options that simultaneously purchase a spot price of ±30% as the exercise price as an example. Assume that the hedging strategy purchases the same number of options as the volatile asset in the liquidity pool.

Following the above example, the liquidity provider purchases 100 call options with an exercise price of US$520/ETH and 100 put options with an exercise price of US$280/ETH. The options are valid for 30 days.

For specific calculation details, please click here to visit.

How to use decentralized options to hedge AMM's impermanent loss? Learn about FinNexus option portfolio strategy

As can be seen from the figure above:

  1. When the price increases by more than 40%, IL has been completely offset. Ultimately, the call option will be sufficient to hedge IL and achieve profitability, as shown on the right flank of the orange curve.
  2. On the left wing, put options have effective hedging effects during the initial price decline stage and achieve profitability. But as the price fell further and the loss intensified, the put option was not enough to make up for the loss, and the final return was negative.
  3. In this plan, the hedging strategy simultaneously purchases the same number of call options and put options as the ETH in the liquidity pool. The fixed cost of this hedging strategy is high. According to calculations, the fixed cost of the option premium is 2.25% of the initial investment and the protection period is 30 days.

If users repeat this strategy every month, the annual cost can reach 27%. In this regard, the following adjustment ideas can be adopted to optimize the hedging results.

  1. The IL ratio when the price of ETH rises and falls is not symmetric.
  2. Multiple combinations of call options and put options should be used for hedging up and down.
  3. The number of options can be adjusted to reduce the upturn of the yellow line and adapt to different hedging effects and strategies.
  4. The effective range of hedging does not have to cover all price changes from -100% to +500%.

Use a combination of multiple options to hedge IL risk

The changes in profit caused by price changes are linearly distributed. When options are real-valued options, only one call option and put option cannot completely hedge the convexity of IL. However, by combining multiple put options and call options, combining options with different exercise prices, and adjusting the ratio of different options, we can find an effective way to offset IL.

For example, we can adopt the following strategies. Here we follow the above example.

  1. The hedging range of the price: -60% to + 100%;
  2. Hedging period: 30 days;
  3. Call options: 6 ETH call options with an exercise price of US$480 (+20%), 8 ETH call options with an exercise price of US$520 (+30%), and 10 ETH call options with an exercise price of US$560 (+40 %) ETH call option.
  4. Put options: 8 8ETH put options with an exercise price of US$360 (-10%), 10 ETH put options with an exercise price of US$320 (-20%), and 15 ETH put options with an exercise price of US$280 (-30%). %) ETH put options, and 5 ETH put options with an exercise price of $240 (-40%).

Please click here for specific calculation details.

How to use decentralized options to hedge AMM's impermanent loss? Learn about FinNexus option portfolio strategy

Within the hedging range, the orange curve after hedging is flatter, and the option price is more reasonable than before the adjustment. In addition to the adjustment strategies listed here, we can flexibly formulate a variety of plans, and adjust the orange curve accordingly through more aggressive or conservative hedging strategies.

How to use decentralized options to hedge AMM's impermanent loss? Learn about FinNexus option portfolio strategy

How to use decentralized options to hedge AMM's impermanent loss? Learn about FinNexus option portfolio strategy

Using different combinations of call and put options will bring very different results. Users can adopt different combinations according to different strategies.

How to obtain options to hedge IL risk?

The above strategies only work in the highly liquid options market. Even in Deribit, which accounts for more than 90% of the total trading volume, the liquidity of the order book for BTC and ETH options is still not deep enough, and some transactions still need to be completed with the help of OTC market, especially some OTM options. In the process of hedging IL risks, a combination of multiple out-of-the-money options is required, which adds a lot of difficulty to the practical operation of IL hedging.

Where is the road?

The distributed option of the point-to-pool model is the answer we are looking for. By aggregating liquidity, the pledge pool becomes the only counterparty for all options, and the buyer can flexibly customize option terms while facing a small price slippage. In addition, because all users share liquidity, when users purchase options, users are trading with the asset pool, rather than matching specific option sellers. In this case, the liquidity of OTM options is the same as any other type of asset.

Decentralized point-to-pool option platforms such as Hegic and FinNexus provide us with choices. Through decentralization, the liquidity of options is guaranteed.

The road ahead

FinNexus is the pioneer of IL hedging strategy. One of the most significant advantages of the FinNexus General Option Agreement (FPO) model is the creation of a USDC option pool collateralized by stable currencies, which supports users to use USDC to trade and settle options.

The FPO hedging strategy can be perfectly combined with the Vaults automated mining strategy combination in the AMM platform to provide strong protection against the risk of impermanent loss for institutions or individuals when engaging in AMM strategy mining. In the next step, FinNexus will strive to simplify the UI and lower the threshold for users to help more people easily hedge against IL risks.

Thank Fire Research Institute of the issue currency research , it is the source of inspiration for this article.