ChainBleedv0.1 · open intel
← back to feed·ARBLOGIC2025-07-09 · 11mo ago
Incident · DEFILLAMA

GMX V1 Perps

Re-entrancy Exploit
Estimated loss
$42.00M
$40.00M returned
VERDICT —AUDIT-CATCHABLE
Cross-function read-of-stale-state in a price-feedback loop is reachable by a careful auditor mapping `getAum*` data dependencies. The pattern was publicly known for years; not catching it indicates audit-depth failure, not novelty.
▰ METHOD
Re-entrancy Exploit
LOGICBYTECODE CATCHABLEAI SCANNABLE
Root cause

GMX V1's `Vault.sol` tracked `globalShortAveragePrice` and AUM via `getAum()`/`getAumE30()`, which fed both GLP minting/redemption and short-PnL settlement. When a short position was closed, the realized PnL was computed against `globalShortAveragePrice` and the GLP price was re-derived in the same call path — but the AUM calculation read the current `globalShortAveragePrice` *before* the close had updated it, allowing a freshly-opened large short to be immediately closed in a way that recursively shifted GLP pricing in the attacker's favor across multiple positions in one block. The exploit chained large WBTC/WETH/UNI shorts opened at the manipulated mark, then closed against the still-stale `globalShortAveragePrice`, with AUM mispricing letting the attacker realize PnL the pool had no liquidity to back. The known-issue lineage — GMX V1's AvgPrice manipulation surface was publicly discussed since 2022 — meant the bug was a chosen-risk on a frozen contract; the 2025-07-09 incident exploited the same long-standing surface after a market condition aligned.

▰ PROOF OF CONCEPT
DEFIHACKLABS
src/test/2025-07/gmx_exp.sol
view forked test on github ↗

Reproducible Foundry test fork from SunWeb3Sec/DeFiHackLabs. Clone the repo, run forge test against the file path above, and replay the exploit against a mainnet fork at the historical block. Use for reproduction only — not for live targets.

Forensic narrative

Classification: Protocol Logic. Technique: Re-entrancy Exploit. Target type: DeFi Protocol. Affected chains: Arbitrum. Implementation language: Solidity. Funds returned: $40,000,000.

Primary source
https://rekt.news/gmx-v1-rekt/
Sourced from
DefiLlama Hacks dataset · api.llama.fi/hacks
Technical record
chain
arbitrum
protocol
GMX V1 Perps
bug_class
logic
date_occurred
2025-07-09
loss_usd
$42,000,000
classification
Protocol Logic
technique
Re-entrancy Exploit
target_type
DeFi Protocol
language
Solidity
source_id
dl:337
Related — same bug class· logic
2026-05-13
28d ago
TRON
Transit Finance
Deprecated Smart Contract Exploit
logic
$1.88M
UNRATED
2026-05-13
28d ago
ETH
TAC Cross-Chain Layer (TON Side)
Contract Vulnerability
logic
$2.80M
UNRATED
2026-05-13
28d ago
ETH
Transit Finance
Contract Vulnerability
logic
$1.88M
UNRATED
2026-05-12
29d ago
ARB
Aurellion
Uninitialized Proxy Exploit
logic
$456.0K
UNRATED
2026-05-12
29d ago
BSC
SQ Protocol
Acces Control Exploit
logic
$346.0K
UNRATED
2026-05-12
29d ago
BSC
SQ Protocol
Contract Vulnerability
logic
$346.1K
UNRATED
ChainBleed — live web3 threat intelligence