<!-- tempo-docs-context -->
> Source: [/docs/guide/private-zones/deposit-to-a-zone](https://tempo.xyz/developers/docs/guide/private-zones/deposit-to-a-zone.md)
> Section: [Zones](https://tempo.xyz/developers/docs/zones.md). Connect to a Zone and work with private balances, deposits, and withdrawals. Zones is in limited preview; see the introduction for access. Earlier testnet sandbox guides describe a separate integration.
> Earlier testnet sandbox: use [Zones](https://tempo.xyz/developers/docs/zones.md) for the current limited preview.
> [Documentation index](https://tempo.xyz/developers/llms.txt) · [Docs skill](https://tempo.xyz/developers/SKILL.md)

> Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation.
> If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.xyz/developers/llms.txt) and Markdown pages directly.

<a id="deposit-pathusd-to-a-tempo-zone-on-testnet" />

# Deposit OUSD to a Tempo Zone on testnet

Deposit `OUSD` test tokens from public Tempo into **Zone A** in the [earlier testnet sandbox](https://tempo.xyz/developers/docs/guide/private-zones#testnet-compatibility). Submit a public-chain deposit first, then wait for the Zone to credit the net amount after fees.

A public account signs a plaintext or encrypted deposit, the Zone A portal locks OUSD, and Zone A later imports the deposit and credits the private balance.

The deposit is accepted through `ZonePortal` on the public chain. You need private zone authorization to read the resulting zone balance, because those reads are only exposed to the authenticated account.

<a id="depositing-pathusd-to-zone-a" />

## Depositing OUSD to Zone A

**Interactive demo: Deposit to Zone A**

1. Deposit to zone

## Code examples

These snippets assume you already have a signed-in `rootClient` on the public chain and the usual token and zone constants in scope.

On this legacy testnet deployment, use the plaintext flow when revealing the recipient and memo is acceptable, or the encrypted flow to hide those fields from public-chain observers. Current Zone portals require encrypted deposits and a Tempo refund recipient; neither legacy call signature below applies to those portals. See the [testnet compatibility notes](https://tempo.xyz/developers/docs/guide/private-zones#testnet-compatibility) before adapting these SDK calls to another Zone.

### Plaintext

```ts
import { parseUnits } from 'viem'

const depositAmount = parseUnits('100', 6)

const { receipt } = await rootClient.zone.depositSync({
  account: rootClient.account,
  amount: depositAmount,
  token: ousd,
  zoneId: ZONE_A.id,
})

console.log(receipt.blockNumber)
```

### Encrypted

```ts
import { parseUnits } from 'viem'

const depositAmount = parseUnits('100', 6)

const { receipt } = await rootClient.zone.encryptedDepositSync({ // [!code focus]
  account: rootClient.account,
  amount: depositAmount,
  token: ousd,
  zoneId: ZONE_A.id,
})

console.log(receipt.blockNumber)
```

## What Happens During a Deposit

A zone deposit settles in two phases.

First, you submit a public Tempo transaction depositing to the `ZonePortal`. The Zone Portal contract locks the token, deducts the deposit fee in the same token, and records the net deposit in its deposit queue. Later, the zone sequencer processes that queue and credits the recipient inside the zone.

That means your public transaction receipt and your zone balance do not update at the same time. The Tempo transaction confirms that the deposit request was accepted. The zone balance changes only after the zone has processed that deposit, and it reflects the post-fee amount rather than the full amount you passed into `deposit(...)`.

:::warning
If you need a specific net amount inside the zone, account for the portal deposit fee first. The amount minted on the zone is `amount - depositFee`.
:::
