TL:DR
This batched proposal is to Accept/Open an HRMP channel with HydraDX and Register Asset xcHDX
Summary
We propose to open a bi-directional channel between Moonbeam and HydraDX. Initially, the main use case will be to transfer GLMR between the two chains, but it can be further expanded to other use cases. The proposal also includes the HDX asset registration as xcHDX, with the following details:
- Multilocation: { parents: 1, interior: { X2: [ {Parachain: 2034}, {GeneralIndex: 0 } ] }}
- Decimals: 12
- Name: HydraDX
- Symbol: xcHDX
xcHDX will have the following asset ID and XC-20 address:
- Asset ID: 69606720909260275826784788104880799692
- XC-20 address: 0xffffffff345dc44ddae98df024eb494321e73fcc
On-Chain Proposal Reference
On-Chain Referendum 98 with the associated hash: 0x8847b851b0931b1c99b315875b61d4665562049d0771288ca59267dd38890a52
Technical details:
The procedure for opening the channels is as follows:
- HydraDX: already proposed to open an HRMP channel to Moonbeam
- Moonbeam: democracy batched proposal:
- Accept HRMP channel from HydraDX to Moonbeam
- Open Moonbeam to HydraDX HRMP channel
- Register HDX asset as an XC-20
- HydraDX: democracy proposal to accept Moonbeam to HydraDX HRMP channel
Once the HRMP channels are ready, XCM based cross-chain transfer will be possible. The extrinsics that need to be executed on the relay chain, are:
- To accept the HRMP channel to Moonbeam: hrmp.hrmpAcceptOpenChannel(sender: 2034) , which hex-encoded call data is 0x3c01f2070000
- To open the HRMP channel from Moonbeam: hrmp.hrmpInitOpenChannel(recipient: 2034), proposedMaxCapacity: 1000, proposedMaxMessageSize: 102400), which its hex-encoded call data is 0x3c00f2070000e803000000900100
The *proposedMaxCapacity *and proposedMaxMessageSize are set to the values of Polkadot configuration.activeConfig.hrmpChannelMaxCapacity and configuration.activeConfig.hrmpChannelMaxMessageSize values, respectively.
These extrinsics need to be called from the parachain’s sovereign account as origin, via a democracy proposal. The proposal will use polkadotXcm pallet to send XCM message to the Relay Chain with the following items:
- Withdraw asset: take funds out of the Sovereign Account of the origin parachain (in the relay chain) to a holding state
- Buy execution: buys execution time from the relay chain, to execute the XCM message
- Transact: provides the call data to be executed
- Deposit asset (optional): refunds the leftover funds after the execution. If this is not provided, no refunds will be carried out
The asset will be registered with the metadata described in the summary. The setAssetUnitsPerSecond was calculated using the value for HDX value on 2023-04-18, targeting a XCM transaction cost of 0.02$.
If you are interested, the hex-encoded call data for this proposal on Moonbeam is:
0x1e020c670003010003100004000000000700e40b540213000000000700e40b540200060002286bee02000400183c01f20700000d0102040001010070617261d4070000000000000000000000000000000000000000000000000000670003010003100004000000000700e40b540213000000000700e40b540200060002286bee02000400383c00f2070000e8030000009001000d0102040001010070617261d40700000000000000000000000000000000000000000000000000001e0208690000010200c91f05001c487964726144581478634844580c000100000000000000000000000000000001690100010200c91f0500d4d6c05a887d0300000000000000000016000000
As a prerequisite, the parachain’s sovereign account must contain at least 20 DOT to be locked as collateral (10 for each channel direction), plus some DOT to pay for XCM execution fees.