The MPC-ZKP Framework
The Obscura Difference: Local State for Complete Privacy
The key innovation of Obscura lies in how it manages state. Unlike centralized exchanges (e.g., Binance) or decentralized exchanges (e.g., Uniswap), where balances and orders are stored on centralized servers or distributed across thousands of nodes, Obscura keeps state locally. Individual traders retain full control of their state, ensuring unmatched privacy and security.
Key Terminology
Wallet: A private record of a trader’s balances and orders. Wallets remain hidden from public view, and only wallet commitments (cryptographic hashes of wallet data) are posted on-chain.
Relayer: A node in the Obscura network responsible for managing one or more wallets and performing Multi-Party Computation (MPC) with other relayers. Relayers only have access to the encrypted wallet they manage.
Cluster (Relay Cluster): A logical group of relayers managing the same wallets. Clusters are designed for fault tolerance, automatic failover, and parallel MPC computations.
Instead of exposing wallets in plaintext, traders post commitments on-chain. These cryptographic commitments ensure wallet privacy while maintaining consistency and integrity.
Commit-Reveal Scheme
To perform operations on a wallet (e.g., depositing tokens, settling trades), traders interact with the commit-reveal scheme:
New Commitment: Traders post a commitment to their updated wallet.
Nullifiers: Two nullifiers are provided to ensure the old wallet cannot be reused, preventing double-spends.
Zero-Knowledge Proofs (ZKP): Traders provide a proof verifying the following:
Commitments are correctly computed.
Nullifiers are valid.
The old wallet exists in the global Merkle tree.
Changes to the wallet are valid (e.g., no unauthorized token creation).
This scheme enables full wallet privacy, as no sensitive wallet data is revealed on-chain, while maintaining state consistency and protection against double-spend attacks.
Obscura’s Network Architecture
The Obscura network operates as a peer-to-peer (p2p) gossip network, composed of independent relayers that coordinate to process trades. Relayers do not custody assets but are granted encrypted access to wallets to perform MPC computations.
Relay Clusters
Public Gateway: A public cluster accessible to anyone who doesn’t want to run their own nodes.
Private Clusters: Independent clusters managed by private groups or individuals for additional security.
When a new order is submitted, the relay cluster managing the wallet generates a handshake tuple containing:
Commitments to the order data.
A zero-knowledge proof validating the order’s integrity.
Other relayers monitor for new handshake tuples and initiate an MPC computation when a match is detected.
How Obscura Matches Orders
Obscura’s MPC framework executes the matching engine in complete privacy:
Relayers collaborate to match orders without revealing the order book or any order details.
If no match is found, no additional information is leaked.
When a match occurs, the parties only learn the tokens exchanged.
This ensures pre-trade and post-trade privacy, as no sensitive data is exposed during the process.
Collaborative SNARKs: Ensuring Atomic Settlement
MPC alone does not guarantee input validity or atomic settlement. To address this, Obscura uses collaborative SNARKs, a framework that combines zero-knowledge proofs with MPC to ensure:
Input Validity: Commitments to order data are re-computed during MPC. If discrepancies arise, the output is nullified, preventing fake or invalid orders.
Atomic Settlement: Both parties collaboratively generate a proof that guarantees matching (deciding what tokens are swapped) is inseparable from settlement (actually swapping the tokens).
This proof, called VALID MATCH MPC, ensures that neither party can back out after the matching engine executes. The proof can then be submitted to the smart contract to finalize the trade.
Privacy and Security with MPC-ZKP
By integrating MPC with ZKP using collaborative SNARKs, Obscura achieves:
Pre-Trade Privacy: Orders remain confidential until a match is found.
Post-Trade Privacy: Only the counterparty learns the details of the trade.
Atomic Settlement: Matching and settlement occur together, ensuring no data leakage.
Input Integrity: Invalid orders or balances are automatically rejected.
This MPC-ZKP framework ensures that Obscura is a fully private, secure, and trustless decentralized exchange.
Learn More
To dive deeper into how Obscura guarantees wallet privacy and order matching, explore:
The Commit-Reveal Scheme: Learn how commitments protect wallet data.
The MPC-ZKP Architecture: Understand the integration of MPC and ZKP for secure trading.
Collaborative SNARKs: Discover how atomic settlement ensures end-to-end security.
Obscura is building a new era of private, decentralized trading with cutting-edge cryptography at its core.
Last updated