cBridge Canonical Mapping Transfer (xAsset)
Terminology
The followings are used to describe cBridge transfer flow
The Original Chain is the chain which supports the original token
The Pegged Chain is the chain which has not supported original token yet.
The Original Token is the existing token on the source chain
The Pegged Token is the original token mapping on the pegged chain. The rate between original token and pegged token is 1:1
The Original Token Vault is a contract deployed on the source chain locking and sending back user's assets
The Pegged Token Bridge is a contract deployed on the pegged chain minting and burning pegged token for users.
Flow Phrases
Mint(Deposit)
A user submit on-chain deposit/mint request to the OriginalTokenVault contract on source chain. Then user's original tokens will be moved and locked in the OriginalTokenVault contract. Celer SGN will coordinate pegged token mint in PeggedTokenBridge contract and move generated tokens into user's wallet address
Burn(Withdraw)
A user submit on-chain burn/withdraw request to the PeggedTokenBridge contract on pegged chain. Then user's pegged tokens will be moved and burnt in the PeggedTokenBridge contract. Celer SGN will coordinate original tokens unlock and send back to user's wallet address in OriginalTokenVault bridge on source chain.
During the communication between you and cBridge gateway, you need to indicate it is a mint&burn transfer flow. Otherwise, cBridge gateway will treat it as a general pool-based transfer and may lead to unexpected error
Last updated