> 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/shield-erc20/interface-and-perc20.md).

# Interface & pERC20 mapping

`ERC20Shield` implements `IERC20Shield`, which extends `IPERC20`. Wallets and SDKs reuse the same `PrivacyCall` / `BundleAction` encoding as [pERC20](/plabs-docs/privacy-core/perc20/interface-and-erc20.md).

## Full mapping

| Interface                     | pERC20                     | Shield ERC20                                                       |
| ----------------------------- | -------------------------- | ------------------------------------------------------------------ |
| `name/symbol/decimals`        | On-chain, public           | Same (pool metadata; independent of underlying)                    |
| `totalSupply()`               | `mint − burn` (note units) | `shieldedSupply` (note units)                                      |
| `issuer()`                    | Token issuer               | **`admin`** (compliance officer; no mint power)                    |
| `underlying()`                | —                          | Custodied ERC-20 address                                           |
| `scale()`                     | —                          | Wei per note unit                                                  |
| `shieldedSupply()`            | —                          | Backed note units (alias of `totalSupply`)                         |
| `balanceOf(addr)`             | Off-chain viewing key      | Same                                                               |
| `transfer(PrivacyCall)`       | Private note→note          | Same                                                               |
| `transfer(executor, call)`    | Executor-gated (swap)      | Same                                                               |
| `mint(...)`                   | Issuer only                | **Disabled** — use `shield`                                        |
| `burn(...)`                   | Any holder                 | **Disabled** — use `unshield`                                      |
| `shield(...)`                 | —                          | Deposit underlying → shielded note                                 |
| `unshield(...)`               | —                          | Spend note → release underlying                                    |
| `cmxFrozenRoot/setFrozenRoot` | Admin                      | Same — [Compliance](/plabs-docs/privacy-core/compliance-freeze.md) |

## Events

| pERC20                        | Shield ERC20                                    |
| ----------------------------- | ----------------------------------------------- |
| `Perc20Created`               | `ShieldPoolCreated` (+ `underlying`, `scale`)   |
| `Mint` / `Burn`               | ❌ not emitted (mint/burn disabled)              |
| —                             | `Shielded(depositor, amountUnits, weiAmount)`   |
| —                             | `Unshielded(recipient, amountUnits, weiAmount)` |
| `NoteAdded` / `NoteConfirmed` | Same (all value changes)                        |
| `FrozenRootUpdated`           | Same                                            |

Shield/unshield emit **public amounts** (note units + wei); depositor/recipient identity for shield is not indexed on-chain beyond `msg.sender` on `Shielded`.

## IPERC20 compatibility notes

* **`mint` / `burn` revert** with `MintDisabled` / `BurnDisabled`. Integrators must route deposit/withdraw through `shield` / `unshield`.
* **`issuer()`** returns `admin`, not a mint authority. For shield pools, treat `admin` as the compliance officer only.
* **Asset identity is the shield pool address**, not `(underlying, name)`. Permissionless factory deployment means look-alike pools are possible — verify `ERC20ShieldFactory.isShieldPool(pool)` before interacting.

## ERC-20 layer (public)

| Step     | On-chain (public)                                               | Private                  |
| -------- | --------------------------------------------------------------- | ------------------------ |
| Shield   | `approve(pool, amountUnits * scale)` then `shield` pulls ERC-20 | Output note recipient    |
| Unshield | `unshield(..., recipient, call)` sends ERC-20 to `recipient`    | Spent notes, change note |
| Transfer | —                                                               | Parties and amount       |

Only **standard ERC-20** tokens are supported. Fee-on-transfer and rebasing tokens are rejected at `shield` via balance-delta check (`NonStandardToken`).

## Relation to Privacy Core

All note state transitions go through `_executeBundle` on `OrchardVerifier`. `ERC20Shield` adds custody accounting (`shieldedSupply`) and ERC-20 pull/transfer around shield/unshield.

## Next

* [Operations](/plabs-docs/privacy-core/shield-erc20/operations.md)
* [Deployment](/plabs-docs/privacy-core/shield-erc20/deployment.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/shield-erc20/interface-and-perc20.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.
