RFC: Open HRMP channels between Centrifuge and HydraDX

Proposal type: CP-4
Author: jgreen (Integrations@HydraDX)
Technical/non-technical proposal: Technical proposal
Date proposed: 2023-02-02

Short Summary

We propose to open HRMP communication between Centrifuge and HydraDX with subsequent intent to list CFG into the Omnipool.

Background

HydraDX is a next-gen DeFi protocol which is designed to bring an ocean of liquidity to Polkadot. Our tool for the job the HydraDX Omnipool - an innovative Automated Market Maker (AMM) which unlocks unparalleled efficiencies by combining all assets in a single trading pool.

Detailed Description

The procedure for opening the channels is as follows:

  1. HydraDX proposes to open the HydraDX to Centrifuge HRMP channel.
  2. Centrifuge proposes (a batch) to accept the HydraDX to Centrifuge HRMP channel and open the Centrifuge to HydraDX HRMP channel
  3. Wait until the proposal on step 2 gets approved & enacted.
  4. HydraDX accepts the Centrifuge to HydraDX HRMP channel
  5. Wait for another session on Polkadot for the change to be effective.

These extrinsics need to be called with the parachain’s sovereign account as the origin. To achieve this, on the HydraDX side we will use polkadot-xcm pallet to send XCM message to the relay chain, by executing the following extrinsic from the parachain. Centrifuge should make an open request call and an accept request call with its pallet.

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.

Change or Improvement

Opening HRMP channels which allow cross-chain communication, as per Introduction to Cross-Consensus Message Format (XCM) · Polkadot Wiki

Alignment to the Mission of the Centrifuge DAO

Cross-chain communication and cooperation is one of the core principles of Polkadot. Both sides, the Centrifuge DAO and HydraDX DAO, will benefit from moving this proposal forward. With growing liquidity and number of listed assets in the HydraDX Omnipool, everyone will be able to gain access to a decentralized, permissionless and frictionless way to trade (or accrue value of) CFG with high capital efficiency and low slippage.

Benefits for CFG holders

Users will be able to trade native CFG within the dotsama ecosystem, no need to use CEXs or bridge to Ethereum anymore.

Omnipool will allow:

  • Trading CFG vs. any other asset in the Omnipool (currently HDX, DOT, DAI, wETH, wBTC + planned native USDT and USDC)
  • Single-sided LPing

In short-term horizon:

  • DCA (dollar-cost averaging)
  • Liquidity-mining
  • Dynamic fees

In mid-term horizon:

  • Stableswap pools
  • Order batching

Note: non-native dotsama assets are bridged to the Omnipool through Wormhole

Docs and detailed information:

7 Likes

Good day jgreen and welcome to the Centrifuge forum
Happy to see a new proposal for opening a new HRMP channel. I would like to ask you just some questions:

  • This proposal is only for opening the HRMP channel right?

  • How HydraDX would like to bring liquidity into the pool at the beginning?

Yes, this is only a proposal to open the HRMP channels to streamline the process as it can take a while until the governance actions on both chains are finalized.

As the next step, a new RFC proposal would be opened to add CFG to the Omnipool. As you correctly pointed out, a certain amount of initial liquidity is needed for that. There are several ways where it could be sourced from, e.g. one of those would be the CFG treasury - this is exactly the place where you can leverage XCM to do it trustlessly via governance. But these options would be laid out in detail in the subsequent proposal.

1 Like

Great. Thank you for your answer.
Just would like to mention that actually Centrifuge Treasury is not funded yet. So the process could be delayed a little bit.
In any case, opening an HRMP channel is the first step.

1 Like

Hey @jgreen, thanks for posting this here!

I’m the PXCME (Principal XCM Engineer) at Centrifuge - just totally made that up but sounds giga cool.

I will let @lucasvo and @jeroen comment on the strategic pov of this proposal but as for the HRMP channels, it would be awesome to open the channels and test the transfer on a testnet such as Rococo.

Let me know what’s the best way forward for you guys and thanks again :pray:

4 Likes

Chad job title! Chief Integrations Analyst here :rotating_light:

I opened hrmp request on Rococo, once you reciprocate, I will list CFG to our testenv Omnipool so you are able to test our UI as well.

3 Likes

Thanks for sending the first request!

The referendum to accept + init open back to you is up. Referendum #22 (Polkadot/Substrate Portal), which should be enacted in ~3 hours.

Stay tuned!

Hey @jpgreen!

Your request is accepted and our request is now awaiting your confirmation :surfing_man:

Can you please share what icon we should use for CFG (ideally 48x48 svg) and its multilocation?

CFG Metadata

Symbol: CFG
Decimals: 18
MultiLocation: V2 { parents: 1, X2 (Parachain: 2031, GeneralKey: 0x0001) }
CFG Token Logo - 48x48 Svg - Download here

Welcome to the Omnipool on the Rococo testnet! Try it out and let us know if all goes swimmingly :ocean:

To get some test tokens, you can use a faucet on the HydraDX discord or send your CFG cross-chain (but we have UI for that only on mainnet atm, so you would need to use PolkadotJS Apps).

@jgreen I just tested transferring CFG from Catalyst (Centrifuge on Rococo) to HydraDX and it worked :white_check_mark:

Do you have any specific tests you want to run on your end with CFG before we jump on opening channels on Polkadot?

1 Like

On our side all good to proceed with channel opening on the mainnet.

3 Likes

Awesome! Would you like to send the first request?

Great to follow the progress of this proposal! The next steps to continue from here would be to submit this proposal to the Centrifuge Proposal Repository on GitHub and create an OpenSquare Snapshot, before proceeding to an on-chain proposal. @ImdioR or I can assist with the submission to GitHub and the OpenSquare Snapshot if needed.

There are already a lot of governance events going on this week, so I would recommend to wait until next week with moving forward with this in order to not ask our community to vote in too many proposal at the same time.

Would that work @jgreen and @nuno?

1 Like

Yeah we aim to request channel opening in a ~week so that would fit the proposed schedule nicely.

2 Likes

Just FYI, after the OpenSquare Snapshot has been created it has to run for minimum 7 days before an on-chain proposal can be made. This is to ensure that there is backing from the community to proceed with this proposal and give the CFG token holders enough time to vote on it.

So maybe it could be submitted to GitHub early/mid next week? And then the OpenSquare Snapshot can be created right after.

2 Likes

The channel request HDX->CFG was open.

2 Likes

Good day Jgreen

Great news!
The next step:

  • uploading of a proposal on GitHub
  • Creation of OpenSquare Snapshot
    If passes → On-chain voting (Centrifuge).

Let me know if you need any help or you can submit your proposal on Github ( https://github.com/centrifuge/cps/tree/main/cps ) by yourself.

1 Like

Good evening @jgreen
That will work for you?