Tamper strategy

Pool stabilization strategy

SU is a strategy for the WSTETH/WETH pair of tokens, which works on top of the corresponding Uniswap V3 pool. It holds two positions in this pool, changing them and rebalancing liquidity between them depending on the price in the pool.

Strategy

Abstract

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 (e.g. 5%) is supposed to be stored inside the ERC20 vault, whereas the remaining part is supposed to be distributed between UniV3 vaults. Below, we describe how this distribution works.

The ratio of the portfolio which is allocated to the ERC20 vault is defined by the 0 <= erc20UniV3CapitalRatio <= 1 parameter. The remaining part 1 - erc20UniV3CapitalRatio goes to the Uniswap V3 positions.

The strategy takes UniV3 pool price estimations from the Circle Protocol Oracle, where typically the average is taken between the spot, UniV3 Oracle (last 30 minutes), and Chainlink Oracle prices (but other safety masks can be stated).

Uniswap V3 positions

Two UniV3 vaults holding the positions are called lower and upper vaults. The strategy has a parameter set in the constructor, intervalWidthInTicks, which set the width on both positions in ticks. Positions always have to hold the following:

Rebalances

There are three types of rebalances that might be called by an operator (in fact, that would be an off-chain bot operating the strategy).

UniV3 rebalance

Generally, as can be seen, the operator might need to call several such rebalances to obtain desired positions and token ratios, depending on market circumstances.

Erc20-UniV3 rebalance

This rebalance is to be done to restore the portion of capital in the ERC20 vault as erc20UniV3CapitalRatio. For that, the following steps are done.

Erc20 rebalance

There is a parameter erc20TokenRatio, which is what share of the capital of the ERC20 vault we want to have in WSTETH. All the remaining share of capital is to be in WETH.

If the current ratio and the desired ratio differ less than by minErc20TokenRatioDeviation, we don't do anything.

In the other case, we have to swap some amount of an excessively presented token to get the second token and align the ratio. We do swaps using Cowswap. At first, a preorder is placed on-chain by the operator. Then, an off-chain bot submits the actual Cowswap order using preorder parameters and calls the signOrder() function. This function verifies that the actual order matches the preorder's requirements and signs the orders using the Cowswap setPresignature() function.

Parameters

TradingParams:

RatioParams:

OtherParams:

Risks

The only major risk the strategy holds is a sudden de-peg of STETH and subsequent IL of the positions we hold in the corresponding Uniswap V3 pool.

Last updated