# 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)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://singularityzk.gitbook.io/singularity/the-singularity-solution/protocol-overview/darkpool-architecture-and-usecase.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
