ZK-verified trading credibility for crypto influencers. Prove your score, hide your wallet.
Crypto influencers claim trading expertise but there's no way to verify it without exposing their wallet. AlphaShield fixes this with zero-knowledge proofs. An influencer runs a ZK circuit locally on their private trade data, computing win rate, Sharpe tier, and an overall grade (A-F). A Pedersen Merkle tree binds the proof to real on-chain committed data, ensuring nothing is fabricated. The trading wallet commits this root, then a completely separate wallet submits the ZK proof — the two are never linked. An on-chain UltraHonk verifier confirms the computation is honest, World ID ensures one human gets one score, and an ERC-721 NFT badge is minted with fully on-chain SVG metadata bound to the influencer's ENS name. Followers look up any influencer by ENS and see a cryptographically verified score — without ever learning which wallet they trade from.
The project has three layers: a Noir ZK circuit, Solidity smart contracts on Sepolia, and a Next.js frontend.
ZK Circuit (Noir + Barretenberg): The circuit takes 10 trades as private inputs — signed P&L values (i64, scaled by 100) and win/loss flags (u1). It computes win rate as (wins * 100 / trade_count), a simplified Sharpe bucket using mean P&L thresholds (integer-only, no floats allowed in ZK), and an overall grade combining both metrics. The circuit then builds a Pedersen Merkle tree (depth 4, 16 leaves) over all trades and returns the root as a public output alongside win_rate, sharpe_bucket, and grade. One notable hack: Noir's i64 can't cast to Field for hashing, so we decompose each P&L into (absolute_value, sign_bit, win_flag) before feeding it to pedersen_hash. The proof is generated locally via nargo execute + bb prove with UltraHonk, producing an 8.6KB proof and 128 bytes of public inputs. We built prove.sh and commit-root.sh as standalone CLI scripts so the entire proof generation is completely decoupled from the frontend — the influencer's trade data never touches a server.
Smart Contracts (Solidity + Foundry): Three contracts on Sepolia. TradeCommitment.sol lets the trading wallet commit its Merkle root — this is the only time the trading wallet touches the blockchain, and it reveals nothing about individual trades. HonkVerifier.sol is auto-generated by Barretenberg's bb write_solidity_verifier — it runs full UltraHonk verification on-chain including KZG pairing checks via the EVM ecPairing precompile at about 3.7M gas. The verifier was initially 33KB, exceeding the 24KB EVM contract size limit — we got it under by setting optimizer_runs=1 in Foundry. AlphaShieldBadge.sol is the core contract: it verifies the Merkle root was committed on-chain, calls the verifier, checks the World ID nullifier hasn't been used, then mints an ERC-721 with fully on-chain SVG metadata — no IPFS, no external dependencies. The SVG is constructed entirely in Solidity using string.concat and Base64 encoding, color-coded by grade (A=green through F=red). We had to split the SVG builder into four smaller internal functions to avoid Solidity's stack-too-deep error from too many local variables.
Frontend (Next.js + wagmi + viem): World ID integration via IDKitWidget provides proof-of-personhood — one human, one badge, no sock puppets. ENS names resolve on mainnet even though the dapp runs on Sepolia, using viem's normalize() before namehash(). The proof upload uses modal popups on the homepage: the user uploads two binary files (proof and public_inputs generated by prove.sh), the frontend parses the 128-byte public inputs file into four 32-byte big-endian values (win_rate, sharpe_bucket, grade, trade_root), previews the score card, then calls attest() on the badge contract via wagmi's useWriteContract. The score lookup modal reads getScoreByNode(namehash(ensName)) and renders the badge. No proof data is ever hardcoded in the frontend — everything comes from the user's uploaded files.
Partner Technologies: World ID provides sybil resistance — without it a trader could create 100 wallets and attest only the winning one. ENS serves as the public identity layer — followers query by human-readable names and the underlying wallet stays hidden. Noir and Barretenberg from Aztec handle the entire ZK pipeline from circuit compilation through on-chain verification. The Merkle root commitment pattern bridges the gap between "I generated this proof" and "this proof is about real data" without requiring the influencer to reveal their trading wallet in the proof itself.

