Steadefi

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

Slippage value needs to be verified

Summary

In calcMinMarketslippageAmt() in GMXManager do not check the slippage value entry and it has to be less than 1000.

Vulnerability Details

Inside of calcMinMarketSlippageAmt(), this sentence is running:

return depositValue
* SAFE_MULTIPLIER
/ _lpTokenValue
* (10000 - slippage) / 10000;

If the slippage is greater than 1000, they throw an unexpected error. "Arithmetic overflow/underflow".

Impact

Low, you can interrupt the process of deposit(), compound, rebalance(), etc. generating losses in the use of gas.

Tools Used

Manual code review

Recommendations

Add a condition for verification of the received value such as:

if(slippage > 10000 ) revert ErrorSlippage();
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.