Hello Community
We would like to share upcoming integration and several motions that will be:
- Motion #1 on Centrifuge
- Motion #2 on Polkadot / Statemint
- Motion #3 on Centrifuge
Goal
We want to open hrmp channels with:
-
Statemint
- to support USDT XCM transfers, the first pools currency on Centrifuge -
Moonbeam
- to support Connectors v1 and Axelar USDC -
Acala
- to support aUSD XCM transfers
This articles describes all the steps and motions required to open hrmp channels with Statemint, Moonbeam, and Acala and register USDT, Axelar USDC, and aUSD on Centrifuge’s asset registry.
Pre-Requirements
We need to get enough DOT into the Centrifuge parachain account on the Polkadot relay chain. This DOT will be used to pay for fees and deposits associated with initiating and acccepting hrmp channel requests.
Process Overview
This visual illustrates the 3-step (minimum) process involved in opening hrmp channels between Centrifuge and another parachain bidirectionally.
We want to open channels with Statemint + Moonbeam + Acala, so we turn step 1 in the figure above into a batch call that will send an init
request to the three parachains individually.
-
Motion #1 on Centrifuge
This first motion will send hrmp channel invites from Centrifuge to Statemint, Moonbeam, and Acala. It will also register USDT, Axelar USDC, and aUSD on the Centrifuge asset registry. -
Motion #2 on Polkadot / Statemint
This motion will haveStatemint
accepting the requestCentrifuge -> Statemint
of motion #1 + init a request back, i.e,Statemint -> Centrifuge
Note: The same motion needs to take place on Moonbeam and on Acala, but that’s not in our power to submit. -
Motion #3 on Centrifuge
This third motion will serve to accept the hrmp channel requests that we will get back from Statemint when motion #2 is enacted and from Moonbeam and Acala once they accept the request we sent to them on step 1 and send us a request back.
NOTE: we most likely want a seperate motion to accept each of these requests, since motion #2 may take over 3 months to be enacted and we don’t want to wait that long to accept Moonbeam’s and Acala’s channels requests which may take, say, 7-14 days to be ready.
Motions Explained
→ Motion #1 @ Centrifuge
This motion will be sending the init requests for each parachain, that each respectivelly will then need to accept
and send init
request back.
Pre-image
The pre-image that we will submit on Centrifuge will be:
batch
- pallet_xcm.forceDefaultXcmVersion(2)
- pallet_xcm.send(<relay_encoded_call_opening_channels>)
- batch
- asset_registry::register(USDT)
- asset_registry::register(Axelar_USDC)
- asset_registry::register(aUSD)
where <relay_encoded_call_opening_channels>
is the encoded relay-chain call that will be executing the following on Polkadot:
batch
- hrmp.init(Statemint)
- hrmp.init(Moonbeam)
- hrmp.init(Acala)
NOTE : include hrmp.accept(Acala)
if they send an init beforehand`
↳ Follow-up steps
1.1 Submit motion #2 (see below)
1.2 Ask Moonbeam to accept our request and send a request back
1.3 Ask Acala to accept our request and send a request back
1.4. New batch motion accepting the requests from Statemint
, Moonbeam
, and Acala
(see motion #3 below)
→ Motion #2 @ Polkadot
Submit a motion on Polkadot to accept and init channels with Statemint.
The centrifuge motion #1 described above will send an init request for Centrifuge -> Statemint
; this step here should accept that request AND send a request back to open the inverse channel, Statemint -> Centrifuge
.
TL;DR : We will submit a motion on Polkadot requesting to have Statemint executing the calls to 1) accept our hrmp channel request Centrifuge -> Statemint
and 2) send a request for the inverse channel, Statemint -> Centrifuge
that we will then need to accept.
The pre-image is submitted on Polkadot (Relay) and it proposes to batch these two calls:
- force transfer enough DOT from the Polkadot Treasury to the Statemint parachain account on Polkadot. This DOT will be used to pay for fees and deposits involved in having Statemint accepting the hrmp init request from our parachain and to send init request back to our parachain.
- send an XCM message from Polkadot to Statemint requesting to
Transact
(i.e., execute) a call in Statemint sending an XCM back to Polkadot, as root, that batcheshrmp.init
+hrmp.accept
in Polkadot.
e.g : Open HRMP channel between Statemine and Kintsugi
→ Motion #3 @ Centrifuge
We can either batch this motion or submit three different motions, depending on the time that each parachain we are opening channels with. If Statemint takes 4 months to open channels but Moonbeam and Acala take 2 weeks, we should have a motion to accept Moonbeam’s and Acala’s requests first and a seperate one to accept Statemint later on.
Regardless, this motion should be:
batch
- pallet_xcm.send(<relay_encoded_call_accepting_channels>)
where <relay_encoded_call_opening_channels>
is the encoded relay-chain call that will be executing the following on Polkadot:
batch
- hrmp.accept(Statemint)
- hrmp.accept(Moonbeam)
- hrmp.accept(Acala)
Source: Centrifuge - Open hrmp channels to support USDT, Axelar USDC, aUSD - HackMD.
Thank you @nuno for sharing this information.
If you have any questions, feel free to ask them