Requirements
- Target platform
- OpenClaw
- Install method
- Manual import
- Extraction
- Extract archive
- Prerequisites
- OpenClaw
- Primary doc
- SKILL.md
Autonomous DeFi trading agent for BNB Chain with multi-strategy engine, network switching, and reinforced learning.
Autonomous DeFi trading agent for BNB Chain with multi-strategy engine, network switching, and reinforced learning.
This item is timing out or returning errors right now. Review the source page and try again later.
Use the source page and any available docs to guide the install because the item is currently unstable or timing out.
I tried to install a skill package from Yavira, but the item is currently unstable or timing out. Inspect the source page and any extracted docs, then tell me what you can confirm and any manual steps still required.
I tried to upgrade a skill package from Yavira, but the item is currently unstable or timing out. Compare the source page and any extracted docs with my current installation, then summarize what changed and what manual follow-up I still need.
Production-ready autonomous trading agent for BNB Chain testnet & mainnet. Features 3 intelligent strategies, real-time performance analytics, on-chain event logging, and self-improving reinforced learning.
Compound Yield - Auto-reinvest harvested rewards for exponential growth Rebalance - Move capital from low-APR to high-APR vaults automatically Dynamic Harvest - Intelligent harvesting based on gas cost optimization
Instant testnet โ mainnet toggle (no restart) Separate configs per network (gas, thresholds, RPCs) Contract address mapping per chain Persistent network preferences
Realized APR (actual, based on historical yields) Per-vault performance breakdown Strategy effectiveness scoring Success rate tracking (target: >90%) Failure pattern detection
Auto-learns from past failures Dynamically optimizes strategy parameters Adjusts thresholds based on success rates Confidence scoring per strategy Self-improving over time
All actions logged with TX hashes Auditable blockchain trail BNB Testnet Scanner links Complete execution history
Interactive command-line interface Network management commands Performance metrics dashboard Learning progress tracking Real-time optimization
clawhub install clawtrade-bnb cd ~/.openclaw/workspace/skills/clawtrade-bnb npm install
# Copy example config cp config.deployed.json config.live.json # Edit with your settings nano config.live.json # Set RPC endpoint, contract addresses, wallet
# Option A: Environment variable (recommended) export PRIVATE_KEY="your_testnet_private_key" # Option B: .env file (git-ignored) echo "PRIVATE_KEY=your_key" >> .env # NOTE: Never commit private keys!
# Test connection and contracts node agent-cli.js network status # Check wallet balance npm run verify
# Terminal 1: Run strategy engine (60-second cycles) node strategy-scheduler.js # Terminal 2: Real-time dashboard npm run dev:dashboard # โ Open http://localhost:5173 # Terminal 3: Control panel node agent-cli.js # Example commands: node agent-cli.js network testnet # Switch network node agent-cli.js perf summary # See performance node agent-cli.js learn now # Optimize strategies
DeFi Strategy Engine โโ Compound Yield Strategy โ โโ Harvest when pending > $25 โ Re-deposit โโ Rebalance Strategy โ โโ Move 20% from low-APR to high-APR vault โโ Dynamic Harvest Strategy โโ Harvest only if pending > 2x gas cost โ (runs every 60 seconds) Strategy Scheduler โโ Read vault APRs & pending rewards โโ Execute all 3 strategies โโ Log actions + TX hashes โ (logs to blockchain) On-Chain Logger โโ execution-log.jsonl (append-only) โโ performance-metrics.json (cumulative) โโ learning-state.json (optimization history) โ (analyzes continuously) Reinforced Learning System โโ Tracks success rates per strategy โโ Detects failure patterns โโ Auto-adjusts thresholds โโ Generates improvement reports โ (displays real-time) Dashboard + Control Panel โโ React dashboard (http://localhost:5173) โโ Agent CLI (network, perf, learn commands) โโ Performance API (/api/logs, /api/health)
config.deployed.json - Contract addresses & ABIs { "chainId": 97, "network": "BNB Testnet", "contracts": [ { "vaultId": "vault_eth_staking_001", "address": "0x588eD88A145144F1E368D624EeFC336577a4276b", "strategy": "Ethereum 2.0 Staking", "risk_score": 0.3 } ] } config.scheduler.json - Strategy thresholds { "scheduler": { "execution_interval_seconds": 60, "enabled": true }, "agent": { "harvest_threshold_usd": 25, "rebalance_apr_delta": 2.0, "max_allocation_percent": 0.35, "min_confidence": 0.6 } }
Each 60-second cycle: COMPOUND YIELD Check pending rewards per vault If pending โฅ $25 โ Harvest + Re-deposit Log action with TX hash REBALANCE Compare APRs across all vaults If top APR > bottom APR by โฅ 2% โ Rebalance Move 20% from worst to best vault Log action with TX hash DYNAMIC HARVEST Estimate gas cost per harvest Only harvest if pending > 2x gas cost Maximize profitability per action Log action with TX hash Example Output: Cycle #42 @ 2026-02-18T18:00:00Z โ vault_eth_staking_001: COMPOUND ($45.50 harvested) โ vault_high_risk_001: REBALANCE (2.1% APR delta) โ vault_link_oracle_001: HARVEST ($12.30 pending) โ Total Rewards: $57.80 | Compounded: $45.50
node agent-cli.js network status # Current network config node agent-cli.js network testnet # Switch to testnet node agent-cli.js network mainnet # Switch to mainnet (โ ๏ธ production)
node agent-cli.js perf summary # Quick stats node agent-cli.js perf report # Detailed analysis node agent-cli.js perf vaults # Per-vault breakdown node agent-cli.js perf strategies # Strategy effectiveness
node agent-cli.js learn now # Analyze & optimize node agent-cli.js learn report # View improvements node agent-cli.js learn reset # Reset learning state
NetworkChain IDUse CaseHarvest MinGas MultiplierBNB Testnet97Development$251.2xBNB Mainnet56Production$1001.5x
Switch instantly without restarting: # Current config node agent-cli.js network status # โ BNB Testnet # Switch to production node agent-cli.js network mainnet # โ Updated RPC, contract addresses, and thresholds # All settings updated automatically
โ Every action logged with transaction hash โ Blockchain verification via BNB Testnet/Mainnet Scanner โ Append-only execution log (execution-log.jsonl) โ Complete audit trail for compliance
โ Deterministic decision logic (reproducible, auditable) โ Success rate monitoring (>90% target) โ Confidence thresholds per strategy โ Graceful error handling & recovery โ Automatic parameter optimization via learning
โ Never hardcoded - use environment variables only โ .env file git-ignored โ Testnet for development, mainnet when ready โ For production: use hardware wallet support (future)
clawtrade-bnb/ โโโ defi-strategy-engine.js # 3 strategies (compound, rebalance, harvest) โโโ on-chain-logger.js # Event logging with TX hashes โโโ strategy-scheduler.js # Main loop (60s cycles) โโโ network-switcher.js # Testnet โ mainnet toggle โโโ performance-analytics.js # Real APR & metrics โโโ reinforced-learning.js # Self-improving parameters โโโ agent-cli.js # Control panel โโโ dashboard/ # React frontend (real-time) โโโ contracts/ # Vault smart contracts โโโ config.deployed.json # Contract addresses & ABIs โโโ config.scheduler.json # Strategy thresholds โโโ execution-log.jsonl # Action history (generated) โโโ performance-metrics.json # Metrics (generated) โโโ learning-state.json # Learning progress (generated) โโโ README.md # User guide โโโ README_STRATEGY.md # Strategy details โโโ README_ADVANCED.md # Network switching & learning โโโ SKILL.md # This file โโโ package.json # Dependencies
This is a standalone, complete skill. It can also integrate with: Telegram Notifications - Send alerts to OpenClaw users Email Reports - Daily performance summaries Database Logging - Store metrics in persistent DB Webhook Integrations - Trigger external services
FilePurposeREADME.mdComplete user guideREADME_STRATEGY.mdStrategy details & examplesREADME_ADVANCED.mdNetwork switching & reinforced learningSKILL.mdThis installation & architecture guide
โ Production-ready code (tested, documented, error-handling) โ 3 profitable strategies (auto-optimizing, self-learning) โ Real-time dashboard (React, live updates) โ CLI control panel (manage from terminal) โ On-chain logging (auditable, transparent) โ Network switching (testnet โ mainnet in seconds) โ Self-improvement (learns from failures automatically) โ Complete documentation (guides, examples, FAQ)
For someone else to replicate: Install clawhub install clawtrade-bnb npm install Configure # Edit config files with your contracts & RPC nano config.deployed.json Deploy Contracts (if using new vaults) cd contracts && npm run deploy:testnet Run node strategy-scheduler.js # Main engine npm run dev:dashboard # Dashboard node agent-cli.js # Control panel Monitor Dashboard: http://localhost:5173 Logs: execution-log.jsonl Analytics: node agent-cli.js perf report Total setup time: ~15 minutes
GitHub Issues: https://github.com/open-web-academy/clawtrade-bnb-bnb ClawHub: https://clawhub.com (search: clawtrade-bnb) Discord: https://discord.com/invite/clawd
v1.1.0 (2026-02-18) - Network switcher, analytics, reinforced learning, CLI v1.0.0 (2026-02-17) - Initial release, 3 strategies, on-chain logging
MIT - Free to use, modify, and distribute
Agent frameworks, memory systems, reasoning layers, and model-native orchestration.
Largest current source with strong distribution and engagement signals.