GMX suffered a hacker attack, resulting in losses of more than $40 million. The attacker exploited a reentrancy vulnerability and opened a short position while the leverage function of theGMX suffered a hacker attack, resulting in losses of more than $40 million. The attacker exploited a reentrancy vulnerability and opened a short position while the leverage function of the

Losses exceeded $40 million, GMX hacking incident analysis

2025/07/10 11:00

GMX suffered a hacker attack, resulting in losses of more than $40 million. The attacker exploited a reentrancy vulnerability and opened a short position while the leverage function of the contract was enabled.

The root of the problem lies in the incorrect use of the executeDecreaseOrder function. The first parameter of the function should have been an external account (EOA), but the attacker passed in a smart contract address. This allowed the attacker to re-enter the system during the redemption process, manipulate the internal state, and ultimately redeem assets far exceeding the actual value of the GLP they held.

GLP normal redemption mechanism

In GMX, GLP is a liquidity provider token that represents a share of treasury assets (such as USDC, ETH, WBTC). When a user calls unstakeAndRedeemGlp, the system uses the following formula to calculate the amount of assets that should be returned:

redeem_amount = (user_GLP / total_GLP_supply) * AUM

The calculation method of AUM (total assets under management) is:

AUM = Total value of all token pools + Global short unrealized losses - Global short unrealized profits - Reserved amount - Default deduction (aumDeduction)

This mechanism ensures that GLP holders receive a proportional share of the actual assets of the treasury.

Problems after leverage is enabled

When enableLeverage is turned on, users can open leveraged positions (long or short). The attacker opened a large WBTC short position before redeeming GLP.

Since the short position increases the global short size as soon as it is opened, the system assumes that the short position is losing money when the price has not changed, and this part of the unrealized loss will be counted as the "asset" of the vault, causing the AUM to artificially increase. Although the vault does not actually gain additional value, the redemption calculation will be based on this inflated AUM, allowing the attacker to obtain assets far exceeding what he deserves.

Attack Process

Attacking transactions

Losses exceeded $40 million, GMX hacking incident analysis

Losses exceeded $40 million, GMX hacking incident analysis

Written at the end

This attack exposed serious flaws in GMX's leverage mechanism and reentrancy protection design. The core problem is that the asset redemption logic places too much trust in AUM and does not conduct sufficiently prudent security checks on its components (such as unrealized losses). At the same time, key functions also lack mandatory verification of the caller's identity assumptions (EOA vs contract). This incident once again reminds developers that when it comes to sensitive operations involving funds, they must ensure that the system state cannot be manipulated, especially when introducing complex financial logic (such as leverage, derivatives), and they must strictly prevent systemic risks caused by reentrancy and state pollution.

Market Opportunity
Moonveil Logo
Moonveil Price(MORE)
$0.002577
$0.002577$0.002577
-1.52%
USD
Moonveil (MORE) Live Price Chart
Disclaimer: The articles reposted on this site are sourced from public platforms and are provided for informational purposes only. They do not necessarily reflect the views of MEXC. All rights remain with the original authors. If you believe any content infringes on third-party rights, please contact [email protected] for removal. MEXC makes no guarantees regarding the accuracy, completeness, or timeliness of the content and is not responsible for any actions taken based on the information provided. The content does not constitute financial, legal, or other professional advice, nor should it be considered a recommendation or endorsement by MEXC.

You May Also Like

Stijgt de Solana koers naar $150 door institutioneel treasury gebruik?

Stijgt de Solana koers naar $150 door institutioneel treasury gebruik?

Solana staat centraal in een nieuwe ontwikkeling binnen corporate treasury management. Mangocueticals heeft samen met Cube Group een formele SOL treasury strategie
Share
Coinstats2025/12/20 23:16
CEO Sandeep Nailwal Shared Highlights About RWA on Polygon

CEO Sandeep Nailwal Shared Highlights About RWA on Polygon

The post CEO Sandeep Nailwal Shared Highlights About RWA on Polygon appeared on BitcoinEthereumNews.com. Polygon CEO Sandeep Nailwal highlighted Polygon’s lead in global bonds, Spiko US T-Bill, and Spiko Euro T-Bill. Polygon published an X post to share that its roadmap to GigaGas was still scaling. Sentiments around POL price were last seen to be bearish. Polygon CEO Sandeep Nailwal shared key pointers from the Dune and RWA.xyz report. These pertain to highlights about RWA on Polygon. Simultaneously, Polygon underlined its roadmap towards GigaGas. Sentiments around POL price were last seen fumbling under bearish emotions. Polygon CEO Sandeep Nailwal on Polygon RWA CEO Sandeep Nailwal highlighted three key points from the Dune and RWA.xyz report. The Chief Executive of Polygon maintained that Polygon PoS was hosting RWA TVL worth $1.13 billion across 269 assets plus 2,900 holders. Nailwal confirmed from the report that RWA was happening on Polygon. The Dune and https://t.co/W6WSFlHoQF report on RWA is out and it shows that RWA is happening on Polygon. Here are a few highlights: – Leading in Global Bonds: Polygon holds 62% share of tokenized global bonds (driven by Spiko’s euro MMF and Cashlink euro issues) – Spiko U.S.… — Sandeep | CEO, Polygon Foundation (※,※) (@sandeepnailwal) September 17, 2025 The X post published by Polygon CEO Sandeep Nailwal underlined that the ecosystem was leading in global bonds by holding a 62% share of tokenized global bonds. He further highlighted that Polygon was leading with Spiko US T-Bill at approximately 29% share of TVL along with Ethereum, adding that the ecosystem had more than 50% share in the number of holders. Finally, Sandeep highlighted from the report that there was a strong adoption for Spiko Euro T-Bill with 38% share of TVL. He added that 68% of returns were on Polygon across all the chains. Polygon Roadmap to GigaGas In a different update from Polygon, the community…
Share
BitcoinEthereumNews2025/09/18 01:10
ViaHonest Introduces a Next-Generation RWA Marketplace for Authentic Physical Goods.

ViaHonest Introduces a Next-Generation RWA Marketplace for Authentic Physical Goods.

Summary: ViaHonest, a top-notch platform, has unleashed digital certificates of authenticity, tamper-proof item identifiers, and a transparent 2.5% commission,
Share
Techbullion2025/12/20 23:46