Built for stake pool operators who need to rebalance validator allocations across multiple pools. Manually calculating stake distributions, tracking validator changes, and generating execution commands is error-prone and time-consuming. This tool solves that by providing an interactive interface to plan rebalancing operations, validate totals, and automatically generate ready-to-run execution scripts—all while ensuring your pool's stake totals remain balanced.
- 📊 Live Data: Fetches current pool state directly from the Solana blockchain
- 🎨 Interactive TUI: Visual interface showing validators, balances, and reserve
- ⚖️ Auto-Rebalance: Redistribute stake from removed validators automatically
- ✅ Validation: Ensures totals balance before generating scripts
- 🔧 Script Generation: Creates ready-to-run bash scripts for execution
- 🌐 Pool Agnostic: Works with any Solana stake pool
# Install dependencies
bun install
cp .env.example .env
# Set your pool address in the .env file
POOL_ADDRESS=your_pool_address_here
RPC_URL=your_rpc_url_here
# Run the rebalancer
bun run rebalanceThe TUI provides an interactive interface with the following commands:
r #- Remove validator by numberu #- Undo removes # AMT- Set target stake amounta VOTE- Add new validatorb- Auto-rebalance (redistribute from removed validators)v- Validate totalsw- Write/Save desired state and generate scriptsq- Quit
After saving (w), the tool generates:
desired-state.json- Complete rebalancing planrebalance_YYYY-MM-DD/- Folder containing execution scripts:01_decrease_and_remove.sh- Remove validators02_increase_stake.sh- Increase stake to validators
- Bun runtime
POOL_ADDRESSenvironment variable (required)RPC_URLenvironment variable (optional, defaults to mainnet-beta)
Built by the team at Brew Labs
Developing open source infrastructure tools and solutions for the Solana ecosystem.
