The profits and losses you think you have may all be illusions created by the perpetual contract algorithm.

CN
PANews
Follow
17 hours ago

The profit and loss algorithm for perpetual contracts is never as simple as what you see on the exchange interface.

It hides a game of multiple variables: funding rates, mark prices, liquidation mechanisms, and the logic of displaying unrealized profits and losses. Users may think they are "holding a profit," but they might actually be in a high-risk zone; conversely, you might think you are only experiencing a "slight unrealized loss," but in reality, the liquidation model may have already been triggered, just not executed yet.

We attempt to examine the principles of calculating unrealized profits and losses and their psychological impacts, trying to restore: what truly constitutes the basis for profit and loss judgment, and what are the algorithmic traps?

Reading Guide

If you happen to have the following questions, it is recommended that you start from the first chapter;

  1. Did you know that perpetual contracts are divided into forward and inverse contracts?

If you have the following questions, it is recommended that you start from the second chapter:

  1. Why does it seem like my position is profitable, but after closing the position, I earn less than what was displayed earlier? Even after adding transaction fees and funding fees, I end up with a loss?

  2. When I opened the position, the margin was enough to support a 10% price fluctuation, but after 3 days, a 5% fluctuation led to liquidation?

If you do not have any of the above questions, it is recommended that you like and share before leaving. ??

Chapter One: Profit and Loss Calculation Mechanism

Perpetual contracts, as the most popular tool in the cryptocurrency derivatives market, allow traders to speculate on asset prices without an expiration date. Understanding how profit and loss (PnL) is calculated is the cornerstone of successful trading. The logic of profit and loss calculation varies by contract type, mainly divided into two categories: USDT margin (forward contracts) and coin-margined (inverse contracts).

1.1 USDT Margin (Forward) Contracts: Standard Linear Model

USDT margin contracts, also known as forward contracts, use stablecoins (such as USDT or USDC) as margin and settlement currency. Their profit and loss calculation is straightforward and linear, making it the mainstream choice in the market. Currently, the vast majority of mainstream exchanges (such as Binance, Bybit) primarily use USDT-based contracts, as their PnL structure is intuitive and fund management can be more easily automated, making it a common preference for both retail and institutional traders.

1.1.1 Unrealized Profit and Loss (Unrealized PnL)

Unrealized profit and loss refers to the floating profit and loss during the holding period, and it is a core indicator used by exchanges to assess liquidation risk.

  • Key Element - Mark Price: The calculation benchmark for unrealized profit and loss is the mark price, not the last transaction price. The mark price is a composite index designed to reflect the "true" fair value of an asset, smoothing out short-term price fluctuations and preventing market manipulation. It is usually composed of the index price (the weighted average price from major spot exchanges) and the funding rate basis, to avoid unnecessary liquidations caused by price fluctuations from a single exchange.

  • Calculation Formula:

  • Long Position Unrealized PnL = (Mark Price - Average Opening Price) × Position Size

  • Short Position Unrealized PnL = (Average Opening Price - Mark Price) × Position Size

Note: The unrealized profit and loss displayed on the trading panel often differs from the actual settlement upon closing, which is due to the difference between the execution price (last transaction price) and the mark price used for risk calculation, creating a "psychological gap."

1.1.2 Realized Profit and Loss (Realized PnL)

Realized profit and loss is the final locked profit and loss after closing a position, which includes all costs incurred during the trading process.

  • Calculation Formula: Realized PnL = (Closing Price - Average Opening Price) × Closing Quantity - Transaction Fees - Funding Fees incurred during the holding period

  • Key Variable - Notional Value: A core trap traders face is confusing the concepts of margin and notional value of the contract. The notional value of a contract is the total value of the position, calculated as Price × Quantity. Both transaction fees and funding fees are calculated based on the notional value of the position, not the amount of margin invested.

For example, a trader uses $100 of margin to open a long position with 100x leverage, controlling a notional value of $10,000. If the taker fee rate is 0.06%, the transaction fee the trader needs to pay for opening the position is not 0.06% of the margin (i.e., $0.06), but rather 0.06% of the notional value, which is $10,000 * 0.0006 = $6.

Similarly, a funding fee of 0.01% is not $0.01, but $10,000 * 0.0001 = $1. Thus, high leverage can dramatically amplify the erosion effect of various fees on the trader's actual margin, and even during sideways market conditions, this continuous "slow bleeding" can significantly increase the risk of liquidation.

1.2 Coin-Margined (Inverse) Contracts: Non-Linear Profit Structure

Coin-margined contracts, also known as inverse contracts, use the cryptocurrency itself (such as BTC, ETH) as margin and settlement currency. The profit and loss calculation for these contracts is non-linear, as the value of the margin itself fluctuates with market prices.

  • Profit and Loss Calculation: The profit and loss formula is based on the contract quantity (usually priced in USD, such as each contract worth $1 or $100) and the reciprocal of the price. This structure is also referred to as "non-linear inverse contracts."

  • Calculation Formula:

  • Long Position Profit and Loss (settled in coins) = (Closing Price - Opening Price) × Position Size - Fees

  • Short Position Profit and Loss (settled in coins) = (Opening Price - Closing Price) × Position Size - Fees

Asymmetric Risk Analysis: This non-linear profit structure creates an asymmetric risk exposure for traders, which is a key but often overlooked trap. When traders go long on BTC/USD inverse contracts, as the BTC price rises, their profit in BTC terms is worth more when converted to USD, creating a convex, accelerating profit curve.

Conversely, when the BTC price falls, the loss in BTC terms increases in quantity, but the BTC used as margin also depreciates. This dual effect means that for long positions, a 10% drop in market price will lead to a USD value loss exceeding 10%, triggering liquidation faster than linear contracts.

For short positions, the opposite is true; a 10% price increase results in a USD loss that is less than 10%, leading to a relatively lower liquidation risk. This inherent convexity is the main risk for long traders in bear markets and a structural advantage for long-term holders accumulating base assets in bull markets, hence also referred to as "coin-holding" contracts.

Chapter Two: Visible Profits, Invisible Bleeding — The Hidden Risks of Perpetual Contracts

We take forward contracts (the common type) as an example. In addition to the basic profit and loss calculations, there are many hidden costs and risks in perpetual contract trading, which are the main reasons for unexpected losses for traders.

2.1 Mark Price vs. Last Transaction Price: The Number One Trap

Exchanges use the mark price to calculate unrealized profit and loss and trigger liquidations, while traders' orders are executed at the last transaction price. This dual price system, although designed as a necessary mechanism to prevent market manipulation, also buries significant risks for traders who only focus on the latest transaction price on the chart.

  • Scenario One: Unnecessary Stop Loss. During periods of extreme market volatility, a large malicious order or a "fat finger" error can cause the last transaction price to suddenly show a long wick. If a trader's stop-loss order is triggered based on the last transaction price, their position may be unnecessarily liquidated. Meanwhile, the mark price, as an average price from multiple data sources, may fluctuate very little, and the position is far from reaching the actual liquidation risk line.

Case: A certain cryptocurrency's 1-minute candlestick spikes, retail traders are shaken out

Trader A goes long at a BTC price of $31,500, setting a stop loss at $30,800. Under normal conditions, the price fluctuates slightly between $31,400 and $31,600, but at one moment, a large sell order suddenly appears, causing the transaction price to plummet to $30,780, only to rebound to $31,500 after 2 seconds.

At this moment:

  • The mark price, due to integration with multiple exchange data, remains above $31,400;

  • The position is not close to the liquidation zone;

  • However, when A sees the price of $30,900, they have already executed a market stop loss.

Result: Trader A is completely shaken out by the liquidity shock, the market has not changed, but they have been swept out by their own emotions.

  • Scenario Two: Unexpected Liquidation. The opposite situation can also occur. A trader observes that the latest transaction price on their trading platform is stable, believing their position is safe. However, if the prices from other major spot exchanges that constitute the index price collectively drop, it will lead to a rapid decline in the index price and mark price. Even if the latest transaction price on the current exchange does not change significantly, once the mark price touches the liquidation line, liquidation will still be triggered.

Case: Platform price stable, account suddenly liquidated

Trader B shorts ETH, observing the price stable at $2,000 on a small exchange. Based on this price, their short position appears to have a safety margin.

However, the index price used by the system includes spot markets like Binance, OKX, and Coinbase. At this moment, the prices on these platforms plummet to $1,900, causing the mark price to fall below the liquidation line.

Result: Even though they are watching "their own exchange," the account is still instantly liquidated.

Traders cannot only look at "the candle in front of them," they must keep an eye on "the thermometer in the background" — the mark price is the "death line."

2.2 Funding Fees: Chronic Bleeding Under High Leverage

Funding fees are the costs exchanged periodically between long and short positions in perpetual contracts to anchor the spot price. The real danger lies in the interaction with high leverage.

Funding fees are calculated based on the full notional value of the position, not the margin invested by the trader. High-frequency funding fees have a compounding effect under leverage. For example, at 0.01% every 8 hours, the daily holding cost is 0.03%, and over 10 days, it will erode nearly 0.3% of the margin. For a position with 50x leverage, this means that the actual capital is eroded by 15% (0.3% * 50). In sideways market conditions, this fee acts as an "invisible time killer."

Case: Real Calculation of Chronic Bleeding

Trader C goes long on a BTC position worth 100,000 USDT, using 50x leverage and only investing $2,000 in margin.

  • Every 8 hours, the funding fee is 0.01%, which means a daily cost of 0.03%;

  • Holding the position for 10 days, the cumulative funding fee rate is 0.3%;

  • Since it is calculated based on "notional value," this amounts to: 0.03% * 100,000 * 10 = $300, which accounts for 15% of their initial margin! Even more frightening, C did nothing during this time, and the price of BTC did not change.

Conclusion:

  • If the market is sideways, they seem not to have lost, but the funding fee is "dripping blood" every day;

  • The higher the leverage, the longer the time, and the more volatile without an increase, the greater the chronic damage from funding fees.

“High leverage + volatile market + long duration” = an invisible meat grinder.

2.3 Chain Liquidation and Slippage

When a large leveraged position is liquidated, it triggers a massive market order to close that position. This can lead to a domino effect, where one liquidation triggers another, creating "chain liquidations" or "squeeze markets."

In a market with insufficient liquidity, the large market orders thrown out by the liquidation engine quickly "consume" the order book depth, causing significant slippage and pushing prices further toward liquidation. This rapid price movement can trigger the liquidation of concentrated leveraged positions at the next price level, forming a self-reinforcing negative feedback loop.

Case: "Slippage Hell Day" on May 19, 20xx

On this day, Bitcoin crashed from $42,000 to $30,000 in less than an hour, causing the following chain reaction:

  1. Long high-leverage positions were liquidated;

  2. The system threw out a massive number of market orders;

  3. The order book was torn apart, resulting in significant slippage;

  4. More leveraged long stop losses or liquidations were triggered;

  5. Deeper price declines → New round of liquidations → Death spiral.

Trader D set a stop loss at $38,000 while going long, but due to liquidity being "sucked dry," the system's market stop loss ultimately executed at $34,500.

This is slippage killing; it’s not that you want to lose so much, but the system gives you no choice when it spirals out of control.

Note: Setting "limit stop losses" can partially prevent slippage; choosing platforms with good liquidity and deep order books is especially important.

2.4 Automatic Deleveraging (ADL): The Winner's Curse

Automatic deleveraging is the last risk control measure when the insurance fund is exhausted. It will forcibly close the most profitable opposite positions in the market to cover the losses of bankrupt traders. In traditional logic, the winners are the ones who profit; however, under the ADL mechanism, the winners may become victims, passively bearing the risk debt of a systemic market collapse. This is a structural injustice and a reversal of fate designed by centralization.

Case: The Short Seller's "Windfall Dream" Instantly Collapses

Trader E shorted LUNA during a market crash, with an opening price of $20, and the price plummeted to $1, resulting in a paper profit of 95% on his short position. However, due to the crash leading to a large number of long positions being liquidated and the insurance fund being depleted, the system initiated ADL.

E's short position was automatically liquidated at a price of $2.5, rather than the market price of $1.

Result:

  • Profits were significantly reduced;

  • Unable to reopen a position;

  • Could only watch the market continue to crash while feeling powerless.

From heaven to hell is just a system judgment; your "spoils" are instantly taken by the system for "cleanup."

Chapter Three: Practical Exercise: The Lifecycle of a BTCUSDT Trade

This chapter will integrate all the aforementioned concepts through a complete trading example.

3.1 Position Establishment and Initial Calculation

  • Scenario: A trader on Binance decides to open a long position of 1 BTC with 20x leverage when the BTC price is $60,000.

  • Initial Calculation:

  • Notional Value: 1 BTC × $60,000 = $60,000

  • Initial Margin: $60,000 ÷ 20 = $3,000

  • Maintenance Margin: According to Binance's tier rules, the notional value of $60,000 falls into the first tier, with a maintenance margin rate (MMR) of 0.40%. Therefore, the required maintenance margin is: $60,000 × 0.40% = $240.

  • Estimated Liquidation Price: The liquidation price is calculated based on the "mark price + fees, funding fees, slippage buffer," and is often lower than the simple estimate made by traders based solely on the opening price and leverage. In a simplified scenario without considering fees, the maximum loss tolerated is $3,000 - 240 = $2,760. Therefore, the estimated liquidation price is approximately $60,000 - 2,760 = $57,240.

3.2 Scenario A: Profitable Trade

  • Market Change: The BTC price rises to $65,000.

  • Unrealized Profit and Loss: The floating profit at this time is (65,000 - 60,000) × 1 = +$5,000.

  • Position Cost: Assuming a funding fee settlement occurred during the holding period, with a positive funding rate of 0.01%. The funding fee the trader needs to pay is: $65,000 × 0.01% = $6.50.

  • Closing Operation: The trader closes the position at a price of 65,000 USDT through a market order (Taker).

  • Opening Fee (Taker, 0.05%): $60,000 × 0.05% = $30.

  • Closing Fee (Taker, 0.05%): $65,000 × 0.05% = $32.50.

  • Net Realized Profit and Loss: Net Profit = (65,000 - 60,000) × 1 - 30 - 32.50 - 6.50 = Net Profit = 5,000 - 69 = $4,931. Although the apparent profit is $5,000, the transaction fees incurred during the market order and the funding fees during the holding period, especially under high leverage, will consume a significant portion of the profit, resulting in the actual amount received being far lower than the paper profit.

3.3 Scenario B: Losing Trade and Forced Liquidation

  • Market Change: The BTC price begins to decline.

  • Margin Consumption: As the price falls, unrealized losses continue to increase, deducting from the initial margin of $3,000.

  • Liquidation Trigger: When the mark price drops near the estimated liquidation price of $57,240, the trader's margin balance approaches the $240 maintenance margin requirement, triggering the liquidation process. Many traders still hold onto the hope that the market will reverse as they approach the liquidation price, ignoring the "premature liquidation" caused by the mark price mechanism. This is one of the most common psychological misconceptions leading to losses.

  • Final Result: The position is taken over by the liquidation engine and forcibly closed at market price. The trader loses the entire initial margin of $3,000. If the closing is accompanied by slippage, resulting in a final execution price worse than the bankruptcy price, the difference will be borne by the insurance fund.

Conclusion and Recommendations: Control Risks to Navigate Cycles

Perpetual contracts, as the most attractive yet dangerous tool in the cryptocurrency derivatives market, charm traders with high leverage, no delivery, and round-the-clock trading flexibility, while their risks are hidden in every detail of the profit and loss mechanism and trading system. As revealed in this article, many traders, in seemingly controllable operations, ultimately suffer unnecessary losses or even liquidation due to a lack of understanding of the mark price mechanism, accumulation of funding fees, the logic of system liquidation, and the ADL mechanism.

Key Summary:

  • Profit and loss calculation does not equal visual unrealized profit: Unrealized profit and loss is based on the mark price, not the transaction price, and psychological expectation gaps often lead to incorrect closing judgments.

  • Fees and funding costs erode profits: High leverage magnifies small transaction fees and funding costs into margin killers, especially in volatile markets where "chronic bleeding" is most severe.

  • The mark price is the real death line: Ignoring this means being blind in trading.

  • Liquidation mechanisms often accompany slippage and systemic chain reactions: Personal judgment often has no power under system pressure.

  • Under the ADL mechanism, profits do not guarantee safety: Winners may also be "sacrificed" by the system to maintain stability, which is a harsh reality traders must accept.

Practical (Bloodletting) Suggestions:

  1. If after reading the above article you find the contract trading mechanism complex and difficult to grasp — then don’t touch contract trading!!

  2. Master the platform rules: Each platform (Binance, Bybit, Bitget, etc.) has subtle differences in fee structures, liquidation mechanisms, and funding fee frequencies; understanding these differences is the foundation for refined operations.

  3. Avoid excessive leverage and control positions moderately: It’s not that you can’t use leverage, but you must understand that with each additional leverage, both unrealized profits and losses grow exponentially, and the margin for error decreases sharply.

  4. Set limit stop losses instead of market stop losses: In times of extreme market volatility, limit stop losses can effectively prevent secondary damage from slippage. (This is really important — set stop losses to lose less)

  5. Continuously monitor the mark price and index composition: Make good use of the "mark price" and "liquidation warning" tools provided by the platform, rather than relying solely on the latest transaction price on the candlestick chart.

  6. Avoid peak funding fee periods and optimize position structure: If you are not a short-term trader, try to avoid holding positions for long periods when funding fees deviate significantly. Consider strategies like staggered opening and two-way hedging to reduce net fees.

  7. In high-volatility markets, shorten trading cycles: The greater the uncertainty, the shorter the time you should stay in the market. Flexibility is more important than predicting direction.

May we always hold a heart of reverence for the market.

Don’t let unrealized profits and losses turn into fleeting illusions.

More importantly, find self-reconciliation after realizing that unrealized profits and losses are unsatisfactory.

Peace of mind is the true home.

免责声明:本文章仅代表作者个人观点,不代表本平台的立场和观点。本文章仅供信息分享,不构成对任何人的任何投资建议。用户与作者之间的任何争议,与本平台无关。如网页中刊载的文章或图片涉及侵权,请提供相关的权利证明和身份证明发送邮件到support@aicoin.com,本平台相关工作人员将会进行核查。

Bybit:白拿50U新人礼+5000U充值返利,真实到账,羊毛稳稳薅!
Ad
Share To
APP

X

Telegram

Facebook

Reddit

CopyLink