DeFiFoundry
50,000 USDC
View results
Submission Details
Severity: high
Invalid

Upgrades in GMX contracts can break some Gamma functionality

Summary

The GMX contract can deploy upgrades that can break some functions in the Gamma Protocol. For example, GMX may introduce a change in the struct parameters passed into the callback functions after transaction execution, causing such callback functions expecting the previous struct to break.

Vulnerability Details

As described in the GMX Docs, Note that if a struct that is passed into callbacks is changed, e.g. Deposit, Withdrawal, Order structs, this would cause the functions of callback contracts expecting the previous struct to stop working, due to this, the changes in structs should be highlighted to integrations

The issue is that there is no way to upgrade the Struct parameters in such event.

Impact

Break in the functionality of the callback functions. This will cause Order creation, and cancellation transaction to fail.

Tools Used

Manual Review

Recommendations

Consider making the GmxProxy and PerpetualVault contracts upgradeable

Updates

Lead Judging Commences

n0kto Lead Judge 8 months ago
Submission Judgement Published
Invalidated
Reason: Known issue

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.