Back to Registry View Author Profile
Official Verified
safe-rebalancer
Execute policy-guarded token swaps and portfolio rebalancing for a Safe via 31Third on EVM chains.
skill-install — Terminal
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/phips0812/31third-safe-rebalancerOr
31Third Safe Rebalancer
This skill executes on-chain transactions with 31Third infrastructure and policy checks (daily limits, allowlists, slippage) before execution.
Setup for Agent Owners
Deploy the 31Third execution environment to your Safe first: Deployment Wizard: https://app.31third.com/safe-policy-deployer
- Get an API key from https://31third.com.
- Deploy Safe policy and Strategy Executor with the wizard.
- Set environment variables:
RPC_URL=https://mainnet.base.org
CHAIN_ID=8453
TOT_API_KEY=your_api_key_here
SAFE_ADDRESS=your_safe_address
EXECUTOR_MODULE_ADDRESS=deployed_module_address
EXECUTOR_WALLET_PRIVATE_KEY=agent_hot_wallet_private_key
Capabilities
- Token swaps (for example USDC -> WETH).
- Portfolio rebalancing to target weights.
- Policy checks and inspection.
Usage
Simple Swap
node {baseDir}/scripts/trade.js --action swap --from 0xUSDC... --to 0xWETH... --amount 1000000 --chain base
Portfolio Rebalance
node {baseDir}/scripts/trade.js --action rebalance --targets '{"0xWETH...": 0.5, "0xUSDC...": 0.5}' --chain-id 8453
Policy Checks
node {baseDir}/scripts/trade.js --action checkPolicy
node {baseDir}/scripts/inspect_policies_advanced.js
node {baseDir}/scripts/check_target_executor.js
Required Configuration
RPC_URLCHAIN_ID(optional, defaults to8453)TOT_API_KEYSAFE_ADDRESSEXECUTOR_MODULE_ADDRESSEXECUTOR_WALLET_PRIVATE_KEY
Disclaimer
- This skill is infrastructure tooling and not financial, investment, legal, or tax advice.
- Operators are fully responsible for policy setup, signer security, execution approvals, and compliance.
- Validate behavior in non-production environments before enabling live trading.
References
- See
references/SDK.mdfor SDK notes.
Metadata
AI Skill Finder
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skill Add to Configuration
Paste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-phips0812-31third-safe-rebalancer": {
"enabled": true,
"auto_update": true
}
}
}Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.