> For the complete documentation index, see [llms.txt](https://singularityzk.gitbook.io/singularity/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://singularityzk.gitbook.io/singularity/the-singularity-solution/protocol-overview/darkpool-architecture-and-usecase.md).

# Darkpool Architecture and Usecase

## Architecture

The Singularity Darkpool is a modular trading layer built on top of its zk-infrastructure, providing institutions and DeFi participants with confidential order execution, protection from MEV, and optional compliance.

#### 1. User Interaction Layer

* **Traders / Institutions / Funds:** Submit confidential orders (market, limit, block).
* **SDK / API Integration:** Professional traders, market makers, or dApps connect directly via SDKs or APIs.
* **Wallet Abstraction:** Users interact without exposing their real wallet addresses.

#### 2. Order Management Layer

* **Dark Orderbook:** Stores obfuscated orders (asset pair, size, address hidden).
* **Matching Engine:** Matches buy/sell orders internally, ensuring fair execution.
* **Order Types Supported:** Market, limit, and large block trades.

#### 3. Privacy & Security Layer

* **zk-Circuits:** Obfuscate order details, balances, and settlement transactions.
* **Relayers:** Submit meta-transactions to the chain, preventing gas-linked identity leaks.
* **On-chain Proofs:** Validate that order matching and settlement respect confidentiality and integrity.

#### 4. Settlement & Liquidity Layer

* **Asset Vaults:** Secure custody for ETH, ERC20, and ERC721 until trades are executed.
* **Liquidity Pools:** Orders routed internally or matched via aggregated institutional pools.
* **Cross-Chain Bridge (optional):** Facilitates order flow and settlement across EVM chains with privacy-preserving validators.

## Usecase

DarkSwap is the flagship trading product built on Singularity’s modular privacy infrastructure — a Darkpool designed for DeFi traders.

It allows users to execute swaps without exposure to MEV bots, sandwich attacks, or front-running, ensuring fair and private trading. Unlike traditional privacy tools, DarkSwap is focused on protecting traders from systemic exploitation, not just hiding data.

Key highlights:

* Bot-proof trading — no MEV, no sandwiching, no slippage manipulation
* Transparent privacy — traders know exactly what’s protected
* Accessible — no KYC at launch, open to casual and pro traders
* Testnet pairs — SepoliaETH/MockUSDC and Horizen ETH/USDC

As more pairs launch on mainnet, DarkSwap demonstrates how Darkpool technology safeguards users and restores trust in DeFi trading.

More Detials Here :point\_right: [Darkswap Overview (Mainnet)](/singularity/darkswap-onchain-darkpool/darkswap-overview-mainnet.md)
