Vault Parameters

The Vault Parameters determine how liquidity within a liquidity pool is being managed by a vault created using Alpha Vaults.

The vault parameters calculate the Liquidity Positions chosen by the vault. It must be adjusted on-chain.

These parameters allow liquidity to be managed with 1 click.

General Information

When managing liquidity, there is a trade off between liquidity concentration, Capital Loss protection, and worst-case liquidity (ie the liquidity when tokens trade out of range).

A liquidity manager with a higher risk appetite usually want to concentrate more liquidity to get better performance*, but this will be at the expense of higher Capital Loss and poor liquidity if tokens trades out of range.

*performance relates to the increase in Fees Income and Capital Efficiency

In general, a narrower base order will increase performance, but with higher risks of Capital Loss and poor liquidity.

A narrower limit order will also increase performance, but there will be less Capital Loss protection and lower Worst Case Liquidity.

A higher % in full range will lower the vault's performance, but it will have lower risk of Capital Loss and better Worst Case Liquidity.

Liquidity Managers should be aware of these trade-offs when changing the Vault Parameters.

Setting Vault Parameters

when editing a vault, the following approach can be used to set the vault's Strategy Parameters:

Step 1 - Determine the time horizon

ie how long an LP or a liquidity manager wants to manage liquidity before withdrawing or shutting down the vault.

Step 2 - Estimate the maximum volatility during the time horizon

One way to do this is to obtain the lower and maximum price from historical data covering the time horizon. This determines the size of the Base Order.

For example, if the time horizon is 6 months, and during the past 6 months, the minimum price is 4000 and the maximum price is 10000. The width of the base order is log1.0001(10000/40000)/2 = 4581.

Step 3 - Determining the rebalancing period

A shorter rebalancing period is more likely to get better performance, but have higher risk of Capital Loss.

Step 4 - Estimate the maximum volatility during the rebalancing period.

One way to do this is to estimate the lower and maximum price during this period, for all possible rebalancing period. within the time horizon. The determines the size of the Limit Order.

For example if the rebalancing period is 48 days, and the ratio of maximum price/ minimum price over ANY 48 days over 6 months is 1.3, the width of the Limit Order is log1.0001(1.3) = 2623

Step 5 - Apply a margin of safety

This can be done by:

  • Applying a % markup to the width determined in Step 2 and Step 3. If is recommended to apply at least 100% margin of safety to the Limit order.

  • Increase the % liquidity in Full Range.

For example, applying a 100% margin of safety to the limit order gives a final limit order width as 2623 * 2 = 5246.

Step 6 - Regularly repeat steps 1 to 5

This ensures the parameters are regularly updated.

Overview

The table below summarises all the vault's parameters:

ParameterDescriptionSetter Method

Vault Name

Name of the ERC20 token representing the vault shares.

NA

Vault Symbol

The letters representing 1 unit of the vault's shares

NA

Pool Address

Address of the Uniswap V3 pool managed by the vault

NA

Vault Manager

The wallet address that can change the vault's parameters

setManager()

Max Capacity

The maximum number of vault shares that can be minted

setMaxTotalSupply

Full Range liquidity %

The maximum % of total liquidity deposited into full-range

setFullRangeWeight()

Base-Order Width

The width of the range order used to collect fees and increase capital efficiency

setBaseThreshold()

Limit-Order Width

The width of the range order used to minimise Capital Loss

setLimitThreshold()

Rebalance Period

The minimum time that must elapse before the vault can chose a new position.

setPeriod()

TWAP Duration

The time period over which the average price within a pool is calculated

setTwapDuration()

TWAP Deviation

The vault will not chose a new position if the spot price differs from the average price by more than the TWAP Deviation.

setMaxTwapDeviation()

Minimum Tick Movement

The vault will not chose a new position at rebalance if the price moved by less than the Minimum Tick Movement

setMinTickMove()

Information Parameters

Information parameters contains the on-chain records that uniquely identifies a vault. They do not affect how liquidity is being managed. The parameters are:

Vault Name (name)

This is the name of the ERC20 token representing the vault shares. The vault name and symbol (explained below) is uniquely associated with the vault address, and can be used by third parties (eg wallets, token trackers) to display depositors' holdings in the vault.

The default value is 'Alpha Vault', but users can chose any name when creating a vault.

This parameter cannot be changed after the vault is created.

Vault Symbol (symbol)

These are the letters representing 1 unit of the vault's shares. For example, if a user deposited $1000 into a vault with a vault symbol of XYZ, and get back 1.2 vault shares in the vault, the user's wallet will display 1.2 XYZ.

The default value is 'AV', but users can chose any name when creating a vault.

This parameter cannot be changed after the vault is created.

Pool Address (pool)

This is the address of the Uniswap V3 pool managed by the vault.

This parameter cannot be changed.

Max Capacity (maxTotalSupply)

This is the maximum number of vault shares that can be minted to depositors. By default, the value is set to infinite (ie an uncapped vault), but it can be changed to create a capped vault

Setting Max Capacity to 0 will make the vault withdraw-only.

Governance Parameters

Governance parameters contain the on-chain records that identifies the vault manager, the fees charged by the vault manager, and who can rebalance the vault. The parameters are:

Vault manager (manager)

This is the wallet address that can change the Vault Parameters, and therefore change how liquidity is being managed.

By default, the vault manager is the wallet address that created the vault, but the vault creator can change it to a different address.

An existing vault manager can appoint a new vault manager at any time, but before the appointment can take effect, the new new manager must accept the responsibility.

Rebalance Delegate (rebalanceDelegate)

By default, anyone* can call Rebalance, but vault managers can whitelist a wallet address as they only additional** address that can call rebalance.

*Assigning the zero address as the rebalance delegate means anyone can rebalance the vault.

**vault managers can always call Rebalance

Manager Fee (managerFee)

Vault manager can set a fee for managing the vault, as a % of Fee Income from Uniswap. They can collect the fees by calling collectManager.

For example, if the vault earns $100 fees from Uniswap and the manager fee is 5%, the vault manager will earn $5.

Strategy Parameters

The Strategy Parameters concentrates liquidity, protect against Capital Loss, and ensure tokens are tradable in all market conditions.

When Rebalancing takes place, the vault will chose new positions by withdrawing all its liquidity from the Uniswap pool, and re-deposit it according to the ranges chosen by the Strategy Parameters.

The Strategy Parameters are set once, and the vault will automatically pick a new range each time rebalancing takes place. Everything happens on-chain, providing full transparency on how liquidity is being managed.

The Strategy Parameters use mean reversion to concentrate liquidity, and is one of the safest and most widely used mechanism to manage liquidity.

The parameters are:

Full Range weight (fullRangeWeight)

This is the maximum % of the vault's liquidity deposited into a Full Range Position. Its purpose is to guarantee the pool's tokens are always tradable, and the vault will always capture fees, even if the price go out of range.

A lower Full Range Weight will result in more liquidity deposited into the ranges calculated by the Base-Order and the Limit-Order. This results in better liquidity if trading takes place inside the ranges.

A higher Full Range Weight will lower liquidity inside the ranges above, but liquidity will be better if trading takes place outside it.

For all Default Values, up to 30% of liquidity will be in Full-Range to ensure the vault will work in all market conditions. This value can be changed by the vault manager at any time.

If the vault is a project's main source of liquidity, always allocate some liquidity to full range to guarantee price discovery.

Base-Order Width (baseThreshold)

The main role of the base order is to collect fees when the price moves, and Charm's front-end will summarise how this is achieved.

The base-oder width is measured in ticks and is ‘B’ in Fig 3. When rebalancing takes place, the vault will create a new position with a lower price of (Spot Price* - B) and an upper price of (Spot Price* + B), which means the vault will capture fees if the market price moves -(1-1.0001^-B)% below the Spot Price, or +(1+1.0001^B)% above it. For example:

If the Base-Order Width is set at 200, the vault will capture fees when the market price moves -2% or +3% above the Spot Price.

A smaller Base-Order Width will increase capital efficiency and collect more fees across a smaller range of prices, but at the expense of higher capital loss. The Base-Order width should therefore be changed according to the expected volatility of the pool's tokens, with higher volatility requiring a larger width. For example:

If a liquidity manager wishes to manage liquidity for 30 days, and expects the maximum price volatility over this period to be +/- 30%, they can set the Base-Order Width to 6000 ticks, which is a price movement of -55% and +82%. This is sufficiently wide to capture fees across the expected price range.

*As determined when the vault choses new positions during rebalancing.

Limit-Order Width (limitThreshold)

The main role of the limit order is to reduce Capital Loss, by attempting a faster movement toward a 50:50 inventory ratio when the price consolidates. Alpha Vault's front-end will summarise how this is achieved.

The limit-order width is also measured in ticks, and is ‘L’ in Fig 3. When rebalancing takes place, it takes whatever liquidity is left after placing the Full-Range order and the Base-Order, and places it in a new range order ( the 'Limit Order') immediately above or below the spot price - ie either in [Spot price* - L, Spot Price] or [Sport price, Spot price + L], depending on which inventory is left.

The above will result in lower capital loss when the market price moves within the ranges chosen above. For example:

If the Limit-Order Width is set at 1200 and the vault places a limit order that is -11% below the Spot Price, the vault will attempt to reduce capital loss when the market price moves from 0% to 11% below the Spot price.

The narrower the limit order, the more Capital Loss the vault will reduce BUT it will risk incurring more capital loss if the price moves too much. The limit order should therefore be MUCH wider than the short term volatility expected by the liquidity manager. For example:

If a liquidity manager expects the maximum price volatility over 1 day to be +/- 10%, they can set the Limit-Order Width to 3000 ticks, which is a price movement of -26% and +35%. This increases the likelihood the vault will reduce capital loss.

*As determined when the vault choses new positions during rebalancing

Rebalance Period (period)

The rebalance period is the minimum time since the previous rebalance, before the vault can be rebalanced again. It determines how often the vault choses a new range as the spot price moves. It is measured in seconds, but converted to hours on Alpha Vault's front-end.

This parameter should be large enough to minimise realised losses, as some unrealised capital loss will be realised each time rebalance takes place; but short enough to capture fees, reduce capital loss, and concentrate liquidity when the price moves.

In general, wider ranges will require less rebalancing, and shorter ranges require more, as illustrated by the Default Values.

Security Parameters

The vaults created using Alpha Vaults are very secure, with no security incidences since launching in May 2021.

One of the key security component is the TWAP check, which prevents price manipulation, MEV extraction, and front running during Rebalancing. It uses the following parameters:

TWAP Duration (twapDuration)

The TWAP duration is the time period over which the average price within a pool is calculated. By default, this is set to 60s (around 5 blocks on mainnet), which means the pool price will need to be manipulated at least 5 blocks to change the average price.

The TWAP Duration can be increased for extra security, but the vault may not rebalance when it should.

TWAP Deviation (maxTwapDeviation)

At Rebalance, if the difference between the spot price and the time weighted average price calculated over the TWAP Duration is more than the TWAP Deviation, rebalance will fail. By default, this is set to 100 ticks (approximately 1%), which means rebalance will fail if the spot price deviates more than 1% from the average price.

The TWAP Deviation can be increased for extra security, but the vault may not rebalance when it should.

Gas Optimization Parameters

Minimum Tick Movement (minTickMove)

To save gas fees, rebalance will not occur if the price has moved by less than the Minimum Tick Movement. For example if _minTickMove is 200 ticks, then rebalance will revert if the spot price moved approximately +/- 2% from the last rebalance.

_minTickMove is set to 0 by default, but can be changed at any time.

When setting a higher minTickMove, it may take longer for new deposits to start earning fees, and for the fees earned to be re-invested into the pool.

Last updated