Skip to content

Build LP position indexing and rewards API endpoints #980

Description

@Chucks1093

Summary

Index liquidity provider events from the contract and expose endpoints for fetching LP positions, accrued rewards, and pool share data per wallet.

Scope

  • GET /lp/positions?wallet= — all active LP positions with share and accrued rewards
  • GET /lp/positions/:lpId — single position detail
  • GET /lp/pool/:keyId — total pool size and current APR estimate
  • LP events (added, claimed, removed) indexed from contract stream
  • Rewards accrual computed on each trade event

Acceptance Criteria

  • Positions list returns correct share percentage and rewards per wallet
  • Pool endpoint returns accurate total size and APR
  • Events indexed without gaps from contract stream
  • Rewards accrual computed correctly on each trade
  • Unauthorized requests return 401

ETA

12 hours

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions