Mark price
Parcl V4 uses multiple price references for different purposes. The price shown in the UI ("mark price") may not match the price used for liquidation checks, and the price used for funding rate calculation may differ from both. This separation prevents orderbook manipulation from triggering forced liquidations or distorting funding.
The exact routing depends on asset class because the threats and tradeoffs are different for daily-cadence real estate indices vs. continuously-traded commodities.
Price references
| Name | Definition | Always available? |
|---|---|---|
| Oracle price | Latest signed price from the external oracle feed | When fresh; may go Stale during venue closures |
| Impact mid | Depth-weighted VWAP midpoint of the orderbook | When the book has sufficient depth |
| Last trade | Most recent trade price on this market | When recent trades exist |
| Median mark | median(oracle, impact mid, last trade) — robust to one bad source | Whenever any two of the three are valid |
Mark price by asset class
| Asset class | Mark price method | Why |
|---|---|---|
| Real estate | Impact mid | Daily oracle has no intraday signal; orderbook is the only intraday reference |
| Commodities | Median mark | Median is robust to single-source failure (stale oracle, manipulated book, weird trade) |
Why the median for continuous markets
The median property requires two of three sources to be wrong before it can be pushed. Concrete examples:
Normal trading. Oracle $102.30, impact mid $102.32, last trade $102.31 → median $102.31. Tracks oracle, which tracks the real market.
Manipulation attempt. Attacker pushes orderbook to skew impact mid to $115. Oracle $102.30, impact mid $115, last trade $102.30 → median $102.30. Manipulation rejected.
Off-hours (ICE closed). Oracle frozen at $102.20 (external feed stopped publishing), impact mid $103.05 (orderbook drifted), last trade $103.10 (recent fills moved). Median $103.05 — tracks reality, ignores stale oracle. Liquidations and stops still fire correctly.
The median lets us run perps 24/7 even when the underlying venue is closed, which is the entire UX promise of crypto-native perp DEXs.
Impact mid
The impact mid is a depth-weighted midpoint that resists manipulation by small orders. Instead of taking the simple midpoint of best bid and best ask, it walks each side of the orderbook, accumulating notional value up to a configured threshold, and computes the volume-weighted average price (VWAP) for each side. The impact mid is the midpoint of the two VWAPs.
Depth thresholds:| Asset class | Threshold |
|---|---|
| Real estate | $5,000 |
| Commodities | $25,000 |
A single dust order at the top of book cannot move the impact mid. To move it by 1% on a real estate market, an attacker would need approximately $5,000 of capital positioned in the book; on a commodity market, $25,000.
Fallback behavior:- If either side of the book has insufficient depth to reach the threshold, impact mid falls back to the oracle price.
- If the depth threshold is set to 0, impact mid degrades to the simple midpoint (best bid + best ask) / 2.
Which price is used where
For how the liquidation reference price plugs into the margin inequality, see Liquidations.
Real estate markets
| Purpose | Price reference | Why |
|---|---|---|
| Displayed mark price | Impact mid | Only intraday signal on daily-oracle markets |
| Unrealized PnL | Impact mid | Matches displayed mark |
| Margin check (initial/maintenance) | Impact mid | |
| Liquidation check | Oracle price | Strongest manipulation resistance for forced actions |
| TP/SL trigger evaluation | Oracle price | Prevents stop-hunting via orderbook manipulation |
| Funding rate | Impact mid | Funding cares about book imbalance |
TP/SL triggers and liquidations fire on the oracle price, not the displayed mark. Your stop-loss fires only when the underlying real estate index actually moves (once daily at the oracle update), not when someone moves the orderbook intraday. On thin real estate books, orderbook-based triggers are vulnerable to manipulation.
Commodity markets
| Purpose | Price reference | Why |
|---|---|---|
| Displayed mark price | Median mark | Robust real-time reference |
| Unrealized PnL | Median mark | Matches displayed mark |
| Margin check (initial/maintenance) | Median mark | |
| Liquidation check | Median mark | Stays enforceable 24/7 (falls back to orderbook when oracle stale) |
| TP/SL trigger evaluation | Median mark | Matches what traders see; resistant to single-source manipulation |
| Funding rate | Impact mid | Funding cares about book imbalance |
TP/SL triggers and liquidations on commodity markets fire when the median mark crosses the threshold, not when any single source crosses. This means your stop on Brent fires when our chain's median price hits your trigger — which closely tracks the actual market price, even when the oracle goes stale during ICE off-hours.
Funding rate premium
The funding rate uses the impact mid as its input regardless of asset class:
premium = (impact_mid - oracle_price) / oracle_priceThe funding rate responds to real-time orderbook imbalance regardless of what the oracle says. This is the same on every asset class because funding's job is to anchor the book to the index, not to be the trigger price for forced actions.