# Privacy Layer Architecture

The Singularity Privacy Layer is a zero-knowledge settlement and execution framework that obfuscates balances, transactions, and wallet identities, enabling confidential on-chain activity with optional compliance.

* **User Interaction & Abstraction**
  * **Wallet Obfuscation**: Users interact with their wallets as usual, but their real addresses are masked through zk-identities or stealth addresses.
  * **Meta-Transactions via Relayers**: Users sign transactions off-chain → relayers submit them on-chain → gas payments never leak from the user’s wallet.
  * **User Experience**: From the user’s perspective, actions like swap, stake, or transfer feel normal, while zk-circuits ensure confidentiality under the hood.
* **ZK Settlement Layer (The Singularity Contracts)**
  * **zk-Circuits**: Prove the validity of transfers, swaps, or staking without revealing inputs (asset type, amount, wallet).
  * **Asset Vaults**: ETH, ERC20, and ERC721 tokens are stored inside vault contracts. Settlement updates commitments rather than exposing balances.
  * **zk-Verifiers**: On-chain contracts that validate zero-knowledge proofs to finalize trades without exposing any sensitive data.
* **Relay Network (The Relayers)**
  * **Transaction Privacy**: Relayers broadcast transactions on behalf of users, concealing who paid gas.
  * **Anonymity Preservation**: Users bypass the public mempool, avoiding MEV scanning, front-running, and wallet tagging.
  * **Custom RPC Support**: Enables faster and more private routing of orders while maintaining confidentiality.
* **Compliance & Toggle Layer**
  * **KYB/KYC Toggle**: For institutions, the compliance layer can be enabled; for permissionless use cases, it can remain off.
  * **Auditable Privacy**: Regulators or trusted partners can review specific activities if needed, without breaking day-to-day confidentiality.


---

# 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/privacy-layer-architecture.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.
