Skip to content

[Docs] Add JSDoc to buildDepositorYieldHistory in yieldHistoryService #1014

@ogazboiz

Description

@ogazboiz

Telegram: https://t.me/+DOylgFv1jyJlNzM0

Why this matters

buildDepositorYieldHistory (backend/src/services/yieldHistoryService.ts, starting around line 150) is a 100+ line exported function that joins pool-level and depositor-level events, reconstructs share-price points, and returns a time series — but it has no doc comment. Other exports in the same file are documented; this one is the most complex and the hardest to onboard to. A JSDoc block describing parameters (address, _token, days, currentSharePrice), the returned YieldHistoryPoint[] shape, and the event types it reads would help contributors.

Acceptance criteria

  • Add a JSDoc block above buildDepositorYieldHistory describing purpose, params, and return value
  • Note why _token is currently unused (or document intended use)
  • No behavioural changes

Files to touch

  • backend/src/services/yieldHistoryService.ts

Out of scope

  • Refactoring the function logic

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendIssues related to backend developmentdocumentationImprovements or additions to documentationgood first issueGood for newcomers

    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