MyCut

AI First Flight #8
Beginner FriendlyFoundry
EXP
View results
Submission Details
Impact: low
Likelihood: high
Invalid

No events emitted on claimCut() or closePot() — off-chain systems cannot reconstruct distribution history

Root + Impact

Poor observability; dispute resolution requires full transaction replay

Description

Neither claimCut() nor closePot() emit any events. Off-chain indexers, frontends, analytics dashboards, and dispute-resolution tools have no efficient way to determine which players claimed, when, what the manager received, or whether a Pot was closed correctly — without replaying every transaction against an archive node.

Risk

Likelihood:

  • Any production deployment immediately needs event data for its frontend and analytics — the absence is noticed on first use.

Impact:

  • Dispute resolution (e.g. "did my claimCut() succeed?") requires full transaction replay against an archive node rather than a simple event query.

  • The manager cannot prove on-chain that they distributed correctly without reconstructing state from scratch.

Proof of Concept

// Pot.sol :: claimCut()
// @> No event emitted after successful claim
function claimCut() public {
...
_transferReward(player, reward);
// missing: emit RewardClaimed(player, reward, block.timestamp)
}
// Pot.sol :: closePot()
// @> No event emitted after distribution
function closePot() external onlyOwner {
...
// missing: emit PotClosed(managerCut, claimantCut, claimants.length)
}

Recommended Mitigation

+ event RewardClaimed(address indexed player, uint256 amount, uint256 timestamp);
+ event PotClosed(
+ uint256 managerCut,
+ uint256 claimantCut,
+ uint256 numClaimants,
+ uint256 timestamp
+ );
function claimCut() public {
...
_transferReward(player, reward);
+ emit RewardClaimed(player, reward, block.timestamp);
}
function closePot() external onlyOwner {
...
+ emit PotClosed(managerCut, claimantCut, claimants.length, block.timestamp);
}
Updates

Lead Judging Commences

ai-first-flight-judge Lead Judge 2 days ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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

Give us feedback!