The Battle of Perptual Futures Algorithms: A Comparison of Price Mechanisms between CEX and DEX

The Battle of Contract Algorithms between CEX and DEX: Hyperliquid, Binance, OKX

In March 2025, the JELLYJELLY contract caused a stir in the market on a certain decentralized trading platform. Within just a few hours, the price of the contract skyrocketed by 429%, about to trigger a large-scale liquidation. If the liquidation occurs, short positions will be forced into the on-chain liquidity vault, resulting in tens of millions of dollars in floating losses. On-chain positions are precarious, and the crypto community is in an uproar. Meanwhile, a centralized trading platform unusually and swiftly launched perpetual contract trading for JELLYJELLY, further intensifying the situation.

Just as the crisis was about to break out, the validators of the decentralized platform took emergency voting action to forcibly delist, close positions, and freeze transactions. This move raised questions in the community about the "decentralized" exchange.

This incident has not only become the focus of heated discussion in the crypto community but also exposed a core issue: what determines the price on decentralized trading platforms? Who ultimately bears the risk? Is the Algorithm really neutral?

This article will use this event as a starting point to analyze the algorithmic differences in the core mechanisms of perpetual contracts among the three major platforms—index price, mark price, and funding rate—and explore the financial principles and risk transmission mechanisms behind them. We will see how different algorithms shape trading styles, serve different types of operators, and determine traders' survival capabilities in market storms.

This is not only an analysis of contract technology but also a philosophical contest about market order design.

The Battle of Contract Algorithms between CEX and DEX: Hyperliquid, Binance, OKX

Overview of Perpetual Contract Trading

Perpetual contract trading is mainly composed of three key elements:

  1. Index price: Tracks changes in spot market prices and serves as the theoretical basis for contract pricing.

  2. Mark Price: The decisive price used to calculate unrealized profits and losses, liquidation, and other key events.

  3. Funding Rate: An economic mechanism that connects the spot and futures markets, guiding the contract price to revert to the spot price.

The three platforms have adopted different algorithm strategies in these core mechanisms:

The core advantage of a certain decentralized platform lies in the design of its marked price. This platform claims that the marked price cannot be arbitrarily changed to affect user positions, which is a key manifestation of its "decentralized" characteristic.

Algorithm Details Comparison

Index Price/Oracle Price

A decentralized platform uses oracle prices independently constructed by validator nodes. It employs a weighted median method to resist extreme price fluctuations, enhancing its anti-manipulation capability, but the update frequency is slower (once every 3 seconds). This design aims to eliminate outliers and fluctuations, making the prices smoother.

Mark Price Mechanism

The marking price algorithm of a certain centralized platform A is based on two main principles: "price smoothness" and "market depth reflection". Its formula combines the bid/ask midpoint price, transaction price, and impact price of the contract market. By simulating the impact of large market orders on the order book, it reflects the true liquidity cost. The median constructed after processing with exponential moving average makes the marking price changes smooth and resistant to spikes, suitable for stable allocation and arbitrage strategies for large funds.

A certain centralized platform B adopts a more direct approach, using only the bid-ask mid-price as the source of the marked price. This Algorithm is extremely sensitive to tiny trades, easily causing sharp fluctuations, making it suitable for high-frequency traders and short-term operations.

The marked price structure of a certain decentralized platform integrates the two aforementioned methods. It is controlled by multiple nodes and combines three price sources: the median of the platform's own best bid, best ask, and last transaction price; the perpetual mid-price weighted median from multiple centralized exchanges; and the exponential moving average of the difference between the oracle price and the contract mid-price. This mechanism creates a certain degree of "Algorithm democracy" and enhances resistance to manipulation.

The Battle of Contract Algorithms between CEX and DEX: Hyperliquid, Binance, OKX

Funding Rate Algorithm

A decentralized platform has introduced a premium index in its funding rate algorithm, combining order book depth and oracle prices. Its features include a very high funding rate cap, calculations based on oracle prices rather than mark prices, and more frequent collection intervals. These designs aim to accelerate price reversion and compensate for the shortcomings of insufficient liquidity.

The funding rate of a certain centralized platform A relies on a relatively long settlement period, combined with order book depth and lending rates, to provide institutional investors and medium to long-term traders with smoother capital costs.

The funding rate Algorithm of a certain centralized platform B is relatively simple, calculated based on the deviation of the market prices, with large fluctuations, making it suitable for high-frequency and short-term strategies.

Trading Strategies and Financial Philosophy Across Different Platforms

Centralized Platform A: Design of Rational Institutionalists

  • Core Philosophy: Making the Market Predictable
  • Mechanism Features: Smooth marked price, finely modeled funding rate, risk buffer mechanism
  • Suitable for: institutional investors and medium to long-term traders seeking stable returns with controllable risks

Centralized Platform B: The Design of Trading Instincts

  • Core concept: The market is a reflection of human nature.
  • Mechanism Features: Price Marking Sensitivity, Large Funding Rate Fluctuations, Rapid Liquidation Mechanism
  • Suitable audience: high-frequency traders, short-term traders

A certain decentralized platform: Design of on-chain structuralists

  • Core Concept: Algorithm Sets Order
  • Mechanism Features: Validator consensus price, liquidity treasury support, high-frequency funding rate, on-chain transparency
  • Suitable for: Traders pursuing transparency and decentralization, on-chain arbitrageurs

The Contract Algorithm Battle between CEX and DEX: Hyperliquid, Binance, OKX

Conclusion

The algorithm designs of different platforms reflect different understandings of the essence of the market and the ways in which trust mechanisms are constructed. Whether pursuing stability, embracing volatility, or relying on on-chain consensus, each approach has its advantages and limitations.

In extreme market conditions, the limitations of the Algorithm will be exposed, and human intervention may become necessary. The JELLYJELLY incident indicates that even decentralized systems need mechanisms to deal with unexpected situations.

The financial world of the future will continue to be dominated by algorithms, but each algorithm carries implicit value judgments. Traders need to understand these mechanisms and choose platforms that align with their risk preferences and trading styles. Regardless of the system chosen, it is crucial to maintain a sense of reverence for the market.

The Battle of Contract Algorithms Between CEX and DEX: Hyperliquid, Binance, OKX

HYPE4.27%
View Original
This page may contain third-party content, which is provided for information purposes only (not representations/warranties) and should not be considered as an endorsement of its views by Gate, nor as financial or professional advice. See Disclaimer for details.
  • Reward
  • 5
  • Repost
  • Share
Comment
0/400
OnchainHolmesvip
· 14h ago
Can a DEX exchange still be called decentralized if it does this?
View OriginalReply0
PoolJumpervip
· 19h ago
Playing it wrong is not just messing around.
View OriginalReply0
SchrodingerWalletvip
· 08-10 13:50
Do you think this counts as Decentralization? Hehe
View OriginalReply0
StableGeniusDegenvip
· 08-10 13:44
How many short orders got liquidated this time?
View OriginalReply0
WenMoonvip
· 08-10 13:34
Retail investor? Played for suckers again.
View OriginalReply0
Trade Crypto Anywhere Anytime
qrCode
Scan to download Gate app
Community
English
  • 简体中文
  • English
  • Tiếng Việt
  • 繁體中文
  • Español
  • Русский
  • Français (Afrique)
  • Português (Portugal)
  • Bahasa Indonesia
  • 日本語
  • بالعربية
  • Українська
  • Português (Brasil)