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

![](/files/-MZYVMi6WGLz4htFnbYK)

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.

![](/files/-MZYVaivwOSESsi7RMvV)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.chainswap.com/mechanism/chainswap-architecture.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
