Uniswap LP Use Case - Optimism Version

Protect Uniswap V3 Liquidity Providing-1

Do you remember the use case that came out a few months ago where we used MetalSwap's hedging swaps to protect the profits made on Uniswap V3? Today, we have a new version of this article, updating it with the costs and opportunities that arise from the introduction of hedging swaps of MetalSwap on the Optimism blockchain. In particular, we will focus on the decrease in premium cost, which, when combined with the extra rewards derived from the Optimism grant, make this use case even more interesting.

In a nutshell, this use case will bring you the following benefits:

  • Ability to get more consistent cash flow from your position on Uniswap V3
  • Ability to defend against volatility in a personalized way
  • Eliminate volatility on the OP token

Uniswap is currently the most widely used DEX in the world. It works thanks to all the liquidity providers (LP) who offer their liquidity in exchange for rewards generated by the protocol's fees. Since the launch of Uniswap V3, it has become possible to provide liquidity in a concentrated way and earn rewards based on a percentage of the fees generated in the select range. Today we are going to use these features to create a profit and protect it on MetalSwap.

Presentation of the Use Case

You have liquidity available to stake on Uniswap V3, and after conducting research, you have decided to provide liquidity in the USDC/OP pair with a 0.3% fee. By choosing this pool, you will be exposed only to the price of OP token, assuming at stablecoin USDC maintains the value of $1. Your goal is to earn the fees generated by Uniswap while minimizing the risks of asset volatility. To achieve this, it would be beneficial for you to open a hedging position on MetalSwap by using a portion of the rewards you earn from Uniswap to pay the premium.

Practical example

You have $2000 available to place in the USDC/OP pool. You have decided to position your liquidity within a fairly wide range that, according to your analysis, may reflect OP’s movement over the next 30 days. Let's take a closer look at the numbers of your position:

Budget: $2000 divided into 1345 USDC and 491 OP.
OP Price: $1,33
Range chosen:  $1,15/ $1,43
Apr estimated for 30 days: 9,34% by this Uniswap rewards tool.

Info about the position and estimated rewards

However, it is important to note that these projections are based on historical data, and all of these tools estimate Apr based on the last 7 days. Due to the recent high volatility of the market, we have observed high volumes on the DEX and consequently, high rewards for liquidity providers. 

Please note that the balance between the two assets in your liquidity position is constantly changing based on price movements. If the price approaches the lower end of the range, you will have more OP within your position, specifically 1577 OP if the price reaches $1,15. On the other hand, if the price starts to rise, you will have more and more USDC, ending up with 2022 USDC, making a small profit from the $2000 initial. You can verify these metrics thanks to this second tool.

From which scenario should I protect myself?

The worst-case scenario is when the OP price goes out of the range that you have selected before. If the price goes down to $1,15 your 1577 OP will have a countervalue of $1813. In this case, you would have a temporary loss of $187. You can decide for yourself the amount you want to protect. In this example, let's say you decide to open a hedging swap to protect yourself from half of this scenario. So in case the price of OP will reach $1,15 you want to gain $93,5 by the MetalSwap hedging swap.

To do that, you should open a position with a target size 520 OP.

Opening the position

Reach the dApp and after selecting the Optimism blockchain, let’s start to open this position. The premium required to open it for 30 days is 50,122 OP, which at the price of $1,33 is $66,6.

In this case, you use a cover of 12% to protect yourself from all the range that you have chosen, so you will be asked for an additional 62,4 OP, which is equivalent to $82,9.

However, we must not forget that at this moment, there are incentives due to the Optimism grant victory. As you can see in the bottom right corner of the screenshot below, in addition to the XMT rewards, we also have the OP rewards, which in this case amount to 55 OP tokens. So, since the required premium is only 50.1 OP tokens, thanks to the OP grant, the position has no cost, but rather we gain about 5 OP just by opening a hedging swap, not bad right?

MetalSwap dApp on Optimism

Now that you have opened the position on Uniswap V3 and the hedging swap on MetalSwap, there are 3 possible scenarios:

  1. If at the end of 30 days the price is the same as when you opened the position, you will have this situation:
    FORMULA: (Rewards Uniswap 186$ + Optimism grant 5 OP) - (MetalSwap premium $0) = 193,45$
  2. If the price drops to $1,15, your hedging swap will protect you against half of the countervalue loss on OP. However, if you still want to earn a profit, it is important that the price stays within the range long enough to cover the remaining half of the lost control value.

(Rewards earned until price exits the range (x) + MetalSwap short $93,5 + Optimism grant 5 OP) - (MetalSwap premium $0 + Loss countervalue $187) = net Rewards = x

  1. If the price rises to $1,43, you have to pay back the cover of $82,9, but as the price is higher, you have already gained from this spike of OP. Your position on Uniswap now is 2022 USDC, so you have already earned $22.

    FORMULA: (Rewards earned until price exits the range (x) + Gain from the rise in OP $22 + Optimism grant 5 OP) - ( MetalSwap Premium $0 + MetalSwap Cover $82,9) = x

For those curious about this use cases, we have provided an embedded Google Sheet sandbox, where you can explore and experiment with different scenarios and parameters. This use case takes place in the red box, here an example on how numbers go if the price shrinks to 1.14; feel free to play with it:



The most probable risk of this strategy is when OP's price goes out of the range before your forecasts. In this particular case, you have chosen a fairly wide range that will be good for the next 30 days, but it is, of course, possible that the price will go out of this range.
Another risk is that the volumes on Uniswap V3 will drop, and the rewards will no longer be competitive enough for this strategy. Unfortunately, there is no way to predict what the pool rewards on Uniswap V3 will be.

A third risk is related to the smart contracts of Uniswap V3. The smart contract, which handles the pools, could be vulnerable to hacks or exploits, resulting in the loss of user funds.

It is essential to consider the potential vulnerabilities in MetalSwap smart contracts. While the Certik audit and the ongoing Bug Bounty Program have certainly helped to alleviate these concerns, it is still important to remember that some technical issues can potentially compromise them.

Finally, it can be said that, in theory, there exists a possibility of encountering technical risks even within Ethereum's blockchain.

Incentives derived from the Optimism grant will not always be like this, the further along the distribution goes the more the rewards will steadily drop and therefore it's important not to waste time in these early stages. To explore this concept further, an article has been released detailing the metrics of this distribution.

Goodbye Volatility

To the MetalSwap!
… and beyond
-The DeFi Foundation


❗ METALSWAP ‘s admins or moderators will NEVER contact you directly on any social under any kind of circumstances.

❗ Everything concerning $XMT ‘s smart contracts and addresses is shared by our official channels (list below), do not trust any different info from any different source.

✎ What is MetalSwap?

MetalSwap is a decentralized platform that allows Hedging Swaps on financial markets with the aim of providing a coverage to those who work with commodities and an investment opportunity for those who contribute to increase the shared liquidity of the project. Allowing the protection for an increasing number of operators.


With MetalSwap we enable Hedging Swap transactions through the use of Smart Contracts, AMM style.