Skip to content

Latest commit

 

History

History
38 lines (23 loc) · 960 Bytes

085.md

File metadata and controls

38 lines (23 loc) · 960 Bytes

Fierce Pecan Swallow

Medium

New orders will not be created if order size is same as MinOrderSize given by owner

Summary

This logic under the Automation contract is not correct. Min order size should also accept orders if the order value is exactly matching.

require(usdValue > minOrderSize, "order too small");

Source: https://github.com/sherlock-audit/2024-11-oku/blob/main/oku-custom-order-types/contracts/automatedTrigger/AutomationMaster.sol#L149

Suggested solution update > to >=

require(usdValue >= minOrderSize, "order too small");

Impact

Users will be confused about why orders are not created even though the order size matches the minimum accepted size

Mitigation

Update > to >=

require(usdValue >= minOrderSize, "order too small");

https://github.com/sherlock-audit/2024-11-oku/blob/main/oku-custom-order-types/contracts/automatedTrigger/AutomationMaster.sol#L149