「Understanding Darwinia Bridge 1–2」Mapping Token Factory

Every bridge has a sub-module called Mapping Token Factory in the Issuing module, responsible for creating, issuing, and burning mapping assets.

Mapping Assets

Before the creation of mapping assets, the Mapping Token Factory has defined a set of criteria for creating a mapping asset, the properties and methods of which are aligned as closely as possible to the original asset but are allowed to differ. The bridge can choose which criteria to use when creating a mapping relationship, but only one criterion is allowed for the original asset, meaning that the mapping asset and the original asset are in a one-to-one relationship. The standards are open for future upgrades. In addition, the mapping asset keeps the original property of the original asset.

mapping(token) = {symbol: token_prefix + token.symbol, name: token.name + name_postfix, ...}
  • symbol prefix: “x”

Example: If the original symbol is “RING”, the mapping token’s symbol will be “xRING”. If this token is mapped to a third chain further, the symbol will be “xxRING”.

  • name postfix: “[${backing_chain_short_name}>”

Example: If RING is mapped from Darwinia to Crab, assume RING’s name on Darwinia is “Darwinia Network Native Token”. (Note: It is using balances pallet instead of ERC20, so the name was newly created in Backing Pallet.) The mapping ERC20 token’s name on Crab will be “Darwinia Network Native Token[Darwinia>”, the token is mapped from Crab to Moonriver again, the name will be “Darwinia Network Native Token[Darwinia>[Crab>”.

Permission Management

The permission of issuing mapping tokens belongs to the system account, which cannot be operated with a private key. This permission only comes from the locking proof of original assets on the source chain from the assets backing module. Once the mapping assets are issued to a user account, the receiving account has exclusive permission to manipulate these assets (transfer or burn). Accordingly, the original assets locked in the source chain can only be unlocked with the proof of burning the mapping assets in the target chain. This mechanism ensures that every mapping asset has an original asset as its backing. Transfer of value in the form of mapping assets is equivalent to that of original original assets.

Safety of Assets

When a bridge between two chains is established using this protocol for original and mapping assets, it has independent security guarantees. That is, the security of any other path or bridge does not affect the security of that bridge.

As an open cross-chain bridge protocol based on Substrate, Darwinia focuses on the construction of future Internet of Tokens. TG: http://t.me/DarwiniaNetwork