Skip to content
$1,000,000 in security audit grants are live now, Apply here →

Security review · December 2025

LayerZeroProvider Routing

for GMX

Guardian's review of LayerZeroProvider Routing for GMX, published December 2025. The report records 1 finding, including 1 medium.

Published
Review window
December 20, 2025
Chains
Arbitrum, Avalanche
Sector
Perpetuals
  • 0 Critical
  • 0 High
  • 1 Medium
  • 0 Low
  • 0 Informational

1 acknowledged

Findings 1

  1. M-01 Medium Messages Routed With New Data Trapped Logical Error Acknowledged

    Description

    The diff between the old LayerZeroProvider that has been re-enabled to rescue stuck messages and the most up-to-date LayerZeroProvider is as follows:

    LayerZeroProvider Diff

    In the new LayerZeroProvider the data payload now has a uint256 type which is destructured from it as a second value.

    The data bytes are now structured like so:

    (ActionType, uint256, bytes)
    

    If messages using this new data payload structure with the uint256 as the second argument are routed to this old LayerZeroProvider contract, then the messages will be trapped forever as the provider contract is not upgradeable and the decoding of the data object as follows:

    (ActionType actionType, bytes memory actionData) = abi.decode(data, (ActionType, bytes));
    

    Inside the if (srcChainId != 0 && data.length != 0) { case will revert.

    Recommendation

    Ensure that messages using the new data format with uint256 as the second parameter are not routed to the old LayerZeroProvider which has now been re-enabled.

More from GMX

All 44 reports
  1. Timelock Updates

    4 findings 4 findings: 3 low, 1 informational
  2. Open Interest Updates

    5 findings 5 findings: 2 medium, 3 low
  3. Updates Branch

    2 findings 2 findings: 2 low
  4. Multichain Referral Codes

    1 finding 1 finding: 1 medium

Put your code through the same review.

This review started with a conversation about scope. Tell us what you are building and we will plan yours with you.

Get a quote