Staking Basket Rebalance Trigger
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
This tool provides on-chain triggering and execution of staking basket rebalancing, enabling you to maintain optimal validator weight distributions for diversified staking. It reads your connected wallet address, staking basket contract address, current validator weights, target validator weights, basket balance, current block timestamp, rebalance threshold, and rebalance history. You can then sign and send transactions to check if rebalancing is needed based on weight deviations, trigger rebalancing when weights drift beyond the threshold, execute pending rebalances, and record rebalance metadata on-chain. All rebalance parameters are displayed in a clear review panel before you sign, so you know exactly what you are triggering. The tool also logs transaction hashes, confirmation status, and gas costs, providing a complete audit trail of all rebalance activities.
HOW TO USE
Connect your wallet using the built-in wallet bridge, choose the network that matches your staking basket contract, and paste the basket contract address. Enter the current validator weights as a comma-separated list, the target validator weights (must match the number of validators), and the rebalance threshold in basis points (e.g., 100 for 1% deviation). The review panel shows all inputs, the current basket balance, and whether rebalancing is needed before you sign. Use the numbered action buttons: check rebalance to compare current and target weights and determine if rebalancing is needed; trigger rebalance to initiate the rebalancing process with the specified weights and threshold; or execute rebalance to execute a pending rebalance (if required by the contract). You can also check status to view current rebalance state, or view rebalance history to see all past rebalance IDs and timestamps. Each transaction is signed sequentially, and the tool displays transaction details and confirmation status.
THE REAL MECHANISM
This tool uses ethers.js v5.7.2 to build and send transactions through the wallet's signer. It does not rely on any hardcoded contract addresses – you paste the basket contract you are using, so you are in full control. When you check rebalancing, the tool compares the current and target weights and determines if the deviation exceeds the threshold. When you trigger rebalancing, the tool calls triggerRebalance, which submits the current and target weights along with the threshold to the contract. When you execute rebalancing, the tool calls executeRebalance, which performs the actual weight redistribution. The tool reads rebalance state via getRebalanceStatus, which returns active status, current weights, target weights, threshold, and timestamp, as well as getRebalanceHistory for the full history. All transactions are sequential to prevent nonce conflicts, and gas costs are calculated using effectiveGasPrice for accurate post-EIP-1559 reporting.
WHAT IT CANNOT SEE
This tool cannot verify off-chain validator performance, predict optimal weights, detect validator misbehavior, or ensure that the basket contract handles rebalancing correctly. It cannot detect if the validators are performing well or if the target weights are optimal. The tool also cannot verify that the basket contract correctly handles edge cases like validator exits, slashing, or weight updates. It cannot simulate the outcome of a transaction before you sign it, nor can it guarantee that the rebalancing will be processed correctly if the contract is not properly implemented.
PLEASE NOTE
This tool works only on EVM-compatible chains supported by your wallet and provider. Always double-check the contract addresses and parameters before signing. Use testnet first. The tool is a transaction-signing interface and rebalance management tool, not a validator performance or optimal weight prediction system.