Rebalancing

When an Auto position drifts out of range, the keeper moves it back around the current price in a single transaction. You can trigger the same thing yourself at any time.

Old range left behind (dashed); new range centred on the current price.

When it happens

The keeper checks every Auto position every 30 seconds. A position is out of range when the pool's current tick is below its lower bound or at/above its upper bound. Only then may the keeper act; in-range positions are left alone, and Manual positions are never touched.

What one rebalance does

  1. 1
    Collect fees
    Accrued fees are collected; 10% goes to the protocol treasury and 90% stays with your position.
  2. 2
    Withdraw liquidity
    All liquidity is removed from the old range and the empty NFT is burned.
  3. 3
    Swap to the right ratio
    Part of one token is swapped through the same pool so the balances match what the new range needs.
  4. 4
    Open the new range
    A new position NFT is minted to your wallet; any leftover dust is refunded to you.

Safety checks on every rebalance

  • The pool price must be within about 1% (100 ticks) of its 30-minute TWAP, before and after the swap. A manipulated or very volatile pool makes the transaction revert instead of executing at a bad price.
  • The swap has a minimum output, and the new range must contain the current price.
  • A deadline stops a delayed transaction from executing later at a different price.
  • The contract never holds funds between transactions.
Preview before you sign
Rebalancing from the app shows the new range and swap, and simulates the exact transaction first. If it would revert (for example PriceDeviationTooHigh), you see why and the confirm button stays disabled.