Auto-Rebalance Trigger Tool
Free to download on every platform. Comes pre-installed on BotFone, BotPad and BotFlip — with extra free apps included.
About this app
WHAT IT DOES
Auto-Rebalance Trigger Tool is a powerful portfolio management tool that monitors your DEX portfolio positions and automatically triggers rebalancing when allocations drift from your targets. When you're on a supported DEX (Uniswap, SushiSwap, 1inch, Curve, or Balancer), the tool detects your current token balances and positions from the page, fetches real-time prices via the DEX's pool contracts, and calculates your current allocation ratio. It compares this against your target allocation (e.g., 50% ETH, 50% USDC) and identifies deviations. When the allocation drifts beyond a configurable threshold (default 5%), the panel displays the current allocation, target allocation, deviation percentages, and a detailed list of trades needed to rebalance—selling over-weighted assets and buying under-weighted assets. A "Rebalance Now" button constructs and sends the required swap transactions to bring your portfolio back to target in a single or sequential bundle. Both manual confirmation and auto-rebalance modes are supported. All rebalance history is tracked for monitoring and performance analysis.
WHERE IT RUNS
This overlay operates on major DEX platforms including Uniswap (app.uniswap.org, uniswap.org), SushiSwap (sushi.com), 1inch (1inch.io), Curve (curve.fi), and Balancer (balancer.fi). It works in any browser that supports the BotGentz extension framework and has an EVM-compatible wallet extension installed. The panel activates automatically when you're on a supported DEX page with detectable portfolio holdings.
HOW TO USE
Install the extension and connect your wallet. Navigate to any supported DEX where your portfolio holdings are displayed. The tool automatically detects your token balances, fetches current prices, and calculates your allocation. Configure your target allocation—enter the percentage for each asset (e.g., ETH 50%, USDC 50%) in the settings. Set the deviation threshold (default 5%) that triggers a rebalance alert. The panel displays your current allocation, target allocation, and any deviations. If rebalancing is needed, the tool shows the trades required and offers a "Rebalance Now" button. Click it to execute the trades—the tool will send the swap transactions through your wallet. Enable auto-rebalance for fully automated rebalancing. Use the "Refresh" button to manually update data, "Save Settings" to apply changes, and "Copy Report" to export a summary. The tool tracks all rebalance history for performance review.
MECHANISM: PORTFOLIO ALLOCATION TRACKING WITH PRICE MONITORING AND AUTOMATED SWAP ROUTING
The extension implements a portfolio allocation tracking system that reads token balances from the page and fetches real-time prices via eth_call to the DEX pool contracts. The tool identifies the user's holdings from the page's DOM (balance displays, position sizes, or staked amounts) and uses eth_call to token contracts' balanceOf() where needed. Current prices are fetched using the DEX pool's getReserves() or equivalent, calculating the spot price for each token. The allocation is calculated as (balance * price) / total_portfolio_value * 100 for each asset. The deviation is computed as current_allocation - target_allocation for each asset. When the maximum absolute deviation exceeds the threshold, the tool calculates rebalance trades: for each asset with positive deviation (over-weighted), a sell order is generated; for each with negative deviation (under-weighted), a buy order is generated. The trade amounts are calculated to bring the portfolio back to target. The execution uses ethers.js loaded at runtime to construct swap transactions via the DEX router contract, with appropriate slippage protection. Auto-rebalance mode automatically executes the rebalance when triggered, with a configurable delay for user override. All rebalance data is stored locally using GM_setValue for historical analysis, tracking the assets rebalanced, deviation percentage, and timestamp.
THE PANEL
The overlay panel is fully draggable via its title bar and remembers its position per-site using GM_setValue. It snaps to the nearest edge when dragged within 40px of any screen boundary. The panel includes clear sections for portfolio rebalance (DEX name, chain, wallet address, gas price), current allocation (list of assets with percentages and deviation indicators), target allocation (user-defined allocation percentages), rebalance needed (deviation status, trades list with actions and amounts, Rebalance Now button), settings (target allocation inputs for each asset, deviation threshold input, auto-rebalance toggle, slippage input, notification toggle), history (recent rebalances with assets and timestamps), and action buttons (Refresh, Save Settings, Copy Report, Clear History). The current allocation section color-codes deviations—green for within threshold, yellow for approaching threshold, red for exceeding threshold. Pressing Escape temporarily dismisses the panel until you navigate to a new DEX page or manually reactivate.
PLEASE NOTE
This extension requires the free BotGentz framework extension to be installed and active. You must also have a real EVM-compatible wallet extension (such as MetaMask, WalletConnect, Coinbase Wallet, or Rabby) already installed in your browser—the overlay uses your wallet's RPC provider for eth_call queries and to send swap transactions. This tool sends real on-chain transactions when rebalancing—each trade costs gas and executes a market swap. The tool cannot detect positions that are not visible on the current page; depends on DEX price feeds which may be manipulated or delayed; cannot guarantee execution at the exact rebalance price due to slippage and market volatility; does not support non-EVM chains where DEX interfaces differ; cannot account for gas costs in the rebalance calculation; does not support positions that require multiple steps to rebalance (e.g., LP positions that require adding/removing liquidity); cannot detect external holdings not displayed on the page; and cannot automatically rebalance without user approval (auto-rebalance requires explicit enablement). No private keys, wallet balances, browsing history, or position data are ever collected, transmitted, or stored outside your local browser—all data is stored locally using GM_setValue. Rebalancing trades are executed at market prices—slippage and price impact may affect execution. Always monitor your trades and verify rebalance calculations before confirming.