Open hats-bug-reporter[bot] opened 8 months ago
This is intentional to avoid duplicate slippage checks - any slippage checks are handled in client code rather than within this OrigamiDexAggregatorSwapper.sol
contract.
eg: OrigamiLovTokenErc4626Manager.sol#L338 OrigamiLovTokenFlashAndBorrowManager.sol#L366
Github username: -- Twitter username: -- Submission hash (on-chain): 0x61d1ed1693dbdb2fc92f36837d642575371cdab85d6831dbbf3cddb6f3b194a2 Severity: high
Description: Description\ There is no slippage protection (minOut parameter) in
OrigamiDexAggregatorSwapper.sol
, this can and will lead to fund loss via MEV bots while using the Aggregator. 1inch also recommends to put minOut parameter while integrating with the router to not lose funds. Example integration for swap function can be seen from here : https://github.com/smye/1inch-swap/blob/master/contracts/SwapProxy.solAttack Scenario\ When transaction seen in the mempool, MEV bots will sandwich the transaction and fund loss will occur.