Skip to content

444 feat include tvlstrategies breakdown for historical avs data#445

Open
uditdc wants to merge 3 commits intodevfrom
444-feat---include-tvlstrategies-breakdown-for-historical-avs-data
Open

444 feat include tvlstrategies breakdown for historical avs data#445
uditdc wants to merge 3 commits intodevfrom
444-feat---include-tvlstrategies-breakdown-for-historical-avs-data

Conversation

@uditdc
Copy link
Copy Markdown
Member

@uditdc uditdc commented Jul 29, 2025

Summary

Adds optional strategy-wise TVL breakdown to the endpoint, allowing clients to get detailed insights into how TVL is distributed across different strategies (stETH, cbETH, rETH, etc.) for any AVS over time.

Features

  • Conditional Parameter: withStrategyTvl query parameter (defaults to false)
  • User-Friendly Keys: Uses strategy names (e.g., "stETH", "cbETH") instead of addresses
  • Performance Optimized: Only processes strategy breakdown when explicitly requested
  • Backward Compatible: Existing API calls remain unchanged

API Usage

Default Behavior (No Breakdown)

GET /historical/avs/0x123...?frequency=1d&startAt=2024-01-01&endAt=2024-01-31

With Strategy Breakdown

GET /historical/avs/0x123...?withStrategyTvl=true&frequency=1d&startAt=2024-01-01&endAt=2024-01-31

Response Format

Without Breakdown (withStrategyTvl=false)

{
  "data": [
    {
      "timestamp": "2024-01-01T00:00:00.000Z",
      "tvlEth": 1000.5,
      "totalStakers": 150,
      "totalOperators": 25
    }
  ]
}

With Breakdown (withStrategyTvl=true)

{
  "data": [
    {
      "timestamp": "2024-01-01T00:00:00.000Z",
      "tvlEth": 1000.5,
      "totalStakers": 150,
      "totalOperators": 25,
      "tvlStrategies": {
        "stETH": 400.2,
        "cbETH": 300.1,
        "rETH": 300.2
      }
    }
  ]
}

Resolves #444

@uditdc uditdc linked an issue Jul 29, 2025 that may be closed by this pull request
@uditdc uditdc force-pushed the 444-feat---include-tvlstrategies-breakdown-for-historical-avs-data branch from 265def6 to 7f1283f Compare July 29, 2025 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feat] - Include tvlStrategies breakdown for historical avs data

1 participant