> For the complete documentation index, see [llms.txt](https://docs.nullmask.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nullmask.pro/user-guide/depositing.md).

# Depositing

Deposits move funds from your public wallet balance into the Nullmask shielded pool.

### Steps <a href="#steps" id="steps"></a>

1. Navigate to the **Shield** screen
2. Select the token (ETH or ERC-20)
3. Enter the amount
4. If your wallet is on the wrong network, you'll be prompted to switch to the base chain (e.g., Ethereum Mainnet)
5. For ERC-20 tokens, approve the token allowance if needed
6. Confirm the deposit transaction in your wallet

### What Happens <a href="#what-happens" id="what-happens"></a>

1. Your wallet sends a `deposit()` transaction to the Nullmask contract on the base chain
2. The transaction includes the deposit amount plus a small gas escrow (to cover the guard's gas costs)
3. The deposit enters a **pending** state
4. The guard service screens your address
5. Once approved, a note is created in the Merkle tree representing your shielded balance
6. The deposit appears in your shielded balance (typically within 15-30 seconds)

### ERC-20 Deposits <a href="#erc-20-deposits" id="erc-20-deposits"></a>

For ERC-20 tokens:

1. The app checks if the contract has sufficient allowance
2. If not, you'll be prompted to approve the token
3. The deposit transfers tokens via `safeTransferFrom`
4. Fee-on-transfer tokens are supported — the actual deposited amount is measured via balance delta

### Gas Escrow <a href="#gas-escrow" id="gas-escrow"></a>

Each deposit includes a small ETH gas escrow sent alongside the deposit. This escrow:

* Pays the guard's gas costs for approving or rejecting the deposit
* Is paid to the guard regardless of the outcome
* Is refunded if you withdraw a pending deposit

### Withdrawing a Pending Deposit <a href="#withdrawing-a-pending-deposit" id="withdrawing-a-pending-deposit"></a>

If your deposit is still pending (not yet approved or rejected), you can withdraw it:

* Ca~~l~~l `withdrawPendingDeposit()` on the contract
* Both the deposit amount and gas escrow are refunded


---

# 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 following URL with the `ask` and `goal` query parameters:

```
GET https://docs.nullmask.pro/user-guide/depositing.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `build a script that syncs our docs to a CMS` lets GitBook tailor the answer to that use case.

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.
