Solidity SDK Overview
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
StoffelInputManager
Client input handling:- Input mask reservation system
- Masked input submission and storage
- ECDSA-based client authentication
Quick Start
1. Create Your Coordinator
2. Deploy
3. Coordinate Computation
State Machine
The coordinator follows a strict 7-phase lifecycle:Integration with Rust SDK
The Solidity SDK works with the Rust SDK’s MPCaaS architecture:- Deploy coordinator on-chain
- MPC servers watch for round transitions
- Clients submit inputs through the contract
- Servers perform off-chain computation
- Designated party publishes outputs on-chain
Security Considerations
Byzantine Fault Tolerance
The coordinator enforcesn >= 3t + 1:
n: Number of MPC partiest: 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
- StoffelCoordinator: State machine details
- Access Control: Role management
- Input Manager: Client input handling
- MPC Protocols: Underlying cryptography