We propose to open HRMP communication between Calamari and Karura. This will require a few actions from the governance bodies of both chains.
We propose to open a bi-directional channel between Karura and Calamari. The two primary use cases will be:
- To transfer Karura’s assets to Calamari so they can be privatized and transferred confidentially and anonymously.
- Calamari’s KMA token can be transferred to Karura to open new DEX pairs and integrate with Karura’s suite of DeFi products.
There is no on-chain proposal yet; #TBD.
The procedure for opening the channels is as follows:
- Calamari initializes a proposal to open Calamari to Karura HRMP channel via [Calamari Governance].
- Wait until the proposal on step 1 gets approved & enacted.
- Karura proposes to accept the Calamari to Karura HRMP channel and open a Karura to Calamari HRMP channel via [Karura Governance Batch call].
- Wait until the proposal on step 3 gets approved & enacted.
- Calamari proposes to accept the Karura to Calamari HRMP channel via [Calamari Governance].
- Wait until the proposal on step 6 gets approved & enacted.
- Wait for another session on Kusama for the change to be effective.
- Calamari proposes to register Karura’s assets via [Calamari Governance].
- Karura proposes to register Calamari’s asset via [Karura Governance].
- Wait until both proposals on step 9 & 10 are approved & enacted.
- XCM based crosschain transfer will be possible at this stage.
The extrinsics that need to be sent with xcm messages to they can be executed on the relay chain , are:
For step 1:
hrmp.hrmpInitOpenChannel(recipient: 2000, proposedMaxCapacity: 1000, proposedMaxMessageSize: 102400), which hex-encoded is
For step 3:
The first call is
hrmp.hrmpAcceptOpenChannel(sender: 2084), second call is
hrmp.hrmpInitOpenChannel(recipient: 2084, proposedMaxCapacity: 1000, proposedMaxMessageSize: 102400), so the final batch call hex-encoded is
For step 5:
hrmp.hrmpAcceptOpenChannel(sender: 2000), which hex-encoded is
proposedMaxMessageSize are set to the values of Kusama’s
configuration.activeConfig.hrmpChannelMaxMessageSize values, respectively.
These extrinsics need to be called with the parachain’s sovereign account as origin. To achieve this, on the Calamari side we will use polkadot-xcm pallet to send xcm message to the relaychain, by executing the following extrinsic from the parachain. Karura should make an open request call and an accept request call with its orml-xcm pallet.
As a prerequisite, the parachain’s sovereign account must contain at least 10 KSM to be locked as collateral (5 for each channel direction), plus some KSM to pay for xcm execution fees.