Liquidity Provider

Mooncake adopts a single-token liquidity pool model. When liquidity providers (LPs) deposit the underlying token into the pool, it is split into a Funding Position and a Leveraged Position, which together form the trading pair.

Mooncake uses the oracle price of the underlying token and the funding rate to calculate the USD value of both Funding Positions and Leveraged Positions.

The exchange rate is defined as:

Exchange Rate=Funding Position Dollar ValueLeveraged Position Dollar ValueExchange\ Rate = \frac{\text{Funding\ Position\ Dollar\ Value}}{\text{Leveraged\ Position\ Dollar\ Value}}

This exchange rate determines the swap ratio between Funding Positions and Leveraged Positions inside the AMM.

Last updated