Last Man Standing

First Flight #45
Beginner FriendlyFoundrySolidity
100 EXP
View results
Submission Details
Impact: low
Likelihood: low
Invalid

Poor DApp Integration: Critical Events Lack Indexed Parameters

Root + Impact

Description

  • Events in Solidity support the indexed keyword, which enables efficient filtering and querying by off-chain services (e.g., The Graph, Dune Analytics, custom indexers). Proper indexing is essential for building responsive, low-latency dApps.

  • Many events in this contract are missing indexed parameters on fields that are routinely used for filtering: such as address newKing, address winner, or game identifiers like round.

  • This omission doesn't affect contract execution but degrades the experience for off-chain applications. Querying for logs by address or round becomes more expensive and inefficient, especially as log history grows.


event GameReset(uint256 newRound, uint256 timestamp);
event GracePeriodUpdated(uint256 newGracePeriod);

Risk

Likelihood:

  • This will affect every DApp or backend service that integrates with the contract via event logs.

  • Especially noticeable in production when data volume grows and querying specific player history or round outcomes becomes inefficient.

Impact:

  • Off-chain applications such as frontends, dashboards, and analytics tools will have to do full log scans to extract data by address or round.

  • This raises costs, causes delays, and can result in poor UX for end-users trying to fetch historical game data.

Recommended Mitigation


- event ThroneClaimed(address newKing, uint256 claimAmount, uint256 newClaimFee, uint256 newPot, uint256 timestamp);
+ event ThroneClaimed(address indexed newKing, uint256 claimAmount, uint256 newClaimFee, uint256 newPot, uint256 timestamp);
- event GameEnded(address winner, uint256 prizeAmount, uint256 timestamp, uint256 round);
+ event GameEnded(address indexed winner, uint256 prizeAmount, uint256 timestamp, uint256 round);
- event WinningsWithdrawn(address to, uint256 amount);
+ event WinningsWithdrawn(address indexed to, uint256 amount);
- event PlatformFeesWithdrawn(address to, uint256 amount);
+ event PlatformFeesWithdrawn(address indexed to, uint256 amount);
// Optional improvements for better filtering
- event GameReset(uint256 newRound, uint256 timestamp);
+ event GameReset(uint256 indexed newRound, uint256 timestamp);

Enables efficient event querying using indexed filters.

Reduces load and gas cost for subgraphs and event listeners.

Improves DApp responsiveness and data accuracy.

Updates

Appeal created

inallhonesty Lead Judge about 1 month ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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