code-423n4 / 2021-11-malt-findings

0 stars 0 forks source link

Add slippage to buy Malt and sell Malt #201

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

Handle

xYrYuYx

Vulnerability details

Impact

https://github.com/code-423n4/2021-11-malt/blob/main/src/contracts/DexHandlers/UniswapHandler.sol#L150 https://github.com/code-423n4/2021-11-malt/blob/main/src/contracts/DexHandlers/UniswapHandler.sol#L160

Now amountOutMin value is 0. This will lead to buy less malt due to frontrun bots.

Tools Used

Manual

Recommended Mitigation Steps

Add amountOutMin value in buyMalt function

0xScotch commented 2 years ago

219

GalloDaSballo commented 2 years ago

Duplicate of #219