YieldVault Agent
by @alannetwork
Autonomous yield farming agent for BNB Chain with deterministic execution, smart contract integration, and automated decision-making.
clawhub install yieldvault-agentπ About This Skill
name: yieldvault-agent description: Autonomous yield farming agent for BNB Chain with deterministic execution, smart contract integration, and automated decision-making.
YieldVault Agent
Autonomous yield farming agent for BNB Chain with deterministic execution, smart contract integration, and automated decision-making.
Features
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:
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
1. Read current vault state (APR, TVL, user balance) 2. Calculate Net APR = apr - fees - (risk_score Γ 0.10) 3. Filter vaults with risk_score β€ 0.5 4. Select vault with highest Net APR 5. 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
6. Execute transaction (with retry logic) 7. Log execution record (SHA256 auditable)
Supported Networks
Security
Production Readiness
For mainnet deployment, add:
1. Chainlink Oracle - Live APR feeds 2. Hardware Wallet Support - Ledger/Trezor signing 3. Smart Contract Audit - Professional security review 4. 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 & architectureSupport
Issues & PRs welcome: https://github.com/open-web-academy/yieldvault-agent-bnb
License
MIT
π‘ Examples
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:
βοΈ 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
}