AMA — Questions and Answers (July 1)

Another theory of funding rate also takes into account the interest rate of the quote and base currencies. I see here that the interest rate of these currencies is not factored into the funding rate calculation. Wanted to hear more thoughts from MCDEX on the rationale behind not factoring in the interest rate? (e.g. I think BitMEX factors in interest rate too)

Good question. We’ve put some thoughts on this question when designing the perps. So in centralized space, there are both models that take into consideration of interest rate or not.

When we are designing, we believe that the interest rate gap between the two currencies is already reflected in the funding rate, since the trader’s pricing strategy should consider the interests. Thus, the mechanism right now could work. (This design is used in Deribit.)

I understand that on the UI, it seems that the perpetual futures contract is inverse. The actual trade, however, is vanilla. My question is — is this inverse also a non-linear? Because if it’s non-linear, then it’s not 100% vanilla contract right? But if it’s linear, then how do you take into account the volatile ETH price?

Do you mean the smart contract is vanilla? That’s correct.

Here is how it works:
When calling the smart contract, the price is inversed (1 / price), the order side is also inversed (long and short are exchanged). So when you are trading, the experience is a non-linear inverse contract. But in the Mai2 smart contract, it’s linear vanilla.

Why do you have to create a separate margin account for the order book and AMM? Is it because it’s isolated? So even if isolated, but the same perpetual contract, then it’s a different margin account?

All traders’ margin accounts are isolated (which means they will be liquidated separately). AMM can be considered as a normal human trader and AMM’s margin account is the same as human traders.

AMM’s trading operations are also the same as a human trader, which means that if a human trader buys from AMM, the AMM — as the counter-party — is identical to another human trader.

Can you explain more on why do you need to have an AMM position fully collateralized? Does this mean you can’t take additional leverage on the AMM position?

AMM position should be kept fully collateralized (leverage = 1x) so that AMM’s margin account can never be liquidated.

Otherwise, if AMM can be liquidated, the financial risk is too high. Because a human trader can deposit before margin call, but it’s hard to force AMM’s Liquidity Providers to deposit more before being liquidated.

If you recommend traders to use order book because of higher liquidity, then why is there an AMM in the first place? Just to calculate the funding rate?

There are 2 reasons:

  1. We believe that Perpetual is a Lego of the DeFi world, other smart contracts can also trade our perpetual by calling the interface of our smart contracts. But smart contracts cannot trade through offline order book, so AMM is the only possible entry.
  2. Calculating the funding rate is very important so that our perpetual can work without any off-chain facilities. This is a vital foundation for Reason 1.

Can you explain more on the new AMM pricing formula (something about using data oracle instead of x*y=k formula)? How will it work?

The AMM formula is still under discussion. You can follow our next analysis article. We involved a “risk exposure” (E) of Liquidity Providers. At the beginning, E = 0 and price = index. So the price discovery mechanism is simplified (the original x*y=k need more complicated progress to discovery the price change).

When the funding rate is expensive and traders close their positions right before funding happens. How do you handle this situation in AMM? Who pays for the funding rate to the counterparties (in this case, the AMM)?

If a trader trades with AMM, in the case you described, he can do the same — close positions. And AMM does not need to close its position. When Liquidity Providers add liquidity to AMM, they hold long shares in AMM and short positions in their own account, so the net position is neutral. No matter how large the funding rate is, their funding payments are just transferring from left hand to right hand.

The trader’s funding rate is paid by AMM. And if the trader closes the position, there will be another trader who holds that position, he will pay the funding rate to AMM since they are each other’s counterparty now.

If AMM’s position size = +10, Bob’s position size = -10, they pay for each other. If Bob wants to close his positions, he is not alone, he must trade against somebody. For example, Bob = 0, Alice = -10. So now AMM and Alice pay for each other.

How do liquidity providers add/remove liquidity to AMM? Can anyone be a liquidity provider? Will the fees that they get be more than the loss they potentially would take? (I’m assuming the loss would be from taking counter-positions of the other traders who trade on AMM)

Yes, anyone can be a Liquidity Provider. This document covered your question:

The liquidity provider still has a certain risk of loss, just like other DeFi products using constant-product algorithms.

Introduction to the team.

Can refer to this article from Defiant:

Building MCDEX V3 (Decentralized Perpetual) | Trade #PerpetualContracts - #Permissionless #1000x Uni’s capital efficiency #Anyone can create any market

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