Skip to content

[CLOB-094] Implement per-market fee attribution for shared quote tokens #970

Closed

Description

@IbrahimIjai

Phase 4 — Atomic settlement, fees, and accounting

Source: Backlog item #62 — Implement treasury accounting across markets sharing the same quote token (part 1/2)
Depends on: #905, #964, #965, #969

Objective

If fees from multiple markets use one token, define whether they remain market-scoped or can be aggregated safely. Avoid double counting the same custody token across market fee ledgers.

Scope

Acceptance criteria

  • Two markets can accrue the same quote token without overwriting each other.

Implementation guidance

  • Make economic state changes atomically with book mutations; no fill is complete unless balances, fees, liabilities, and order state agree.
  • Use checked integer arithmetic and one canonical rounding implementation across contract tests and SDKs.

Definition of done

Implementation, positive and negative-path tests, updated public docs/types where behavior changes, no new unbounded iteration, and the full verification gate in AGENTS.md passing. Matching/storage/resource changes update benchmark evidence once the benchmark harness exists.

Activity

  1. BIGdigii commented on Oct 19, 2026

    @BIGdigii

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

    Hello, please assign me to this issue
    I'm confident I can fix it.

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

  2. toluwalasedaniel459-cmyk commented on Oct 19, 2026

    @toluwalasedaniel459-cmyk
    Contributor

    @toluwalasedaniel459-cmyk has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    pls assign

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

  3. drips-wave commented on Oct 19, 2026

    @drips-wave

    Congratulations, @toluwalasedaniel459-cmyk! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on October 22, 2026.

    🧑‍💻 @toluwalasedaniel459-cmyk: 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 🌊

  4. drips-wave commented on Oct 21, 2026

    @drips-wave

    This issue has been completed by @toluwalasedaniel459-cmyk as part of the Stellar Wave Program's 10th Wave 🥳

    😎 @toluwalasedaniel459-cmyk: You earned 200 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.

    🧑‍💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.

  5. grantfox-oss commented on Oct 21, 2026

    @grantfox-oss

    🎉 This issue has been marked as completed on GrantFox!

    @toluwalasedaniel459-cmyk's PR #1093 was approved and merged by @IbrahimIjai.

    🏆 @toluwalasedaniel459-cmyk: You earned 35 FoxPoints for this contribution! Your current tier: Explorer (175 total points). Track your full progress on GrantFox.

    👏 Great work, @toluwalasedaniel459-cmyk! Keep contributing to SO4-Markets.

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

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions