# Trapped XCM Assets

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.

{% hint style="danger" %}
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.
{% endhint %}

## The AssetTrapped Event

When assets get trapped because of the XCM transaction failing to execute, the blockchain will register an `AssetsTrapped` event.

<figure><img src="https://2862319636-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1YRoR7fazGxiQsx9pH6m%2Fuploads%2FdI1ovhJVmeKD9SDwgron%2FAssetTrap1.png?alt=media&#x26;token=e3063efc-02ae-4a44-9b59-a1e2c01a1b0a" alt=""><figcaption></figcaption></figure>

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.

## How to Claim 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)

<figure><img src="https://2862319636-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1YRoR7fazGxiQsx9pH6m%2Fuploads%2FNf6TTFwtI5hEGEZxJL25%2FAssetTrap2.png?alt=media&#x26;token=bcea6f30-401e-4e2c-8fd3-d1a73a355cc0" alt=""><figcaption></figcaption></figure>

* `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

  <figure><img src="https://2862319636-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1YRoR7fazGxiQsx9pH6m%2Fuploads%2FKqbV7MUQwYjqf1ljfcwU%2FAssetTrap3.png?alt=media&#x26;token=19cbec6b-d186-4c3b-8e51-5c4561e32fa1" alt=""><figcaption></figcaption></figure>
* `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.

  <figure><img src="https://2862319636-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1YRoR7fazGxiQsx9pH6m%2Fuploads%2FBso1TL0xHYrXuX9QhgPf%2FAssetTrap4.png?alt=media&#x26;token=33a94772-bcf7-4d9f-9c44-4c542764b4fc" alt=""><figcaption></figcaption></figure>
