Skip to main content
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.

Overview

Source: 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

Accrues interest in the mock Aave pool.Implementation:
Source: packages/agents/defi-portfolio/src/agents/sub-agents/yield-generator-agent/tools.ts:12-28Parameters: None (uses environment configuration)Returns:
Smart Contract Interaction:
  • 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:
  1. Call yield_generator tool
  2. Executes on-chain transaction to MOCK_AAVE_POOL_ADDRESS.accrue(LINK_ADDRESS)
  3. 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:
Source: 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

Source: tools.ts:1-10

Environment Variables

Required configuration:
  • MOCK_AAVE_POOL_ADDRESS: Address of the mock Aave pool contract
  • LINK_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

Example Workflow

Testing Harvest Functionality

Integration Testing

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:
  1. Configurable Yield Amounts: Allow specifying yield percentage or amount
  2. Multiple Token Support: Accrue yield for other tokens beyond LINK
  3. Time-Based Simulation: Simulate yield over configurable time periods
  4. APY Target: Generate yield to achieve specific APY targets
  5. 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
Despite its simplicity, it plays an important role in the development and testing workflow of the MetaVault AI system.