Ranges & Rebalancing

Ranges in a CLMM can be a tough nut to crack. Kamino does it for you.

Position Ranges in CLMMs

A position range refers to the specific price range into which a vault deploys user funds. This is enabled by the concentrated liquidity DEX model, where liquidity can be manually deposited, or concentrated, around specific price points, according to a liquidity provider's preference.

Say, for example, the SOL price is $50. A liquidity provider can choose to deposit in the 49 - 51 price range in a SOL/USDH pool. This means that the liquidity is highly "concentrated", and can earn high yields. As long as the SOL price is between $49 - $51, the position is "in range" and earning yield. However a small change in the SOL price, say from $50 to $48, would put this position "out of range". Then, the liquidity deposited in the 49 - 51 price range is unutilized, and the liquidity provider earns no trading fees.

If a position is "in range", the liquidity provider earns yield from trading volume. In a standard CLMM, users would have to select these ranges manually, and rebalance (remove their liquidity and redeposit into a new range) if a deposit moves "out of range".

Automated Rebalancing

Rebalancing is fully automated on Kamino, and executed by smart contracts.

So far, USDC-USDT, for example, has never rebalanced as it’s a very stable pair. Other vaults, and particularly those with mixed strategies, have more likelihood of requiring a rebalance, as mixed vaults have non-correlated tokens (eg. mSOL-ETH; SOL-USDC).

Note that range rebalancing can mean that impermanent loss is realized. It's encouraged that you familiarize yourself with impermanent loss, and how it works in Kamino's context.

In summary, the "Position Range" refers to the deposit range into which the Kamino Vault deploys funds. The range is automatically readjusted when needed, ensuring that users continue to earn yield.

How Rebalancing Works

A bot monitors every vault on Kamino, checking whether rebalances are needed at intervals of 20 minutes. When a vault meets the strategy's rebalancing criteria, the process looks as follows:

  • All funds withdrawn

  • New range identified

  • Funds swapped according to new asset ratio + funds deposited

  • If deposit impacts asset ratio, thus remaining funds are swapped at new ratio

  • Remaining funds deposited

Note that rebalancing realizes any impermanent loss incurred up to that moment

When rebalancing, Kamino sets a reference price. This is the pool price when a rebalance is triggered. If there is a sudden spike in volatility, the rebalance will only be completed when the pool price is once again in line with reference price.

Rebalancing Efficiency

In order to maximize efficiency in the rebalancing process, Kamino identifies reference prices and max slippage thresholds. Each asset pairing has a maximum tolerable slippage depending on the respective assets in the pair. Only when these requirements are met does rebalancing and subsequent swaps occur.

After each step, slippage and prices are checked once again, and the next step will either take place, or be delayed until requirements are met. Ultimately, the rebalancing process is tailored to minimize market impact and user slippage.

Rebalancing Strategies

Generally, the goal of every strategy is to maximize PnL which is made from trading fees, rewards, impermanent loss, and swapping fees from rebalances. For every type of trading pair, different rebalancing strategies work better.

There are four types of strategies that can be deployed on mainnet, and they have slightly different policies:

  • Stablecoin strategies should rarely move, and rebalances should be close to 0.

  • SOL-only strategies (SOL-to-SOL derivative) may have a natural drift, depending on the pairs. Liquid staking SOL tokens grow at a known pace. When vanilla SOL and a liquid staking token is paired (stSOL-SOL), the liquid staking token increases in value over time, and may need a rebalance a few times a year.

  • Mixed strategies of volatile-to-volatile assets can diverge in price. This should be rebalanced to ensure optimized ranges, but will experience impermanent loss upon extreme price divergence.

  • Mixed strategies of volatile-to-stablecoin tokens should rebalance as needed to retain optimized ranges, as with volatile-to-volatile pools. They can experience impermanent loss when the price of the non-pegged asset fluctuates. Ranges are set to allow for volatility, but will rebalance if the volatile asset has extreme price increases or decreases for a sustained period.

There are more details on each of these strategies in the Strategy section.

Last updated