Original title: "One article to understand the insurance agreement launched by AC for Uniswap v3 LP impermanence loss-Protection Markets"
Original source: Gamma Strategies
Original compilation: Babbitt
Impermanent loss (IL) is the liquidity provider (LP ) of greatest concern because its effects can cause volatility in returns, especially for assets whose prices tend to diverge. As interest in providing liquidity has risen, innovations to deal with this risk have begun to be developed, and in this Gamma Strategies article, we review a contract recently shared by Yearn Finance founder Andre, Protection Markets.
On July 3, Andre Cronje shared on Twitter a prototype of a pay-as-you-go protection market against impermanent losses on Uniswap called ProtectionMarket.sol. The contract specifies a pERC20 token that functions as an independent insurance market for protection against impermanent losses, with premiums determined by supply and demand.
Assuming you are interested in WETH/USDC Uniswap v3 Do LP in the pool to earn transaction fees, but worry about potentially severe price fluctuations that will cause you to suffer significant impermanent losses during the investment period. Then, the ProtectionMarket.sol prototype contract provides you with the possibility to create a market where you can hedge impermanent losses by providing additional WETH to this market and protect the exchange rate of your provided assets from IL. However, this is in exchange for an insurance premium, which is payable while the protection is in effect and is determined by supply and demand at a variable annual rate.
There are two types of participants in the protection market, protectors and hedgers. These participants participate in the insurance market for a particular Uniswap pool and define one of the two assets as a RESERVE (reserve asset). In this market, both participants provide RESERVE tokens to smart contracts and earn fees in return for providing protection to hedgers by allowing them to exercise insurance contracts to compensate impermanent losses incurred.
The following is a schematic diagram of the operation of the contract:
1. Both the protector and the hedger Deposit the reserve asset RESERVE in the contract.
2. The hedger buys protection against impermanent losses by upfront some of the fees earned by the protector.
3. As long as the fee is paid, hedgers can exercise their contracts and close their insurance positions at any time.
4. Both protectors and hedgers can withdraw their liquidity funds as long as there is sufficient liquidity to cover hedged positions.

This contract allows users to protect part of the liquidity provided by impermanent loss, in exchange for accruing fees. This mechanism brings together the liquidity of different protection providers and spreads the risk of this hedging to all participants. ), which are dynamically updated based on supply and demand.
When you implement the protection function, you actually buy insurance for any impermanent loss you may incur, to compensate for the price difference of your impermanent loss (requires minus the premium). The impermanent loss is calculated based on the price when you purchased the protection, does not refer to a specific position in the liquidity pool, allowing the maximum degree of combination.
After purchasing the insurance and providing some reserved fees, you can call the exercise function to execute your insurance contract, in which your reserve will be Amend the following amount to represent compensation for IL:

Among them, p_0 is the exchange price when you get the contract, and p_1 is the current price, so the profit is A function of price changes that can relate your position value to impermanent losses.
Assuming decimals = 18, then the profit function would look like the blue curve below, which is a function of relative price changes. In red, it shows what the profit function would look like if it compensated 1:1 for price changes. The display shows that for a 20% price drop the impermanence loss compensation is about 10%, but for a 20% price increase the compensation is a little less.

This function generally behaves as you would expect, if the price does not move, you will not incur an impermanent loss, so the contract will not return anything , and as the relative price changes, your impermanence loss will be higher. Note that this profit function assumes a constant product function market, so properly hedging concentrated liquidity positions will require further effort.
Fees are continuously compounded as a percentage of the hedged amount , the hedged amount is determined by the APY utilized, and the ratio of the hedged liquidity (totalHedged) to the overall liquidity in the pool (totalProtection) is similar to the interest rate in the Compound borrowing market.

On July 4, 2021, the market rate model of Compound USDC supply
As the demand for hedging services increases, utilization should increase as well, and the resulting fees will increase accordingly. This will incentivize more protection providers to supply to the pool, increasing the solvency of insurance programs. Protecting market contracts ensures that the total amount of hedging is at most equal to the size of all liquid funds in the fund pool. This can provide hedgers with substantial protection against even extreme levels of impermanent losses.
The most relevant parameters for determining whether a conservation market is economically viable are the parameters of the fee function, and the size of the reserve fee requirement. These parameters must be carefully calibrated to attract protection providers and hedgers to supply the pool.
In economic theory, the criterion for evaluating insurance is whether it is actuarially fair, that is, whether the premium paid is sufficient to reduce the variability of potential outcomes (in this case In this case, provide the impermanent loss of liquidity accrual) to make it worthwhile. Given the significant price movements we've seen for digital assets, the required fees could end up being substantial. However, it is difficult to estimate what is reasonable without letting the market do the math.
Using protection markets for liquidity positions is a Potential improvements to reduce return volatility for LP strategies, as concentrated liquidity provides customizable exposure to impermanent losses.
Assuming that liquidity is provided at price P within the range of [p_a,p_b], and the price change is p_1=k⋅p_0, the impermanent loss will be the percentage of change is derived as:

It is helpful to understand the amount of hedging required to compare with the profit function of the protection market we have looked at earlier. Assuming p_0=2100, then LP is performed within the range of [2000,2200], then the profit function of Uniswap V3’s IL and protection market is shown in the figure below.

In view of the virtual liquidity provided by the centralized liquidity function of Uniswap v3, when the scope is relatively narrow, it is necessary to establish a relatively small hedging position to make up for the relatively narrow Immutable losses for large LP positions, as in the above example.
In order to quantify the hedge ratio, it is necessary to calculate the units of hedge q required to make up for the percentage change of IL k=p1⋅p0 (assuming there is no cost of maintaining the position) :

Calculation of hedging ratio

Calculation of narrow range hedging ratio
In terms of protecting the profit function of the market, you need to Buy 0.05 units of insurance for each unit of position. As a sanity check, consider another wider LP range where you would face significantly more impermanent losses: Assuming a range of [100,15000], then at the same initial price, the following hedge ratio would be required :

The impermanent loss protection market is an important service that we expect to see high demand from liquidity providers. We are working with Visor to implement this service for their positions. This will provide an automated way to improve the risk profile of LP strategies on Uniswap v3. For Protection Markets, pricing is key, and in particular a carefully calibrated charging system will be key to its adoption and success.
Original link blockquote>
Welcome to join the official BlockBeats community:
Telegram Subscription Group: https://t.me/theblockbeats
Telegram Discussion Group: https://t.me/BlockBeats_App
Official Twitter Account: https://twitter.com/BlockBeatsAsia