Introduction
MetaVault AI employs a sophisticated multi-strategy architecture to maximize yields while managing risk across different DeFi protocols. The vault dynamically allocates user funds between multiple strategies based on market conditions, risk parameters, and AI-driven analysis.Strategy Architecture
All strategies implement the standardizedIStrategy interface, ensuring consistent interaction patterns:
Core Functions
invest(uint256 amount): Deploys capital into the strategy’s protocolwithdrawToVault(uint256 amount): Withdraws funds back to the vaultharvest(): Collects accrued yields and sends profits to the vaultstrategyBalance(): Returns the current value of assets managed by the strategydeleverageAll(uint256 maxLoops): Unwinds leveraged positions (no-op for non-leveraged strategies)
Available Strategies
MetaVault AI currently supports two distinct strategies:1. Aave V3 Strategy (Safe)
Contract:StrategyAaveV3.sol
- Risk Level: Low
- Mechanism: Simple lending on Aave V3
- Collateral: USDC
- Yield Source: Aave V3 supply APY
- Leverage: None
2. Aave Leverage Strategy (Aggressive)
Contract:StrategyAaveLeverage.sol
- Risk Level: High
- Mechanism: Leveraged looping (supply → borrow → swap → supply)
- Collateral: LINK
- Borrowed Asset: WETH
- Leverage: Up to 3x (configurable)
- Yield Source: Amplified Aave supply APY minus borrow costs
Strategy Router
TheStrategyRouter contract orchestrates fund allocation across all strategies:
Portfolio Management
Allocation Targets: Strategies are assigned target allocations in basis points (10000 = 100%)- Withdraws excess from overweight strategies
- Recalculates total managed assets
- Deploys capital to underweight strategies
Harvesting
The router coordinates yield harvesting across all strategies:AI-Driven Management
The Strategy Sentinel Agent continuously monitors and manages strategies:- Health Monitoring: Tracks LTV ratios, liquidation risk, and protocol health
- Market Analysis: Monitors token prices (LINK/WETH) for market-aware decisions
- Risk Management: Automatically pauses strategies or reduces leverage during volatility
- Rebalancing: Adjusts portfolio weights based on market conditions
- Harvesting: Optimizes yield collection and compounding timing
Development Status
For development and testing purposes:
- Aave V3 Strategy: Uses mock Aave pool with simulated liquidity index (
1e18) - Aave Leverage Strategy: Uses mock Aave pool, mock swap router, and mock price oracle
- All liquidation thresholds and LTV calculations use mocked logic
- Interest accrual is driven by programmatically updated mock indices
Next Steps
Aave V3 Strategy
Learn about the safe lending strategy
Aave Leverage Strategy
Explore leveraged looping mechanics
Risk Management
Understand risk parameters and controls
AI Agents
See how AI manages strategies