[Proposal: 12] Proposal to list GLMR on the HydraDX Omnipool

Proposal to list GLMR on the HydraDX Omnipool

[Status: Idea]

Requested Amount: 500,000 GLMR (~$110k at time of writing)
Note: These funds will remain in control of Moonbeam governance.

Abstract
We propose to use GLMR from Moonbeam treasury and provide it cross-chain into the HydraDX Omnipool as an LP position controlled by the Moonbeam governance. The intent is to seed initial liquidity and start trading GLMR in the HydraDX Omnipool natively and efficiently within the Polkadot ecosystem.
image

Motivation

Users will be able to trade native GLMR within the dotsama ecosystem.

Omnipool will allow:

  • Trading GLMR vs. any other asset in the Omnipool (currently HDX, DOT, DAI, ZTG, wETH, iBTC, wBTC, native USDT, ASTR + a lot more in the pipeline)
  • Single-sided LPing
  • OTC trading
  • Cross-chain transfers
  • Liquidity-mining

In a very short-term horizon (expected June 2023):

  • DCA (dollar-cost averaging) - allowing your supporters to gradually accumulate GLMR during the bear market
  • Dynamic fees - improving potential profitability of your position in the Omnipool

In mid-term horizon:

  • Stableswap pools
  • Order batching
  • Staking

Project Overview and Team Experience
HydraDX is a next-gen DeFi protocol founded in 2020 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.

Video content:
Kusamarian - HydraDX overall
Kusamarian - HydraDX usage & efficiency

Rationale
Cross-chain communication and cooperation is one of the core principles of Polkadot. Both sides, the Moonbeam 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) GLMR with high capital efficiency and low slippage.

Key Terms
GLMR will be provided as an LP position into the Omnipool - trustlessly and without losing control of the funds. The GLMR position can be withdrawn at any time by the Moonbeam governance and GLMR sent back to its treasury. All made possible by XCM.
Important fact to realize is that this model is superior to alternatives, where teams have to spend capital to be listed on CEXes or aquire the other half of the pair for seeding common fragmented XYK pools on other DEXes.

Overall Cost
There is no direct cost for the treasury. The LP position if withdrawn can end up in a profit or loss which depends mostly on accrued trading fees and Impermanent Loss in Omnipool suffered during LPing.

Use of Treasury Funds

  1. Moonbeam governance approves & executes a proposal to send 500,000 GLMR via XCM to the [HydraDX Omnipool account] (7L53bUTBbfuj14UpdCNPwmgzzHSsrsTWBHX5pys32mVWM3C1, a system account with no private key)
  2. HydraDX governance launches a council motion which is fast-tracked and enacted in 3-4 hours
  3. After step 2 is complete, GLMR becomes tradeable within the Omnipool. Sender (i.e. Moonbeam sibling account 7LCt6dFmtiRrwZv2YyEgQWW3GxsGX3Krmgzv9Xj7GQ9tG2j8), is set as the LP position holder so the position can be controlled via XCM Transact calls.
4 Likes

Always in favor of the treasury earning revenue.

1 Like

hey, @jgreen. Thank you for submitting your proposal.

based on my observations, the current Moonbeam treasury holds approximately 5.06M GLMR, as can be seen here: Moonbeam Treasury. It appears that your request amounts to around ~10% of the total treasury funds. In my opinion, considering the current circumstances, this may not be the most suitable allocation of funds.

furthermore, I noticed that two members of the Moonbeam treasury Council also serve on the HydraDX Council, as shown here: HydraDX Council. this situation might create a perception of bias from an external perspective.

considering these factors, I believe it would be more appropriate to submit a Community Committee Grants application instead of relying solely on the treasury funds. you can find more detailed information about the Community Committee Grants program at the following link: Moonbeam Community Committee Grants

Hi @turrizt,

Thank you for the feedback. This dosn’t really sound suitable for the grants programme, as this is not a grant request. It is a trustless allocation of otherwise idle treasury funds that can actually serve a purpose and provide a lot of utility and use cases for GLMR holders. These funds can be withdrawn at any point in time, e.g. if the treasury is running low.
Also to your point about treasury council, i don’t think it is applicable here. This proposal will be proposed and decided as a public referendum, councilmen have the same rights as anyone else there.

IMO, this proposal appears to be better suited for Moonbeam Community Committee Grants, although this assessment reflects only my perspective. you can explore the structure of the Moonbeam Treasury Process by visiting the following link - (Treasury Program Approved by Community | Moonbeam Foundation)

as per the guidelines, after the proposal author completes the administrative review to ensure fund feasibility, any Treasury Council member has the authority to motion for a vote on accepting the Moonbeam Treasury Proposal (MBTP). It’s essential to emphasize that the ultimate decision lies with the Treasury Council members themselves.

the voting period extends over three days, during which the Treasury Council carefully evaluates and casts their votes on the reviewed submission. at the end of this process, the Moonbeam Treasury Proposal will be finalized and determined as either accepted or rejected :slight_smile:

Will look into it, cheers! Curious generally also to see if the community would value this proposition and thinks about the best path forward.

1 Like

If this proposal ends up moving forward (either via Treasury or Grants) it would be ideal to test operating in the Omnipool via XCM in Moonbase Alpha.

I can confirm Moobeam’s Sovereign Account address is 7LCt6dFmtiRrwZv2YyEgQWW3GxsGX3Krmgzv9Xj7GQ9tG2j8 in HydraDX.

What I don’t understand is that if we send the funds to HydraDX Omnipool account directly via XCM, how does the Omnipool knows that the funds belong to Moonbeam? Through the Council Motion? There should be a way to send the GLMRs to Moonbeam’s Sovereign Account and then through Remote Transact add the LP position right?

1 Like

Yes, initially to start trading GLMR, there needs to be the fast-tracked referendum which also assigns the LP position to the sovereign account. Subsequently any add or remove liquidity can be done via transact calls from Moonbeam.

But, let’s say, I send GLMR to HydraDX and we set trading GLMR with 1 GLMR and then we can just use XCM and Democracy via remote Transact to add the LP position?

That way, the GLMRs are always controlled by the Sovereign

Start trading with 1 GLMR would be a very sub par experience for everyone. Besides there needs to be initial price set within the addToken referendum so you would lose the difference to arbitrageur if you LPed some time after that and price diverged. Imo it is not a concern as the Omnipool account funds can be controlled only by the HydraDX governance.

1 Like

Thanks for putting together this treasury proposal. There are several aspects to this proposal which make it a rather unique treasury proposal so please pardon the delay in response.

Your proposal is being reviewed by the Treasury Council and I expect there will be additional questions posted here soon.

3 Likes

@AlbertoV19 you know how we can test the steps to perfom the LP action via xcm?

@jose.crypto - Yes it should be possible.

If @jgreen provides the encoded call data of the actions to be done in the HydraDX side I can find some time to test this.

The following call will be executed on HydraDX:
0x3b011000000044b3c98aba2bd700000000000000000050c300007369626cd4070000000000000000000000000000000000000000000000000000
This will start GLMR trading with all GLMR in the Omnipool account at time of the call execution. The LP position is attributed to the Parachain 2004 sibling account.

Note that initialPrice parameter might slightly differ to reflect the actual market prices.

1 Like

@AlbertoV19 can check pls

Really excited to follow along :eyes:

3 Likes

you can see the decoded call here

1 Like

Hey I will get it to it hopefully before the end of this week :slight_smile:

2 Likes

Please use this updated proposal for testing:
0x3b0110000000fe985c2a02000000000000000000000050c300007369626cd4070000000000000000000000000000000000000000000000000000

For reference, you can verify that the Omnipool address is correct here: Subscan - Omnipool account

3 Likes

Hey so it took me a while to figure everything out. Thanks @jgreen for the help. Posting here the entire testing summary.

Summary

The following represents the steps taken to test a proposal to move funds from the Treasury to HydraDX’s Omnipool. At a high level these were the different steps taken:

  • First, we moved funds from the Treasury address to the Omnipool address in HydraDX. This is done via the Root Track in Moonbeam (soon to be launched)
  • Next, I emulated a proposal in HydraDX to start a position and assigned it to Moonbeam’s Sovereign Account in HydraDX
  • Next, I submitted an on-chain proposal on Root Track Moonbeam to remove 10 GLMR of liquidity from the Omnipool position that the Moonbeam Sovereign account owns
  • Next, I created an XCM message that gets executed in HydraDX that sends the remaining of the 10 GLMR tokens back to the Treasury account on Moonbeam. This needs to be done as a Root Track proposal in Moonbeam

Note the following:

  • Root track must be used on Moonbeam to transact through Moonbeam Sovereign Account in HydraDX. This requires a hefty 2M GLMR decision deposit and requires at least 0.5% support by day 14 of voting
  • The funds are sent to the Omnipool address, therefore they are no longer in control of Moonbeam. Here, we trust HydraDX to open the position in behalf of Moonbeam Sovereign Account
  • As a security feature, there are some rate limit parameters to remove liquidity from the Omnipool, so you can’t really exit your position all at once

Moonbeam Treasury Address: 0x6d6f646C70792f74727372790000000000000000

HydraDX Omnipool Address: 7L53bUTBbfuj14UpdCNPwmgzzHSsrsTWBHX5pys32mVWM3C1

Moonbeam Sovereign Account in Hydra: 7LCt6dFmtiRrwZv2YyEgQWW3GxsGX3Krmgzv9Xj7GQ9tG2j8

Tranfser 100 GLMR to Moonbeam Sovereign Account in Hydra:
0x6a0000000010632d5ec76b050000000000000003010200c91f01007369626cd407000000000000000000000000000000000000000000000000000000

Send Tokens from Moonbeam Treasury to HydraDX Omnipool Address

Utility.dispatchAs Extrinsic
0x1e0300016d6f646c70792f747273727900000000000000006a0000000080d07666e70de16900000000000003010200c91f01006d6f646c6f6d6e69706f6f6c000000000000000000000000000000000000000000

preimages.notePreimage
0x3e0051011e0300016d6f646c70792f747273727900000000000000006a0000000080d07666e70de16900000000000003010200c91f01006d6f646c6f6d6e69706f6f6c000000000000000000000000000000000000000000

Preimage Hash:
0xcb11c8c1ca7c31233cde02c2a09d5d109b9726a5f14a797977dc625417d44611

OpenGov Root Proposal
0x4000000002cb11c8c1ca7c31233cde02c2a09d5d109b9726a5f14a797977dc625417d44611540000000164000000

Result In HydraDX (OK)

List GLMR in the Omnipool via HydraDX Governance

List GLMR Call (Provided by HydraDX Team)
0x3b0110000000fe985c2a02000000000000000000000050c300007369626cd4070000000000000000000000000000000000000000000000000000

preimages.notePreimage
0x0f00e83b0110000000fe985c2a02000000000000000000000050c300007369626cd4070000000000000000000000000000000000000000000000000000

**Preimage Hash: **
0x89c33e173d10f9af311ce69ab7c87cf9d570a0a2c8a8297e5394191a0f6f46d7

Result (OK)

Checking Moonbeam Sovereign Account Position in Omnipool

Checking Moonbeam Sovereign Account Position in Omnipool from Moonbeam via XCM

Removing an Omnipool Position Using Moonbeam Sovereign Account via XCM

Remove 10 GLMR from Omnipool Call on HydraDX (3500000000 RefTime)
0x3b038d0a00000000000000000000000000000000e8890423c78a0000000000000000

Remove 10 GLMR from Omnipool Call on Moonbeam
0x6b0303010100c91fbc7ce80a47ccc70eedb84267e9f0b9678f5a0c8b000001000064a7b3b6e00d0000000000000000883b038d0a00000000000000000000000000000000e8890423c78a0000000000000000010700f2052a01a2f703000107001a71180242420f00

preimages.notePreimage
0x3e00a1016b0303010100c91fbc7ce80a47ccc70eedb84267e9f0b9678f5a0c8b000001000064a7b3b6e00d0000000000000000883b038d0a00000000000000000000000000000000e8890423c78a0000000000000000010700f2052a01a2f703000107001a71180242420f00

Preimage Hash
0xcd7090b63c20af6f1557c58ebffa1063e3be4a810f8940baa9d9c41463794482

OpenGov Root Proposal
0x4000000002cd7090b63c20af6f1557c58ebffa1063e3be4a810f8940baa9d9c41463794482680000000164000000

Result Moonbeam (OK)

Result HydraDX(OK)

Moving Liquidy back from HydraDX to Moonbeam Treasury

XCM message from Moonbeam to HydraDX to send 10 GLMR back to Moonbeam Treasury Account on Moonbeam
0x670003010100c91f030c000400010200511f040a00130000e8890423c78a1300010200511f040a001300008a5d784563010010010204010100511f0813000001040a001300008a5d78456301000d010204000103006d6f646c70792f74727372790000000000000000

preimages.notePreimage
0x3e00a501670003010100c91f030c000400010200511f040a00130000e8890423c78a1300010200511f040a001300008a5d784563010010010204010100511f0813000001040a001300008a5d78456301000d010204000103006d6f646c70792f74727372790000000000000000

Preimage Hash
0x2c99cfb49c63e0dd30ab78cf5a760feb046b8717ad7d5d6b48a3a1058d9bf43f

OpenGov Root Proposal
0x40000000022c99cfb49c63e0dd30ab78cf5a760feb046b8717ad7d5d6b48a3a1058d9bf43f690000000164000000

Result Moonbeam 1st XCM (OK)

Result HydraDX (OK)

Result Moonbeam 2nd XCM (OK)

2 Likes