[Referendum: 77] Open/Accept HRMP channel to/from Equilibrium and Register EQ, EQD Assets

TL:DR

This batched proposal is to Accept/Open an HRMP channel with Equilibrium and to register the EQ/EQD tokens.

Summary

We propose to open a bi-directional channel between Moonbeam and Equilibrium. Initially, the main use case will be to transfer GLMR and EQ/EQD between the two chains, but it can be further expanded to other use cases. The proposal also includes the EQ/EQD assets registration as xcEQ/xcEQD, with the following details:
EQ:

  • Multilocation: { “parents”: 1, “interior”: { “X1”: { “Parachain”: 2011 }}}
  • Decimals: 9
  • Name: Equilibrium Token
  • Symbol: xcEQ
    EQD:
  • Multilocation: { “parents”: 1, “interior”: { “X2”: [{ “Parachain”: 2011 }, {“GeneralKey”: “0x657164”}]}}
  • Decimals: 9
  • Name: Equilibrium Dollar
  • Symbol: xcEQD

xcEQ will have the following asset ID and XC-20 address:

  • Asset ID: 190590555344745888270686124937537713878
  • XC-20 address: 0xffffffff8f6267e040d8a0638c576dfba4f0f6d6

xcEQD will have the following asset ID and XC-20 address:

  • Asset ID: 187224307232923873519830480073807488153
  • XC-20 address: 0xffffffff8cda1707baf23834d211b08726b1e499

Proposal

Proposal #15 with the following hash: 0xdbe1b2df0678af70aad726950a780ddeff4bbf4b6de71a397b3d7338eb1b03f2

Technical details:

The procedure for opening the channels is as follows:

  • Equilibrium: already proposed to open an HRMP channel to Moonbeam
  • Moonbeam: democracy batched proposal:
    • Open Moonbeam to Equilibrium HRMP channel
    • Accept Equilibrium to Moonbeam HRMP channel
    • Register EQ/EQD asset as an XC-20s
  • Equilibrium: democracy proposal to accept Moonbeam to Equilibrium 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: 2011) , which hex-encoded call data is 0x3c01db070000
  • To open the HRMP channel from Moonbeam: hrmp.hrmpInitOpenChannel(recipient: 2011, proposedMaxCapacity: 1000, proposedMaxMessageSize: 102400), which its hex-encoded call data is 0x3c00db070000e803000000900100

The *proposedMaxCapacity *and *proposedMaxMessageSize *are set to the values of Polkadot’s 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 EQ value on December 13th 2022 (from their oracle pallet), targeting a XCM transaction cost of 0.02$.

If you are interested, the hex-encoded call data for this proposal in Moonbeam is:

0x1e0210670001010002100004000000000700e40b540213000000000700e40b5402010700f2052a01060002286bee183c01db0700000d0100040001010070617261d4070000000000000000000000000000000000000000000000000000670001010002100004000000000700e40b540213000000000700e40b5402010700f2052a01060002286bee383c00db070000e8030000009001000d0100040001010070617261d40700000000000000000000000000000000000000000000000000001e020c6900000101006d1f44457175696c69627269756d20546f6b656e1078634551090001000000000000000000000000000000016901000101006d1f1fbc228cc102000000000000000000001500000000050411011da53b775b270400e7e61ed5cbc5a146ea70f53d5a3306ce02aaf97049cf181a304050df5a076ac5ef941989e1a3859fffffffff8f6267e040d8a0638c576dfba4f0f6d6181460006000fd1e02086900000102006d1f060c65716448457175696c69627269756d20446f6c6c61721478634551440900010000000000000000000000000000000100050411011da53b775b270400e7e61ed5cbc5a146ea70f53d5a3306ce02aaf97049cf181a1ee4f45cc5c7dcdcba0d1ebdcd18fc8fffffffff8cda1707baf23834d211b08726b1e499181460006000fd

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.

4 Likes