
Trading Automation
yieldvault-agent
YieldVault Agent is an autonomous, auditable yield-farming operator for BNB Chain that integrates directly with on-chain YieldVault contracts (testnet/mainnet) to automate DEPOSIT, WITHDRAW, HARVEST, COMPOUND, and REBALANCE actions.
總覽
YieldVault Agent is an autonomous, auditable yield-farming operator for BNB Chain that integrates directly with on-chain YieldVault contracts (testnet/mainnet) to automate DEPOSIT, WITHDRAW, HARVEST, COMPOUND, and REBALANCE actions.
YieldVault Agent is an autonomous, auditable yield-farming operator for BNB Chain that integrates directly with on-chain YieldVault contracts (testnet/mainnet) to automate DEPOSIT, WITHDRAW, HARVEST, COMPOUND, and REBALANCE actions. Core features include a deterministic decision engine (same input → same output) for full auditability, an hourly autonomous scheduler, a transaction executor that signs and broadcasts transactions, Telegram alerts for executions, APR deltas and errors, and conservative risk management (only vaults with risk_score ≤ 0.5). The agent computes net APR (apr − fees − risk_penalty) to optimize yield while respecting harvest thresholds and rebalancing rules. Typical use cases: hands-off liquidity management for LPs or treasuries, automated yield optimization with auditable decision trails, safe testnet development and live deployment, and integration into CI/CD or self-hosted operations for continuous farming.
Skill.md
這個 Skill 如何運作
YieldVault Agent is an autonomous, auditable yield-farming operator for BNB Chain that integrates directly with on-chain YieldVault contracts (testnet/mainnet) to automate DEPOSIT, WITHDRAW, HARVEST, COMPOUND, and REBALANCE actions.
YieldVault Agent
Autonomous yield farming agent for BNB Chain with deterministic execution, smart contract integration, and automated decision-making.
Features
- Deterministic Decision Engine - Same input always produces same output (auditable)
- Smart Contract Integration - Interact with YieldVault contracts on BNB testnet/mainnet
- Autonomous Scheduler - Run farming decisions hourly without manual intervention
- Transaction Executor - Automatic DEPOSIT, WITHDRAW, HARVEST, COMPOUND, REBALANCE actions
- Telegram Alerts - Real-time notifications for executions, APR changes, and errors
- Risk Management - Conservative risk filtering (only vaults with risk_score ≤ 0.5)
- Yield Optimization - Net APR calculation (apr - fees - risk_penalty)
Installation
clawhub install yieldvault-agent
Quick Start
1. Configure
cp config.deployed.json .env.local
# Edit with your contract addresses and RPC endpoint
2. Deploy Contracts (if needed)
cd contracts
npm install
npm run deploy:testnet
3. Run Tests
npm test # Unit tests
node test.live.mock.js # Integration tests (offline)
node test.live.js # Live testnet tests
4. Start Scheduler
node scheduler.js
# Runs decision cycle every hour against testnet
5. Monitor Alerts
Telegram notifications sent automatically for:
- Execution started (vault_id, action, amount)
- APR changes (>1% delta)
- Errors (with severity level)
- Cycle completion (stats summary)
Architecture
Smart Contracts (BNB Testnet/Mainnet)
↓
BlockchainReader (live vault data)
↓
YieldFarmingAgent (deterministic decisions)
↓
TransactionExecutor (sign & broadcast)
↓
Scheduler (hourly automation)
↓
Notifications (Telegram alerts)
Configuration
Edit config.scheduler.json:
{
"chainId": 97,
"interval_minutes": 60,
"harvest_threshold_usd": 25,
"rebalance_apr_delta": 0.02,
"max_allocation_percent": 0.35,
"risk_score_threshold": 0.5
}
Decision Logic
-
Read current vault state (APR, TVL, user balance)
-
Calculate Net APR = apr - fees - (risk_score × 0.10)
-
Filter vaults with risk_score ≤ 0.5
-
Select vault with highest Net APR
-
Decide action:
- HARVEST if pending_rewards ≥ $25 USD
- COMPOUND if net_apr ≥ 2% delta
- REBALANCE if another vault beats current by ≥ 2%
- NOOP if already optimized
-
Execute transaction (with retry logic)
-
Log execution record (SHA256 auditable)
Supported Networks
- Testnet: BNB Chain Testnet (chainId: 97)
- Mainnet: BNB Chain Mainnet (chainId: 56)
Security
- ✅ Deterministic execution (reproducible, auditable)
- ✅ SHA256 audit trail for every decision
- ✅ Risk filtering (conservative)
- ✅ Constraint enforcement (max 35% per vault)
- ✅ Retry logic with exponential backoff
- ✅ No hardcoded private keys (use environment variables)
Production Readiness
For mainnet deployment, add:
- Chainlink Oracle - Live APR feeds
- Hardware Wallet Support - Ledger/Trezor signing
- Smart Contract Audit - Professional security review
- Emergency Pause - Multi-sig pause mechanism
See FINAL_CHECKLIST.md for complete production requirements.
Documentation
README.md- Full user guideSKILL.md- This fileFINAL_CHECKLIST.md- Production requirementsINTEGRATION_GUIDE.md- Smart contract integrationEXAMPLES.md- Usage examplesRESPUESTAS_PREGUNTAS.md- FAQ & architecture
Support
Issues & PRs welcome: https://github.com/open-web-academy/yieldvault-agent-bnb
License
MIT
最適合用於
何時使用
YieldVault Agent is an autonomous, auditable yield-farming operator for BNB Chain that integrates directly with on-chain YieldVault contracts (testnet/mainnet) to automate DEPOSIT, WITHDRAW, HARVEST, COMPOUND, and REBALANCE actions.

01 · 會前準備
準備決策簡報
在投資委員會開會前,把零散證據整理成結構化的論據。

02 · 團隊協作
統一交接標準
讓分析師、投資組合經理與 Agent 產出一致的研究結果。

03 · 即時更新
更新投資邏輯
出現新催化劑、KPI 發布或財報結果後,更新情境假設。
社群回饋
越用越好用。
隨著 Skill 被使用與評審,回饋將顯示在這裡。
探索更多
相關 Skills
查看全部hyperliquid-trading
The Hyperliquid Trading skill provides a concise interface for trading on Hyperliquid’s spot and perpetual markets. Use it to place limit and market orders, cancel open orders, query order status,…
bankr
Bankr enables executing crypto trading and DeFi operations via natural-language commands. It offers two integration options: a batteries-included Bankr CLI and a REST API at https://api.bankr.bot,…
pine-backtester
pine-backtester provides comprehensive backtesting for Pine Script indicators and strategies. Use it to append performance metrics, analyze trades, generate equity curves, compute win rates, track…