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

# Depositing

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

## Steps

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

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)

## Deposit Statuses

| Status   | Description                        |
| -------- | ---------------------------------- |
| Pending  | Awaiting guard review              |
| Approved | Note added to Merkle tree          |
| Rejected | Funds refunded to depositor        |
| Reverted | Depositor withdrew pending deposit |

## ERC-20 Deposits

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

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

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

* Call `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 current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.nullmask.io/user-guide/depositing.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.
