Portfolio Rebalance Executor
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
The Portfolio Rebalance Executor enables automated portfolio rebalancing when token allocations deviate beyond configured thresholds. This tool is essential for DeFi portfolio managers, automated strategy providers, and index operators who need to maintain target allocations as market prices fluctuate. Unlike simple manual rebalancing, this tool provides automated execution with configurable thresholds, frequency controls, and slippage protection.
The tool reads portfolio state including token balances, current prices from price feeds/oracles, target allocations, current allocations, deviation percentages, rebalance thresholds, rebalance frequency, and last rebalance timestamp. It supports multiple rebalance execution method variants (rebalancePortfolio, executeRebalance, performRebalance) to ensure compatibility with various portfolio management contract implementations. The tool displays comprehensive portfolio details including current allocations versus target allocations, maximum deviation, rebalance status, last rebalance time, and whether a rebalance is currently needed.
HOW TO USE
1. Connect your wallet using the Connect button. The tool automatically detects your connected address and network.
2. Select the network where your rebalance contract is deployed using the network dropdown.
3. Enter the rebalance contract address and the portfolio ID you want to manage.
4. Enter the token addresses (comma-separated) and target allocations (comma-separated percentages, e.g., 50,50).
5. Configure the rebalance threshold percentage (e.g., 5% means rebalance when any allocation deviates by more than 5%).
6. Set the rebalance frequency in seconds to prevent excessive rebalancing and gas costs.
7. Configure your slippage tolerance percentage for swap execution.
8. Click "Load Portfolio" to verify the portfolio exists, is active, and check if a rebalance is needed.
9. Review the portfolio details in the preview panel including current allocations, target allocations, maximum deviation, and whether a rebalance is needed.
10. Click "Execute Rebalance" to submit the rebalance transaction through your wallet.
11. Use the "Cancel Auto-Rebalance" button to stop automatic rebalancing for a portfolio if supported by the contract.
TECHNICAL MECHANISM
The tool dynamically discovers the correct rebalance function by attempting multiple common ABI variants (rebalancePortfolio, executeRebalance, performRebalance) and performing gas estimation to verify the function exists. When a rebalance is triggered, the tool calls the rebalance contract with the portfolio ID as the parameter. The contract then calculates the required trades based on current and target allocations, checks that sufficient time has elapsed since the last rebalance based on the frequency parameter, executes swaps through the configured swap path/protocol for each token that needs adjustment, and updates the portfolio state. The tool reads portfolio state via the portfolios view function, which returns owner address, total portfolio value, current allocations as percentages, target allocations, last rebalance timestamp, and active status. The needsRebalance view function checks if any token allocation deviates beyond the configured threshold.
WHAT IT CANNOT SEE
This tool cannot verify that the price feed is accurate or reliable; it relies entirely on the oracle configured in the contract. It cannot detect if the oracle has been compromised, manipulated, or provides stale data. It cannot ensure that the rebalance will execute at the optimal time or price due to slippage, market volatility, and block timing. It cannot guarantee that the rebalance will result in the exact target allocations due to slippage and swap execution constraints. It cannot verify that the portfolio contracts have not been upgraded or modified after deployment. It cannot detect if the swap path is optimal or if the transaction is being front-run by malicious actors. It cannot recover funds if execution fails due to contract bugs, insufficient token approvals, out-of-gas errors, or blockchain reorgs. It cannot verify that tokens being traded are legitimate or not honeypot contracts. It cannot predict market movements, price gaps, or flash crashes that may affect rebalance execution. It cannot guarantee execution during extreme network congestion, high gas prices, or volatile market conditions. It cannot detect if the underlying swap protocol has been compromised or is returning manipulated prices. It cannot prevent the user from canceling or modifying rebalance parameters through other interfaces. It cannot ensure that the configured rebalance frequency or threshold is appropriate for current market volatility or portfolio characteristics.
PLEASE NOTE
This tool is designed for EVM-compatible blockchains only (Ethereum, Polygon, Arbitrum, Optimism, Base, BSC, Avalanche, Fantom, Linea, Scroll). It requires an active wallet connection and sufficient native currency for gas fees for each rebalance execution. Always verify your rebalance contract address, portfolio ID, token addresses, and target allocations before executing. The tool attempts multiple ABI variants but may not support all rebalance contract implementations - verify your contract's functions match the expected interfaces. Threshold and frequency parameters are critical - too low may result in frequent rebalances with high gas costs, too high may allow significant drift from target allocations. The tool is provided as-is with no warranty; users assume full responsibility for their transactions and should exercise caution when automating portfolio rebalancing. For mainnet usage, ensure your rebalance contract has been audited and you understand the risks of automated portfolio management including impermanent loss, slippage, gas costs, and smart contract risks.