SNARKeling Treasure Hunt

First Flight #59
Beginner FriendlyGameFiFoundry
100 EXP
Submission Details
Impact: low
Likelihood: low

_markClaimed Does Not Emit Event

Author Revealed upon completion

Root + Impact

Description

  • The internal _markClaimed() function marks a treasure as claimed but does not emit an event. While claim() emits a Claimed event, the separation of concerns suggests _markClaimed() should also emit its own event for complete tracking.

// @>TreasureHunt._markClaimed()
function _markClaimed(bytes32 treasureHash) internal {
claimed[treasureHash] = true; // No event emission
}

Risk

Likelihood:

  • Reason 1

Impact:

  • No event trail if _markClaimed is called from multiple paths

  • Event emission responsibility is unclear

  • Minor code quality issue

Proof of Concept

Recommended Mitigation

Consider adding an event emission in _markClaimed() for consistency, or ensure all calling functions emit appropriate events.

Support

FAQs

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

Give us feedback!