Skip to content

Commit 7879792

Browse files
committed
fix: formatting for guide
1 parent 9d95b6a commit 7879792

File tree

2 files changed

+84
-66
lines changed

2 files changed

+84
-66
lines changed
Lines changed: 42 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
---
22
title: Asset claimer
3-
description: How the AssetClaimer hint improves trapped asset recovery in XCMv5.
3+
description: Learn how the AssetClaimer hint improves trapped asset recovery in XCM V5, enabling automated recovery and reducing the need for governance intervention.
44
---
55

6-
# Asset claimer
6+
# Asset Claimer (XCM V4 → XCM V5)
77

8-
XCMv5 introduces the `AssetClaimer` execution hint through `SetHints`, which significantly simplifies the process of recovering trapped assets when XCM execution fails.
8+
XCMv5 introduces the [`AssetClaimer`](https://paritytech.github.io/polkadot-sdk/master/staging_xcm/v5/enum.Hint.html#variant.AssetClaimer){target=\_blank} execution hint through [`SetHints`](https://paritytech.github.io/polkadot-sdk/master/staging_xcm/v5/enum.Instruction.html#variant.SetHints){target=\_blank}, which significantly simplifies the process of recovering trapped assets when XCM execution fails.
99

1010
## The problem before v5
1111

1212
When XCM execution failed and assets became trapped:
1313

14-
- **Governance dependency**: Most trapped asset recovery required governance proposals
15-
- **Complex procedures**: Manual intervention through referendum processes
16-
- **Long delays**: Recovery could take weeks or months through governance
17-
- **Risk of loss**: Assets could remain permanently trapped if governance didn't act
18-
- **High barriers**: Small amounts often weren't worth the governance overhead
14+
- **Governance dependency**: Most trapped asset recovery required governance proposals.
15+
- **Complex procedures**: Manual intervention through referendum processes.
16+
- **Long delays**: Recovery could take weeks or months through governance.
17+
- **Risk of loss**: Assets could remain permanently trapped if governance didn't act.
18+
- **High barriers**: Small amounts often weren't worth the governance overhead.
1919

20-
## The v5 solution: AssetClaimer hint
20+
## The V5 Solution: `AssetClaimer` Hint
2121

22-
The new `AssetClaimer` hint allows XCM programs to preemptively designate who can claim trapped assets:
22+
The new [`AssetClaimer`](https://paritytech.github.io/polkadot-sdk/master/staging_xcm/v5/enum.Hint.html#variant.AssetClaimer){target=\_blank} hint allows XCM programs to preemptively designate who can claim trapped assets:
2323

2424
```typescript
2525
// Set asset claimer before risky operations
@@ -28,9 +28,10 @@ XcmV5Instruction.SetHints({
2828
})
2929
```
3030

31-
## How it improves the situation
31+
## How it Improves the Situation
32+
33+
### Before XCM V5
3234

33-
### Before XCMv5
3435
```typescript
3536
// If this XCM fails, assets become trapped
3637
const riskyXcm = [
@@ -43,7 +44,8 @@ const riskyXcm = [
4344
// Recovery required governance intervention
4445
```
4546

46-
### With XCMv5
47+
### With XCM V5
48+
4749
```typescript
4850
// Proactive asset claimer setup
4951
const saferXcm = [
@@ -60,34 +62,40 @@ const saferXcm = [
6062
// Recovery can be done immediately by the claimer
6163
```
6264

63-
## Key improvements
65+
## Key Improvements
66+
67+
### Immediate Recovery
68+
69+
- **Before**: Wait for governance process (weeks/months).
70+
- **After**: Designated claimer can act immediately.
71+
72+
### Reduced Governance Burden
6473

65-
### 1. Immediate recovery
66-
- **Before**: Wait for governance process (weeks/months)
67-
- **After**: Designated claimer can act immediately
74+
- **Before**: Every trapped asset required a governance proposal.
75+
- **After**: Only complex cases need governance intervention.
6876

69-
### 2. Reduced governance burden
70-
- **Before**: Every trapped asset required a governance proposal
71-
- **After**: Only complex cases need governance intervention
77+
### Predictable Recovery
7278

73-
### 3. Predictable recovery
7479
- **Before**: Uncertain if governance would approve recovery
7580
- **After**: Predetermined claimer provides certainty
7681

77-
### 4. Lower barriers
78-
- **Before**: Small amounts often not worth governance overhead
79-
- **After**: Any amount can be efficiently recovered
82+
### Lower Barriers
8083

81-
## Best practices
84+
- **Before**: Small amounts often not worth governance overhead.
85+
- **After**: Any amount can be efficiently recovered.
86+
87+
## Best Practices
88+
89+
### Set Hint Early
8290

83-
### 1. Set hint early
8491
```typescript
8592
// Set claimer hint before any risky operations
8693
XcmV5Instruction.SetHints({ hints: [Enum('AssetClaimer', claimerLocation)] }),
8794
// ... other instructions that might fail
8895
```
8996

90-
### 2. Use for cross-chain transfers
97+
### Use for Cross-Chain Transfers
98+
9199
Particularly useful for setting local accounts on destination chains:
92100

93101
```typescript
@@ -103,16 +111,17 @@ const remoteXcm = [
103111
]
104112
```
105113

106-
### 3. Consider origin preservation
114+
### Consider Origin Preservation
115+
107116
When origin preservation is available, trapped assets are automatically associated with the original origin, making claiming easier without additional hints.
108117

109-
## Migration impact
118+
## Migration Impact
110119

111120
This change makes XCM programs more resilient and user-friendly:
112121

113-
- **Reduced risk**: Assets are less likely to be permanently lost
114-
- **Better UX**: Users can recover their own assets without waiting for governance
115-
- **Increased adoption**: Lower risk encourages more XCM usage
116-
- **Operational efficiency**: Reduces governance workload for routine recoveries
122+
- **Reduced risk**: Assets are less likely to be permanently lost.
123+
- **Better UX**: Users can recover their own assets without waiting for governance.
124+
- **Increased adoption**: Lower risk encourages more XCM usage.
125+
- **Operational efficiency**: Reduces governance workload for routine recoveries.
117126

118127
The `AssetClaimer` hint represents a significant improvement in XCM's fault tolerance and user experience, making cross-chain operations safer and more predictable.

llms.txt

Lines changed: 42 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1790,26 +1790,26 @@ Doc-Content: https://docs.polkadot.com/develop/interoperability/versions/v5/asse
17901790
--- BEGIN CONTENT ---
17911791
---
17921792
title: Asset claimer
1793-
description: How the AssetClaimer hint improves trapped asset recovery in XCMv5.
1793+
description: Learn how the AssetClaimer hint improves trapped asset recovery in XCM V5, enabling automated recovery and reducing the need for governance intervention.
17941794
---
17951795

1796-
# Asset claimer
1796+
# Asset Claimer (XCM V4 → XCM V5)
17971797

1798-
XCMv5 introduces the `AssetClaimer` execution hint through `SetHints`, which significantly simplifies the process of recovering trapped assets when XCM execution fails.
1798+
XCMv5 introduces the [`AssetClaimer`](https://paritytech.github.io/polkadot-sdk/master/staging_xcm/v5/enum.Hint.html#variant.AssetClaimer){target=\_blank} execution hint through [`SetHints`](https://paritytech.github.io/polkadot-sdk/master/staging_xcm/v5/enum.Instruction.html#variant.SetHints){target=\_blank}, which significantly simplifies the process of recovering trapped assets when XCM execution fails.
17991799

18001800
## The problem before v5
18011801

18021802
When XCM execution failed and assets became trapped:
18031803

1804-
- **Governance dependency**: Most trapped asset recovery required governance proposals
1805-
- **Complex procedures**: Manual intervention through referendum processes
1806-
- **Long delays**: Recovery could take weeks or months through governance
1807-
- **Risk of loss**: Assets could remain permanently trapped if governance didn't act
1808-
- **High barriers**: Small amounts often weren't worth the governance overhead
1804+
- **Governance dependency**: Most trapped asset recovery required governance proposals.
1805+
- **Complex procedures**: Manual intervention through referendum processes.
1806+
- **Long delays**: Recovery could take weeks or months through governance.
1807+
- **Risk of loss**: Assets could remain permanently trapped if governance didn't act.
1808+
- **High barriers**: Small amounts often weren't worth the governance overhead.
18091809

1810-
## The v5 solution: AssetClaimer hint
1810+
## The V5 Solution: `AssetClaimer` Hint
18111811

1812-
The new `AssetClaimer` hint allows XCM programs to preemptively designate who can claim trapped assets:
1812+
The new [`AssetClaimer`](https://paritytech.github.io/polkadot-sdk/master/staging_xcm/v5/enum.Hint.html#variant.AssetClaimer){target=\_blank} hint allows XCM programs to preemptively designate who can claim trapped assets:
18131813

18141814
```typescript
18151815
// Set asset claimer before risky operations
@@ -1818,9 +1818,10 @@ XcmV5Instruction.SetHints({
18181818
})
18191819
```
18201820

1821-
## How it improves the situation
1821+
## How it Improves the Situation
1822+
1823+
### Before XCM V5
18221824

1823-
### Before XCMv5
18241825
```typescript
18251826
// If this XCM fails, assets become trapped
18261827
const riskyXcm = [
@@ -1833,7 +1834,8 @@ const riskyXcm = [
18331834
// Recovery required governance intervention
18341835
```
18351836

1836-
### With XCMv5
1837+
### With XCM V5
1838+
18371839
```typescript
18381840
// Proactive asset claimer setup
18391841
const saferXcm = [
@@ -1850,34 +1852,40 @@ const saferXcm = [
18501852
// Recovery can be done immediately by the claimer
18511853
```
18521854

1853-
## Key improvements
1855+
## Key Improvements
1856+
1857+
### Immediate Recovery
1858+
1859+
- **Before**: Wait for governance process (weeks/months).
1860+
- **After**: Designated claimer can act immediately.
1861+
1862+
### Reduced Governance Burden
18541863

1855-
### 1. Immediate recovery
1856-
- **Before**: Wait for governance process (weeks/months)
1857-
- **After**: Designated claimer can act immediately
1864+
- **Before**: Every trapped asset required a governance proposal.
1865+
- **After**: Only complex cases need governance intervention.
18581866

1859-
### 2. Reduced governance burden
1860-
- **Before**: Every trapped asset required a governance proposal
1861-
- **After**: Only complex cases need governance intervention
1867+
### Predictable Recovery
18621868

1863-
### 3. Predictable recovery
18641869
- **Before**: Uncertain if governance would approve recovery
18651870
- **After**: Predetermined claimer provides certainty
18661871

1867-
### 4. Lower barriers
1868-
- **Before**: Small amounts often not worth governance overhead
1869-
- **After**: Any amount can be efficiently recovered
1872+
### Lower Barriers
18701873

1871-
## Best practices
1874+
- **Before**: Small amounts often not worth governance overhead.
1875+
- **After**: Any amount can be efficiently recovered.
1876+
1877+
## Best Practices
1878+
1879+
### Set Hint Early
18721880

1873-
### 1. Set hint early
18741881
```typescript
18751882
// Set claimer hint before any risky operations
18761883
XcmV5Instruction.SetHints({ hints: [Enum('AssetClaimer', claimerLocation)] }),
18771884
// ... other instructions that might fail
18781885
```
18791886

1880-
### 2. Use for cross-chain transfers
1887+
### Use for Cross-Chain Transfers
1888+
18811889
Particularly useful for setting local accounts on destination chains:
18821890

18831891
```typescript
@@ -1893,17 +1901,18 @@ const remoteXcm = [
18931901
]
18941902
```
18951903

1896-
### 3. Consider origin preservation
1904+
### Consider Origin Preservation
1905+
18971906
When origin preservation is available, trapped assets are automatically associated with the original origin, making claiming easier without additional hints.
18981907

1899-
## Migration impact
1908+
## Migration Impact
19001909

19011910
This change makes XCM programs more resilient and user-friendly:
19021911

1903-
- **Reduced risk**: Assets are less likely to be permanently lost
1904-
- **Better UX**: Users can recover their own assets without waiting for governance
1905-
- **Increased adoption**: Lower risk encourages more XCM usage
1906-
- **Operational efficiency**: Reduces governance workload for routine recoveries
1912+
- **Reduced risk**: Assets are less likely to be permanently lost.
1913+
- **Better UX**: Users can recover their own assets without waiting for governance.
1914+
- **Increased adoption**: Lower risk encourages more XCM usage.
1915+
- **Operational efficiency**: Reduces governance workload for routine recoveries.
19071916

19081917
The `AssetClaimer` hint represents a significant improvement in XCM's fault tolerance and user experience, making cross-chain operations safer and more predictable.
19091918
--- END CONTENT ---

0 commit comments

Comments
 (0)