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

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