Cross-chain Assets Flow
1. The user selects and deposits the token on the mainchain, which is actually staking their token to the token's staking contract.
2. The user withdraw on the sidechain, at which point the node verifies that user's deposit action through the mapping contract, and if more than 3 nodes are validated, the Token Mapping contract executes the mint operation, mints the same amount of tokens, and sends them to the user's destination address for collection.
Sidechain –> mainchain cross-chain process
The user selects and deposits the token on the sidechain, which is actually burning the token as the contract puts the user's token into the black hole address.
When the user withdraw on the mainchain, the node verifies that there is a valid deposit operation through the Token Mapping contract, and if more than 3 nodes are authenticated, the Token Mapped contract performs the unstake action and transfers the token to the user’s destination address for collection.