Steadefi

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

There is a risk of a sandwich attack during emergencyResume.

Summary

During emergencyResume, minMarketTokens, which is a parameter originally required in addLiquidity, is not set and is set to zero. This prevents slippage from being taken into account, making it a target of a sandwich attack.

Vulnerability Details

minMarketTokens: alp.minMarketTokenAmt is usually specified in AddLiquidityParams, which is the argument to this function. However, this parameter is not specified in emergencyResume. In other words, it is set to zero, and the minimum token value is not set, making it subject to a sandwich attack.

Impact

Sandwich attack will result in a deal with very unfavorable terms

Tools Used

Manual

Recommendations

Allow minMarketTokenAmt to be set as an argument to emergencyResume

Updates

Lead Judging Commences

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

Slippage protection on emergency Pause/Resume

Impact: High Likelihood: Low Because the whole lpToken balance is used during the emergency process, the impact is high. But the likelihood is LOW because of the dependence on the emergency.

Support

FAQs

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