Interesting Cedar Hare
Medium
checkMinOrderSize will not work when sdValue is equal to minOrderSize.
https://github.com/sherlock-audit/2024-11-oku/blob/main/oku-custom-order-types/contracts/automatedTrigger/AutomationMaster.sol#L144 function checkMinOrderSize(IERC20 tokenIn, uint256 amountIn) external view override { uint256 currentPrice = oracles[tokenIn].currentValue(); uint256 usdValue = (currentPrice * amountIn) / (10 ** ERC20(address(tokenIn)).decimals());
@> require(usdValue > minOrderSize, "order too small");
}
No response
No response
No response
No response
No response
function checkMinOrderSize(IERC20 tokenIn, uint256 amountIn) external view override { uint256 currentPrice = oracles[tokenIn].currentValue(); uint256 usdValue = (currentPrice * amountIn) / (10 ** ERC20(address(tokenIn)).decimals());
require(usdValue >= minOrderSize, "order too small");
}