The claim function allows a user to submit a valid ZK proof along with a recipient address. After successful verification, the contract transfers the REWARD (10 ETH) to that recipient and is supposed to emit a Claimed event that logs the treasureHash and the actual recipient of the funds.
The Claimed event is emitted with msg.sender (the caller of the function) instead of the recipient parameter that actually receives the ETH.
Likelihood:
This bug triggers on every successful claim() call
No special conditions or attacker actions required. It is deterministic
Impact:
Off-chain indexing/monitoring will track the wrong recipient
Audit logs and historical data will be misleading
Event consumers (block explorers, dashboards, bots, frontends) cannot determine who actually received the reward
The PoC creates a situation where the caller (msg.sender) is different from the recipient who actually receives the ETH. The contract correctly sends the funds to the recipient, but the emitted Claimed event incorrectly logs the caller’s address. This shows the event is unreliable for off-chain tracking.
Changing the event emission from msg.sender to the recipient parameter is a one-line fix. It ensures the Claimed event always accurately reflects who actually received the reward. This has zero risk to the contract logic, negligible gas impact, and fully resolves the off-chain indexing and logging issues.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.
The contest is complete and the rewards are being distributed.