1. Can I provide liquidity to AMM by adding ETH?

Yes, but the mechanism of MCDEX AMM is a bit complicated since it’s derivatives market instead of spot market. We will put it simple here.

In our AMM pool, there are two assets: ETH and short positions with 0.5x. (the 0.5x short position will never be liquidated). They are equivalent in value. Whenever you are adding liquidity, you are adding these two assets in equivalent value to the AMM as the same time.

So when you add ETH to the pool and if you don’t have short positions yet, In this case, our perpetual contracts will mint the same quantity of short positions and long positions. The short positions (0.5x) will be added to the AMM with your ETH. Now, what happens to the long position? It will be held by you in your margin account.

In AMM, the short position will always be 0.5x leverage and will never be liquidated( since it’s inverse contract). And in your margin account, you will have a long position that the leverage is set by you when adding liquidity. Please notice that the long position has risk exposure and can be liquidated, please pay attention to the liquidation price after adding liquidity.

During this process, part of your ETH will be used as collateral of short positions and This part is in the AMM earning MCB; part of your collateral will be used as collateral for long positions and are not earning MCB.

Now let’s take an example —

I click on the “MAX” button, choose the 2x leverage, which I’m comfortable with and click on “add liquidity”. After successful, my AMM shows like this —

Image for post
Image for post

I will show what those figures mean:

  1. how many of my ETH goes to AMM?

As shown in the portfolio session, my AMM margin is 2.795ETH,the rest 0.692 ETH is my margin account as collateral of my long position.

2. What’s my mining efficiency?

As shown in my portfolio, my imbalance rate is 0%, which means the quantity of my long positions and short positions are the same. I’m neutral. So my mining efficiency is 100%.

2. Why I have 1ETH(for example, worth of $300), when I click on MAX, I can only provide $100?

As mentioned, not all of your ETH will go to AMM and provide liquidity, since part of your ETH will be in your margin account as collateral of your long positions.

For example, if you enter 100$ when providing liquidity and choose 1x leverage for the long position, that means that you will have $100 short positions(0.5x) and $200 worth of ETH in the AMM; $100 long positions in your margin account and $100 worth of ETH as collateral.

3. What is imbalance rate?

As mentioned, after adding liquidity, LP will hold a quantity of short positions(in the AMM) and a quantity of long positions in his margin account.

If the quantity of short positions and long positions equal to each other, your imbalance rate will be 0%; if there is a gap between them, the balance rate will be calculated as: net position / AMM position(short position)

After block height 10,471,250 (July 16), the imbalance rate will affect your mining efficiency:

  • If imbalance rate is less than 20% or equal to 20%, your mining efficiency is 100% (which means that all of your short position and ETH in the pool will enjoy share).
  • If imbalance rate is between 20% and 90%, the effective share is decreasing linearly. The calculation is :

For example, if your imbalance rate is 50%, your mining efficiency is 55%, which means that 55% of your share is in the AMM are mining.

  • If imbalance rate is larger than 90% or equals to 90%, you can enjoy 10% of the mining efficiency.

4. What should I do if my imbalance rate is too high?

There is a button “rebalance” in your portfolio session. By clicking on that button, your imbalance rate will be down to 0.

5. Do I need to withdraw liquidity to receive MCB?

Nope. As long as you have liquidity in AMM, you will get your share of MCB. MCB will be transferred every day, starting from July 14th.

Once you withdraw your liquidity, you will not receive MCB anymore.

For example, if your liquidity is in the AMM for 10 blocks, you will get your share for those 10 blocks.

6. How to exit liquidity mining?

Go to your AMM page, in the “remove liquidity” session:

1.click on the “MAX” button if you want to remove all of your liquidity. Or enter in the quantity of share you want to remove.

Image for post
Image for post

2. Click on the “Remove Liquidity” button.

3.Confirm in your wallet.

Image for post
Image for post

After this step, you will get your ETH and short positions in the AMM back into your margin account.

3. Go to the order book page, check if you still have positions. If you do and you don’t want take position risks, please close the position.

4. go to “account” page, click on the “withdraw” button to transfer assets in your margin account back to your wallet.

Image for post
Image for post

Written by

Building MCDEX V3 (Decentralized Perpetual) | Trade #PerpetualContracts - $ETH $LINK $SNX $COMP $LEND

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store