A Python SDK for analyzing DeFi vault performance and yield metrics
Project description
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
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
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
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
📞 Support
- Email: dev@logarithm.fi
- Issues: GitHub Issues
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file yield_analysis_sdk-0.4.3.tar.gz.
File metadata
- Download URL: yield_analysis_sdk-0.4.3.tar.gz
- Upload date:
- Size: 132.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f6efc0fb52b079920dd49bcb47d5334628ab328b3db61bb4303f0d3746c809c6
|
|
| MD5 |
bd5259d22033e93cee20e7b2fa5ec003
|
|
| BLAKE2b-256 |
d05ec2fbbfec7a623a649e312646cbfaf5c5fbefa4e690211d6d6df57b0537b9
|
File details
Details for the file yield_analysis_sdk-0.4.3-py3-none-any.whl.
File metadata
- Download URL: yield_analysis_sdk-0.4.3-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e9deec3459e6416b5473136b2ab54309d3476bad5a418448db8945f13858146
|
|
| MD5 |
7d65fcd0e1bf496c49f1a319f68d7fc1
|
|
| BLAKE2b-256 |
0414052bd6a44e1a55f1d497196c7943ce98c4118bb349868f437e7dd50d8d72
|