---
# System prepended metadata

title: Mark Price Analysis
tags: [internal, nftperp, markPrice]

---

Analysis on different mark prices which will be used to calculate margin ratio (and therefore liquidations). Different mark price calculations shown below:
## 1. AMM Pool Price Calculation
**Mark Price Calculation**: Calculated using current AMM pool price based on X and Y reserves for an AMM.
* Advantage: Fully weighted on pool price, does not require external price sources.
* Disadvantage: Easily manipulatable due to likely lower liquidity on the Fusion AMM, and doesn't include order book or oracle price. May lead to cascading liquidations.

## 2. Weighted Mark Price with AMM and Index/Oracle Price
**Mark Price Calculation:** `Mark Price = β * Market Price + (1 - β) * Index Price`
where `β` = weighting of market price's influence of mark price calculation
e.g., if `β` = 0.8 , vAMM pool price has 80% weight on mark price and 20% from index
so if BAYC market = 55e and BAYC index = 50e, the calculated mark price will be (0.8 * 55) + (0.2 * 50) = 54e
* Advantage: Reduces dependency on the pool price, includes more stable external price sources, and reduces manipulability. 
* Disadvantage: Choices of weightings can be subjective. Does not include orderbook in its calculation.

## 3. Mark Price with Orderbook, AMM, and Index Price
**Mark Price Calculation**: 
`MarkPrice = α*AMMPoolPrice + β*OrderbookPrice + γ*IndexPrice`

`AMMPoolPrice` = Current AMM pool price based on X and Y reserves.
`OrderbookPrice` = Can be the mid-point between the highest bid and the lowest ask, or the last-traded price on the order book
`IndexPrice` = 30-minute TWAP of Oracle price
`α,β,γ` = Weighting assigned to each data point, where `α + β + γ` = 1
* Advantage: More robust against manipulation, and includes broad market insights from the order book, AMM, and reliable external oracles.
* Disadvantage: More complex to calculate, requires reliable real-time data from multiple sources, and also involves subjective weighting.

**Secondary analysis on using mid-point or last-traded price (LTP)**:
Both have pros and cons. A composite of the two is also possible, but introduces further complexities by including additional data sources.
***Mid-point***: Uses best-bid, and best-ask to find a midpoint of the price of the contract.
* Advantage: More reliable with more available depth on the orderbook. 
* Disadvantage: Less reliable with more spread. May not reflect recent trades.

***LTP***: Uses last-traded price to determine price of the contract.
* Advantage: Reflective of recent trades
* Disadvantage: May be manipulatable when orderbook liquidity is low(?). Based on orderbook being utilised (if no trades are made on the book, LTP would be outdated vs. AMM price)

***Composite of Mid-point and LTP***: Uses a Median of [best-bid, best-ask, LTP]

## 4. Pure Index/Oracle Price Calculation
**Mark Price Calculation**: based entirely on an TWAP'd external Oracle feed.
* Advantage: Stable and reflective of current pricing.
* Disadvantage: Ignores internal market, a bad actor can manipulate the underlying oracle price, highly unsafe.

## 5. Multi-faceted Median Price Calculation
**Mark Price Calculation**: `Mark Price = Median of [Price 1, Price 2, MarketPrice]`

`Price 1` = ` 30-Min TWAP MarketPrice`
`Price 2` = `Index Price` + `Premium`
`Premium (15-minute Basis)` = `Market 15-minute TWAP` - `Index TWAP (15-minute Basis)`

`MarketPrice = 0.50*AMMPoolPrice + 0.50*OrderbookPrice (revisit weights)`
* Advantage: Balances several factors including Market and Index TWAP, and incorporates a short-term Perp Contract TWAP for responsiveness.
* Disadvantage: Requires continuous monitoring and data from multiple sources, may be complex to implement.