The Yield Simulator Agent (also called Yield Generator Agent) is responsible for generating or accruing yield to the pool, which allows the vault to generate profits for testing and development purposes.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Rohit-KK15/MetaVault-AI/llms.txt
Use this file to discover all available pages before exploring further.
Overview
packages/agents/defi-portfolio/src/agents/sub-agents/yield-generator-agent/agent.ts:5-13
Purpose
The Yield Simulator Agent serves a specific purpose in the MetaVault ecosystem:- Testing Environment: Simulates yield accrual in mock/test environments
- Profit Generation: Triggers interest accrual to increase pool value
- Development Support: Enables testing of yield-dependent features without waiting for real market yields
Available Tools
yield_generator
yield_generator
Accrues interest in the mock Aave pool.Implementation:Source: Smart Contract Interaction:
packages/agents/defi-portfolio/src/agents/sub-agents/yield-generator-agent/tools.ts:12-28Parameters: None (uses environment configuration)Returns:- Contract: Mock Aave Pool (configured via
MOCK_AAVE_POOL_ADDRESS) - Function:
accrue(address token) - Parameter: LINK token address
How It Works
Yield Accrual Process
The Yield Simulator triggers the mock pool to accrue interest:- Call
yield_generatortool - Executes on-chain transaction to
MOCK_AAVE_POOL_ADDRESS.accrue(LINK_ADDRESS) - Returns transaction hash confirming successful yield accrual
Integration with Root Agent
The Root Agent uses the Yield Simulator for accruing or generating yield to the pool:packages/agents/defi-portfolio/src/agents/agent.ts:8-14
Use Cases
Development & Testing
Automated Testing Workflows
Manual Yield Generation
Developers or administrators can manually trigger yield accrual:Implementation Details
Dependencies
tools.ts:1-10
Environment Variables
Required configuration:MOCK_AAVE_POOL_ADDRESS: Address of the mock Aave pool contractLINK_ADDRESS: Address of the LINK token
Chain Utilities
chain_write: Executes on-chain write operations
- Parameters:
(address, abi, functionName, args) - Returns: Transaction receipt with hash
toStringBN: Converts BigNumber values to string format for JSON serialization
Limitations
Mock Environment Only
The Yield Simulator is designed for mock/test environments only:- Uses
MOCK_AAVE_POOL_ADDRESS(not production Aave) - Calls
accrue()function that may not exist in real protocols - Intended for development and testing purposes
No Production Use
In production environments:- Real yield comes from actual DeFi protocols (Aave, Compound, etc.)
- No manual yield accrual is possible
- Yield depends on market conditions and protocol performance
Comparison with Other Agents
| Feature | Yield Simulator | Strategy Sentinel | Chat Agent |
|---|---|---|---|
| Purpose | Generate test yield | Manage strategies | User interactions |
| Tools | 1 tool | 15 tools | 11 tools |
| Complexity | Simple | Complex | Moderate |
| User-facing | No (admin/dev) | No (admin) | Yes (public) |
| Production | Test only | Production-ready | Production-ready |
Example Workflow
Testing Harvest Functionality
Integration Testing
Related Tools
The Yield Simulator works in conjunction with other vault tools:- Strategy Sentinel’s
harvest_strategy: Collects generated yield - Strategy Sentinel’s
get_vault_apy: Measures yield generation rate - Strategy Sentinel’s
get_vault_state: Monitors TVL changes after yield accrual
Behavioral Notes
The Yield Simulator Agent has minimal instruction logic:“use the tool accrueInterest for accruing yield or interest to the pool for generating profits to the vault.”Source:
agent.ts:9
This simple instruction indicates the agent’s single-purpose nature:
- No complex decision making
- No risk assessment
- No user interaction
- Direct execution of yield accrual
Future Enhancements
Potential improvements to the Yield Simulator:- Configurable Yield Amounts: Allow specifying yield percentage or amount
- Multiple Token Support: Accrue yield for other tokens beyond LINK
- Time-Based Simulation: Simulate yield over configurable time periods
- APY Target: Generate yield to achieve specific APY targets
- Realistic Market Conditions: Simulate yield based on real market data
Summary
The Yield Simulator Agent is a simple, single-purpose agent designed for testing and development:- Single tool:
yield_generator- accrues interest in mock pool - Mock environment: Works with
MOCK_AAVE_POOL_ADDRESS - Testing utility: Enables testing of yield-dependent features
- Not for production: Real yield comes from actual DeFi protocols