Skip to content

1-to-N stealth payment splitter on Stellar #15

@truthixify

Description

@truthixify

Labels: Stellar Wave, stellar, feature, drips, help-wanted
Tier: L (1–2 weeks)
Type: feature

Context

stealth-batch-sender (issue #09) takes N pre-computed transfers and executes them. A different and complementary primitive is the splitter: one deposit, automatically divided into N stealth payouts according to a fixed schema (weights, fixed amounts, or both).

This is the building block for: revenue-share among contributors, tip distribution, royalty splits, and DAO payouts where the list of recipients is part of the public commitment but the individual stealth addresses must remain unlinkable to recipient identities.

Scope

Build contracts/stellar/stealth-splitter/:

  1. create_split(beneficiaries: Vec<(meta_address, weight)>, asset, salt) -> SplitId:
    • Beneficiaries: at most 25 (justify based on resource budget — coordinate with #06).
    • Weights are arbitrary positive integers; payouts will be proportional.
    • The SplitId is the deterministic hash of (beneficiaries, asset, salt); it can be advertised publicly without revealing recipients (because meta-addresses are committed to but the stealth addresses generated from them aren't yet known).
  2. fund_split(split_id, amount):
    • Sender deposits amount. The deposit is split immediately into stealth payouts to each beneficiary, with a generated ephemeral key per payout.
    • Each payout emits a standard announcement so beneficiaries scan normally.
    • Atomic: any failure rolls back all transfers and announcements.
  3. get_split(split_id) -> SplitDetails:
    • Returns the public beneficiary list + total amount funded to date (no per-recipient stealth address data).

Design constraints

  • The split definition must be immutable after creation (no add/remove beneficiaries) — argue in the PR.
  • The contract must not retain any view of individual stealth addresses after a payout completes; it should be ephemeral pass-through.
  • Rounding error from weights must go somewhere deterministic — propose "first beneficiary absorbs dust" with a documented rationale.

Acceptance criteria

  • New crate with full unit, property, and adversarial tests.
  • Atomicity test: middle-of-distribution failure rolls back all transfers.
  • Resource-budget comparison vs. N separate stealth-sender calls.
  • SDK follow-up issue filed for buildSplitDeposit builder.
  • Demo follow-up: "Split a payment among N recipients" flow.

Why this matters

DAOs, contributor payouts, and revenue-share are the most-requested use cases for "private but auditable" payments. The split commits to who gets what publicly without ever revealing the resulting stealth addresses to anyone but the recipients.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programdripsFunded via Drips NetworkfeatureNew feature workhelp wantedExtra attention is neededstellarTouches Stellar / Soroban code

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions