Steadefi

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

`GMXVault.updateMinSlippage` function: no lower bound check on `_store.minSlippage`

Summary

GMXVault.updateMinSlippage function: no lower bound check on _store.minSlippage.

Vulnerability Details

In GMXVault; the value _store.minSlippage represents the minimum slippage amount for adding/removing liquidity and for swaps when interacting with GMX exchange router; and it acts as a protection for the user to not losing their assets due to MEV or sandwich attacks.

  • So if this valus is set to a very high value; then almost all transactions made to the GMX exchange router will be cancelled.

Impact

But if this value is set to a very low value; zero for example; then users will be losing their assets if the transaction they made is front-ran by a MEV bot.

Proof of Concept

GMXVault.updateMinSlippage function/L656-L659

function updateMinSlippage(uint256 minSlippage) external onlyOwner {
_store.minSlippage = minSlippage;
emit MinSlippageUpdated(minSlippage);
}

Tools Used

Manual Review.

Recommendations

Add a lower bound and an upper bound check for this value before assigning/updating it.

Updates

Lead Judging Commences

hans Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

Centralization Risk

Impact: High Likelihood: Low Centralization risk is regarded a known issue. This tag will include all submissions : - Admin setter functions without validations

hans Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Known issue
Assigned finding tags:

Centralization Risk

Impact: High Likelihood: Low Centralization risk is regarded a known issue. This tag will include all submissions : - Admin setter functions without validations

Support

FAQs

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