Changes: CRAB <> xRING liquidity pool swap #80
Replies: 5 comments
-
Here are some code snippets that might help understand. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
@1022ranji @xiaoch05 The migrations and steps before add liquidity is finished, and the remaining part is more about ecosystem collaboration and articles if need. For docs and articles, I'll transfer this issue to crab-docs repo. @robinwei-itering @1022ranji |
Beta Was this translation helpful? Give feedback.
-
Some users wonder whether the RING-to-CRAB exchange rate is fixed, or how the exchange rate evolves. This article will clarify some questions around this topic. HistoryWe reserved 40M RING in CrabBacking Account in the launch of Darwinia Network, and the corresponding mapped(wrapped) RINGs were issued and recorded in Crab Network's Issuing module on Crab network. xRING denotes mapped RING in the rest part of this article. Before Darwinia mainnet, there was a genesis cross-chain event during which uses could convert CRAB into xRING at the rate of **100 CRAB = 1 xRING ** and redeem that 1 xRING into Darwinia genesis(burned in Crab side, and unlocked from CrabBacking to user). RationaleThe backing assets(xRING) are allocated to Crab Network to make it a canary network with real economic incentives and massive gaming theory testing other than a testnet. ProblemsOnce the two networks have started evolving independently, the exchange rate of 100:1 between CRAB and RING no longer applies. There is no such pegging mechanism inherently. The evaluation of two assets(RING & CRAB) should be market-driven and relatively independent. The total supply of CRAB would be 10,000M, which requires a liquidity pool of larger volume. The amount currently locked in the backing account is far from sufficient. xRING was recorded in CrabIssuing pallet because sub-sub bridge is not ready and MappingTokenFactory(based on DVM) is not ready. ProposalsWe plan to migrate xRING recorded in the CrabIssuing pallet to ERC-20 mapped tokens in a reserved EVM account controlled by Crab Module Account(Treasury/Council) after a Substrate-to-Substrate bridge between Darwinia and Crab networks. All mapped tokens are managed using EVM by design, and controlled by the Issuing module and relative MappingTokenFactory. We will use tokens from the above reserved account and the Crab Issuing Account to create a UNISW-like liquidity pool to increase the liquidity of both tokens. It is possible that that the amount of CRAB currently locked in the Crab Issuing module does match the outside price, but the shortfall or surplus can be addressed by Treasuary. SummaryCRAB and xRING no longer follow the 100:1 swap ratio, which has already happened in off-chain exchanges with most liquidation. The original backing assets(xRING) will be transferred to Crab Treasury(/Council), and Crab Treasury can use these backing assets to create a liquidity pool for the long-term running of the CRAB/xRING trade pair. These changes conform to the positioning of Crab as a Canary network of Darwinia with real economic value. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
History
CrabBacking
Accounthttps://github.com/darwinia-network/darwinia-common/blob/c387ba1c7303e1bad26aa612f232afcbcfd891ae/frame/bridge/crab/backing/src/lib.rs#L62
Corresponding Mapped RINGs were issued and recorded in Crab Network's Issuing module on Crab network.
https://github.com/darwinia-network/darwinia-common/blob/c387ba1c7303e1bad26aa612f232afcbcfd891ae/frame/bridge/crab/issuing/src/lib.rs#L82
https://github.com/darwinia-network/darwinia-common/blob/45c85a84750c42bef91637507d706bf40dbdb5fe/frame/bridge/crab/issuing/src/lib.rs#L132
The CRAB used to swap for Mapped RING are locked in the module account now.
Motivation
The backing assets(Mapped RING) are allocated to Crab Network to make it serve as a canary network having real economic incentives and massive gaming theory testing, not just working a testnet.
Problems
With CRAB get listed in outside exchanges, its price is unpegged from ratio 100:1, and the original ratio becomes unreasonable, which will make the constant swap not work anymore. A liquidation pool like uniswap is more reasonable.
The original backing amount is not enough cover all future CRAB cap(10,000M) in whole lifetime.
Mapped RING was recorded in CrabIssuing pallet because sub-sub bridge is not ready and MappingTokenFactory(based on DVM) is not ready.
Changes
Note: all mapped tokens are managed using EVM by design, and controlled by Issuing module and relative MappingTokenFactory.
Summary
Beta Was this translation helpful? Give feedback.
All reactions