Skip to content

Implement multi_sig contract - multi-signature sweep authorization #62

@phertyameen

Description

@phertyameen

Description:

Currently, sweep authorization in sweep_controller relies on a single Ed25519 key. This creates a single point of failure - if the authorized signer is compromised, all sweep operations are at risk. A multi-signature contract requiring M-of-N approvals significantly raises the security bar for high-value disbursements.

Why it's needed:

Single-signer authorization is insufficient for production financial infrastructure. M-of-N signing is a standard safety requirement in custodial and semi-custodial payment systems.

File locations:

contracts/sandbox/multi_sig/Cargo.toml
contracts/sandbox/multi_sig/src/lib.rs
contracts/sandbox/multi_sig/src/storage.rs
contracts/sandbox/multi_sig/src/errors.rs
contracts/sandbox/multi_sig/src/events.rs

Acceptance Criteria:

  • Contract initializes with a list of authorized signers and a threshold M
  • submit_approval records a signer's approval for a given sweep ID
  • Duplicate approvals from the same signer are rejected
  • Threshold reached event is emitted when M approvals are collected
  • is_approved query returns correct state for a given sweep ID
  • Unit tests cover threshold reached, duplicate rejection, and unauthorized signer cases

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions