Skip to content

Automated multi-chain payout execution (EVM / Solana) #85

@sacha-l

Description

@sacha-l

Context

PR #84 (multi-chain sign-in) lets a project register a payout address on Substrate, Ethereum, or Solana (projects.donation_chain). However, automated payout execution is still Substrate-only:

  • server/api/services/payment.service.js constructs Asset Hub USDC transfers through a Polkadot multisig. It cannot send funds to an Ethereum or Solana address.
  • confirmPayment only records a payment (appends to totalPaid with a proof URL), so recording works for any chain — but there is no automated send for EVM/Solana.

Result today: a project with donation_chain = 'ethereum' | 'solana' must be settled manually off-platform, then recorded.

Scope

Design and build automated payout execution for non-Substrate payout chains:

  • An EVM transfer path (funded treasury wallet or Safe; ERC-20/native send; gas handling).
  • A Solana transfer path (SPL token transfer; fee payer).
  • Decide the treasury model per chain (single wallet vs. multisig/Safe) and where keys live.
  • Surface chain-appropriate UI in ConfirmPaymentModal and guard the Substrate multisig path from being fed a non-Substrate recipient.

Test scenarios

  • On the admin payment flow, confirming a payout for a project with donation_chain = 'ethereum' → an on-chain EVM transfer is initiated (or a clear, auditable manual-settlement record is created).
  • On the admin payment flow, a Substrate-chain project → the existing Asset Hub multisig path runs unchanged.
  • On payment.service.js, a non-Substrate recipient passed to the multisig path → rejected with a clear error rather than building a broken extrinsic.

Notes

Out of scope for PR #84 by design — flagged there. Larger effort: needs treasury wallets/keys and a security review.

Metadata

Metadata

Assignees

No one assigned

    Labels

    claude-suggestedIssue suggested by the Claude agent during a /ship-issue run

    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