Skip to content

stealth-batch-sender Soroban contract #9

@truthixify

Description

@truthixify

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

Context

The EVM WraithSender already supports batchSendETH and batchSendERC20. Stellar's stealth-sender only handles single transfers. For high-volume scenarios (payroll, recurring drops, Spectre's scheduled-payment executor) we want a Stellar contract that sends to many stealth addresses in one transaction, with one fee envelope.

Scope

Implement a new crate contracts/stellar/stealth-batch-sender/ that:

  1. Exposes batch_send(from: Address, transfers: Vec<Transfer>, token: Address) where Transfer { recipient_meta: BytesN<64>, amount: i128, metadata: Bytes }.
  2. For each entry:
    • Generates a stealth address using the recipient's meta-address (this happens off-chain; the contract receives the already-derived stealth address and ephemeral pub key in metadata or as part of Transfer).
    • Transfers amount of token from from to the stealth address.
    • Invokes the announcer with (scheme_id, stealth_address, ephemeral_pub_key, metadata).
  3. Is all-or-nothing: any failure inside the loop must revert the whole batch.
  4. Limits batch size (suggestion: 25 — but justify the choice based on Soroban resource budgets).
  5. Charges nothing beyond Soroban's native resource pricing.

Design considerations to address in the PR description

  • Should the batch sender accept both XLM and SAC tokens with the same entrypoint, or have separate batch_send_xlm / batch_send_token?
  • How does the gas-fee envelope compare to N individual stealth-sender::send calls? Include a benchmark.
  • Is this a new contract or a new function on the existing sender? (We lean toward new contract so existing audits don't need re-doing; argue either way in the PR.)

Acceptance criteria

  • New crate with full unit tests.
  • Property-based test verifying atomicity (any failure → no transfers, no announcements).
  • Resource-budget comparison vs. N individual sends in the PR description.
  • Deploy script support added (see #07).
  • SDK follow-up issue filed describing the consumer-side wiring needed.

Why this matters

The current Stellar Spectre connector scheduled-payment executor sends one tx per recipient. Batching is the difference between "Wraith does payroll" and "Wraith can theoretically do payroll."

Files to start with

  • contracts/stellar/stealth-sender/src/lib.rs (existing single-send reference)
  • contracts/evm/contracts/WraithSender.sol (batchSendETH reference)

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