Requirements
- Target platform
- OpenClaw
- Install method
- Manual import
- Extraction
- Extract archive
- Prerequisites
- OpenClaw
- Primary doc
- SKILL.md
One-step Safe rebalancer using on-chain 31Third policies.
One-step Safe rebalancer using on-chain 31Third policies.
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
This skill is intentionally minimal for non-technical users. Best practice: use only one command / one tool: rebalance_now verify_deployment_config (post-deploy troubleshooting) If you are unsure, use the help command first: npm run cli -- help
Node.js 22+ npm
npm install npm run build
Deploy your Safe + policies using the 31Third policy wizard: https://app.31third.com/safe-policy-deployer You need at least two wallets: Safe owner wallet: never share this private key. Executor wallet: configured in the wizard on ExecutorModule; this private key is used by this skill. Copy env vars from the final wizard overview. Required env vars: SAFE_ADDRESS=0xYourSafe EXECUTOR_MODULE_ADDRESS=0xYourExecutorModule EXECUTOR_WALLET_PRIVATE_KEY=0x... TOT_API_KEY=your_31third_api_key RPC_URL=https://mainnet.base.org CHAIN_ID=8453 TOT_API_KEY can be requested via https://31third.com/contact or by emailing dev@31third.com.
Reads AssetUniverse and StaticAllocation policy state from ExecutorModule. Builds baseEntries from current Safe balances for AssetUniverse tokens. Builds targetEntries from on-chain StaticAllocation targets. Calls SDK calculateRebalancing(...). Executes via SDK executeRebalancing(...) using ethers wallet signer. Waits for confirmation and returns tx hash. Safety checks: Fails if scheduler != registry. Fails if executor wallet is not equal to registry. Fails if required policies are missing. Loads driftThresholdBps from StaticAllocation and skips execution when drift is below threshold. Loads maxSlippageBps from SlippagePolicy and uses: maxSlippage = policySlippage - 0.1% maxPriceImpact = policySlippage - 0.1% Uses default minTradeValue = 0.1. Partial policy deployment behavior: If AssetUniverse is not deployed, base entries default to []. If SlippagePolicy is not deployed, configured/default slippage values are used. If StaticAllocation is not deployed, auto target fetch is not possible. This is the only fallback case where you should pass manual targetEntries. Do this only when StaticAllocation policy is intentionally not deployed. CLI fallback example: npm run cli -- rebalance-now --target-entries '[{"tokenAddress":"0x...","allocation":0.5},{"tokenAddress":"0x...","allocation":0.5}]'
npm run cli -- help npm run cli -- rebalance-now npm run cli -- rebalance-now --target-entries '[{"tokenAddress":"0x...","allocation":0.5},{"tokenAddress":"0x...","allocation":0.5}]' npm run cli -- verify-deployment --troubleshooting-file ./summary.txt npm run cli -- verify-deployment --troubleshooting-summary "Safe=0x..."
If your rebalance fails, check these common issues:
Your AssetUniverse policy is blocking the trade. Fix: Just use tokens that are allowed by the policy for rebalancing.
The trade slippage is too high. Cause: Low liquidity for the token pair (common with Aave aTokens or wrapped assets on new chains). Fix: Try setting maxSlippage and maxPriceImpact lower on the rebalancing calculation call.
The script can't find a target allocation on-chain. Fix: Run verify-deployment and if policy not deployed on purpose you can rebalance into any allocation within the AssetUniverse.
Trading, swaps, payments, treasury, liquidity, and crypto-financial operations.
Largest current source with strong distribution and engagement signals.