Steadefi

Steadefi
DeFiHardhatFoundryOracle
35,000 USDC
View results
Submission Details
Severity: low
Invalid

`GMXCallback::afterDepositCancellation(), afterDepositExecution(),afterWithdrawalExecution()`

Summary

Reducing Storage Reads, _store is a storage variable that is read multiple times within the function, so storing the value in a local variable.

Vulnerability Details

In the code, every reference to vault.store() would result in a storage read operation, which consumes gas.

Impact

Wastes gas

Tools Used

Manual Review

Recommendations

Storing the value of vault.store() in a local variable _store as GMXTypes.Store storage ,

-GMXTypes.Store memory _store = vault.store();
+GMXTypes.Store storage _store = vault.store();
Updates

Lead Judging Commences

hans Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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