Skip to content

[Docs] Add payment-distributor design spec #17

@Jayrodri088

Description

@Jayrodri088

Complexity / points: Medium (150 points) - maintainer label: points-150-medium

PR must include:

  • Closes #17 in the PR description
  • Tests added or updated where behavior changes
  • Docs updated if public API, lifecycle, or deploy steps change
  • No unwrap() in production Soroban contract paths (project convention)
  • cargo test passes locally; match CI (cargo fmt, cargo clippy -D warnings) when touching Rust

Problem

payment-distributor is currently a placeholder contract, and the repo does not contain a clear written design spec describing:

  • what inputs it requires to distribute payments
  • what distribution algorithm is expected (e.g., investor split, fee handling)
  • how it should interact with invoice-escrow and invoice-token

Without this, contributors may implement incompatible logic.

Proposed change

Create a lightweight design spec document for payment-distributor.

Acceptance criteria

  • Add a design doc under docs/ (e.g. docs/payment-distributor-spec.md)
  • Document the intended distribution flow at a high level (sequence of calls)
  • Document the intended contract API (function list with parameters/return types)
  • Document state/events expectations (what gets stored; what events get published)
  • Include an explicit Γò¼├┤Γö£ΓòóΓö¼├║╬ô├╢┬ú╬ô├╢├⌐╬ô├▓┬╝Γö£Γöñ╬ô├╢┬ú╬ô├«├ë╬ô├╢┬╝╬ô├▓┬ÑΓò¼├┤Γö£Γòó╬ô├▓┬Ñ╬ô├╢┬ú╬ô├╢├▒assumptions / open questionsΓò¼├┤Γö£ΓòóΓö¼├║╬ô├╢┬ú╬ô├╢├⌐╬ô├▓┬╝Γö£Γöñ╬ô├╢┬ú╬ô├«├ë╬ô├╢┬╝╬ô├▓┬Ñ^] section if something is undecided
  • Link from payment-distributor README and from docs/API.md (once it exists)

Dependencies

Recommended as a prerequisite before large implementation work in [Feature] Implement payment-distributor baseline (replace stub).

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions