Open HRMP channel between Karura and Statemine

2yrs ago
12 Comments

NOTE: This is crossposted at Karura Governance Forum

On behalf of Karura community and Acala Foundation, I would like to propose opening bidirectional HRMP channel between Karura and Statemine. This will enable crosschain communication between Karura and Statemine to enable various use cases including crosschain token transfer.

Use cases

It is currently possible to mint tokens on Statemine however the decentralized use cases are very limited on Statemine. By allowing crosschain transfer assets to Karura, this can enable many more use cases for assets created on Statemine.

Listing assets on Karura Swap

One of the most common use cases of tokens is trading. Currently the only way to trade assets on Statemine is via centralized exchanges. With HRMP channel open, it will be possible to transfer assets from Statemine to Karura and listed on Karura Swap. This will allow people to trade assets with a decentralized exchange. It will be possible to create stablecoin based trading pair with kUSD or KSM based trading pair or any other trading pairs if community desires.

Note: Additional referendum is required on Karura parachain to enable listing of a trading pair.

Use assets as collateral to issue kUSD

For high quality assets with healthy trading volume, they could be added as collateral to back kUSD, the stablecoin of Kusama ecosystem. This will allow asset owners to issue kUSD by using their asset as collateral and kUSD can be used to participate other DeFi activities including swap tokens on Karura Swap.

Note: Additional risk analysis from Karura Financial Council is required to enable assets to be used as collateral to issue kUSD.

Integrate with smart contracts deployed within Karura EVM+

All the assets on Karura are exposed to Karura EVM+ as ERC20 including crosschain transferred assets. This means it will be possible to use smart contract to interact assets minted on Statemine after they are crosschain transferred into Karura. The possibilities are limitless.

Note: Karura EVM+ is not yet deployed.

Techanical Details

The proposed channel parameters:

  • Proposed max capacity: 1000
  • Proposed max message size: 102400

The parameters are chosen to be the maximum acceptable value of Kusama configuration.

Proposal

There are multiple ways we can establish the channel and we are presenting two options here. Please provide feedback on which option is preferred.

Option 1: Create bidirectional channel.

A bidirectional channel will allow both Karura and Statemine to send XCM messages to each other. This means it enables token transfer from Statemine to Karura and transfer back. Note that the assets of Karura cannot be transferred to Statemine because Statemine does not support foreign assets.

In order to create a bidirectional channel, both Karura and Statemine will need to make an open request and accept the open request from the other chain.

The governance body of Statemine is Kusama so the proposal will be made on Kusama. In order to reduce the number of actions required by Kusama governance, the open & accept channel proposal can be batched if Karura is making the open request first.

Three proposals will be required. Two from Karura and one from Kusama.

  • Proposal 1: Karura open HRMP channel request to Statemine
  • Proposal 2: Kusama instruct Statemine to accept open HRMP channel request from Karura and make open HRMP channel request to Karura
  • Proposal 3: Karura accept open HRMP channel from Statemine

Option 2: Only create Statemine -> Karura unidirectional channel.

Due to this issue, it is not yet possile to reserve transfer assets back to Statemine. Therefore maybe it is a good idea to open Statemine -> Karura unidirectional channel first.

Then after the crosschain transfer issue is resolved (which requires runtime upgrade of Statemine), we could have another followup proposal to create Karura -> Statemine HRMP channel. This ensures it is not possible for anyone to trigger unsupported crosschain transfer, which will result lost of fund.

With the Statemine -> Karura unidirectional channel, assets from Statemine will be able to transfer to Karura and participate all the DeFi protocols of Karura. Assets will not be able to transfer back to Statemine until the other channel is created. But there are no additional functionality exists on Statemine, so I do not expect there will be a big demand of transfer assets back to Statemine.

Reference

Up
Comments
No comments here