- Singularity: Confidential DeFi
- Posts
- Darkpool Deep Dive #6
Darkpool Deep Dive #6
Inside the Engine: How Orders Are Matched in our Darkpool
Welcome to the sixth edition of the Singularity Darkpool Deep Dive Series, where in each edition, we will take a deeper look into the architecture, vision, and innovations powering Singularity’s institutional-grade on-chain Darkpool orderbook.
In each edition, we unpack a specific layer of the Darkpool - from how we prevent MEV and frontrunning to the role of cutting-edge cryptography like ZKPs, FHE, and MPC.
Built to offer compliance without compromise, Singularity delivers confidential, capital-efficient execution tailored for institutions ready to trade on-chain - privately, securely, and without leaving a trace.
Last edition, we discussed MPC and why it's essential in DeFi.
This week, we're diving into how the matching engine actually works.
What is a Book Node?
A book node is the engine that powers Singularity’s dark orderbook. It handles:
Encrypted order intake
Matching logic using privacy-preserving tech
Trade match confirmation and result handling
Unlike centralized exchanges CEXs or public DEXs, book nodes never see the raw contents of any order - they operate entirely in the dark.
Step-by-Step: How Orders Are Matched Privately
1. Order Encryption
When a user creates an order, they encrypt all sensitive parameters:
Asset pair
Price
Amount
The encryption uses a public key that was generated collaboratively by the book nodes using MPC. This ensures that no single node can decrypt the order later.
2. Order Submission
The user submits the encrypted order to the Singularity Darkpool. From this point forward, the order is live in the system - but completely obfuscated on-chain.
No third party (validators, indexers, or attackers) can infer what’s being traded.
3. Encrypted Matching Logic (FHE)
The book node scans the pool of encrypted orders and performs matching computations using FHE.
This allows it to:
Compare encrypted prices
Check for compatible asset pairs
Ensure quantities meet minimum thresholds
All of this happens without decrypting the underlying values.
4. Match Determination via MPC
Once a match is found, the book node initiates a secure MPC process to decrypt only the result:
✅ Matched
❌ Not Matched
The contents of the order (asset, price, amount) remain encrypted - only whether there’s a match or not is revealed.
This step ensures distributed trust and prevents any single party from gaining insight into the trade details.
Summary: Privacy-Preserving Matching in Action
Step | Description |
1. Order Encrypted | User encrypts all order details using a shared public key |
2. Submitted | Encrypted order is sent to the Darkpool |
3. FHE Matching | Book node runs matching logic on encrypted values |
4. MPC Decryption | Nodes decrypt only the result (match/no match) |
5. Trade Settlement | Orders are settled without revealing trade data |
Why This Matters
Singularity’s Darkpool reimagines what an on-chain orderbook can be:
Fully private by default
Compliant through off-chain KYB/KYC
Tamper-resistant and distributed
Matching is no longer a trust-based black box - it’s a cryptographically enforced, verifiable process that protects every trader’s strategy.
Thanks for reading our sixth edition of Singularity’s Darkpool Deepdive series.
In the subsequent deep dives, we’ll take you behind the curtain to explore additional core components that power Darkpool.
Here’s the link to this piece on our blog here.
How to Participate
To learn how to participate please head to the following link here.
We are currently integrating market makers for our Darkpool and are in discussions with several others. If you are interested in supporting our Darkpool, please connect with us.
We offer maker and taker incentives that we can share as well.