Crypto Flexs
  • DIRECTORY
  • CRYPTO
    • ETHEREUM
    • BITCOIN
    • ALTCOIN
  • BLOCKCHAIN
  • EXCHANGE
  • TRADING
  • SLOT
  • CASINO
  • SPORTSBET
  • SUBMIT
Crypto Flexs
  • DIRECTORY
  • CRYPTO
    • ETHEREUM
    • BITCOIN
    • ALTCOIN
  • BLOCKCHAIN
  • EXCHANGE
  • TRADING
  • SLOT
  • CASINO
  • SPORTSBET
  • SUBMIT
Crypto Flexs
Home»HACKING NEWS»Wake’s GMX Hacking Analysis and Attack Scenario
HACKING NEWS

Wake’s GMX Hacking Analysis and Attack Scenario

By Crypto FlexsJuly 25, 20253 Mins Read
Facebook Twitter Pinterest LinkedIn Tumblr Email
Wake’s GMX Hacking Analysis and Attack Scenario
Share
Facebook Twitter LinkedIn Pinterest Email

This analysis investigates a 42m attack on the GMX protocol. We provide detailed technical analysis of vulnerability and include work reproduction of attack scenarios for educational purposes in a forked environment.

Use the attack Mutual contract re -vulnerability Increases the detoured access control while the position increases. As a result, GLP token prices were operated at a higher price, allowing attackers to repay the tokens and extract profits from protocols.

Reproduction with Wake

  1. Replicate the repository
  2. GMX project dependency import:
    $ npm i
  3. Initialization Wake:
    $ wake up
  4. Receive and set ARBITRUM for URL from alchemy or other providers. .env Similar .env.example.
  5. Execution:
    $ wake test tests/test_attack_simple.py
  6. compromise print(tx.call_trace) To see the call tracking.

Root cause

The vulnerability comes from re -entry. Re -entry itself is simple, but its impact is important.

Core problem: GLP token price calculation globalShortAveragePrices Variable ShortsTracker. This dependence creates an exploited attack vector.

The vulnerability is a re -creation of mutual contracts. Many contracts have been related during the transaction. Each contract has a re -creation guard. However, the re -creation has already occurred after the termination of a specific contract.

Entry

The attack begins when the user increases the position.

  1. User call createIncreaseOrder To register an order
  2. Order Keeper Bot calls PositionManager.executeIncreaseOrder Run it
  3. within executeIncreaseOrder,,, ShortsTracker.updateGlobalShortData Called

ShortsTracker.updateGlobalShortData save globalShortAveragePrice In the case of tokens -average input price of all short positions. This value directly affects GLP token price calculations.

contract PositionManager 
    function executeIncreaseOrder(
        address _account,
        uint256 _orderIndex,
        address payable _feeReceiver
    ) external onlyOrderKeeper 
        //...
        IShortsTracker(shortsTracker).updateGlobalShortData(_account, collateralToken, indexToken, isLong, sizeDelta, markPrice, true);

        ITimelock(timelock).enableLeverage(_vault); // isLeverageEnabled <- True
        IOrderBook(orderBook).executeIncreaseOrder(_account, _orderIndex, _feeReceiver);
        ITimelock(timelock).disableLeverage(_vault); // isLeverageEnabled <- False

        _emitDecreasePositionReferral(_account, sizeDelta);
    

External currencies achieve this path Vault:

  • OrderBook.executeIncreaseOrder
    • Router.pluginIncreasePosition

that decreasePosition The flow follows a similar pattern.

that Vault.increasePosition The function checks it isLeverageEnabled Equivalent True Make sure the call occurs Timelock.enableLeverage and Timelock.disableLeverage. This inspection turned out to be insufficient.

contract Vault {
    // function has no msg.sender check.
    // Assumes caller transfers tokens or at least the caller is trusted.
    function increasePosition(
        address _account,
        address _collateralToken,
        address _indexToken,
        uint256 _sizeDelta,
        bool _isLong
    ) external override nonReentrant 
        _validate(isLeverageEnabled, 28); // this will be bypassed
        _validateGasPrice();
        _validateRouter(_account);
        ...
    ...

during Vault.decreasePositionThe contract transmits a collateral token for the closed location. If the mortgage token is Weth, the system withdrew the ETH and sent it to the user’s account. In particular, these WETH work occurs outside Vault contract.

The call flow proceeds as follows:

  • OrderBook.executeDecreaseOrder
    • Router.pluginDecreasePosition
      • Vault.decreasePosition
        1. REENTRANTRANCYGUARD set ENTERED
        2. Vault Close the location
        3. Send Weth to Orderbook
        4. REENTRANTRANCYGUARD set NOT_ENTERED
    • OrderBook Withdraw the ETH
    • ETH is sent to the user
      • User.receive Trigger
        • Vault.increasePosition (Abuse)
          1. Reentrancyguard checks NOT_ENTERED
          2. REENTRANTRANCYGUARD has been set ENTERED
          3. The attack continues…

Re -creation guard Vault Start NOT_ENTEREDHowever, after this status is reset, a re -entry call occurs and bypassed protection.

Attack escalation

directly Vault.increasePosition Bypass call ShortsTracker.updateGlobalShortDatacause GlpManager.getAum Returns the expansion value and artificially increases the price of GLP tokens.

Attack order:

  1. It goes back through an open entry point
  2. To get GLP tokens, add fluidity
  3. call increasePosition GLP token price is manipulated up
  4. Remove liquidity at the expansion GLP token price

Operation details

Used by an attacker RewardRouterV2.mintAndStakeGlp because GLPManager.inPrivateMode It is activated by preventing direct calls GLPManager.addLiquidity.

The attacker uses a flash loan with a USDC to create a large WBTC short position.

summation

The attack was successful due to the fragmentary data responsibility for the contract. Important status information is divided ShortsTracker and VaultREENTRANTRANTRANCY Guard is inefficiently rendered. This vulnerability has made the attacker manipulates the price of GLP tokens through a carefully adjusted re -entry phone to enable millions of exploits.

Share. Facebook Twitter Pinterest LinkedIn Tumblr Email

Related Posts

Lombard Liquid Bitcoin Summary Summary

October 3, 2025

UXLINK attackers mix stolen assets and have drained $ 43 million by phishing

September 29, 2025

YouTube Star MR BEAST Scoops 3 Days Purchase SPREE ASTER in SPREE

September 27, 2025
Add A Comment

Comments are closed.

Recent Posts

Solana Future Surge as the institution induces the open interest for the best record.

October 4, 2025

Free bitcoin.in app withdrawal request My satoshi

October 3, 2025

If this happens, you can see a huge price of $ 1.9.

October 3, 2025

Lombard Liquid Bitcoin Summary Summary

October 3, 2025

Easily Earn $5588+ In Passive Income Every Day With PlanMining Cloud Mining

October 3, 2025

The reason why hyper clicade wins aster with Perp DEX, which can be most invested.

October 3, 2025

Psy Protocol Testnet Combines Internet Scale And Speed With Bitcoin-Level Security

October 2, 2025

Eightco Holdings Inc. ($ORBS) Expands Investor Access With Options Trading

October 2, 2025

How To Use A Bitcoin Heatmap For Smarter Trading Decisions

October 2, 2025

Pioneer the future of digital innovation throughout Web2 and Web3

October 2, 2025

Codego Launches Whitelabel Devices Bringing Tokens Into Daily Life

October 2, 2025

Crypto Flexs is a Professional Cryptocurrency News Platform. Here we will provide you only interesting content, which you will like very much. We’re dedicated to providing you the best of Cryptocurrency. We hope you enjoy our Cryptocurrency News as much as we enjoy offering them to you.

Contact Us : Partner(@)Cryptoflexs.com

Top Insights

Solana Future Surge as the institution induces the open interest for the best record.

October 4, 2025

Free bitcoin.in app withdrawal request My satoshi

October 3, 2025

If this happens, you can see a huge price of $ 1.9.

October 3, 2025
Most Popular

Binance Announces New Learning and Earning Opportunities with CKB and PORTAL Rewards

May 21, 2024

Bitcoin Sell-side Risks Hit 2024 Low With BTC Price Hitting Just $10K

September 25, 2024

Bitcoin miner Cipher buys 37,000 Bitmain Antminers for $99.5 million.

December 18, 2023
  • Home
  • About Us
  • Contact Us
  • Disclaimer
  • Privacy Policy
  • Terms and Conditions
© 2025 Crypto Flexs

Type above and press Enter to search. Press Esc to cancel.