NDMM Pricing Mechanism
Normal Distribution-Based AMM (NDMM) Pricing Mechanism
1 When users open, close, or are liquidated from positions, liquidity providers (LPs) always passively become the counterparty, transacting at the same price.
2 The deviation rate (DR) for a trading pair is calculated using the following algorithm:
The trading pair's LP = Total TLP size * Trading pair's proportion
The trading pair's long positions (LONG) = Total value of long positions for that trading pair
The trading pair's short positions (SHORT) = Total value of short positions for that trading pair
The trading pair's LP exposure (EXPOSURE) = LONG - SHORT
The formula is as follows:
Trading Pair Deviation Rate (DR) = LP exposure value / The trading pair's LP= (LONG - SHORT) / The trading pair's LP
For example:
Trading Pair: BTC/USDT
LP for BTC/USDT: 10,000,000 USDT
LONG: 1,000,000 USDT
SHORT: 400,000 USDT
EXPOSURE = LONG - SHORT = 600,000 USDT
Then in this case the DR for BTC/USDT would be 600,000/10,000,000=0.06
OI limit = The trading pair's LP * MULTIPLIER
ADL:
EXPOSURE > The trading pair's LP
3 The perpetual contract's price premium rate (PR) is determined by the deviation rate (DR) and a premium rate function, i.e., PR is a function of DR, which is decided by the liquidity data and system parameters. Notably, when DR = 0, PR = 0, meaning that when the deviation rate of the trading pair is zero, the contract's premium rate is zero.
4 The premium rate function f(x) is an antisymmetric function and should be positively correlated with the deviation rate.
Based on the risk-neutral principal, we assumed the Deviation Rate of perpetual contract follows Normal distribution, thus the probability density function has following format:
The Premium Rate Function should represent the accumulation of the contract's Deviation Rate. Thus, we performed an integration on the distribution of the deviation rate. As a result, we obtained the Premium Rate Function, which exhibits the characteristics of a cumulative normal distribution function N(x).
Exact Premium Rate Function is determined by some inner configurations such as premium_cap etc.
Characteristics of the Premium Rate Function:
It is an antisymmetric function.
It is positively correlated with the degree of deviation, exhibiting a monotonically increasing relationship.
The average transaction price:
where PR0 is the premium rate before the transaction, and PR1 is the premium rate after the transaction.
Perpetual contract price formula:
Last updated