The Snow contract declares a SnowEarned event at line 41, intended to be emitted when a user earns free Snow tokens.
The buySnow function correctly emits its corresponding SnowBought event after minting tokens.
However, the earnSnow function never emits the SnowEarned event after minting. The event is declared but never used anywhere in the contract.
Likelihood:
Every single earnSnow call completes without emitting the event. This occurs 100% of the time during normal usage.
Impact:
Off-chain systems (event indexers, frontends, analytics dashboards) that listen for SnowEarned events will never receive data about free Snow token earnings.
There is an inconsistency between buySnow (which emits SnowBought) and earnSnow (which emits nothing), making on-chain activity harder to track and audit.
The SnowBought event is emitted in buySnow at line 89, but the analogous SnowEarned event is never emitted in earnSnow. A grep of the entire contract confirms zero occurrences of emit SnowEarned.
Add the emit SnowEarned statement at the end of the earnSnow function, mirroring how buySnow emits SnowBought. This ensures consistent event emission across both token acquisition paths, allowing off-chain systems to accurately track all Snow token distributions.
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.