Skip to main content

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 git+ssh://git@github.com/Logarithm-Labs/yield-analysis-sdk.git#egg=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

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests
  5. Submit a pull request

📞 Support

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yield_analysis_sdk-0.1.1.tar.gz (174.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yield_analysis_sdk-0.1.1-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file yield_analysis_sdk-0.1.1.tar.gz.

File metadata

  • Download URL: yield_analysis_sdk-0.1.1.tar.gz
  • Upload date:
  • Size: 174.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.12

File hashes

Hashes for yield_analysis_sdk-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c846a9a52bd01ec6d4e0252bb955d7146e36c0eee1a39151f59e496f7ccd8ac4
MD5 8cb0d9a0b6434dd057379cea074e86d0
BLAKE2b-256 e5459bd2017ae1be2c63f31ecf50d7f50c15ee870cb4294f9e328cb4790af831

See more details on using hashes here.

File details

Details for the file yield_analysis_sdk-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for yield_analysis_sdk-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bed605cc9f40818eee8051d1a4197d6789d7ef7185542407a1c19db1044905e0
MD5 200738a17edf06267f9ef167973119c0
BLAKE2b-256 cb5b336135c7859d35a1b36fc386c9460d25a39cc590d8ed3a560b36e0cca4a7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page