MorpheusAI

MorpheusAI
Foundry
22,500 USDC
View results
Submission Details
Severity: medium
Invalid

lack of slippage protection

Summary

amountOutMinimum for slippage may be set as zero

Vulnerability Details

function swap(uint256 amountIn_, uint256 amountOutMinimum_) external

Eve though its good that amountOutMinimum_ is being passed as a parameter, there is no check that value passed in !=0

Impact

If amountOutMinimum_ is passed in as 0 by error or ignorance or other reason this implies no slippage protection for price and the swap can be executed such that all funds can be lost as amount coming out being at least 0 will be satisfied

Tools Used

Manual Analysis

Recommendations

Recommended it be checked that uint256 amountOutMinimum_ != 0 or be bound within certain values based on on Decentralized Price Oracle or other guidelines e. g

require(amountOutMinimum_ != 0. "no slippage protection")
Updates

Lead Judging Commences

inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Known issue

Support

FAQs

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