> For the complete documentation index, see [llms.txt](https://nasdexofficial.gitbook.io/nasdex/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nasdexofficial.gitbook.io/nasdex/technology/calculation-formula.md).

# Calculation formula

#### **Mint collateral ratio：**

**C-ratio =（Value of Collateralized asset/ Value of Minting asset）\*100%**

Asset value=Quantity\*Multiplier\*Price

Quantity of minting nAssets to be opened a position:

![](https://4146443128-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MkMHSId7Az3xVkZqyzQ%2F-MkMTXEqtXum8cDZsmVq%2F-MkM_TtRE7N3s7TyPpFs%2F%E6%88%AA%E5%B1%8F2021-09-24%2019.34.23.png?alt=media\&token=2aa687c3-7e64-4a19-aa57-57bf655068f0)

#### **Increase/Decrease margin：**

![](https://4146443128-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MkMHSId7Az3xVkZqyzQ%2F-MkMTXEqtXum8cDZsmVq%2F-MkM_YvrHCNSLhoihkS0%2F%E6%88%AA%E5%B1%8F2021-09-24%2019.34.48.png?alt=media\&token=c6441527-33f1-4503-adfe-f77c3a9a3836)

The amount of collateralized assets that can be withdrawn should be kept above the minimum collateral ratio, and the amount that can be withdrawn should minus the fee.

#### **Mint/Burn nAssets：**

![](https://4146443128-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MkMHSId7Az3xVkZqyzQ%2F-MkMTXEqtXum8cDZsmVq%2F-MkM_fz0KomumPK-Yg5r%2F%E6%88%AA%E5%B1%8F2021-09-24%2019.35.19.png?alt=media\&token=c6de08b9-faca-49ef-90ba-caf46dbbc4f7)

The quantity exceeding can be extracted from the CDP

#### **Auction：**

The amount of collateralized assets the buyer may receive based on the discount rate (the amount collateralized by paying the minting assets in the position) :

![](https://4146443128-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MkMHSId7Az3xVkZqyzQ%2F-MkMTXEqtXum8cDZsmVq%2F-MkM_nkHmqsTpIdqFn9S%2F%E6%88%AA%E5%B1%8F2021-09-24%2019.35.36.png?alt=media\&token=6bd5cb05-f9bd-49e9-9ffd-ca0911b30b87)

\* The remaining unsold collateralized assets will be returned to CDP's owner.

#### **Staking NSDX APR：**

Staking NSDX calculates the time-weighted average award for the past 15 days and then annualize:

\[Daily NSDX Emission x 365 x NSDX Price x (Pool Weight/Total Pool Weight)]/TVL

#### **LP Mechanism：**

Opportunity constancy algorithm X \*y= K (initial before trading)

Where X and Y respectively represent the quantity of two kinds of assets in the liquidity pool, and K is the opportunity of the two kinds of assets.

If K is kept constant, x increases and y needs to decrease

x\*y=k=(x+ΔX)\*(y-ΔY)

Considering the Swap fee (assuming that the Swap fee is p%), the formula is:

【x+ΔX\*(1-0.p%)】\*(y-ΔY)

#### **Price Slippage：**

![](https://4146443128-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MkMHSId7Az3xVkZqyzQ%2F-MkMTXEqtXum8cDZsmVq%2F-MkMa0EOaj1umLBlQhPE%2F%E6%88%AA%E5%B1%8F2021-09-24%2019.36.44.png?alt=media\&token=efdf14b5-3ec7-4ed9-b431-906dd894e18f)

#### **Create a new pool：**

![](broken://files/-MkGZO0TxAYUQn7heAZx)

![](https://4146443128-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MkMHSId7Az3xVkZqyzQ%2F-MkMTXEqtXum8cDZsmVq%2F-MkMah46WjZq-9iDv_g9%2Fimage.png?alt=media\&token=d524e233-e477-4932-891a-a05e5a42178d)

Where x0 and y0 are the initial number of pools

Number of LP added for liquidity minting:

![](https://4146443128-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MkMHSId7Az3xVkZqyzQ%2F-MkMTXEqtXum8cDZsmVq%2F-MkMaTII1euhDvOTllMN%2F%E6%88%AA%E5%B1%8F2021-09-24%2019.37.23.png?alt=media\&token=deff6446-1668-42a0-9842-aa3b29d4d0f0)

Where x+ and y+ are the increments on both sides of the specific pool

#### **Burn：**

Burn LPtoken to extract asset

![](https://4146443128-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MkMHSId7Az3xVkZqyzQ%2F-MkMTXEqtXum8cDZsmVq%2F-MkMaOv-RwMn15BhTBxk%2F%E6%88%AA%E5%B1%8F2021-09-24%2019.37.31.png?alt=media\&token=59d2be58-b7dd-4318-a43a-1b05ae15dc51)

![](broken://files/-MkGZO0Vl82uJbAVr3o8)![](broken://files/-MkGZO0W1qUjqdL8Do0w)
