rebalance-position_skill

This skill rebalances an out-of-range Uniswap V3/V4 liquidity position by closing the old and opening a new centered on the current price.
  • Python

2.5k

GitHub Stars

3

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill openclaw/skills --skill rebalance-position

  • _meta.json295 B
  • README.md1.1 KB
  • SKILL.md10.4 KB

Overview

This skill rebalances an out-of-range Uniswap V3/V4 liquidity position by closing the old position and opening a new one centered on the current price. It automates fee collection, liquidity removal, range calculation, approvals, and re-entry in a single, user-confirmed workflow. Use it to recover earning potential when a position has stopped collecting fees.

How this skill works

First the skill identifies and verifies the target position (by ID or by searching your positions), then analyzes pool state, uncollected fees, and cost-benefit metrics. It proposes a new tick range based on the selected strategy (narrow/medium/wide) and current price, shows estimated gas and break-even time, and asks for confirmation. After approval it atomically collects fees, removes liquidity, calculates ticks, approves tokens if needed, and mints a new position NFT with the updated range.

When to use it

  • When a tracked position is flagged as OUT OF RANGE and not earning fees
  • When you want to re-center liquidity to the current market price
  • When a portfolio report shows a stale position with lost APY
  • When you want an immediate decision: close old + open new in one operation
  • When you need a guided analysis showing gas vs estimated fee recovery

Best practices

  • Always review the pre-rebalance cost-benefit summary and break-even time
  • Prefer rebalancing for positions large enough to justify gas (>= ~10x gas)
  • Select range width based on pair volatility: narrow for stable pairs, wide for volatile ones
  • Wait if price is within ~2% of your range boundary to avoid unnecessary operations
  • Confirm wallet and sufficient gas before executing the rebalance

Example use cases

  • Auto-recenter an ETH/USDC V3 position that moved above your upper bound
  • Collect fees and re-deploy liquidity after a large price swing in a volatile pair
  • Rebalance multiple out-of-range positions identified by a portfolio scan
  • Switch to a wider range for a small position where gas costs would dominate
  • Perform a single atomic workflow to avoid partial state (fees collected but new position not created)

FAQ

Yes. Closing a position realizes any impermanent loss. The skill reports IL and trade-offs in the pre-execution analysis.

What if gas makes rebalance uneconomical?

The tool estimates gas and break-even time and will warn if expected recovery exceeds your threshold (e.g., >14–30 days). You can cancel after review.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational