The three major Perp Dex mechanics at a glance: Hyperliquid vs. Jupiter vs. GMX

avatar
PANews
03-18
This article is machine translated
Show original
Here is the English translation of the text, with the terms in <> retained as is:

Recently, the address 0xf3f496c9486be5924a93d67e98298733bb47057c on Hyperliquid has long 50 ETH with leverage, with a maximum unrealized profit of over $2 million. Due to the large position size and the transparent nature of DeFi, the entire crypto market is watching the movements of this whale. The general public generally believes that his next move will usually be to increase his position to continue to profit, or to close his position and take profits. Unexpectedly, he took a move that surprised everyone. He withdrew the margin to realize the profit, and the system will adjust the liquidation price of the long position upwards, ultimately triggering the liquidation of this whale, earning $1.8 million in profit.

What impact does this bring? It damages the liquidity of HLP.

HLP is actively market-making by Hyperliquid, through market-making to collect funding fees and liquidation proceeds, and all users can also provide liquidity for HLP.

Due to the high profit of the ETH whale, if he were to close his position normally, it would lead to insufficient counterparty liquidity. But he actively sought forced liquidation, and this amount was absorbed by HLP as a loss. On March 12, in just one day, about $4 million in funds were reduced.

This attack means that Perp Dex is facing a severe challenge, and the liquidity pool mechanism must evolve. Seizing this opportunity, let's let WOO X Research take you to see the mechanisms currently adopted by the mainstream Perp Dex (Hyperliquid, Jupiter Perp, GMX), and finally discuss how to prevent similar attacks from occurring!

Overview of the Mechanisms of the Three Major Perp Dexes: Hyperliquid vs. Jupiter vs. GMX

Reference: https://app.hyperliquid.xyz/vaults/0xdfc24b077bc1425ad1dea75bcb6f8158e10df303

Hyperliquid

Liquidity Provision: The community liquidity pool HLP (Hyperliquid Pool) provides the funds, and users can deposit USDC and other assets into the HLP Vault to become the platform's market-making liquidity. In addition, it allows users to create their own "Vault" to participate in market-making and profit sharing.

Market-Making Model: It adopts a high-performance on-chain Order Book matching, providing a centralized exchange-level experience. The HLP treasury acts as a market maker, placing orders on the order book to provide depth and process unmatched orders, reducing slippage. The price reference is based on external oracles to ensure that the quoted prices are close to the global market.

Liquidation Mechanism: Triggered when the maintenance margin (usually starting from 20%) is insufficient. Any user with sufficient capital can participate in the liquidation and take over the positions that fail to maintain the margin. The HLP Vault also plays the role of a liquidation insurance pool, and if the liquidation causes a loss, it will be borne by the HLP (as in this attack).

Risk Management: It uses multi-exchange price oracles, updated every 3 seconds, to prevent malicious market manipulation from a single market causing incorrect prices. To address the extreme situations caused by large whale positions, it has increased the minimum margin requirement for some positions to 20%, reducing the impact of large-scale forced liquidations on the pool. Anyone can participate in the liquidation to increase the decentralization, and there is a single Vault to centrally bear the risk. The downside is that as an emerging proprietary chain, it has not yet withstood long-term testing, and there have been past incidents of large-scale forced liquidation losses.

Funding Rate and Holding Cost: The funding rate is calculated hourly to anchor the contract price close to the spot. If the long positions outweigh the short positions, the longs pay the funding to the shorts (and vice versa) to prevent long-term price deviations. For situations where the platform's net position exceeds the HLP's tolerance, Hyperliquid will increase the margin requirement and possibly dynamically adjust the funding rate to reduce the risk. The holding cost is the funding fee, without additional overnight interest, but the high leverage increases the pressure of funding fee payments.

Jupiter

Liquidity Provision: The multi-asset JLP (Jupiter Liquidity Pool) provides liquidity, with the pool containing index assets such as SOL, ETH, WBTC, USDC, and USDT. Users can mint JLP by exchanging assets, and the JLP acts as the counterparty to bear the risk of leveraged trading.

Market-Making Model: It abandons the traditional order book and uses the innovative LP-to-Trader mechanism. Through oracle pricing, traders can trade directly with the JLP liquidity pool, enjoying a near-zero slippage trading experience. Advanced features like limit orders can be set, but the trades are essentially executed by the pool at the oracle price.

Liquidation Mechanism: It is an automatic liquidation. When the position's margin ratio falls below the maintenance requirement (e.g., <6.25%), the smart contract automatically closes the position at the oracle price. The JLP liquidity pool, as the counterparty, absorbs the profit and loss of the position, and the remaining margin goes to the pool if the trader is liquidated. Users can adjust the collateral during the position period to adjust the liquidation price, but excessive collateral withdrawal will make the liquidation price approach the current price, making it easier to be liquidated.

Risk Management: The use of oracles ensures that the contract price is closely tied to the spot, preventing internal price manipulation. The high TPS of the Solana chain reduces the risk of liquidation delays, but the instability of the underlying network can affect trading and liquidation. To prevent malicious manipulation, the platform can set limits on the total position of a single asset (e.g., limiting the maximum leverage position), and the borrowing fee increases with the asset utilization rate, increasing the long-term cost of one-sided positions and suppressing extreme biases. To date, traders have generally been in a net loss, and the JLP capital has been growing relatively steadily.

Funding Rate and Holding Cost: No traditional funding rate, Jupiter Perp does not adopt the mutual payment of funding fees between longs and shorts, as the counterparty is the liquidity pool rather than a long-short pair. Instead, there is a borrow fee (Borrow Fee) that accrues hourly interest based on the proportion of the borrowed asset in the pool, which is deducted from the margin. Therefore, the longer the holding period or the higher the asset utilization rate, the more accumulated interest, and the liquidation price will gradually approach the market price over time. This mechanism serves as a cost constraint on long-term one-sided positions, avoiding the long-term imbalance problem of funding fees.

GMX

Liquidity Provision: The multi-asset index pool GLP (GMX Liquidity Pool) provides liquidity, including assets such as BTC, ETH, USDC, and DAI. Users deposit assets to mint GLP, and the GLP becomes the counterparty for all trades, bearing the profit and loss.

Market-Making Model: There is no traditional order book, but trades are executed through oracle pricing and the pool's assets automatically acting as the counterparty. GMX uses Chainlink decentralized oracles to obtain market prices and execute trades with "zero slippage". The GLP asset pool acts as a unified market maker, adjusting the pool's assets through the price impact fee mechanism to ensure liquidity depth.

Liquidation Mechanism: Automatic liquidation, using Chainlink index prices to calculate the position value. When the margin ratio falls below the maintenance level (around 1.25 times the initial margin), it triggers liquidation. During liquidation, the contract automatically closes the position, and the user's margin is first used to pay the pool's loss, with the remainder (if any) returned or added to the insurance fund. The GLP asset pool, as the counterparty, will directly bear the loss or receive the liquidation margin profit.

Risk Management: The use of authoritative multi-source oracles reduces the risk of wash trading manipulation and avoids erroneous forced liquidations due to abnormal price fluctuations in a single trading pair. There have been cases of traders using GMX's zero-slippage mechanism to manipulate prices and arbitrage, and the team has subsequently set maximum position limits for assets like AVAX (e.g., a $2 million position limit) that are more susceptible to manipulation. Through such position limits and dynamic fee rate mechanisms (the higher the asset utilization rate, the higher the holding interest), the leverage risk is limited, and 70% of the trading fees are rewarded to the GLP to increase the LP's incentive to withstand losses.

Funding Rate and Holding Cost: GMX V1 does not have the mutual payment of funding fees between longs and shorts; instead, there is a borrowing fee (0.01% per hour based on the proportion of the borrowed asset) that is paid directly to the GLP pool. This means that regardless of whether the position is long or short, the holder has to pay the holding interest, which is included in the position's profit and loss. The higher the asset utilization rate, the higher the annualized borrowing fee (can exceed 50% annualized), economically penalizing long-term one-sided crowded positions.

In this model, the perpetual price is always close to the spot (zero slippage), and there is no traditional funding fee imbalance, but the pool needs to bear the profit and loss when the price fluctuates sharply.

Simplified Comparison Table of Hyperliquid vs. Jupiter vs. GMX

Overview of the Mechanisms of the Three Major Perp Dexes: Hyperliquid vs. Jupiter vs. GMX

Overview of the Mechanisms of the Three Major Perp Dexes: Hyperliquid vs. Jupiter vs. GMX

Conclusion: The Inevitable Path of Decentralized Contract Exchanges

This attack took advantage of the decentralized nature of Perp Dex: transparency, and rules determined by code.

The overall attack strategy was: to profit through massive positions, attacking the liquidity within the exchange.

To prevent this in the future, they must reduce user leverage, which can be done by adjusting leverage ratios and margin requirements. They have announced a reduction in the maximum leverage for BTC and ETH to 40x and 25x respectively, and will increase the required margin transfer ratio by 20%, all with the aim of preventing users from opening massive positions.

Following this approach, what else can Hyperliquid do? ADL automatic deleveraging.

When the risk reserve fund (HLP) cannot bear the further losses from liquidated positions, the automatic deleveraging (ADL) mechanism will be triggered to limit further losses to the reserve fund. The core principle is that losing positions will be hedged against profitable positions or high-leverage positions (the "deleveraged positions"), and the two positions will be closed out simultaneously. Due to the triggering of the ADL mechanism, profitable positions may be forcibly closed, limiting their future profit potential, while also avoiding impact on the HLP fund level.

All of these measures are actually limiting single accounts. If malicious actors want to exploit rule loopholes, they can open multiple accounts to conduct similar attacks. Of course, the project can use address correlation to ban related accounts, preventing Sybil attacks (which is also one of the reasons why centralized exchanges require KYC). But this measure goes against the core idea of DeFi - allowing anyone to use decentralized finance without permission.

The best solution is for the Perp Dex protocol itself to mature, with liquidity gradually increasing, raising the cost for attackers until it becomes unprofitable, which is the inevitable path of the industry's development.

Source
Disclaimer: The content above is only the author's opinion which does not represent any position of Followin, and is not intended as, and shall not be understood or construed as, investment advice from Followin.
Like
Add to Favorites
Comments
Followin logo