The OrderSelled
event in the TokenDivider
contract does not have the price
field indexed, making it difficult to search and filter orders by price off-chain.
Code Location:
Severity: Low
The lack of indexing of the price
field has the following impacts:
Inability to effectively filter events by price
Reduced performance for off-chain applications that need to analyze order prices
Degraded user experience for interfaces that require price filtering
To find all orders with a specific price, an off-chain application would need to:
Retrieve all OrderSelled
events
Decode each event to access the price
field
Manually filter the results
With an indexed field, this search would be much more efficient as it could directly use the event index.
Manual code analysis
Foundry tests
Aderyn (static analysis tool)
Index the price
field in the OrderSelled
event:
Note: Although indexing numerical values consumes more gas, the benefit in terms of ease of use and off-chain performance generally justifies this additional cost for important events like order sales.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.