Skip to content

Add liquidity pool allocation tracking and TVL reporting endpoint #943

Description

@Chucks1093

Summary

Build endpoints that track LP allocations from bonding curve buys, reporting cumulative LP contributions per key and total protocol-owned liquidity across all keys.

Scope

  • LP allocation recorded on each LPAllocationSent contract event
  • GET /keys/:id/lp-stats returns total LP contributed and current LP balance
  • GET /admin/lp-overview returns protocol-owned liquidity across all keys
  • LP stats cached with 60s TTL
  • LP contribution history paginated per key

Acceptance Criteria

  • LP allocations recorded correctly from contract events
  • Per-key LP stats return correct cumulative amounts
  • Admin overview aggregates LP correctly across all keys
  • Cache invalidated on new LPAllocationSent event
  • History endpoint paginated correctly with cursor

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