OrderBook

First Flight #43
Beginner FriendlySolidity
100 EXP
View results
Submission Details
Severity: low
Valid

Missing Event Parameter Indexing

Root + Impact

Description

  • Events should have indexed parameters for efficient filtering and querying

  • Several events are missing indexed parameters that would be useful for off-chain monitoring

// @> Missing indexed parameters for better event filtering
event OrderAmended(
uint256 indexed orderId,
uint256 newAmountToSell, // @> Should be indexed
uint256 newPriceInUSDC, // @> Should be indexed
uint256 newDeadlineTimestamp
);

Risk

Likelihood:

  • High - This affects all event emissions

  • Makes off-chain monitoring and indexing less efficient

Impact:

  • Low - Doesn't affect contract security but impacts usability

  • Poor developer experience for dApp integration

Proof of Concept

// Current events make it difficult to filter by specific criteria
// Like finding all orders amended to a specific price range

Recommended Mitigation

event OrderAmended(
uint256 indexed orderId,
+ uint256 indexed newAmountToSell,
+ uint256 indexed newPriceInUSDC,
uint256 newDeadlineTimestamp
);
Updates

Lead Judging Commences

yeahchibyke Lead Judge about 1 month ago
Submission Judgement Published
Validated
Assigned finding tags:

Poor event indexing and asset token symbol not displayed

Events not properly indexed. Filtering and querying from analytic tools will be very in-efficient

Support

FAQs

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