> For the complete documentation index, see [llms.txt](https://plabs.gitbook.io/plabs-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://plabs.gitbook.io/plabs-docs/privacy-core/overview.md).

# Overview

**Privacy Core** is the foundation of the pERC20 stack. It has two layers:

1. **Cryptographic layer** — how value exists as **Orchard notes**, how actions are proved and verified, compliance freeze
2. **Asset protocols** — how **private assets** are created (`pERC20` native mint, `Shield ERC20` public → private)

**Applications** (pSWAP, pDEX, pX402) consume private assets built on Privacy Core; they are documented separately and are not part of this book.

## Cryptographic layer

```
Orchard concepts        notes / commitments / nullifiers / encryption
Note state machine      OrchardVerifier on-chain logic
Groth16 action circuit  131,787 constraints, BN254
Signatures              bindingSig + spendAuthSig
Compliance              entry/exit screening (off-chain) + frozenRoot (on-chain)
Compliance freeze       IMT blacklist + pubFields[7] binding
Universal call format   PrivacyCall / BundleAction (shared by all layers)
```

| Component                   | Role                                                     |
| --------------------------- | -------------------------------------------------------- |
| `OrchardVerifier.sol`       | Note state machine: proofs, tree, nullifiers, signatures |
| `ActionGroth16Verifier.sol` | `pubFields[8]` → `pub_hash` → Groth16 pairing            |
| `action.circom`             | Single Orchard action + freeze non-membership            |

## Asset protocols

How privacy assets enter the system:

| Protocol                                                          | Status    | Role                                                                          |
| ----------------------------------------------------------------- | --------- | ----------------------------------------------------------------------------- |
| [pERC20](/plabs-docs/privacy-core/perc20/overview.md)             | ✅ Shipped | Native private fungible token — `mint` / `transfer` / `burn` on `PERC20` pool |
| [Shield ERC20](/plabs-docs/privacy-core/shield-erc20/overview.md) | ✅ Shipped | Deposit public ERC-20 → private notes; `unshield` back                        |

`PERC20.sol` **inherits** `OrchardVerifier` and adds supply + `IPERC20` — see [pERC20 overview](/plabs-docs/privacy-core/perc20/overview.md).

pSWAP / pDEX / pX402 call **`IPERC20.transfer`** (and future app rules) on pools created by these asset protocols.

## Relation to Zcash Orchard

| Inherited                                | EVM adaptation                                                                  |
| ---------------------------------------- | ------------------------------------------------------------------------------- |
| Note format, nullifiers, note encryption | Groth16 instead of Orchard native proofs                                        |
| Action value conservation, binding sig   | On-chain BabyJubJub Schnorr (Solidity)                                          |
| Shielded-pool semantics                  | **Per-asset pool** (not one global shielded pool)                               |
| —                                        | **Compliance** — off-chain screening + in-circuit freeze (`FrozenCmxNonMember`) |

## Trust boundaries

| Component                      | Trust                                                                                                                                                                                                 |
| ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Groth16 proof                  | Trustless on-chain verify                                                                                                                                                                             |
| Trusted setup                  | Per-circuit ceremony; ≥1 honest participant                                                                                                                                                           |
| binding / spendAuth signatures | On-chain verify                                                                                                                                                                                       |
| Relayer                        | Minimal trust today (cannot tamper ciphertext; can censor). **Planned:** integrate [Kohaku](https://github.com/ethereum/kohaku) ERC-4337 relaying to remove reliance on self-hosted `privacy-relayer` |
| Compliance admin               | Can update freeze root (explicit trade-off)                                                                                                                                                           |

## Next

* [Compliance implementation](/plabs-docs/privacy-core/compliance-implementation.md)
* [Orchard concepts](/plabs-docs/privacy-core/orchard-concepts.md)
* [pERC20 overview](/plabs-docs/privacy-core/perc20/overview.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://plabs.gitbook.io/plabs-docs/privacy-core/overview.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
