overview· xtz deposits· fa deposits· xtz withdrawals· xtz fast withdrawals· fa withdrawals· design
bridge indexing · deposit

XTZ deposits

flowchart TD
  subgraph L1["L1 · MICHELSON"]
    direction TB
    USER_L1(["User"]):::actor
    HD["Call EVMBridge.depositTzKT · transaction · EVMBridge"]:::l1
    MINT["Call Ticketer.mintTzKT · transaction · Tez-Ticketer"]:::l1
    CB["Call EVMBridge.callbackTzKT · transaction · EVMBridge"]:::l1
    TT["Call Rollup.depositTzKT · transaction · Rollup✓ tezos.on_rollup_call✚ TezosDepositOperation"]:::l1
    USER_L1 -->|xtz| HD
    HD -->|xtz| MINT
    MINT -->|ticket| CB
    CB -->|ticket| TT
  end

  subgraph KER["ROLLUP / KERNEL"]
    direction TB
    INBOX["Inbox messageTzKT · inbox · Rollup✓ rollup_message_index✚ RollupInboxMessage"]:::sys
    KP["Kernel parse_routing"]:::sys
    INBOX --> KP
  end

  subgraph EVMA["L2 · EVM · ACTUAL"]
    direction TB
    QUEUE["Call XTZBridge.queueEVM node · transaction · 0xff…01"]:::evm
    QD["Event QueuedDepositEVM node · event · 0xff…01"]:::evm
    CLAIM["Call XTZBridge.claim_xtzEVM node · transaction · 0xff…01"]:::evm
    VT["Value TransferEVM node · transaction · 0x…feed✓ etherlink.on_xtz_deposit✚ EtherlinkDepositOperation"]:::evm
    EV["Event DepositEVM node · event · 0xff…01"]:::evm
    USER_E(["User"]):::actor-evm
    WT(["Watchtower"]):::actor-evm
    QUEUE --> QD
    QUEUE -.-> CLAIM
    CLAIM --> VT
    VT --> EV
    VT -->|xtz| USER_E
  end

  subgraph EVML["L2 · EVM · LEGACY"]
    direction TB
    LVT["Value TransferEVM node · transaction · 0x00…00✓ etherlink.on_xtz_deposit✚ EtherlinkDepositOperation"]:::evm
    LEV["Event DepositEVM node · event · 0x00…00"]:::evm
    USER_LEG(["User"]):::actor-evm
    LVT --> LEV
    LVT -->|xtz| USER_LEG
  end

  subgraph MICH["L2 · MICHELSON"]
    direction TB
    MTX["Value TransferTzKT · transaction · tz1Ke2h7…"]:::mich
    MEV["Event DepositTzKT · event · tz1Ke2h7…◔ planned: tezos.events✚ TezosDepositOperation"]:::mich
    USER_M(["User"]):::actor-mich
    MTX --> MEV
    MTX -->|xtz| USER_M
  end

  TT -->|ticket| INBOX
  KP -->|has code → queue| QUEUE
  KP -->|no code| VT
  KP -->|old kernel| LVT
  KP -->|Michelson · tz1| MTX
  WT --> CLAIM

  %% decision classes — one line per node (a comma in class = a list of NODES, not classes)
  class TT indexed
  class INBOX indexed
  class VT indexed
  class LVT indexed
  class LVT legacy
  class LEV legacy
  class QUEUE faded
  class QD faded
  class CLAIM faded
  class EV faded
  class LEV faded
  class HD faded
  class MINT faded
  class CB faded
  class MTX faded
  class KP faded
  class WT faded
  class MEV planned
  class USER_L1 faded
  class USER_E faded
  class USER_LEG faded
  class USER_M faded

  %% IMPORTANT: no color: in classDef — mermaid turns it into `.class span{color !important}`,
  %% which overrides per-line colors (.t/.s/.ix/.md). Text color is set ONLY by themeCSS. classDef = border/fill.
  classDef l1 fill:#e8836b1f,stroke:#e8836b,stroke-width:1.5px;
  classDef evm fill:#5aa6e01f,stroke:#5aa6e0,stroke-width:1.5px;
  classDef mich fill:#6fbf731f,stroke:#6fbf73,stroke-width:1.5px;
  classDef sys fill:#8b919c1f,stroke:#8b919c,stroke-width:1.5px;
  classDef actor fill:transparent,stroke:#e8836b,stroke-width:1.5px;
  classDef actor-evm fill:transparent,stroke:#5aa6e0,stroke-width:1.5px;
  classDef actor-mich fill:transparent,stroke:#6fbf73,stroke-width:1.5px;
  classDef indexed stroke-width:2px;
  classDef planned stroke-width:2px;
  classDef faded stroke-width:1.5px;
  classDef legacy stroke-width:1.5px;

  %% edge color = runtime of the source (rule #4). Order = order of edge declaration, including edges inside subgraphs
  linkStyle 0 stroke:#e8836b,stroke-width:2.4px;
  linkStyle 1 stroke:#e8836b,stroke-width:2.4px;
  linkStyle 2 stroke:#e8836b,stroke-width:2.4px;
  linkStyle 3 stroke:#e8836b,stroke-width:2.4px;
  linkStyle 4 stroke:#8b919c,stroke-width:2.4px;
  linkStyle 5 stroke:#5aa6e0,stroke-width:2.4px;
  linkStyle 6 stroke:#5aa6e0,stroke-width:2.4px,stroke-dasharray:6 5;
  linkStyle 7 stroke:#5aa6e0,stroke-width:2.4px;
  linkStyle 8 stroke:#5aa6e0,stroke-width:2.4px;
  linkStyle 9 stroke:#5aa6e0,stroke-width:2.4px;
  linkStyle 10 stroke:#5aa6e0,stroke-width:2.4px;
  linkStyle 11 stroke:#5aa6e0,stroke-width:2.4px;
  linkStyle 12 stroke:#6fbf73,stroke-width:2.4px;
  linkStyle 13 stroke:#6fbf73,stroke-width:2.4px;
  linkStyle 14 stroke:#8b919c,stroke-width:2.4px;
  linkStyle 15 stroke:#5aa6e0,stroke-width:2.4px;
  linkStyle 16 stroke:#5aa6e0,stroke-width:2.4px;
  linkStyle 17 stroke:#5aa6e0,stroke-width:2.4px,stroke-dasharray:6 5,opacity:0.55;
  linkStyle 18 stroke:#6fbf73,stroke-width:2.4px;
  linkStyle 19 stroke:#5aa6e0,stroke-width:2.4px;
    
Legend
Hue L1 L2 EVM L2 Michelson Kernel
Decision indexed planned not indexed
Status Legacy · remains in mainnet