Mint and Burn Bridge

I. Smart Contract

Token Mapped: Create a staking contract for a normal ERC20 token to realize cross-chain action.

Mappable Token: Create a cross-chain eligible ERC20 staking contract for the user.

Token Mapping: Mapping contracts deployed in sidechains, primarily for minting and burning tokens.

II. Cross-chain Assets Flow

Mainchain –> sidechain cross-chain process

  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

  1. 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.

  2. 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.

Last updated