Snowman Merkle Airdrop

First Flight #42
Beginner FriendlyFoundrySolidityNFT
100 EXP
View results
Submission Details
Impact: low
Likelihood: high
Invalid

Missing Event Emission for Snow Earning Tracking in Snow.sol::earnSnow

Root + Impact

Root: The earnSnow function mints Snow tokens to users but fails to emit the declared SnowEarned event, despite the event being properly defined in the contract.

Impact: Snow earning activities cannot be properly tracked or monitored off-chain, reducing transparency and making it difficult to audit earning patterns or verify user reward distribution.

Description

  • Normal Behavior: Token minting functions should emit events to provide transparency and enable off-chain monitoring of when tokens are earned and by whom.

  • Specific Issue: The SnowEarned event is declared but never emitted in the earnSnow() function, creating a gap in the contract's event logging and preventing proper tracking of free token distribution activities.

Risk

Likelihood: High

  • Every successful call to earnSnow() triggers this issue as the event is never emitted

  • Snow earning is a core protocol feature that users will interact with regularly throughout the farming period

Impact: Low

  • Poor Transparency: Off-chain monitoring systems cannot track Snow earning activities automatically

  • Audit Difficulties: Historical earning data cannot be easily retrieved from blockchain events, complicating reward distribution audits

Recommended Mitigation

Emit an event when someone earnSnow

function earnSnow() external canFarmSnow {
if (s_earnTimer != 0 && block.timestamp < (s_earnTimer + 1 weeks)) {
revert S__Timer();
}
_mint(msg.sender, 1);
+
+ emit SnowEarned(msg.sender, 1);
s_earnTimer = block.timestamp;
}
Updates

Lead Judging Commences

yeahchibyke Lead Judge 5 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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