📢 Gate Square Exclusive: #WXTM Creative Contest# Is Now Live!
Celebrate CandyDrop Round 59 featuring MinoTari (WXTM) — compete for a 70,000 WXTM prize pool!
🎯 About MinoTari (WXTM)
Tari is a Rust-based blockchain protocol centered around digital assets.
It empowers creators to build new types of digital experiences and narratives.
With Tari, digitally scarce assets—like collectibles or in-game items—unlock new business opportunities for creators.
🎨 Event Period:
Aug 7, 2025, 09:00 – Aug 12, 2025, 16:00 (UTC)
📌 How to Participate:
Post original content on Gate Square related to WXTM or its
Unveiling the Jelly-My-Jelly Incident: The Mark Price Dilemma and Systemic Risks in the Perptual Futures Market
When the Mark Price Becomes a Weapon: Analyzing Systemic Risks in the Perpetual Futures Market
In March 2025, a little-known token JELLY with a daily trading volume of less than $2 million triggered a multi-million dollar liquidation storm on Hyperliquid. Attackers exploited the platform's publicly available calculation logic, algorithmic processes, and risk control mechanisms to execute a "no-code attack" that was highly destructive to both the market and traders. The mark price, which was supposed to serve as an anchor of "neutrality and safety" in the market, transformed from a shield into a sword during this incident.
This article will deeply analyze the systemic risks of the mark price mechanism in the perpetual futures market of altcoins from both theoretical and practical perspectives, and will provide a detailed review of the Jelly-My-Jelly attack incident. This incident not only revealed the structural vulnerabilities in oracle design and the double-edged nature of innovative liquidity pools (HLP Vault) but also exposed the inherent asymmetry in the current mainstream liquidation logic in protecting user funds during extreme market conditions.
Part One: The Core Paradox of Perpetual Futures - The Liquidation Mechanism Bias Caused by False Security
1.1 mark price: A tendency for liquidation brought about by a consensus game mistakenly thought to be safe.
The core principle of mark price is built around a three-value median mechanism based on "index price". The index price is calculated by the weighted average of the prices of the asset on multiple mainstream spot platforms, aiming to provide a fair reference price across platforms and regions.
The typical mark price calculation method is as follows:
Mark Price = Median (Price1, Price2, Last Traded Price)
The introduction of the median is intended to eliminate outliers and enhance price stability. However, the security of this design is entirely based on the assumption that the quantity of input data sources is sufficient, the distribution is reasonable, liquidity is strong, and it is difficult to be collectively manipulated.
However, in reality, the spot market for the vast majority of altcoins is extremely weak. Once an attacker is able to control the prices of several low liquidity platforms, they can "pollute" the index price, thereby injecting malicious data into the mark price through a formula legally. This type of attack can trigger large-scale leveraged liquidations at minimal cost, causing a chain reaction.
1.2 Liquidation Engine: The platform's shield, as well as blade.
When the market price fluctuates rapidly in an unfavorable direction, the trader's margin will be eroded by floating losses. Once the remaining margin falls below the "maintenance margin ratio," the liquidation engine will be triggered. The core triggering standard is the mark price, not the platform's latest transaction price.
What is even more concerning is the "forced liquidation" (or early settlement) mechanism. Many exchanges adopt relatively conservative liquidation parameters in their risk control systems to avoid the risk of negative balance. When a forced liquidation is triggered, even if the liquidation price is better than the actual price that would zero out the loss, the platform usually does not return this portion of the "forced liquidation surplus" but instead directly injects it into the platform's insurance fund.
The liquidation engine should be a neutral risk control tool, but in terms of profit attribution, parameter selection, and triggering logic, it has a tendency toward platform profit-making.
The failure of the mark price at 1.3 leads to distortion in the liquidation engine.
The theory of mark price provides a fair and manipulation-resistant price benchmark by aggregating multi-source data and median algorithms. However, this theory may hold when applied to liquid mainstream assets, but its effectiveness will face severe challenges when confronted with illiquid, centralized trading altcoins.
For the vast majority of altcoins, their trading depth and the number of listed exchanges are very limited, which makes their price indices easily fall into the "small data set" trap. Therefore, the sense of security brought by the exchange's claim of a "multi-source index" is often just an illusion in the world of altcoins. Many times, the latest transaction price is often equated with the mark price.
Part Two: The Oracle Dilemma: When Spot Liquidity Dries Up as a Weapon
2.1 Oracle: A fragile bridge connecting on-chain and off-chain
Price oracles are middleware systems responsible for securely and reliably transmitting off-chain data to on-chain, providing "real world" information inputs for the operation of smart contracts. However, an "honest" oracle does not mean that it reports "reasonable" prices. The duty of an oracle is merely to accurately record the external world state it can observe; it does not judge whether the price deviates from fundamentals.
2.2 The Pivot of Attack: When Liquidity Defects Become a Weapon
The core of this type of attack lies in exploiting the liquidity disadvantage of the target asset in the spot market. For assets with thin trading, even small orders can cause significant price fluctuations, thereby providing an opportunity for manipulators.
The attack on Mango Markets in October 2022 is considered a "paradigm". The attacker leveraged the extreme liquidity depletion of MNGO by concentrating approximately $4 million in purchases across multiple exchanges, successfully driving the MNGO price up by over 2300% in a very short time. This "abnormal price" was fully recorded by the oracle and fed to the on-chain protocol, causing its borrowing limit to soar, ultimately "legally" draining all the assets of the platform.
Attack Path Detailed Explanation:
Part Three: Hunting Ground - Structural Risk Analysis of Hyperliquid
3.1 HLP Treasury: Democratized Market Makers and Clearing Counterparties
The HLP treasury of Hyperliquid is a fund pool managed uniformly by the protocol, serving a dual purpose. It acts as an active market maker for the platform while also serving as the platform's "liquidation stop-loss backstop." This design not only attracts speculators but also draws in a more dangerous presence: attackers who deliberately manipulate the market.
3.2 Structural Defects of the Liquidation Mechanism
The Jelly-My-Jelly incident exposed a fatal flaw in Hyperliquid's funding structure and liquidation model within the HLP treasury under extreme market conditions. There is no strict isolation mechanism between the liquidation reserve pool and other funding pools executing market-making strategies; they share the same collateral.
When the clearing reserve pool itself has fallen into deep losses, because it can call upon the collateral assets of other strategy pools in the entire HLP treasury, the system determines that the "overall health" of the entire HLP treasury is still good, and therefore does not trigger the risk control mechanism. The design of this shared collateral mechanism inadvertently bypasses the ADL systemic risk defense line.
Part Four: Case Study - A Complete Review of the Jelly-My-Jelly Attack
Phase 1: Layout - $4 million short trap
On March 26, as the spot price of JELLY fluctuated around $0.0095, the attacker began the first phase. The attacker constructed a short position worth approximately $4 million in the perpetual futures market of JELLY through self-trading, supplemented by a total of $3 million in long counterpart positions.
Stage 4.2 Phase Two: Blitz - The Flash Battle of the Spot Market
Attackers launched a synchronized buying assault on multiple centralized and decentralized exchanges. The JELLY spot price was quickly pushed up in a short period, starting from $0.008, and within less than an hour, the price soared over 500%, reaching a peak of $0.0517.
Stage 4.3: Ignition - Oracle Contamination and Liquidation Waterfall
The sharp rise in spot prices quickly transmitted to Hyperliquid's mark price system. The surge in the mark price directly triggered the short positions previously deployed by the attacker. As the HLP treasury serves as the platform's liquidation counterparty, it unconditionally took over according to the smart contract logic, causing the entire high-risk position to be directly pushed onto HLP.
Stage 4: Aftershock - Emergency Delisting and Market Reflection
Faced with immense pressure from the market and the community, Hyperliquid validator nodes urgently voted to adopt multiple measures: immediately and permanently delist the JELLY Perptual Futures; the foundation will fund full compensation for all affected users from non-attack addresses.
Conclusion - The "Mark Price Illusion" and Defensive Propositions of Perpetual Futures
In the Jelly-My-Jelly incident, the attackers did not rely on complex contract vulnerabilities or cryptographic methods; they simply identified and exploited the structural mathematical flaws in the mark price generation mechanism - small data sources, median aggregation, liquidity fragmentation, and operated by leveraging the market's liquidation mechanism.
The fundamental issue of mark price manipulation is:
The mark price should not be a value that is "mathematically correct but strategically fragile," but rather a product of a mechanism that can maintain stability under real market pressure. The ideal of DeFi is to build trust through code, but code is not perfect; it can also entrench biases, amplify preset flaws, and even become a weapon in the hands of attackers.
The Jelly-My-Jelly incident is not a coincidence, nor will it be the last. It serves as a warning: any liquidation mechanism based on "certainty" is a potential arbitrage entry point before deeply understanding the game structure. For the mechanism to mature, it requires not only faster matching speeds and higher capital efficiency, but also a self-reflective capability at the design level to identify and block these systemic risks that are obscured by "mathematical aesthetics."
May we always maintain a heart of reverence for the market.
Mathematics is simple, but humans are complex. Only the historical game is repeated. Know the fact, and also know the reason behind it.