Steadefi

Steadefi
DeFiHardhatFoundryOracle
35,000 USDC
View results
Submission Details
Severity: medium
Valid

Setter functions for core GMX contracts

Summary

GMX docs state that their ExchangeRouter and GMXOracle contracts will change as new logic is added. Therefore setter functions should be added to GMXVault.sol to be able to update the state variables storing those addressed when the need arises.

Vulnerability Details

From the GMX docs:

If using contracts such as the ExchangeRouter, Oracle or Reader do note that their addresses will change as new logic is added

Impact

Not being able to use the ExchangeRouter and GMXOracle contracts the protocol would effectively be unusable given their importance.

Tools Used

Manual Review

Recommendations

Create setter functions in GMXVault.sol as below:

function updateExchangeRouter(address exchangeRouter) external onlyOwner {
_store.exchangeRouter = exchangeRouter;
emit ExchangeRouterUpdated(exchangeRouter);
}
function updateGMXOracle(address gmxOracle) external onlyOwner {
_store.gmxOracle = gmxOracle;
emit GMXOracleUpdated(gmxOracle);
}
Updates

Lead Judging Commences

hans Auditor
almost 2 years ago
hans Auditor
almost 2 years ago
hans Lead Judge almost 2 years ago
Submission Judgement Published
Validated
Assigned finding tags:

Immutable external address

Impact: High Likelihood: Low

Support

FAQs

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