# Deploying New Wrappers

One of the most innovative aspects of the confidential token system is that **anyone can deploy a wrapper for any ERC-20 token or ETH** without permission. This creates a truly permissionless privacy layer that can expand to cover the entire Ethereum token ecosystem.

## **Who Can Deploy a Wrapper?** <a href="#who-can-deploy-a-wrapper" id="who-can-deploy-a-wrapper"></a>

Anyone willing to pay the deployment fee can deploy a new wrapper/cToken pair. There are no restrictions, no whitelist, and no governance approval required.

This means:

* A DeFi protocol can deploy wrappers for its own tokens
* A user wanting privacy for an obscure token can deploy
* An aggregator can deploy wrappers for popular tokens proactively
* Communities can crowdfund deployment for tokens they care about

## **Deployment Process** <a href="#the-deployment-process" id="the-deployment-process"></a>

Deploying a new wrapper involves these steps:

1. **Check if wrapper already exists**
   * Call `coordinator.wrapperExists(tokenAddress)`
   * If true, the wrapper is already deployed---no action needed
   * If false, you can deploy it
2. **Pay the deployment fee**
   * Check current [fee](/wiki/zaiffer/protocol-fees.md): `feeManager.getDeployFee()`
   * Send as `msg.value` with your deployment transaction
3. **Call the deploy function**
   * `coordinator.deploy(tokenAddress)` for ERC-20 tokens
   * `coordinator.deploy(address(0))` for ETH
4. **Contracts are deployed automatically**
   * A new `RegulatedERC-7984Upgradeable` proxy (the cToken)
   * A new `WrapperUpgradeable` proxy
   * Both are initialised and linked together
5. **Added to the registry**
   * `coordinator.getWrapper(tokenAddress)` now returns the wrapper address
   * `coordinator.getConfidentialToken(tokenAddress)` returns the cToken address
   * Anyone can now shield that token

## **What Gets Created During Deployment** <a href="#what-gets-created-during-deployment" id="what-gets-created-during-deployment"></a>

Zaïffer ensures consistent behaviour across all cTokens. So when you deploy a wrapper for a token, the system automatically creates:

1. **The Confidential Token (cToken)**
   * **Contract type**: `RegulatedERC-7984Upgradeable` (ERC-7984 standard)
   * **Name**: "confidential \[TokenName]" (e.g., "confidential USD Coin")
   * **Symbol**: "c\[TokenSymbol]" (e.g., "cUSDC")
   * **Decimals**: Maximum 6 (rate-adjusted if original token has more)
   * **Underlying**: Permanently linked to the original token address
2. **The Wrapper Contract**
   * **Contract type**: `WrapperUpgradeable`
   * **Purpose**: Holds original tokens in escrow, mints/burns cTokens
   * **Permissions**: Exclusive right to mint and burn the paired cToken
   * **Functions**: `wrap()`, `finalizeUnwrap()`, balance tracking
3. **Configuration**
   * The deployment automatically handles:
   * **Rate calculation** based on token decimals (see Section 3)
   * **Token metadata** fetched from original token (name, symbol)
   * **Registry entry** in the DeploymentCoordinator

## After Deployment: Permissionless Use <a href="#after-deployment-permissionless-use" id="after-deployment-permissionless-use"></a>

Once a wrapper exists, everyone shields through the same wrapper. This concentrates liquidity and makes the cToken more useful.

Once a wrapper/cToken pair is deployed:

* **Anyone can Shield** the original token to get cTokens
* **Anyone can Unshield** cTokens back to original tokens
* **Anyone can transfer** cTokens confidentially
* **DeFi protocols** can integrate the cToken
* **Wallets** can display cToken balances

The deployer has no special privileges over usage.


---

# 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://zaiffer.gitbook.io/wiki/zaiffer/deploying-new-wrappers.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.
