The DeFi Yield Farming Assistant is an intelligent tool that scans Aptos blockchain protocols (Joule, Thala, Amnis, Echo) to calculate the best yield farming opportunities. It leverages AI to recommend optimal farming strategies with risk analysis.
- Automated Yield Scanning: Retrieves yield information from Joule, Thala, Amnis, and Echo.
- Risk Analysis: Evaluates APY volatility, TVL risks, and smart contract risks.
- AI-Based Strategy Optimization: Uses Anthropic's Claude-3 AI to suggest risk-adjusted strategies.
- Break-Even Analysis: Calculates the required time to recover gas fees.
- Automated Execution: Supports staking, unstaking, and lending operations.
-
Clone this repository:
git clone https://github.com/kartikmehta8/yf-assistant.git cd yf-assistant
-
Install dependencies:
npm install
-
Configure environment variables in
.env.example
:NETWORK=mainnet APTOS_PRIVATE_KEY=your_private_key ANTHROPIC_API_KEY=your_api_key LOG_LEVEL=info
agents/
- Protocol-specific integrations (Joule, Thala, Amnis, Echo).utils/
- Helper functions for logging, APY calculations, and token scanning.config.ts
- Configuration settings for network, logging, and AI.index.ts
- Entry point for running the assistant.
Fetches and ranks the best yield strategies:
const result = await assistant.analyzeYieldOpportunities(walletAddress);
console.log(result);
Automatically executes the best yield strategy:
await assistant.executeStrategy(strategy);
Protocol | Features |
---|---|
Joule | Deposit & Borrow |
Thala | Staking Rewards |
Amnis | Liquid Staking |
Echo | Reward Boosting |
The assistant uses Anthropic’s Claude-3 model to analyze yield farming strategies based on:
- APY & TVL comparison across protocols.
- Risk assessment (smart contract risks, low liquidity).
- Market conditions for Aptos DeFi.
- Gas cost and break-even analysis.
- Always review protocol risks before executing strategies.
- Private keys should be stored securely and never exposed in code.
- Transactions should be simulated before committing to the blockchain.