> For the complete documentation index, see [llms.txt](https://docs.zetrix.com/zetrix-l2-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zetrix.com/zetrix-l2-documentation/usage/asset-flow.md). Agents can also search and read this documentation through its [MCP server](https://docs.zetrix.com/zetrix-l2-documentation/~gitbook/mcp).

# Asset Flow

## Overview

```
L1 Native ZETRIX → Bridge → Wrapped Zetrix (wZETRIX) → L2
```

```mermaid
flowchart TB
    A["L1 Native ZETRIX"] --> B["Bridge / Lock on L1"]
    B --> C["Relayer observes deposit"]
    C --> D["Mint wZETRIX on L2"]
    D --> E["Use on L2:<br/>transfer, dApps, gas"]
    E --> F["Burn wZETRIX<br/>to withdraw"]
    F --> G["Bridge unlock on L1"]
    G --> H["L1 Native ZETRIX<br/>returned"]
```

## Deposits (L1 → L2)

```mermaid
sequenceDiagram
    participant User
    participant L1 as Zetrix L1 Bridge
    participant Rel as Relayer
    participant L2 as Z2
    User->>L1: Lock ZTP-20 / ZTP-721 in Bridge
    L1-->>Rel: Delayed message (deposit)
    Rel->>Rel: Wait for confirmations
    Rel->>L2: Deliver → credit wZETRIX / mapped token
    L2-->>User: L2 balance available (seconds)
```

* User locks native ZETRIX / ZTP-20 (or a ZTP-721 NFT) in the L1 **Bridge**, which enqueues a **delayed message**.
* The **Relayer** delivers the message and the asset is credited on L2 (typically within seconds).

## Withdrawals (L2 → L1)

```mermaid
sequenceDiagram
    participant User
    participant L2 as Z2 Nodes
    participant Seq as Sequencers
    participant Prop as Main Validator
    participant Comm as Committee (5)
    participant Agg as Aggregator
    participant Inbox as L1 Sequencer Inbox
    participant Rollup as L1 Rollup
    participant Watch as Watchers
    participant Outbox as L1 Bridge / Outbox
    User->>L2: Initiate withdrawal (burn wZETRIX / mapped token)
    L2-->>Seq: Block containing the withdrawal
    Seq->>Inbox: Batch it, post commitment + data certificate
    Prop->>Prop: Replay batches with own reexecutor
    Prop->>Rollup: Propose assertion (includes the withdrawal)
    Comm->>Comm: Shared reexecutor replays, sign if match
    Comm->>Agg: Signatures over gossip bus
    Agg->>Rollup: Soft confirmation at 3 of 5
    Note over Rollup,Watch: Challenge window (120 s on testnet)
    Watch->>Watch: Re-execute; dispute on Challenger if mismatch
    Rollup->>Rollup: Assertion confirmed (final, no successful dispute)
    User->>Outbox: Claim with Merkle proof against confirmed assertion
    Outbox-->>User: Release native ZETRIX / token
```

1. The withdrawal is included in an L2 block, which the **Sequencers** batch and commit to the **Sequencer Inbox**.
2. The **Main Validator** replays the batches with its own reexecutor and **proposes an assertion** on the Rollup.
3. The **committee** checks it with the shared reexecutor; with **3 of 5** signatures the **aggregator** submits the **soft confirmation**.
4. The **challenge window** opens; **Watchers** re-execute and can dispute on the **Challenger**.
5. With no successful dispute, the assertion is **confirmed** and the user can **claim** on L1.

> \[!WARNING] A soft confirmation is **not** enough to withdraw. Withdrawals wait for the **challenge window** to end and the assertion to be **confirmed** on L1 (120 s on the testnet — a testnet setting; confirm the value for other networks). The user then **claims on L1 with a Merkle proof** against that confirmed assertion via the **Outbox**. Do not treat a withdrawal as complete until the L1 claim succeeds.

## Token Wrapping

* **Wrapping:** Native ZETRIX locked on L1 → wZETRIX minted on L2 (1:1, subject to bridge policy).
* **Unwrapping:** wZETRIX burned on L2 → native ZETRIX released on L1 after the withdrawal is confirmed and claimed.
* **ZTP-20 / ZTP-721:** Fungible (ZTP-20) and NFT (ZTP-721) assets are custodied by the Bridge and mapped to L2 representations via the same lock/mint, burn/claim pattern.

| Direction | L1 action                                                                             | L2 action                   | Timing                                    |
| --------- | ------------------------------------------------------------------------------------- | --------------------------- | ----------------------------------------- |
| Deposit   | Lock in Bridge (delayed message)                                                      | Mint wZETRIX / mapped token | Fast (seconds)                            |
| Withdraw  | Propose → soft-confirm (3 of 5) → confirm assertion → claim via Outbox (Merkle proof) | Burn / initiate             | After challenge window (120 s on testnet) |

***

[← Wallet Configuration](https://docs.zetrix.com/zetrix-l2-documentation/usage/wallet-configuration.md) · [Index](https://docs.zetrix.com/zetrix-l2-documentation/readme.md) · [Tokenomics →](https://docs.zetrix.com/zetrix-l2-documentation/usage/tokenomics.md)
