Skip to content

Add 90-day APY Component to Historical APY Calculation #259

@murderteeth

Description

@murderteeth

Description

Currently, the APY calculation in packages/ingest/abis/yearn/lib/apy.ts computes weekly (7d), monthly (30d), and inception APY values. Adding a 90-day (quarterly) APY component would provide users with a more comprehensive view of vault performance over a medium-term timeframe.

Current Implementation

The system currently calculates:

  • weeklyNet (7 days)
  • monthlyNet (30 days)
  • inceptionNet (since vault inception)

Proposed Enhancement

Add a new 90-day APY calculation that includes:

  • quarterlyNet - 90-day annualized return
  • quarterlyPricePerShare - Price per share 90 days ago
  • quarterlyBlockNumber - Block number 90 days ago

Acceptance Criteria

  • 90-day APY fields added to schema
  • Calculation logic implemented and tested
  • Output components properly stored in database
  • GraphQL API exposes new quarterly fields
  • Ensure proper handling when vault age < 90 days (return undefined)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions