DOT-KSM Bridge
The fully functional Polkadot < > Kusama bridge facilitates secure asset transfers between the chains in both the ecosystems. The progress of Polkadot < > Kusama bridge implementation can be tracked here.
Transfer DOT to Kusama Asset Hub¶
This tutorial shows how to transfer DOT on Polkadot Asset Hub to Kusama Asset Hub. The first step is to ensure that your account on Polkadot Asset Hub has enough DOT to cover the XCM transfer fee and the bridge fee (which is around 2 DOT). The next step is to craft an XCM message to be sent from Polkadot Asset Hub.
BagPipes (formerly called xcmsend) is an opensource application that lets you create workflows in a drag and drop style interface in order to build execution flows of cross chain assets transfers using XCM. Check Bagpipes docs for more information on how to create workflows for crafting XCM transfers. The snapshot below shows a workflow on BagPipes that is designed to send 3 DOT from an account Polkadot Asset Hub to Kusama Asset Hub.
This workflow crafts an XCM transfer as shown below.
{
"isSigned": false,
"method": {
"args": {
"dest": {
"V3": {
"parents": "2",
"interior": {
"X2": [
{
"GlobalConsensus": "Kusama"
},
{
"Parachain": "1,000"
}
]
}
}
},
"beneficiary": {
"V3": {
"parents": "0",
"interior": {
"X1": {
"AccountId32": {
"network": null,
"id": "this has to be the intended address"
}
}
}
}
},
"assets": {
"V3": [
{
"id": {
"Concrete": {
"parents": "1",
"interior": "Here"
}
},
"fun": {
"Fungible": "30,000,000,000"
}
}
]
},
"fee_asset_item": "0",
"weight_limit": "Unlimited"
},
"method": "limitedReserveTransferAssets",
"section": "polkadotXcm"
}
}
Once this extrinsic is signed and
submitted, it is broadcast to Polkadot Asset Hub nodes. As this is a reserve asset transfer, the DOT
is transferred to the destination's sovereign account on Polkadot Asset Hub and
DOT is issued as a foreign
asset and deposited onto the destination account on Kusama Asset Hub. The foreign asset balances of
any account on Kusama Asset Hub can be queried on-chain through the foreignAssets
pallet as shown
below.
Transfer DOT from Kusama Asset Hub to Polkadot Asset Hub¶
This tutorial shows how to transfer DOT on Kusama Asset Hub to Polkadot Asset Hub. The first step is to ensure that your account on Kusama Asset Hub has enough KSM to cover the XCM transfer fee and the bridge fee (which is around 0.4 KSM). The next step is to craft an XCM message to be sent from Kusama Asset Hub.
DOT which is registered as a foreign asset on Kusama Asset Hub can be transferred to Polkadot Asset
Hub through an extrinsic like the one below, whose call data is
0x1f0b040202090200a10f04000101009e4e7009937c56d267338762a60ed004293afd40e7c2081847c12cb63c76a818040402010902000700e40b54020000000000
.
If you plan on reusing this extrinsic, ensure that you change the Account ID and the transfer amount below.
For reference, this extrinsic is signed and submitted successfully, and the destination account on Polkadot Asset Hub received DOT.
Transfer KSM to Polkadot Asset Hub¶
This tutorial shows how to transfer KSM on Kusama Asset Hub to Polkadot Asset Hub. The first step is to ensure that your account on Kusama Asset Hub has enough KSM to cover the XCM transfer fee and the bridge fee (which is around 0.4 KSM). The next step is to craft an XCM message to be sent from Kusama Asset Hub.
The XCM transfer extrinsic shown below can be accessed here.
If you plan on reusing this extrinsic, ensure that you change the Account ID and the transfer amount highlighted in the snapshot below.
Once this extrinsic is signed and
submitted, it is broadcast to Kusama Asset Hub nodes. As this is a reserve asset transfer, the KSM
is transferred to the sovereign account on Kusama Asset Hub and
KSM is issued as a
foreign asset and deposited onto the destination account on Kusama Asset Hub. The foreign asset
balances of any account on Kusama Asset Hub can be queried on-chain through the
foreignAssets
pallet as shown below.
Transfer KSM from Polkadot Asset Hub to Kusama Asset Hub¶
This tutorial shows how to transfer KSM on Polkadot Asset Hub to Kusama Asset Hub. The first step is to ensure that your account on Polkadot Asset Hub has enough DOT to cover the XCM transfer fee and the bridge fee (which is around 2 DOT). The next step is to craft an XCM message to be sent from Polkadot Asset Hub.
KSM which is registered as a foreign asset on Polkadot Asset Hub can be transferred to Kusama Asset
Hub through an extrinsic like the one below, whose call data is
0x1f0b040202090300a10f04000101008479c8ea5480acca5a847133cd97a87801b6e698a98f2eab0e8e9d5c51b14a33040402010903000700a0db215d0000000000
For reference, this extrinsic was signed and submitted successfully, and the destination account on Kusama Asset Hub received KSM.
Transfer of arbitrary assets between Polkadot Asset Hub and Kusama Asset Hub¶
There are several requirements for an arbitrary token to be transferable between Polkadot and Kusama Asset Hub:
- The asset must already be registered on each Asset Hub.
- The destination account should exist on the destination chain (and hold a sufficient asset).
- The asset transferred needs to be larger than the minimum balance specified by the asset.
- The fee asset transferred needs to be larger than the minimum balance specified by the asset. For example, if DOT is used as fee asset from Polkadot Asset Hub to Kusama Asset Hub, the excess DOT will be deposited to the beneficiary on Kusama Asset Hub. However, if the DOT is less that the minimum balance of DOT on Kusama Asset Hub, the transfer might fail.
- The destination account must hold fewer assets than the maximum number of assets allowed per account.
Avoid Asset Traps
To avoid issues on the receiving side for non-sufficient assets, make sure to call pallet_assets::touch() or pallet_assets::touch_other() effectively guaranteeing the ability to successfully receive and accept the bridged assets in your account on the destination chain. This eliminates issues like your account on destination not existing or not having enough ED or having reached the maximum limit of different assets it can hold. Without this sanity step, you risk that the bridged assets will make their way to the destination chain but will not be accepted by your account, and instead get trapped in the Asset Trap on the destination chain. Technical users should dry run their transfer on the destination chain to ensure a successful transfer.
Transfer of ERC-20 assets between Polkadot Asset Hub and Kusama Asset Hub¶
ERC-20 token transfers are supported between Polkadot Asset Hub and Kusama Asset Hub.
Users can use the Snowbridge UI to transfer ERC-20 tokens from Polkadot Asset Hub to Kusama Asset Hub and vice versa. The fee asset is the native token of the source chain (DOT from Polkadot Asset Hub to Kusama Asset Hub and KSM from Kusama Asset Hub to Polkadot Asset Hub). The Snowbridge UI does all the necessary checks and dry runs the transfer to ensure a successful transfer.