Skip to content

Add a holder registry endpoint returning each holder's balance split into liquid and staked quantities #846

Description

@Chucks1093

Summary

The updated holders table needs a stakedQuantity field per holder. The existing holders endpoint should be extended to include stakedQuantity and liquidQuantity derived from the staking_positions contract state.

Scope

  • Extend GET /keys/:keyId/holders to include stakedQuantity and liquidQuantity per holder
  • Fetch staking positions from the staking_positions persistent map for each holder via the Soroban RPC
  • Compute liquidQuantity as totalQuantity minus stakedQuantity
  • Cache individual holder staking positions in Redis for 30 seconds
  • Maintain backward compatibility by adding the new fields without removing existing ones

Acceptance Criteria

  • stakedQuantity and liquidQuantity present on every holder record
  • liquidQuantity correctly computed as total minus staked
  • Holders with no stake show stakedQuantity of 0
  • Redis cache used for staking position reads
  • Existing fields unchanged for backward compatibility

ETA: 12 hours


Coordinate on Telegram

Activity

  1. devzakari-sketch commented on Aug 27, 2026

    @devzakari-sketch

    Hi maintainer can i work on this task

  2. Akinloluwa20 commented on Aug 29, 2026

    @Akinloluwa20

    @Akinloluwa20 has applied to work on this issue as part of the Stellar Wave Program's 8th wave.

    I would like to work on this issue

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @Akinloluwa20 to this issue.

  3. Bobai100 commented on Aug 29, 2026

    @Bobai100

    @Bobai100 has applied to work on this issue as part of the Stellar Wave Program's 8th wave.

    Hi Maintainer,
    I’d really appreciate the opportunity to work on this issue. Having reviewed the acceptance criteria, I’m confident that I can submit a PR after being assigned.
    Please kindly assign this issue to me.
    Thank you!

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @Bobai100 to this issue.

  4. devJaja commented on Aug 29, 2026

    @devJaja
    Contributor

    @devJaja has applied to work on this issue as part of the Stellar Wave Program's 8th wave.

    can I work on this please

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @devJaja to this issue.

  5. drips-wave commented on Aug 29, 2026

    @drips-wave

    Congratulations, @devJaja! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on August 31, 2026.

    🧑‍💻 @devJaja: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.

    Warning

    When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.

    🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.

    🌊 Happy Wave 🌊

  6. devJaja commented on Aug 31, 2026

    @devJaja
    Contributor

    Closed by PR #859 — holder registry with staked/liquid balance implemented.

  7. devJaja commented on Aug 31, 2026

    @devJaja
    Contributor

    Closed by PR #859

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