Closed c4-bot-7 closed 3 months ago
raymondfam marked the issue as insufficient quality report
raymondfam marked the issue as primary issue
Inadequate elaboration to elicit the attack idea: Dust amounts: want to prevent small orders on the orderbook to prevent skyrocketing gas costs for large orders that match with multiple limit orders
hansfriese marked the issue as unsatisfactory: Insufficient proof
Lines of code
https://github.com/code-423n4/2024-03-dittoeth//blob/main/contracts/facets/BidOrdersFacet.sol#L40
Vulnerability details
Impact
Users executing trades above the 300 million limit by splitting them into multiple orders incur higher transaction fees. Each additional transaction required to split the order increases the cost, impacting the overall efficiency and attractiveness of the platform for large trades.
Additionally, splitting large orders into smaller ones could lead to increased slippage, especially in less liquid markets. This slippage can negatively impact the execution price for the trader.
These large orders, when split and executed over time, can have a prolonged impact on the market, potentially leading to unfavorable price movements for the trader.
Proof of Concept
https://github.com/code-423n4/2024-03-dittoeth//blob/main/contracts/facets/BidOrdersFacet.sol#L40
Tools Used
Manual
Recommended Mitigation Steps
Develop an order aggregation mechanism that allows users to submit large orders as a single transaction, which the smart contract then internally manages as multiple smaller orders. This approach would reduce the complexity and potentially lower the transaction costs for the user.
Introduce batch processing of orders where feasible, allowing multiple orders to be processed in a single transaction. This method can reduce gas costs and slippage by taking advantage of economies of scale.
Implement slippage protection mechanisms that allow users to specify a maximum acceptable slippage for their orders. If the execution price would result in slippage beyond this threshold due to order splitting, the transaction could be reverted or adjusted accordingly.
Assessed type
Other