Skip to main content
The Stoffel Solidity SDK provides smart contracts for coordinating MPC computations on-chain. It enables trustless orchestration of multi-party computation with verifiable input collection and output distribution.

Purpose

On-chain coordination solves key challenges in MPC deployments:
  • Trustless Setup: No single party controls the computation lifecycle
  • Verifiable Inputs: Clients prove they submitted valid masked inputs
  • Guaranteed Outputs: Results are published on-chain for all participants
  • Timeout Handling: Automatic round progression prevents deadlock

Architecture

Components

StoffelCoordinator

The main abstract contract implementing a 7-phase state machine for MPC orchestration. Subclass this to create your specific computation coordinator. Learn more →

StoffelAccessControl

Role-based access control for MPC parties:
  • PARTY_ROLE: Assigned to MPC compute nodes
  • DESIGNATED_PARTY_ROLE: Elevated privileges for orchestration
Learn more →

StoffelInputManager

Client input handling:
  • Input mask reservation system
  • Masked input submission and storage
  • ECDSA-based client authentication
Learn more →

Quick Start

1. Create Your Coordinator

2. Deploy

3. Coordinate Computation

State Machine

The coordinator follows a strict 7-phase lifecycle:
See StoffelCoordinator for detailed round descriptions.

Integration with Rust SDK

The Solidity SDK works with the Rust SDK’s MPCaaS architecture:
  1. Deploy coordinator on-chain
  2. MPC servers watch for round transitions
  3. Clients submit inputs through the contract
  4. Servers perform off-chain computation
  5. Designated party publishes outputs on-chain

Security Considerations

Byzantine Fault Tolerance

The coordinator enforces n >= 3t + 1:
  • n: Number of MPC parties
  • t: Maximum faulty/malicious parties

Input Privacy

  • Clients submit masked inputs, not raw values
  • Input masks are pre-generated by MPC nodes
  • Only the threshold can reconstruct original values

Access Control

  • Only authorized parties can trigger round transitions
  • Designated party has additional privileges
  • Party count cannot drop below threshold

Development

Build

Test

Deploy

Next Steps