Data Dictionary

Data developers and integrators can use this data dictionary to make sure metrics are consistent across platforms. Each metric has a written description and a technical definition for developers.

Perps V3 Historical Data

Metric
Description
Definition

Protocol fees

Fees charged by the Synthetix protocol to open or modify a position.

From the PerpsMarketProxy.OrderSettled event: totalFees - collectedFees - referralFees - settlementReward Alt: Sum of CoreProxy.MarketUsdDeposited.amount

Filter by marketId for fees by market

Settlement fees

The fees paid to compensate keepers for pushing price updated, settling trades, and liquidating accounts.

Sum of PerpsMarketProxy.OrderSettled.settlementReward

Referral fees

The fees paid to the referred address during the settlement of a trade.

Sum of PerpsMarketProxy.OrderSettled.referralFees

Trading volume

The total value exchanged in markets, denominated in USD.

From PerpsMarketProxy.OrderSettled, sum of sizeDelta * fillPrice

Open interest

The USD value of all open positions on a market at it's current price.

From PerpsMarketProxy.MarketUpdated... Total OI: size * price Long OI: (size + skew)/2 * price Short OI: (size - skew)/2 * price

Funding rate

The amount of funding applied to an open position as a rate per 24 hours. The funding velocity is the amount the rate is increasing or decreasing based on market skew.

From PerpsMarketProxy.MarketUpdated... currentFundingRate is the rate per 24 hours currentFundingVelocity is the amount the rate is increasing or decreasing per 24 hours Example: currentFundingRate = 0.001 currentFundingVelocity = 0.002 Positions are accruing funding at 0.1% per 24 hours. In 24 hours, we expect the funding rate to be 0.3%.

Trades

The count of unique trades settled on a market.

Count of PerpsMarketProxy.OrderSettled events

Perps V3 Markets

Metric
Description
Definition

Market summary

A snapshot of the current market state.

PerpsMarketProxy.getMarketSummary(marketId) returns values useful for calculating common market stats: - size: market size in asset units - skew: the difference in long and short market sizes in asset units, positive is skewed long - currentFundingRate: see "Funding rate" - currentFundingVelocity: see "Funding rate" - indexPrice: The most recent price published onchain - maxOpenInterest: The max single-sided open interest in asset units

Open interest

The USD value of all open positions on a market at it's current price.

Available from "Market summary" Total OI: size * price Long OI: (size + skew)/2 * price Short OI: (size - skew)/2 * price

Funding rate

The amount of funding applied to an open position as a rate per 24 hours. The funding velocity is the amount the rate is increasing or decreasing based on market skew.

Available from "Market summary" currentFundingRate is the rate per 24 hours currentFundingVelocity is the amount the rate is increasing or decreasing per 24 hours See "historical" for an example.

Open interest cap

The maximum size of one side (long/short) of a perps market.

Available from "Market summary"

Index price

The price of the market at the last oracle update. Usually this price was set during the last trade or liquidation.

PerpsMarketProxy.indexPrice(marketId)

Perps V3 Accounts and Positions

Metric
Description
Definition

Collateral value

Value in USD of the collateral deposited to an account at current index prices.

Total value: PerpsMarketProxy.totalCollateralValue(accountId) Specified asset: PerpsMarketProxy.getCollateralAmount(accountId, marketId) where marketId is the spot synth market.

Available margin

Total amount of margin an account has available to back positions. It is the USD value of all collateral after applying unrealized pnl and funding.

PerpsMarketProxy.getAvailableMargin(accountId)

Withdrawable margin

The amount of margin that can be withdrawn by an account, resulting in positions at max leverage

PerpsMarketProxy.getWithdrawableMargin(accountId) Alt: initialMargin, maintenanceMargin = PerpsMarketProxy.getRequiredMargins(accountId) withdrawableMargin = availableMargin - initialMargin

Health factor

A factor representing the account's risk of liquidation. Accounts with a health factor below 1 can be flagged for liquidation.

initialMargin, maintenanceMargin = PerpsMarketProxy.getRequiredMargins(accountId) availableMargin = PerpsMarketProxy.getAvailableMargin(accountId) Health factor = availableMargin / maintenanceMargin

Position unrealized pnl

The profits or losses accumulated on a position since the last contract interaction.

PerpsMarketProxy.getOpenPosition(accountId, marketId) returns: - pnl : The unrealized pnl from changes in the index price - accruedFunding : The USD value of funding accrued to the position Note that these values update when positions are modified. This means funding will be realized and reset to 0. Historical funding and realized pnl requires offchain indexing.

Fill price

The average price a trader will receive after the premium or discount is applied to their order.

PerpsMarketProxy.getFillPrice(marketId, orderSize, price) - The price parameter should be fetched from the offchain Pyth price service

Price impact

The impact on a market's index price as a result of filling an order.

Starting with a price from the Pyth price service and a fillPrice from calling getFillPrice... price impact = (fillPrice - price) / price)

Estimated fees

An estimate of the fees paid to open an order of a specified size.

PerpsMarketProxy.computeOrderFees(marketId, sizeDelta)

Returns a USD amount of fees charged to open a position of size sizeDelta

Note: The result is an estimate since other orders may be filled before yours. This can impact the skew and therefore the fill price and whether maker or taker fees are applied.

Last updated