security_review("snarkeling")

SNARKeling Treasure Hunt

Smart Contract & ZK Circuit Security Review · CodeHawks First Flight · May 2026
Real-world treasure hunt with on-chain ETH reward claiming via zero-knowledge proofs. ~220 NSLOC reviewed across Solidity contract, Noir ZK circuit, and deploy script.

HIGH 2
MEDIUM 1
LOW 5
INFO 2
GAS 3
TOTAL FINDINGS 13
NSLOC ~220
DS-1 · Secret Values Exposed in Public Deploy Script L-1 · Proof Replay Drains 100 ETH — Wrong Mapping Key AC-1 · withdraw() Missing onlyOwner — Anyone Can Trigger EV-1 · updateVerifier() Missing Zero-Address Check ST-2 · Claimed Event Emits msg.sender Instead of Recipient C-1 · Duplicate Hash in ALLOWED_TREASURE_HASHES — Only 9 Unique Treasures CEI-1 · CEI Violation in claim() — Verifier Called Before State Updates DS-2 · Deploy Script hash[8] Differs from Circuit — Confirms C-1 AC-2 · receive() Accepts ETH from Anyone AC-3 · Auth Check Order in updateVerifier() / emergencyWithdraw() G-2 · 9 Custom Errors Defined but Never Thrown G-3 · onlyOwner Modifier Declared but Never Applied G-7 · Redundant paused = false in Constructor
[ DOWNLOAD REPORT PDF ]
[ TAP TO VIEW FULL REPORT ]