DittoETH

Ditto
DeFiFoundryOracle
55,000 USDC
View results
Submission Details
Severity: low
Valid

The events for creating an order may contain incorrect IDs

Summary

The events when a Short, Ask, or Bid are created can include incorrect IDs.

Vulnerability Details

In the case of Bids and Asks, the ID can be incorrect because Market Orders are not added to the order book and therefore do not have an ID. Additionally, an incorrect ID can be present in the event when an order is fully matched immediately after creation. In such cases, the order does not enter the order book and also does not receive an ID.

Impact

Off-chain services that work with these events might malfunction and display incorrect content.

Tools Used

VSCode

Recommendations

These events should only be emitted after the order has been added to the order book, i.e., after the addSellOrder or addBid function has been called.

Updates

Lead Judging Commences

0xnevi Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

finding-278

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.