Cross-Layer Transfer
Last updated
Last updated
operates atop , facilitating token transfer between the L1 and L0 networks, ensuring consensus, and offering economic incentives.
The supported token types for transfer:
.
.
The supported token transfer directions:
.
.
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:
A L1 transaction sender invokes the to:
Lock permanently.
Emit an operation event.
NOTE: The L1 listens for the emitted events.
The block miner invokes the L0 to:
Post the block metada.
Apply a cryptographic digest of the L1-to-L0 transfer.
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.
The L0 transaction recipient:
Invokes the Chain Contract.
Applies the cryptographic proof of the transfer.
The L0 Chain Contract:
Mints the wrapped token.
Sends the token to the L0 transaction recipient.
NOTE: The reverse transfer is streamlined and nearly instant.
The Chain Contract:
Burns the wrapped token.
Adds a record in its state.
The L1 miner:
Reads the state.
Adds Unit Zero withdrawal transaction data to the block.
NOTE: When posting the block metadata in L0, the miner marks the transfer as processed.
The Unit0 token becomes available to the L1 transaction recipient in the next block.
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.