https://github.com/logarithm-labs/yield-analysis-sdk
A Python SDK for DeFi vault registration and yield analysis services within the Agent Commerce Protocol (ACP) ecosystem.
https://github.com/logarithm-labs/yield-analysis-sdk
acp defi erc4626 python virtuals
Last synced: 11 months ago
JSON representation
A Python SDK for DeFi vault registration and yield analysis services within the Agent Commerce Protocol (ACP) ecosystem.
- Host: GitHub
- URL: https://github.com/logarithm-labs/yield-analysis-sdk
- Owner: Logarithm-Labs
- Created: 2025-06-27T13:45:40.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-07-10T03:42:17.000Z (12 months ago)
- Last Synced: 2025-07-10T08:19:13.045Z (12 months ago)
- Topics: acp, defi, erc4626, python, virtuals
- Language: Python
- Homepage:
- Size: 357 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Yield Analysis SDK
A Python SDK for DeFi vault registration and yield analysis services within the Agent Commerce Protocol (ACP) ecosystem.
## 🚀 Features
- **ACP Integration**: Built-in support for Virtuals ACP (Agent Commerce Protocol)
- **Vault Registration**: Complete workflow for registering DeFi vaults in the ACP ecosystem
- **Yield Analysis Service**: Vault performance analysis and metrics calculation
- **Multi-chain Support**: Ethereum, Arbitrum, Base, Optimism, Polygon, BSC, and more
- **Comprehensive Metrics**: APY calculations, volatility analysis, Sharpe ratios, and drawdown tracking
- **Real-time Data**: Fetch vault performance from blockchain subgraphs
- **Type Safety**: Full Pydantic validation and type hints
## 📦 Installation
```bash
pip install yield_analysis_sdk
```
## 🔧 Quick Start
For detailed usage examples, see the `examples/` directory:
- **`examples/analysis_service.py`**: Analysis service implementation
- Note: Do NOT add input/output requirements through the ACP UI when using this SDK setup
- Flexible data sources: Uses subgraph for price fetching, but alternative data sources can be configured
- **`examples/registration.py`**: Vault registration and job management
### Basic Usage
```python
from yield_analysis_sdk import Chain, analyze_yield_with_daily_share_price
# See examples/analysis_service.py for complete implementation
```
## 🏗️ ACP Ecosystem Integration
This SDK provides two main services within the ACP ecosystem:
### Vault Registration Service
- Register new DeFi vaults for analysis
- Validate vault addresses and chain compatibility
- Manage registration workflow through ACP jobs
### Yield Analysis Service
- Provide vault performance analysis as an ACP service
- Calculate comprehensive yield metrics
- Deliver analysis results through ACP job completion
## 📊 Supported Metrics
- **APY Calculations**: 7-day, 30-day, 90-day annualized yields
- **Risk Metrics**: Volatility, maximum drawdown, Sharpe ratio
- **Vault Info**: Fees, capacity limits
- **Multi-chain**: Cross-chain vault comparison
## 🤝 Contributing
1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Add tests
5. Submit a pull request
## 📞 Support
- **Email**: dev@logarithm.fi
- **Issues**: [GitHub Issues](https://github.com/yourusername/yield-analysis-sdk/issues)