Trapped XCM Assets
How to fix trapped XCM assets!
Last updated
How to fix trapped XCM assets!
Last updated
When an XCM transaction fails and the assets appear lost, where do those assets go? Do they disappear entirely? Thankfully not, they get stuck in the XCM asset trap on the chain where the execution failed.
The following information is relevant for the Polkadot and Kusama Relay Chains, as well as system parachains (such as Asset Hub), but might not apply to some parachains.
In more technical terms, this is applicable if pallet-xcm
is configured as the AssetTrap in a chain's runtime. You should contact the relevant parachain team if this guide does not work on their parachain.
When assets get trapped because of the XCM transaction failing to execute, the blockchain will register an AssetsTrapped
event.
This event contains the information that you need to claim the assets back. It will contain information about whose assets were trapped and information about the assets.
To claim the assets we need to create an XCM transaction. The transaction we want to create is a polkadotXCM
and then execute
.
Choose the latest version available for XCM (likely V3 or V4).
Here are the details of the XCM extrinsic that you need to create:
ClaimAsset
You need to specify the exact same assets that appear in the AssetTrapped
event
In the ticket
section, you can leave it as the default values (parents: 0, interior: Here)
BuyExecution
For the fee, put the same values as you put in the ClaimAsset
section – these will be used for paying the transaction fees so that the assets can move into your account
DepositAsset
This section allows you to select the account that you want to withdraw the funds to, likely you will want to input your account here, but you can select any other account.