The Standard

The Standard
DeFiHardhat
20,000 USDC
View results
Submission Details
Severity: medium
Invalid

Improper slippage protection on swaps

Summary

Loosely implementation of slippage would lead to loss of funds to MEV

Vulnerability Details

When performing swaps the allowable slippage is calculated within the contract, the issue is that calculateMinimumAmountOut() would return zero when collateralValueMinusSwapValue >= requiredCollateralValue which provides no slippage for the swap meaning zero value could also be received. On the other branch of the trinary operation the function loosely calculate minimumAmountOut since requiredCollateralValue - collateralValueMinusSwapValue could return a relatively small value as well meaning other values are likely to be lost to MEV.

Impact

Funds could be lost when performing swaps from vaults

Tools Used

Manual Review

Recommendations

Allow the owner to provide an acceptable minimumAmountOut on performing swap.

Updates

Lead Judging Commences

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

Slippage-issue

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

Slippage-issue

Support

FAQs

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