> For the complete documentation index, see [llms.txt](https://docs.derify.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.derify.finance/getting-started/dictionary.md).

# Dictionary

## Account

**Account Balance:** cumulative deposit - cumulative withdrawal + cumulative realized PnL from total trading pairs - cumulative PCF from total trading pairs - total trading pairs trading fee - cumulative paid gas fee - liquidation penalty/compensation \
\&#xNAN;**\[**&#x49;f liquidation/forced liquidation occurs, the account balance will be reset to 0 and the margin will be recalculated from 0 upon rechargin&#x67;**]**

**Margin Balance:** account balance **+** cumulative unrealized PnL from all trading pairs

**Margin For All Positions:** the sum of margins for positions of all trading pair&#x20;

**Gas Fee:** This refers to the gas fee paid for actions initiated by liquidators, such as limit orders, take-profit, stop-loss, auto-deleveraging, and forced liquidations. The charging rule for gas fees is as follows: Liquidators calculate the gas fee based on the on-chain **ProposeGasPrice** gas reward amount (refer to system parameters), and this fee is shared among the users being liquidated (multiple liquidation transactions might be executed at once). The liquidation transaction will have a whitelist mechanism designed by the DAO to ensure the reasonability and fairness of the gas fee when each liquidator executes the action. Theoretically, the more liquidation transactions there are, the lower the liquidation gas fee will be for each user.

**Liquidation Fee:** the remaining margin in the account will be injected into the insurance pool when the position is liquidated&#x20;

**System Compensation:** the system will compensate when the margin balance is negative after the position has closed or been liquidated

**Bond Compensation:** the system has a net loss and the insurance pool is insufficient, so users cannot withdraw 100% of their cash. At this time, the system will compensate users by issuing redeemable bonds bToken

## Trade

**Current Price:** take the median from multiple external Oracle

**Price Fluctuation:** the percentage change of the current price relative to 24 hours ago

**PCF (Position Change Fee) rate:** (total long position of the trading pair - total short of the trading pair) / MIN ( *κ \** liquidity pool balance, *ψ/Margin Token price) \* 100%* \
\&#xNAN;**\[**&#x52;efer to system parameters for κ and &#x3C8;**]**

**Position Mining Yield:** position mining yield (Margin Token) + position mining yield ($DRF)

**Position Mining Yield (Margin Token):** (1 - net position direction \* position direction \* μ) \* maximum leverage of the trading pair \* yesterday's trading fee of the trading pair  \* 15% / MAX(0.00000001, total positions of the trading pair in the position direction) \* 365 \* 100% \
\&#xNAN;**\[**&#x52;efer to system parameters for &#x3BC;**]**

**Position Mining Yield ($DRF):** (1 - net position direction \* position direction \* μ) \* maximum leverage of the trading pair  \* today's $DRF rewards of the trading pair \* 0.5 / MAX(0.00000001 \* Margin Token price, total positions of the trading pair in the position direction \* Margin Token price) \* 365 \* 100% **\[**&#x52;efer to system parameters for &#x3BC;**]**&#x20;

**Max Position Size:** margin available \* leverage / open position price&#x20;

**Notional Value:** position size \* open position price

**Margin Available:** MAX(0, margin balance - margin for all trading pairs - margin occupied by limit order for all trading pairs)

**Margin Occupied By Limit Order:** limit price \* position size / leverage

**Open Position Fee:** open position size \* open position price \* trading fee \
\&#xNAN;**\[**&#x52;efer to system parameters for trading fe&#x65;**]**

**Position Change Fee (Open):** (|naked position of the trading pair after open position| - |naked position of the trading pair before open position|) \* \[(|PCF rate before open position| + |PCF rate after open position|)/2+ρ]\
**\[**&#x52;efer to system parameters for &#x3C1;**]**

**Naked Position:** total long position of the trading pair - total short position of the trading pair

**Minimum Open Position Size:** Net Value of Minimum Open Position (in USD) / Margin Token Price &#x200B;**\[**&#x52;efer to system parameters for Minimum Open Position Size]

**Position Limit (One-Way):** \[liquidity pool balance \* θ - direction of open position \* (total long position of the trading pair - total short position of the trading pair)]/trading pair market price\
\&#xNAN;**\[**&#x52;efer to system parameters for &#x3B8;**]**

**Unrealized PnL:** futures direction \* (current futures price - average open position price) \* position size

**PnL%:** unrealized PnL / margin \* 100%

**Position Holding:** cumulative open position - cumulative position close

**Average Open Position Price:** total notional value / total position size

**Margin For Position Holding:** position holding \* current price of the trading pair / leverage

**Margin Rate:** margin balance / total positions of all trading pairs

**Liquidation Price:** current price - direction of position holding  \* (margin balance - total positions of all trading pairs \* maintenance margin rate) / position holding\
\&#xNAN;**\[**&#x52;efer to system parameters for maintenance margin rat&#x65;**]**

**Estimated PnL for TP/SL (Take Profit/Stop Loss):** direction of position holding \* (TP/SL price - open position price) \* position size

**Maximum Position Closing:** MIN(total position holding, closing limit/current price)

**Closing Limit:** (liquidity pool balance \* θ + direction of position close \* (total long position for the trading pair - total short position for the trading pair)) / trading pair market price

**Closing Fee:** position close \* close price \* trading fee rate \
\&#xNAN;**\[**&#x52;efer to system parameters for trading fee rat&#x65;**]**

**Position Change Fee (Closing Position):** (|naked position of the trading pair after position close|  -  |naked position of the trading pair before position close|) \* \[(|PCF rate before position close| + |PCF rate after position close|)/2 + ρ]\
\&#xNAN;**\[**&#x52;efer to system parameters for &#x3C1;**]**

**Total PnL:** margin balance of all users - liquidity pool balance

**Liquidity Pool Balance:** total deposit - total withdrawal (U) - liquidation gas - trading fee - remaining margin after liquidation \[inject into insurance pool] - shared user net loss \[inject into insurance pool] -  user net profit shared by insurance pool redemption \[inject into insurance pool]&#x20;

**Realized PnL:** direction of the position closed  \* (close position price - open position price) \* close position size

**ADL (Auto Deleveraging):** when the margin rate < maintenance margin rate, it will trigger auto liquidation partially. \
auto liquidation amount = (total position holdings of all trading pairs \* maintenance margin rate \* n - margin balance + close position gas fee) / (maintenance margin rate \* n - trading fee rate) \
\&#xNAN;**\[**&#x52;efer to system parameters for n and maintenance margin rat&#x65;**]**

## Earning

**Open Position Balance:** the sum (long positions + short positions) of all open positions (position holding \* contract price) of all trading pairs

**Position Mining Rewards:** Rewards are calculated and distributed every 8 hours based on the data at that specific moment (T-Time). Rewards consist of both Margin Token earnings and $DRF earnings

**Time T Position Mining Rewards (in Margin Token):** The sum of all position earnings (in Margin Token) at T-Time - Gas Fee for reward distribution \* individual user's earnings (in Margin Token) at T-Time / total earnings of all users (in Margin Token) at T-Time

**Single Position Earnings at T-Time (in Margin) =** (1 - Net position direction at T-Time \* user's position direction \* u) \* Total trading fees from the previous day for that trading pair \* 5% / MAX(0.00000001, Total amount of positions in the trading pair's direction at T-Time) \* Individual user's position size in that direction at T-Time \[Refer to system parameters for u].

**Position Mining Earnings at T-time (in $DRF):** Total of all positions' earnings at T-time (in $DRF)

**Single Position Earnings at T-time (in $DRF)** = (1 - Net position direction at T-time \* user's position direction \* u) \* $DRF amount allocated to that trading pair for the day / 6 / MAX(0.00000001, Total amount of positions in the trading pair's direction at T-time) \* Individual user's position size in that direction at T-time \[Refer to system parameters for u]

**$DRF Staking Reward:** For each staked $DRF, 1 eDRF is produced on a daily basis

**bToken Staking Reward:** The interest obtained for 1 bToken/day is $$i$$/365 bToken\
\&#xNAN;**\[**$$i$$an adjustable paramete&#x72;**]**

**Exchangeable Balance:** MIN(account balance, buyback fund balance)

**Buyback Fund:** x \* MAX(0，insurance pool balance - MAX(Total PnL, 0))\
\&#xNAN;**\[**&#x52;efer to system parameters for x ∈ \[0,100%]**]**

**Insurance Pool Balance:** 40% trading fee + invalid broker rebate 30% trading fee + shared user net loss + remaining margin after liquidation - user net profit shared by insurance pool redemption - spending on bond redemption - spending on $DRF buyback

## System Data

**Total Trading Net Value:** Sum of net values (in USD) for all Margin Token trades. Net Value of Each Margin Token Trade: = Each Margin Token transaction amount \* Margin Token price at the time of transaction

**Total Position Net Value:** Sum of net values (in USD) for all Margin Token positions. Current Net Value of Each Margin Token Position (Long & Short): = Current position amount (Long & Short) for that Margin Token \* Current price of that Margin Token

**Total Buyback Net Value:** Sum of net values (in USD) for all Margin Token buybacks. Net Value of Each Margin Token Buyback: = Current balance in the buyback fund for each Margin Token \* Current Margin Token price

## **System Parameters**

Parameters for different Margin Tokens might vary. For specifics, please refer to the product system parameters page


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.derify.finance/getting-started/dictionary.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
