Search

PythonReactSEOPDF
OpenClaw

clawtrade-bnb

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

alannetwork0 source installs☆ 0 Repository starsv1.1.0

Installation

Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.

SkillHub CLI

skillhub install alannetwork/clawtrade-bnb

Inspect the source and compatibility requirements, then follow its installation steps.

Give your agent the source link and ask it to inspect instructions and dependencies before explaining the installation steps.

View source ↗Guides

Skill instructions

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 information

Source
github
Repository
openclaw/skills
Path
skills/alannetwork/clawtrade-bnb
Version
1.1.0
Commit
4e2573717c8217a90556f3578a571d6eaf2dc032
Classification source
rules
Status
active
Visibility
public

These signals come from indexed source analysis and may lag behind changes. Check the current source files.

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

Extracted content

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

Related skills

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.