搜索

PythonReactSEOPDF
OpenClaw

clawtrade-bnb

Autonomous DeFi trading agent for BNB Chain with multi-strategy engine, network switching, and reinforced learning.

alannetwork0 来源安装数☆ 0 仓库 Starsv1.1.0

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

SkillHub CLI

skillhub install alannetwork/clawtrade-bnb

打开来源仓库,查看说明和兼容环境后,按来源提供的命令或步骤安装。

将来源链接提供给你的 Agent,让它先读取说明、核对依赖,并向你说明将执行的安装步骤。

查看来源 ↗使用指南

技能说明

CawTrade BNB - Autonomous DeFi Trading Agent v1.1.0

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.

Core Features

🤖 Three Autonomous Strategies
  1. Compound Yield - Auto-reinvest harvested rewards for exponential growth
  2. Rebalance - Move capital from low-APR to high-APR vaults automatically
  3. Dynamic Harvest - Intelligent harvesting based on gas cost optimization
🌐 Network Switching
  • Instant testnet ↔ mainnet toggle (no restart)
  • Separate configs per network (gas, thresholds, RPCs)
  • Contract address mapping per chain
  • Persistent network preferences
📊 Real-Time Analytics
  • Realized APR (actual, based on historical yields)
  • Per-vault performance breakdown
  • Strategy effectiveness scoring
  • Success rate tracking (target: >90%)
  • Failure pattern detection
🧠 Reinforced Learning
  • Auto-learns from past failures
  • Dynamically optimizes strategy parameters
  • Adjusts thresholds based on success rates
  • Confidence scoring per strategy
  • Self-improving over time
⛓️ On-Chain Event Logging
  • All actions logged with TX hashes
  • Auditable blockchain trail
  • BNB Testnet Scanner links
  • Complete execution history
🎮 Control Panel CLI
  • Interactive command-line interface
  • Network management commands
  • Performance metrics dashboard
  • Learning progress tracking
  • Real-time optimization

Installation & Setup

1. Install Skill
clawhub install clawtrade-bnb
cd ~/.openclaw/workspace/skills/clawtrade-bnb
npm install
2. Configure Environment
# Copy example config
cp config.deployed.json config.live.json

# Edit with your settings
nano config.live.json
# Set RPC endpoint, contract addresses, wallet
3. Set Private Key (Secure)
# Option A: Environment variable (recommended)
export PRIVATE_KEY="your_testnet_private_key"

# Opti...

来源信息

Source
github
Repository
openclaw/skills
Path
skills/alannetwork/clawtrade-bnb
Version
1.1.0
Commit
4e2573717c8217a90556f3578a571d6eaf2dc032
分类来源
rules
状态
active
可见性
public

这些信息来自收录时的来源分析,可能滞后;使用前请核对最新来源文件。

README

Autonomous Yield Farming Agent Skill

Status: ✅ Production Ready | Chain: BNB Testnet (97) / Mainnet (56) | Model: Deterministic Decision Engine

Quick Start

Installation
npm install
# or link as OpenClaw skill
ln -s /home/ubuntu/.openclaw/workspace/skills/clawtrade-bnb /path/to/openclaw/skills/
Basic Usage
const YieldFarmingAgent = require('./index.js');
const mockdata = require('./mockdata.json');

const agent = new YieldFarmingAgent({
  chainId: 97,
  harvest_threshold_usd: 25,
  rebalance_apr_delta: 0.02,
  max_allocation_percent: 0.35
});

// Your current position state
const allocation = {
  vault_bnb_lp_001: {
    shares: "1000",
    amount_usd: "50000",
    pending_rewards_usd: "1200"
  }
};

// Get deterministic decision
const decision = agent.decide(mockdata.vaults, allocation);
console.log(JSON.stringify(decision, null, 2));
CLI Execution
# Run with default example
node index.js

# Run with hash verification
node index.js --verify

Decision Flow

┌─────────────────────────────────────────────────┐
│  1. Load Vaults & Filter by Risk (score ≤ 0.5)  │
└────────────────────┬────────────────────────────┘
                     │
┌────────────────────▼────────────────────────────┐
│  2. Calculate NET_APR = apr - fees - risk_penalty │
│     (risk_penalty = risk_score × 0.10)           │
└────────────────────┬────────────────────────────┘
                     │
┌────────────────────▼────────────────────────────┐
│  3. Rank by NET_APR (descending)                │
│     → Select best_vault                         │
└────────────────────┬────────────────────────────┘
                     │
          ┌──────────┴──────────┐
          │                     │
    ┌─────▼─────┐        ┌─────▼──────┐
    │ HARVEST?  │        │ COMPOUND?  │
    │ rewards   │        │ net_apr >=  │
    │ >= $25    │        │ threshold   │
    └─────┬─────┘        └─────┬──────┘
          │ YES...

来源内容

SKILL.md
# CawTrade BNB - Autonomous DeFi Trading Agent v1.1.0

**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.

## Core Features

### 🤖 Three Autonomous Strategies
1. **Compound Yield** - Auto-reinvest harvested rewards for exponential growth
2. **Rebalance** - Move capital from low-APR to high-APR vaults automatically
3. **Dynamic Harvest** - Intelligent harvesting based on gas cost optimization

### 🌐 Network Switching
- Instant testnet ↔ mainnet toggle (no restart)
- Separate configs per network (gas, thresholds, RPCs)
- Contract address mapping per chain
- Persistent network preferences

### 📊 Real-Time Analytics
- Realized APR (actual, based on historical yields)
- Per-vault performance breakdown
- Strategy effectiveness scoring
- Success rate tracking (target: >90%)
- Failure pattern detection

### 🧠 Reinforced Learning
- Auto-learns from past failures
- Dynamically optimizes strategy parameters
- Adjusts thresholds based on success rates
- Confidence scoring per strategy
- Self-improving over time

### ⛓️ On-Chain Event Logging
- All actions logged with TX hashes
- Auditable blockchain trail
- BNB Testnet Scanner links
- Complete execution history

### 🎮 Control Panel CLI
- Interactive command-line interface
- Network management commands
- Performance metrics dashboard
- Learning progress tracking
- Real-time optimization

## Installation & Setup

### 1. Install Skill
```bash
clawhub install clawtrade-bnb
cd ~/.openclaw/workspace/skills/clawtrade-bnb
npm install
```

### 2. Configure Environment
```bash
# Copy example config
cp config.deployed.json config.live.json

# Edit with your settings
nano config.live.json
# Set RPC endpoint, contract addresses, wallet
```

### 3. Set Private Key (Secure)
```bash
# Option A: Environment variable (recommended)
export PRIVATE_KEY="your_testnet_private_key"

# Opti...
README
# Autonomous Yield Farming Agent Skill

**Status:** ✅ Production Ready | **Chain:** BNB Testnet (97) / Mainnet (56) | **Model:** Deterministic Decision Engine

## Quick Start

### Installation

```bash
npm install
# or link as OpenClaw skill
ln -s /home/ubuntu/.openclaw/workspace/skills/clawtrade-bnb /path/to/openclaw/skills/
```

### Basic Usage

```javascript
const YieldFarmingAgent = require('./index.js');
const mockdata = require('./mockdata.json');

const agent = new YieldFarmingAgent({
  chainId: 97,
  harvest_threshold_usd: 25,
  rebalance_apr_delta: 0.02,
  max_allocation_percent: 0.35
});

// Your current position state
const allocation = {
  vault_bnb_lp_001: {
    shares: "1000",
    amount_usd: "50000",
    pending_rewards_usd: "1200"
  }
};

// Get deterministic decision
const decision = agent.decide(mockdata.vaults, allocation);
console.log(JSON.stringify(decision, null, 2));
```

### CLI Execution

```bash
# Run with default example
node index.js

# Run with hash verification
node index.js --verify
```

## Decision Flow

```
┌─────────────────────────────────────────────────┐
│  1. Load Vaults & Filter by Risk (score ≤ 0.5)  │
└────────────────────┬────────────────────────────┘
                     │
┌────────────────────▼────────────────────────────┐
│  2. Calculate NET_APR = apr - fees - risk_penalty │
│     (risk_penalty = risk_score × 0.10)           │
└────────────────────┬────────────────────────────┘
                     │
┌────────────────────▼────────────────────────────┐
│  3. Rank by NET_APR (descending)                │
│     → Select best_vault                         │
└────────────────────┬────────────────────────────┘
                     │
          ┌──────────┴──────────┐
          │                     │
    ┌─────▼─────┐        ┌─────▼──────┐
    │ HARVEST?  │        │ COMPOUND?  │
    │ rewards   │        │ net_apr >=  │
    │ >= $25    │        │ threshold   │
    └─────┬─────┘        └─────┬──────┘
          │ YES...

相关技能

OpenClaw

bambu-studio-ai

heyixuan2

Bambu Lab 3D printer control and automation. Activate when user mentions: printer status, 3D printing, slice, analyze model, generate 3D, AMS filament, print monitor, Bambu Lab, or any 3D printing task. Full pi...

OpenClaw

humanpages

human-pages-ai

Search and hire real humans for tasks — photography, delivery, research, and more

OpenClaw

geo-optimization

capt-marbles

Generative Engine Optimization (GEO) for AI search visibility. Optimize content to appear in ChatGPT, Perplexity, Claude, and Google AI Overviews. Use when optimizing websites, pages, or content for LLM discove...

OpenClaw

openclaw-skills

zseven-w

Reusable skill templates for OpenClaw AI agents. Templates for API integration, data processing, web scraping, CLI tools, and file processing.