Orange Finance 101: Unraveling the Math for Delta Neutral Vault

TL;DR

This article delves into the mathematical intricacies of the Delta Neutral Vault provided by Orange Finance. Contrary to what the name might suggest, the Delta Neutral Vault does not maintain an entirely delta-neutral position. Instead, it employs dynamic delta hedging in response to delta changes, striving to achieve an approximate delta-neutral position. Consequently, our vaults are designed to generate consistent profits while mitigating the risks associated with price fluctuations of the underlying assets.

With Orange Finance 101, our mission is to demystify the intricate ideas that power Orange's offerings and present them in clear, concise lessons for all. Today, our spotlight is on the Delta Neutral Vault on Orange.

Thread Competition Campaign

We are hosting Twitter thread-writing competition for the Camelot DN vault on Orange Finance. We hope this article helps your thread creation. More details can be found in the below tweets.

What’s Orange Finance and the Camelot DN vault?

Orange Finance is an automated liquidity management protocol for DEXes, especially concentrated-liquidity ones, on Arbitrum. We have launched multiple vaults on DEX such as Uniswap v3. As a recent development, we have introduced a Delta Neutral vault on Camelot. This vault offers a stable yield from Camelot’s ETH-USDC.e v3 AMM pool with a narrow price range employing a delta-neutral strategy to mitigate losses from market volatility.

It's common in many articles and whitepapers to encounter complex formulas, proofs, and terminologies presented without in-depth explanations or intermediate steps. This often poses challenges for readers, making the content hard to grasp or even causing them to disengage.

We aim to foster a deeper understanding of the product among users by carefully and clearly explaining each concept step by step from the beginning.

In this article, we firstly confirm an advantage of Delta Hedge with a PnL graph, reasoning why Orange Finance launched the DN vault. Subsequently, we will take a comprehensive dive into the mechanics of concentrated market makers like Uniswap, Camelot, which helps you understand the explanation about the delta neutral position on DEXes in the last part of the article. Then, we will quickly introduce some key charachteristics of the Greeks. Lastly, delve into the mathematical intricacies underlying the functionality of the Orange Delta Neutral vault.

Advantage of Delta Hedge

First and foremost, I will elucidate the rationale behind Orange Finance's adoption of the Delta Neutral Strategy.

The graph above contrasts the Pool PnL from providing liquidity on Uniswap with the Hedged PnL achieved through delta hedging. It's clear that the hedged LP exhibits a markedly different payoff profile compared to its unhedged counterpart.

The unhedged LP PnL, the blue line, experiences significant fluctuations in tandem with changes in the ETH price, which is arguably riskier than the hedged LP. While the hedged LP might appear less spectacular, it consistently yields profits.

Orange Finance employs Delta hedging by utilising Aave, a renowned lending protocol. A segment of the deposited USDC.e is collateralized on Aave, facilitating the borrowing of ETH. Given that the ETH position is borrowed, the vault can offset a portion of potential losses in the event of a decline in the ETH price, presenting a distinct advantage over an unhedged position.

A quick summary of Uniswap v2 and v3

In this part, we will quickly show you how Uniswap v2 works and then guide you through the formulas of Uniswap v3, which supports you understand the explanation about the delta neutral position in the later section.

The formula below is a general constant functional market maker formula. Let's start by converting this formula to the Uniswap v3 formula.

Uniswap v2:

https://uniswap.org/whitepaper.pdf
https://uniswap.org/whitepaper.pdf

Uniswap v3:

https://uniswap.org/whitepaper-v3.pdf
https://uniswap.org/whitepaper-v3.pdf

First, we add a virtual reserve as concentrated liquidity to the Uniswap v2 formula. This means that the equation (xy=k) is shifted by the amount of the virtual reserve in both the x-axis and y-axis directions. Therefore, according to the graph, we can derive the following formula.

Uniswap v2 formula + Virtual Reserve
Uniswap v2 formula + Virtual Reserve
Uniswap v2 formula + Virtual Reserve
Uniswap v2 formula + Virtual Reserve

The value of that virtual reserve can be calculated using the formula below. Then, by transforming the formula, we can substitute (3),(4) into equation (2).

As a result of the substitution, we obtain equation (5). Furthermore, in Uniswap v3, the position changes significantly depending on whether the current price is within the range of provided liquidity.

For instance, in the ETH-USDC pair, if the current price exceeds the range of liquidity provision, all liquidity becomes USDC. Conversely, if it falls below, all liquidity becomes ETH.

Given this, we examine three scenarios based on the current price's position. Firstly, we explore the scenario where the entire composition is of token x, which occurs when the current price is beneath the liquidity provision range.

Uniswap v3 Liquidity Position

All liquidity is composed of x, and y becomes 0. Therefore, the equation is as stated above (6). Furthermore, we will transform the formula to derive L.

This time, all liquidity is composed of y, and x becomes 0. Similarly to before, we will transform the formula to derive y and L respectively. We have been able to derive y. Next, we will calculate L.

Now, let's consider the case where the current price is within the range of liquidity provision. If it's an x token, considering the current price as a boundary, liquidity is provided from the lower limit price of the liquidity provision range to the current price.

Therefore, we only need to consider the range from P_a to P. While the previous formula indicated that liquidity was provided throughout the range from P_a to P_b, this time it can be expressed as follows.

From the calculations presented above, we can determine the value of the LP position in Uniswap v3. The value of this LP position is represented by formula (9). To further refine our understanding, we substitute equations (6), (8), (10), and (11) into (12).

With these steps, we have successfully derived the LP position value for Uniswap v3. Moving forward, our aim is to delve deeper into the Delta Neutral Vault as implemented by Orange Finance, utilizing the formulas we've discussed.

Key Characteristics of The Greeks

Let us introduce the key characteristics o the Greeks here.

Firstly, what exactly does the "Delta" in Delta Neutral mean? In the world of finance, delta refers to the relationship between the price change of an option (premium) and the price change of the underlying asset.

If you plot a graph with the underlying asset price on the x-axis and the option price on the y-axis, the slope of the curve represents the delta. For instance, if the delta value is "0.50", it indicates that if the S&P500 moves by 100, the option price will change by 50 (i.e., 100 x 0.50).

The LP position of Uniswap v3 draws a Pay-off curve similar to the covered call strategy in option strategies. By viewing the LP position of Uniswap v3 as a covered call, it becomes possible to apply Greek indicators such as delta and gamma.

Being "Delta neutral" suggests that the strategy remains impervious to fluctuations in the underlying asset price, meaning the delta is zero. However, it's crucial to note that the Delta Neutral Vault offered by Orange Finance doesn't consistently maintain a delta of zero. This variation arises because, besides delta, other Greek indicators like gamma and theta influence the option. The delta is precisely zero only right after a rebalancing event. Let's proceed to derive both delta and gamma.

Delta:

Delta can be discerned by taking the first partial derivative of the formula we derived earlier. Conceptually, it's akin to the slope of the tangent. Observing this, one can notice that the tangent's slope varies with shifts in the underlying asset price, a phenomenon attributed to gamma, another Greek indicator.

To calculate the delta, we will first take the partial derivative of the formula we derived earlier.

Uniswap v3 LP positon

https://www.desmos.com/calculator/iauanttydo?lang=en
https://www.desmos.com/calculator/iauanttydo?lang=en

Uniswap v3 LP position with a wide range

https://www.desmos.com/calculator/iauanttydo?lang=en
https://www.desmos.com/calculator/iauanttydo?lang=en

Uniswap v3 LP position with a narrow range

https://www.desmos.com/calculator/iauanttydo?lang=en
https://www.desmos.com/calculator/iauanttydo?lang=en

Gamma:

Gamma quantifies the rate at which delta evolves in response to changes in the underlying asset's price. For gamma, we take the second partial derivative. Therefore, we will differentiate the delta formula we derived earlier once more.

Uniswap v3 LP position with a wide range

https://www.desmos.com/calculator/ryf3rq6bmp?lang=en
https://www.desmos.com/calculator/ryf3rq6bmp?lang=en

Uniswap v3 LP position with a narrow range

https://www.desmos.com/calculator/ryf3rq6bmp?lang=en
https://www.desmos.com/calculator/ryf3rq6bmp?lang=en

How Delta Neutral Position is calculated

The formulas for the Uniswap LP value, as presented by Guillaume Lambert, the founder of Panoptic, are invaluable. I will delve deeper into these formulas, offering a comprehensive explanation while referencing his work.

Having already derived the Greek indicators for options, namely Delta and Gamma, our next step is to enhance our understanding of the Delta-Neutral-Vault we provide, approached from a mathematical standpoint.

We'll commence with the formula associated with providing liquidity to Uniswap. This involves deciding on the upper and lower price boundaries for liquidity provision, determining the quantity of token x or y to contribute, and subsequently calculating L.

The general formula to ascertain the liquidity, denoted as L, is as follows:

To simplify the formula based on (x_0), we multiply by

And

Simplifying further, we get:

Thus, we obtain the above formula. Next, to calculate the LP value for Uniswap v3, we will derive the formulas for tokens x and y. As before, to simplify the formula, we will multiply by

And

Next, we will derive the formula for y.

We will substitute the calculated results (16)-(21) for x and y into the formula (12) below that represents the LP value for Uniswap v3 and simplify the equation.

And, by defining

we further simplify the equation.

We have derived the formula for the Uniswap v3 LP position value. To determine the delta-neutral position, we then calculate the delta and integrate it into the equation.

Delta

Setting ( P = K ), when we compute the previous equation, the delta-neutral position is

Delta Neutral Hedge Formula

https://www.desmos.com/calculator/1lorppob5u?lang=en
https://www.desmos.com/calculator/1lorppob5u?lang=en

As you can see from the profit and loss graph above, unless there is a significant fluctuation in the price of the underlying asset, it's a strategy that can generate profits in both rising and falling markets. In other words, it's akin to shorting volatility.

Conclusion

The delta-neutral strategy is a strategy that does not bet on significant fluctuations in the underlying asset price. It is best suited for markets where the price of the underlying asset tends to revert within a certain range. Orange Finance's Vaults consistently accumulate trading fees from DEX as LP, enabling a steady yield while reducing risk.

However, while this strategy reduces the price fluctuation risk of the underlying asset, it's important to note that it doesn't necessarily guarantee continuous returns. For example, in situations where the price of the underlying asset keeps moving in one direction, such as a market that continually drops, or where it hits record highs day after day, this might not be the most appropriate strategy.

In the future, we plan to introduce vaults suited for bullish or bearish markets in addition to the delta-neutral ones. Ultimately, users will need to select a vault based on their market sentiment at the time.

About Orange Finance

Orange Finance is an Automatic Liquidity-Management protocol for concentrated liquidity-type DEXes such as Uniswap v3 and Camelot, maximizing the capital efficiency by maintaining an efficient price range through the use of statistical modeling and delta hedging strategies.

Additionally, Orange Finance operate Orange Lab which is Experimental Stage allowing depositors and developers to test their hypotheses with limited amount.

Subscribe to Orange Finance
Receive the latest updates directly to your inbox.
Mint this entry as an NFT to add it to your collection.
Verification
This entry has been permanently stored onchain and signed by its creator.