Liquidity management on Uniswap V3 for wstETH-WETH and wstETH-USDC pools

Liquidity management on Uniswap V3 for wstETH-WETH and wstETH-USDC pools

Introduction

Mellow Protocol is a platform for building automatic trustless DeFi strategies. The system is permissionless and open for builders to implement their own strategies.

The protocol beta was launched mid November ‘22. The platform is audited by Chainsecurity and BlockSec. At the moment, Mellow has 4 major families of strategies in production working with different assets:

  • Pulse – protocol liquidity management on DEXes with LM rewards compounding (the strategy is in production for zkBob Protocol to manage volatile pairs with BOB token)
  • Boosted – generates additional yield on top of UniV3 maintained positions by deploying part of the capital to Yearn or AAVE V3
  • Fearless Gearbox – leveraged farming on Convex with liquidation protection
  • Voltz LP optimizer – Voltz tooling to simplify LPing for users of the protocol (entirely built by Voltz Protocol on top of Mellow)

We propose to launch two strategies for liquidity management on Uniswap V3 for wstETH-WETH and wstETH-USDC pools.

Strategies

Detailed descriptions of the strategies can be found in the docs.

Tamper strategy

The strategy is designed for the wstETH-WETH pool, utilizing the corresponding Uniswap V3 pool with a 0.05% fee. The strategy maintains two positions within the pool, actively updating and rebalancing the liquidity between them based on the current market price.

The strategy utilizes Cowswap integration to get improved results for rebalancing swaps.

The strategy operates with three vaults, one ERC20 vault, and two UniV3 vaults. Each of those UniV3 vaults holds a Uniswap V3 position on the WSTETH/WETH pair.

One portion of capital (initially set to 5%) is supposed to be stored inside the ERC20 vault, whereas the remaining part is supposed to be distributed between UniV3 vaults based on formulas presented in the strategy documentation). The positions are maintained so the current tick would be inside both positions, so the strategy normally earns fees from both of them.

When the price deviates significantly and the current distribution of capital becomes irrelevant for the pool tick, the rebalance is performed as described in the docs. The strategy uses UniV3 pool price estimations from the Mellow Oracle, which utilizes the Chainlink STETH/ETH oracle for determining the current tick price (the strategy doesn’t use spot price to avoid possible manipulations).

Pulse strategy

Mellow Pulse strategy will maintain a position for the wstETH-USDC Uniswap V3 pool with a 0.3% fee. This strategy utilizes an interval with a width of 4200 ticks. When the price of the wstETH-USDC pair approaches the current interval margin, the strategy automatically rebalances the liquidity to a new interval by swapping funds and providing liquidity to a new interval. If there is no need to rebalance, the strategy collects and compounds the fees into the current position. The strategy utilizes integration with 1inch, which leads to reduced swap fees for rebalances.

The strategy works with two vaults – ERC20Vault and UniV3Vault.

All capital of the strategy is held in the Uniswap position. Calculations for the strategy are made using the spot tick of the corresponding pool. When rebalancing, the deviation of the pool spot tick from the average tick for the last timespanForAverageTick (60 seconds) is checked. If the deviation is more than maxDeviationForVaultPool (50 ticks), then the rebalance will not be executed. When the spot tick of the pool approaches the border of the Uniswap position on tickNeighborhood (500 ticks), a new position of the same width is minted, with the center in the current tick.

Risks

There are several potential risks for these strategies:

Smart-contract risk

This is the risk of hacking the vaults and strategies contracts. The Vaults system was audited by Chainsecurity and BlockSec. Also, the Vault system is used as a base layer of security as it’s designed to restrict and prevent potentially harmful actions of the strategies.

The initial version of Tamper strategy was audited by Chainsecurity (prev. L-strategy), however, the contracts had several improvements after the audit.

Pulse strategy went through the internal audit and is already used in production to manage the liquidity of zkBob protocol.

The audits are published in Mellow GitHub.

Price risk and IL

The strategy contains two underlying risks: price risk and impermanent loss risk. These risks stem from the fluctuations in the prices of wrapped staked ETH and wrapped ETH. The price risk, which is considered the first-order effect or “delta,” is relatively limited due to the stable nature of the price. On the other hand, the impermanent loss risk is considered the second-order effect or “gamma” and is more substantial as the strategy’s liquidity is heavily concentrated in Uniswap v3.

These are rebalancing strategies, so every rebalance realizes some of the incurred IL from the volume of rebalance.

For Tamper strategy we analyzed the data for the period from 15 Jul 2022 to 1 Oct 2022 and according to the backtest, the annual IL can be around 5%. Nevertheless, the IL depends on current market conditions.

Incentives

For incentives distribution we utilize Synthetix smart contracts that were audited and broadly utilized by other products.

The deployed smart contracts source code for incentives can be found in Mellow GitHub.

2 Likes

Additional links:
Formulas for Tamper strategy
Audits

Thank you @s0xn1ck for the great write-up.

Lido’s reWARDS committee has been in discussions with the Mellow team for a while now around this potential collaboration.

Incentivizing and bootstrapping liquidity on Uniswap v3 is much more complex than on most of the current other pools, and using Mellow’s strategies was one of the solutions found. We have worked closely with the team to devise and agree on the current strategies for both the wstETH-ETH and wstETH-USDC pairs proposed.

These are rebalancing strategies and have the trade-off mentioned: On the one hand liquidity deployed via Mellow will be useful all/most of the time, supporting the price at which wstETH may trade at any given point. This is great in terms of capital efficiency (little idle capital in the pool) and is a proper utilization of Univ3. On the other hand, as price moves out of ranges, rebalances to bring the range in line again realize impermanent loss for the LP.
From extensive backtests the Mellow team conducted, the strategies proposed were considered to be the best ones in this trade-off curve.

The wstETH-ETH strategy has already been privately deployed by Mellow (without extra incentives) for a bit of time and the strategy for wstETH-USDC follows an already deployed Mellow strategy for a pair with almost the exact same relative volatility.

Under the approved February’s reWARDS budget for Uniswap v3 incentives, the committee is going to allocate a smaller amount of incentives to LPs in these two strategies, and re-evaluate next month based on the real performance metrics of each!

1 Like

Update on wstETH Uniswap pools management

The strategies for wstETH pairs on Uniswap V3 were launched on February 24 and February 27.

Initially, the setup included two strategies: the Tamper strategy for the wstETH/ETH 0.05% pool and the Pulse strategy for the wstETH/USDC 0.3% pool.

In this write-up, we want to cover the first month’s results and discuss our next steps.

Tamper

The Tamper strategy has performed well, with an organic APR of 6-9% during the current period.

The strategy had 62 depositing addresses with a total of 253 WSTETH + 477 ETH.

Pulse strategy

The organic performance of the Pulse strategy was very volatile due to market conditions, with an APR ranging from +9% to -56%. However, users continued to use the strategy to receive LDO rewards. The pool was empty when the strategy launched, and it attracted almost 1.3M TVL.

The strategy had 28 depositing addresses with a total of 236 WSTETH + 283k USDC.

To summarize, the Tamper strategy performs well, and we propose to continue it and its incentives. However, we need to improve the Pulse strategy to make the rebalances less frequent.

Next steps

We propose implementing a new approach for managing volatile pairs.

Pulse V2 mechanics:

The strategy maintains the interval within the pool of the corresponding Automated Market Maker (AMM) protocol in an active state. The primary distinction from the previous version lies in a more efficient rebalancing process:

When the price (spot tick) in the pool approaches the interval’s boundary, the strategy does not mint a new position centered on the current tick. Instead, it expands the existing position uniformly in both directions. This approach reduces the amount of tokens to be swapped and significantly decreases the impact of Impermanent Loss (IL) on profitability.

As the position’s width increases gradually, its depth decreases. This process results in reduced fees from pool swaps and increased slippage when swapping within this pool. To counteract these effects, the strategy introduces the concept of position limit width. If the width reaches this limit, it resets to the default width size, and a position centered on the spot tick is minted, similar to the approach employed in the strategy’s first version.

Proposed base strategy parameters:

  • Default width of UniswapV3 position – 4200
  • Width limit after which position will be minted – 10000
  • The multiplier of the current interval width, showing the minimum required difference between the tick and the border of the current position to trigger – 15% of interval width
  • The multiplier of the current tickNeigborhood, showing how much the position will be expanded in case of rebalance – 2 times the current tickNeighborhood

You can find more details in the documentation.

The team has already started implementing Pulse V2. The strategy will be ready for launch in less than one week.

On the launch, we propose to set up Pulse V2 for wstETH / USDC 0.05% pool as this can lead to bigger amounts of swaps in this pool compared to 0.3% fee tier.

1 Like

Great update, thank you.

  • Totally agree.
  • I think this may be as important as the strategy updates themselves, as the uniswap .3% pool was not being able to compete on routes, sometimes not even on direct frontend trades on this pair. Keen to see the performance of having TVL on the 5bps pool.

Keen to track the results on the Pulse v2 strategy, and hopeful that Tamper can continue to generate great organic fee APR

1 Like

I love the updates and conversation. If possible to keep occasional comments here it would be helpful inputs (if any) come up.

2 Likes