Unit Zero Docs
  • Home
  • HOW IT WORKS
    • Navigation
    • Overview
    • Key Components
      • Node
      • Network
      • Blockchain
      • Tokens
        • Unit0
        • WAVES
        • L2MP
        • Cross-Layer Transfer
      • Wallet
      • WavesBridge
      • DAO
        • Proposal
      • dApp
    • Terms & Conditions
    • Privacy Notice
  • GUIDES
    • Navigation
    • Node
      • Run Mainnet Node
      • Run Testnet Node
      • Run Testnet UNIT1 Node
    • Network
      • Connect to Mainnet
      • Connect to Testnet
    • Wallet
      • Set Up WX Wallet
    • Tokens
      • Get Tokens
        • Get Unit0
          • Mine Unit0 With Node
          • Get Unit0 via WX Network and Waves Bridge
          • Get Unit0 via Swop.fi and Waves Bridge
        • Get WAVES
        • Get L2MP
      • Bridge Tokens
        • Bridge Unit0 from Waves to Ethereum
        • Bridge Unit0 from Waves to Unit Zero
      • Stake L2MP
    • DAO
      • Proposal
        • Add
        • Edit
        • Retract
        • Vote
    • dApp
      • Deploy
        • Mainnet Deployment
        • Testnet Deployment
Powered by GitBook
On this page
  • Native Token Transfer
  • L1 to L0 Transfer
  • L0 to L1 transfer
  • Custom Token Transfer
  1. HOW IT WORKS
  2. Key Components
  3. Tokens

Cross-Layer Transfer

PreviousL2MPNextWallet

Last updated 1 month ago

operates atop , facilitating token transfer between the L1 and L0 networks, ensuring consensus, and offering economic incentives.

The supported token types for transfer:

  • .

  • .

Native Token Transfer

The supported token transfer directions:

  • .

  • .

L1 to L0 Transfer

The native token of the L1 network can be transferred to the L0 network by converting it into a wrapped token.

The process of token transfer from L1 to L0:

  1. A L1 transaction sender invokes the to:

    1. Lock permanently.

    2. Emit an operation event.

    NOTE: The L1 listens for the emitted events.

  2. The block miner invokes the L0 to:

    1. Post the block metada.

    2. Apply a cryptographic digest of the L1-to-L0 transfer.

  3. The L0 transaction recipient must wait until the block reaches irreversibility: ~200 L1 epochs.

    NOTE:

    • Each L0 block corresponds to a L1 epoch.

    • This step guarantees transaction finality, safeguarding against double spending and token loss during potential L1 reorganizations.

  4. The L0 transaction recipient:

    1. Invokes the Chain Contract.

    2. Applies the cryptographic proof of the transfer.

  5. The L0 Chain Contract:

    1. Mints the wrapped token.

    2. Sends the token to the L0 transaction recipient.

L0 to L1 transfer

NOTE: The reverse transfer is streamlined and nearly instant.

  1. The Chain Contract:

    1. Burns the wrapped token.

    2. Adds a record in its state.

  2. The L1 miner:

    1. Reads the state.

    2. Adds Unit Zero withdrawal transaction data to the block.

      NOTE: When posting the block metadata in L0, the miner marks the transfer as processed.

  3. The Unit0 token becomes available to the L1 transaction recipient in the next block.

Custom Token Transfer

Custom, non-native token transfers follow the same process:

The Chain Contract establishes a link between tokens in L1 and their counterparts in L0:

  • For tokens created in L0, their smart contract in L1 must emit the relevant events to enable their return to L0.

A L0 sender invokes the with the wrapped token used.

For tokens created in L1, the mints their wrapped version in L0.

Unit Zero Layer-1 (L1) network
Waves Layer-0 (L0) network
Native tokens
Custom tokens
From L1 to L0
From L0 to L1
Bridge Contract
Unit0
Consensus Client
Chain Contract
Unit0
Chain Contract
Unit0
Chain Contract