CP102: Deposit additional CFG into HydraDX Omnipool

Uses component: CP2
Author(s): spazcoin
Beneficiary: N/A (Centrifuge treasury retains control of tokens)
Wallet: 7LCt6dFsJVukxnxpix9KcTkwu2kWQnXARsy6BuBHEL54NcS6 (Centrifuge sibling acct on HydraDX chain)
Date proposed: 2024-04-09

Short Summary
I propose that the Centrifuge treasury make an additional CFG deposit of 710k CFG ($595k) into the HydraDX Omnipool to further increase Polkadot on-chain liquidity for CFG.

High level objective
This 710k CFG is 5% of the treasury and would bring the CFG treasury deposit in the Omnipool up to $1M or 0.22% of FDV. This would significantly reduce trading slippage of CFG within the Polkadot ecosystem and enable lending and borrowing markets.

Background
The Centrifuge treasury in June 2023 deposited 500k CFG into the Omnipool, currently valued at $400,763. RFC: Listing CFG in HydraDX Omnipool & seeding initial liquidity

https://app.hydradx.io/wallet/assets?account=7LCt6dFsJVukxnxpix9KcTkwu2kWQnXARsy6BuBHEL54NcS6

The 24-hour trading volume of CFG in the Omnipool is $120k with an APR of 6.04% and can be seen at: https://app.hydradx.io/stats/overview
As you can see, the Centrifuge treasury deposit into the Omnipool has maintained its value over time. (the acct value in terms of CFG tokens is lower because the CFG token value increased while the stablecoins in the Omnipool did not, and they make up 20% of the Omnipool)

Description of Activity
With the existing CFG in the Omnipool you can only trade 16k CFG ($13,366) per trade before hitting 2% slippage. Recently in twitter discussions an investment firm mentioned they tried to buy 600k ASTR ($76k) recently but slippage was too high and they had to use a CEX instead.

DCA helps you break up large trades, but this reinforces the fact that we should continue to deepen our liquidity across the Polkadot ecosystem. Letā€™s bring those fees on-chain to Polkadot!

Another reason to increase CFG liquidity on-chain is to support larger money markets for CFG. HydraDX is launching a lending platform soon and increasing Omnipool liquidity would support a larger max cap if and when the HydraDX community decides to list CFG on their money market. This would enable another use case for CFG hodlers. Again with my thesis of using treasury-controlled funds to increase liquidity across the entire Polkadot ecosystem I would separately encourage the CFG treasury to deposit CFG liquidity ($200k?) into a CFG lending market on HydraDX to enable larger borrowing positions. (but that would be a separate future Centrifuge proposal) Interlay also has money markets but canā€™t list tokens that have 18 decimal places like CFG. Bifrost has also launched their Loop Stake lending market but are currently only supporting their vTokens. So there is only a future opportunity for a CFG money market on Hydra.

Change or improvement
The great thing about all of the proposals above is that they put to use ā€œTreasury Owned Liquidityā€.

  • earn fees
  • add token use cases
  • deepen liquidity
  • no ā€œlisting feeā€ or reoccurring costs for market making or LM
  • tokens arenā€™t ā€œspentā€ and are still controlled by the Centrifuge community.

Q: But how much in fees?
A: Omnipool stats show CFG deposits earning 6.04% from swap fees. Deposits into lending would likely earn 3-8% once they are borrowed.

Q: But $595k from the treasury is a lot!!
A: Interlay treasury already deposited $750k of INTR and weā€™re discussing boosting it to $1.2M. Astar governance just passed a proposal to add another $718k of ASTR to the Omnipool. ([Deposit additional ASTR into HydraDX Omnipool - Astar Network (Polkadot) - Astar Network Forum]) The Bifrost team is discussing adding another $639k of BNC as well.

Iā€™m certainly open to discussing deposit amounts other than 710k CFG, but Iā€™m encouraging multiple teams to deposit $1M of liquidity to send a strong ā€œweā€™re open for businessā€ signal from a cohesive Polkadot community, with minimal risk for each treasury and demonstrating the power of XCM to control funds on other chains.

Alignment to the mission of Centrifuge DAO

  • increase use case for CFG token and earn revenue without ā€˜spendingā€™ any token assets
  • I have reviewed the March ā€œUpdated Treasury Spending Agreementā€ and earnestly believe that POL strategies are one of the best uses of treasury funds.

Description of Individual/Group seeking funding
I am an $HDX token holder but I am not a HydraDX team member.

Budget
710k CFG ($595k)

Delivery and Reporting
If the Centrifuge community accepts this proposal, the on-chain referenda to execute it would:

  1. XCM transfer the 710k CFG from Centrifuge chain to the Centrifuge sibling acct on HydraDX chain (7LCt6dFsJVukxnxpix9KcTkwu2kWQnXARsy6BuBHEL54NcS6)
  2. call multiTransactionPayment.setCurrency(13) to set CFG as the fee token so that no other tokens are needed for further operations
  3. call omnipool.addLiquidity(13,709999000000000000000000) to deposit the 710k CFG into the Omnipool (minus tx fee, assumed to be <1 CFG)
  4. the CFG sibling acct would receive an NFT representing their second liquidity deposit into the Omnipool.

Real-time value of the Centrifuge treasury CFG deposit in the Omnipool can be monitored at: https://app.hydradx.io/wallet/assets?account=7LCt6dFsJVukxnxpix9KcTkwu2kWQnXARsy6BuBHEL54NcS6

The 24-hour trading volume of CFG in the Omnipool can be monitored at: https://app.hydradx.io/stats/overview

Governance Process for this Proposal
Link to the Github PR: https://github.com/centrifuge/cps/pull/102
Link to the RFC on the Forum: CP102: Deposit additional CFG into HydraDX Omnipool


Update: 2024-05-29
The proposal has been submitted on Github as CP102 - cps/cps/CP102.md at main Ā· centrifuge/cps Ā· GitHub

8 Likes

Always happy to see you, Spaz! :raised_hands:

Thank you for broaching this topic and letting us know of the slippage issue.

While my knee-jerk reaction is a simple ā€œYES,ā€ I think other Centrifuge holders should weigh in too. My biggest reservation is that I believe the last time we did this for the original provision, Centrifuge actually minted the tokens (I could be wrong or not remembering the details correctly, so happy to have others weigh in). So in some sense all holders were slightly diluted despite these tokens not being in circulation and otherwise under the control of the Centrifuge team.

Ultimately weā€™ll see how other community members feel about it after they have shared their perspectives, but Iā€™m provisionally an ā€œAYEā€ on this should it go to referendum.

2 Likes

I agree with Phunky, I also tried HydraDX, and like the good experience from them, it is great to support the DEX in Polkadot and also bring more liquidity for the CFG pool. One small question, for the CFG treasury fund, will they also earn some trading fees on HydraDX?

2 Likes

@The_Phunky_One_Lucky Centrifuge has successfully grown a treasury now. I see 14.3M CFG ($10.4M) in the parachain treasury account at: Subscan | Aggregate Substrate ecological network high-precision Web3 explorer

@DrCAO Yes the CFG treasury is already earning 6.1% on its deposit into the Omnipool. See the HydraDX Omnipool stats page: HydraDX Omnipool - An Ocean of Liquidity The fees earned are in CFG/LRNA increasing the LP balance over time. Itā€™s hard to see that in the Liquidity Position because CFG has increased in value faster than the LRNA pool of all assets, which is why the LP position looks like itā€™s worth less in purely CFG terms now.

1 Like

Good day @spazcoin

Thank you for posting this proposal.

  • Centrifuge Treasury right now holds ~ 14,408,235 CFG

With this proposal, HydraDX is asking to provide 710,000 CFG which is =~ 4.927% of all CFG Treasury. This is not a small request.

Due to this, As a simple token holder, I would like to understand more about the benefits of this proposal for Centrifuge Protocol.
Since the first HydraDX Proposal already passed around 10 months ( cps/cps/CP53.md at main Ā· centrifuge/cps Ā· GitHub )

  • CFG initial allocation was 500,010 CFG ( ~ 350,500$ with the actual token price) and 484 942 CFG actual holding ( ~40% of the pool)
  • CFG Pool on HydraDX has Value locked: $652 222
  • CFG Protocol has earned - $9 315 in LRNA tokens
  • CFG protocol has lost 15,068 CFG (difference between CFG provided and CFG that sibling account holding right now) = or 10,562.668$ difference.

Is this information correct ?
So in 10 months, CFG has earned 9315$ (2.657% of the Value locked) and lost 10,562$.
Looks like not a super interesting deal for Centrifuge Protocol, but as a good deal for HydraDX.

So what are the benefits for CFG Protocol and token holders to increase the actual CFG Holdings and decrease by 5% CFG Treasury and get more looses?
Would not be better to use this 5% of Treasury in T-Bills through Anemoy and get profit instead of 0% or losses?

4 Likes

hey, although I am not the proponent of the proposal, I believe that the point of this proposal is more focused on having the necessary liquidity to be able to increase the use of the token on other platforms from the eco, for example in the lending of Interlay or Hydra later on, major liquidity, allows a higher threshold = greater use, since a higher position can be liquidated = also means more volume

Likewise, it must be clarified that it is simply IL, due to the price increase greater than that of LRNA (you can treat it as an index of the other assets in the Omnipool). So simply if another omnipool token has a big rise, this gap that you mention closes more and you can really see what it has generated as fees. As in any other position, it is knowing when to exit the position.

Now it is worth highlighting that in the month of May a defi campaign will be carried out in Hydra for the next 12 months, which is expected to attract much more volume, and in conjunction with dynamic fees, will allow more rewards to be generated for the Position.

So although in the long term ofc the position is sought to be in profit, it is about what this liquidity can contribute to the cfg ecosystem and usage.

if the amount is big or no, well that depends on the cfg comunnity, im more simply solving the doubts

1 Like

One goal of any project is to get their token listed on exchanges so that their community can trade it, ideally so people can buy more of the token. The goal is also to achieve the projectā€™s target exchange liquidity with as little cost as possible to the project. Listing on top-tier centralized exchanges is very expensive, and you might even pay a market maker like Wintermute to manage liquidity on the CEX. Getting listed on a DEX is cheaper, but almost always requires ongoing rewards to attract mercenary liquidity.

Example governance proposals to use treasury tokens to incentivize DEX liquidity:

This works out to a ā€œcost of capitalā€ of paying $2400/month in incentives to attract each $100k in DEX liquidity for your token.

The Centrifuge treasury currently has $400k of CFG deposited into the Omnipool as Protocol Owned Liquidity. If the treasury were instead incentivizing this $400k liquidity with pure token incentives, it would cost about $2,400 x ($400k/$100k) = $9.6k each month. Over 10 months this would have cost $90.6k. (and you can see from the governance proposals above that other treasuries are indeed paying this magnitude of incentives to DEXs to encourage liquidity)

Therefore although it requires a much larger up-front deposit of tokens (which might not have been put to use sitting in the treasury anyways), the reoccurring cost for providing this DEX liquidity as a service to the Centrifuge community is significantly cheaper. You calculated the temporary impermanent loss to be $1,247 vs having paid $90.6k in liquidity incentives. If/when the market swings the other direction and CFG loses value vs the other tokens in the Omnipool (particularly stablecoins) then the impermanent loss will swing the other way and the value of the Centrifuge treasury deposit will look positive. Long-term its a wash and thereā€™s really not a cost and we should see the treasury balance grow due to swap fees. But if a project pays out liquidity incentives to a DEX, those are permanently spent and the project must pay again each period to maintain DEX liquidity for their users.

So please consider how the Omnipool is providing a cheap valuable service.

Second, you were thinking about the CFG deposit just as an investment and suggested instead investing this 5% into T-bills to deposit into Anemoy. This could certainly be another investment that the Centrifuge community makes. But usually communities donā€™t want their treasury to sell tokens and depress the CFG price. A benefit of depositing just CFG tokens into the Omnipool or into a lending pool is that the treasury doesnā€™t need to sell any tokens so it doesnā€™t affect price.

How Much Liquidity Is Really Needed?

I feel very strongly about the benefits of POL as outlined above, but I think ā€œhow much liquidity is enoughā€ is definitely something we could debate. Currently with the $685k of CFG in the Omnipool you can trade 16.5k CFG ($11.6k) to USDT in a single trade. Has the community shown a desire for more liquidity to do larger trades? As I mentioned in my proposal, I see whales wanting to buy more of a token but forced to use a CEX because on-chain liquidity is too low. Coingecko indicates you can trade $12.7k on Kraken and $23k on OrangeX before hitting 2% depth/slippage. Iā€™d like to see our on-chain liquidity be high enough for each parachain token so that on-chain swaps provide the cheapest most efficient way to buy tokens. Adding 710k CFG to the Omnipool would achieve that.

The other reason Iā€™m advocating for a deeper pool of liquidity on-chain is for loan liquidations as I explained originally. You definitely need more token liquidity to enable that, so thatā€™s why I think itā€™s valuable to push Omnipool liquidity to $1M so that we have a large enough money market to attract larger players.

Closing thought: Thanks for the discussion, Iā€™m really glad Polkadot chains have open governance like this, and Iā€™m looking forward to fielding more questions from the community at tomorrowā€™s monthly governance call.

3 Likes

Hi @spazcoin

Thank you for your reply and for your presentation during the call.
As a simple token holder. I have a few questions:

  • How many active users does HydraDX have?
  • How many dailies trading HydraDX have?
  • How many trading with $CFG pair is happening on HydraDX daily, weekly, and monthly?
  • How I can find full daily statistics about CFG trading? I can see only 10 last trading.
  • Are CFG tokens could face any risk if HydraDX protocol will be hacked?

I do think that this is not a bad proposal and definitely much better than simple maintaining of incentive or trading volume, but I would like to understand if spending this amount on something else will be more beneficial for CFG Protocol.

Thank you.

There is a good Dune dashboard for HydraDX:
[https://dune.com/substrate/hydradx]

The Parity data team also have some good monthly graphs:
[Parity Data Dashboards - Monthly Report]

Active Users - Dune shows 200-300 and Parity shows 5000-6000 active addresses. Neither source currently breaks out CFG trader accounts specifically.

From Dune, the daily volume of CFG traded on HydraDX is around $100-200k:

Regarding hacks, I would highly recommend reading through the list of HydraDX security measures: [State of the Art Security | HydraDX Docs]
I am especially impressed with how theyā€™ve been able to customize their Polkadot chain to apply security checks on every block produced. They also have an Immunefi bounty and recently participated in a code4rena contest to get whitehats to find any lingering vulnerabilities:

Only one high-risk finding with a $100k prize. (compare to Acala $36.5k prize and three High-risk findings)

1 Like

Maybe you can provide this information @ jrafaelangarita, please?

When there has been sufficient input/discussion in this proposal and it is ready to move on to the actual onchain vote, the GCG recommends to allow all token holders to vote on it as opposed to only the council voting in order to make the decision making process as decentralised as possible. So the process would be:

Council Motion -> External motion -> Referendum

hey sir, well spazcoin already provide most of the info:

for the 1 and 2, you can use this chart from subscan that show all the active account on Hydra, since hydra is a AMM-Chain, most of the activies are related with that.

for the CFG volume, for now can use our stats page to see the last month volume where you can see that the peak on the last month was around 180k

also from thank link can see the daily volume

and support with the info from dune that spazcoin already commented

and well also a dashboard that i want to highlight is this one made from a member of the comunnity,

Omnipool Liquidity vs. Volume per Asset (grouped) per Month - the higher the bar, the more traders might benefit from additional liquidity

Data is 2 days behind.

https://dune.com/queries/3623112/6103570

1 Like

Hi
Thank you.
But the information provided relates to all HydraDX and is not limited only to using the Hydradx app.
So counts also users who are using polkadot.js.org and interact with HDX token, as well as using or transferring\signing any transaction on hydradx via any wallet.

image

So far, so good.
However even with taking in consideration this data only ~ 515 daily users on HydraDX. :thinking:

The questions that should be answered:

  • Is this worthing providing additional liquidity ( +140% = 710,000 CFG) to already provided liquidity without earning anything to DEX with only 515 daily users?
  • How many of the 515 daily users trade CFG? 10%,15%?
  • Provide the liquidity of 700,000 CFG for 50 daily users? :smiling_face_with_tear:
  • Can anyone from the HydraDX team provide accurate information about how many daily users HydraDX DEX has?

Recent Trades
I can find only the recent 10, but would like to understand how many CFG trades happening daily, weekly, and monthly. This statistic is still unclear.
I am unsure why this information is so difficult to provide.

There is no such statistics of how many specific traders for each asset at the moment, so I simply give you the information available

and also most of people do not go daily to make their trades, many are making purchases and sending to their native parachain or simply keeping them there in HydraDX, or set up of dcas, etc

and you can notice this, since the volume of how many xcm went to the centrifuge is much greater than those received

and although I am not the proponent of this proposal, I understand that its objective is to prepare the ground for future integrations of CFG in HydraDX and Interlay lending platforms and have enough liquidity to cover these liquidations

given that on-chain liquidity is very important for this type of platforms and is a point to take into account when adjusting the ratios

Apologies to everyone that Iā€™ve been delaying moving forward with this Omnipool deposit proposal. Iā€™ve been trying to do this ā€œthe right wayā€ by crafting a preimage of extrinsics that could be approved by Centrifuge governance and entirely control the transfer of assets and deposit of the tokens into the Omnipool from the Centrifuge sibling account on the Hydra chain. I wanted to demonstrate that XCM could allow the Centrifuge chain complete control over operations on another chain without assistance. However, even using Chopsticks to test transactions, Iā€™ve found the XCM documentation lacking and debug nearly impossible. From some Polkadot forum posts I see that perhaps this use case isnā€™t fully supported yet.

Therefore Iā€™m going to fall back to pressing the ā€œeasy buttonā€ so we can move forward. Iā€™ll propose an on-chain CFG governance proposal to transfer the funds to the Centrifuge sibling acct on HydraDX. If approved and transferred, Iā€™ll propose a HydraDX governance proposal to deposit those tokens into the Omnipool on behalf of the Centrifuge sibling acct.

Technical details:

  • call to xtokens.send the CFG to sibling acct: (this works)
    0x3e0300016d6f646c70792f747273727900000000000000000000000000000000000000007c00000000904cbb5f69aad29e00000000000003010200c91f01007369626cef07000000000000000000000000000000000000000000000000000000
  • draft Centrifuge XCM call to omnipool.addLiquidity(13, 46875 CFG): (doesnā€™t work)
    0x790003010100c91f0314000400010200bd1f060200010000000000000000000000000000000000000000000000000000000000000013000064a7b3b6e00d1300010200bd1f060200010000000000000000000000000000000000000000000000000000000000000013000064a7b3b6e00d00060013000064a7b3b6e00d6566583b020d00000000008c239bb14d19ed09000000000000140d0100010200c91f01007369626cef070000000000000000000000000000000000000000000000000000
  • Astar and Bifrost both transferred more tokens into their sibling accts. Hereā€™s the Hydra governance proposal to deposit ASTR tokens into the Omnipool: Deposit additional 5.54M ASTR into Omnipool from Astar Treasury
  • Thereā€™s one example of successful parachain-to-parachain funds control - Hydraā€™s DOT->vDOT minting on Bifrost: Send 1M DOT to Bifrost and mint vDOT

Two recent Polkadot forums discussions about improving XCM implementation and documentation:

  1. XCM user and developer experience improvements - #21 by acatangiu - Tech Talk - Polkadot Forum
  2. Asset Hub Brainstorming Session - Call Notes and Discussion Continuation - #5 by joyce - Tech Talk - Polkadot Forum

If any Centrifuge/substrate devs knows how to correctly craft and execute the XCM calls, Iā€™m all ears. Otherwise, Iā€™d ask the Centrifuge community to trust that this XCM implementation is being improved and in the future governance calls alone should be able to be used to remove liquidity and transfer it back to the Centrifuge treasury if needed.

my prepared preimage hash is 0xd24c0d4a05f25594d7baf4b6fe7c36d6f01db0781198b3d1ea916d65e93122e9 for a 750k CFG transfer to the Centrifuge sibling account on HydraDX. HydraDX governance can then deposit it into the Omnipool on behalf of the Centrifuge community.

What are the reasons that stays behind of increasing of requested amount?

Can you please help us @WilliamFreude ?

Sure! IMO, this should be testable with Chopsticks.

@spazcoin Could you please tell me which asset is represented by the 0x0001000000000000000000000000000000000000000000000000000000000000 general key which you configured for buying and paying execution time for the second call? My quick Chopsticks XCM attempts have resulted in xcmpQueue.OverweightEnqueued failures. I checked the weight of your transact call and that should be sufficient.

I managed to create a batch XCM call which encapsulates both of your calls. Your main mistake was that the Transact in the second call uses the Native origin kind when it should use SovereignAccount.

Before I share the batch call hex, I wanted to know whether there was any specific reason for you to draft the second call with ~47k CFG of liquidity instead of the ~710k? I ask this because during my tests I failed to add liquidity via XCM (with the fixed version of your 2nd call) if the amount was more than ~47k CFG. Unfortunately, the HydraDX chain does not display any error and treats the XCM as successful. So itā€™s hard to debug and the issue should be some HydraDX configuration.

Sadly, I cannot easily share the test setup as I had to overwrite the Centrifuge WASM with a local built that includes sudo for convenience reasons. Without sudo, the XCM calls need to go through governance with a minimum amount of 3h of block time which takes quite some time even with Chopsticks fast forward support.