Bridge Transfer Flow
Transfer Flow
Transfer flow consists of 2 key points:
- Deposit - Swap blockchains native tokens to the child blockchains tokens.
- Withdraw - Swap child blockchains tokens to blockchains native tokens.
Both deposit
and withdraw
share the same flow, detailed description:
The user wants to swap tokens from Blockchain X to Blockchain Y. A user makes a transaction on Blockchain X — this sends tokens to our Cross-Chain Routing smart contract on Blockchain Y.
There are separate validators which catch this event in Blockchain X. For detailed Validator architecture, see below.
Each validator signs the transaction by its own signature, and forwards a message to the relayer:
- Validators work completely independently of each other
- Validators know nothing about each other
When the relayer collects two of three signatures from the Validators, it initiates a transaction on Blockchain Y by calling the function of the Cross-Сhain Routing smart contract in Blockchain Y — sending tokens to the user.
The swap contract verifies that ⅔ of the signatures have been collected, and sends tokens to the user.