Root Cause:
GameResetevent’snewRoundparameter is not indexed -> Impact: Off-chain services and users cannot efficiently filter or query logs by round number, hampering analytics and UX.
The GameReset event is defined as:
but does not declare newRound as an indexed topic. Since newRound serves as the identifier for each game round, omitting indexed means:
Likelihood: High
Off-chain listeners cannot filter logs by newRound at the node level, they must download all GameReset logs and scan each one.
This increases bandwidth and processing time for block explorers, analytics dashboards, and players tracking specific rounds.
In high-volume chains, unindexed events lead to slower queries and higher costs for data retrieval.
Event Topics: Without indexed, newRound is part of the event data payload rather than the topics array.
Filtering: RPC calls like eth_getLogs can only filter on topics, not on data fields.
Result: To find the log for round 5, clients must retrieve all GameReset logs and inspect each payload.
Impact: Gas & Low(Off-chain logs retrievals)
Slow Off-Chain Queries: Analytics and UI must retrieve and scan all GameReset events, leading to high latency.
Increased Bandwidth & Costs: More data transferred from nodes, higher indexing costs for services.
Poor UX: Players cannot jump directly to a specific round’s log or history without heavy client-side filtering.
Tools Used:
Foundry Test Suite
Chat-GPT AI Assistance (Report Grammar Check & Improvements)
Manual Review
You can write a test that inspects the number of topics in the recorded log:
dependencies: forge-std/Vm.sol
Run:
Scenario:
A block explorer wants to display the timestamp for round 42. With an indexed newRound, it can call so.
But since newRound is unindexed, it must instead fetch all GameReset logs.
Index the newRound Parameter
- This adds `newRound` to the topics array, enabling efficient `eth_getLogs` filtering.
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.