Back to projects
Zarklink icon

Zarklink

Private cross-chain bridge over Zcash to Starknet

$1,500
Total awarded
Zarklink
Arnav, Nikhileshwaran
Builders
Rust Cargo Cairo Circom StarkNet Zcash

Awards

The problem it solves

  • Privacy-Preserving Transfers: Unlike traditional bridges that expose “User A bridged 100 ZEC” on-chain, ZCLAIM uses Zcash’s shielded notes and homomorphic value commitments. The bridge verifies validity without learning amounts, true financial privacy across chains.

  • Trustless Custody: No centralized custodian holds your assets. Multiple independent vaults lock ZEC, each posting 150% collateral. If a vault misbehaves, users claim collateral directly. No single point of failure.

  • Cryptographic Proof of Locking: Zero-knowledge proofs (πZKMint/πZKBurn) prove notes exist in Zcash’s Merkle tree, are addressed to the correct vault, and have matching value commitments, all without revealing actual values.

  • On-Chain Zcash Verification: The RelaySystem contract maintains Zcash block headers with PoW verification and Sapling commitment roots, enabling trustless verification of Zcash state on Starknet.

  • Challenge-Response Security: Vaults can challenge bad encryption by revealing shared secrets, with malicious users losing deposits.

  • Composable Private DeFi: wZEC on Starknet enables private trading on DEXs, private collateral in lending, and anonymous DAO participation, extending Zcash privacy into DeFi.

Challenges we ran into

  • Cairo 2.8 Compiler Issues: The Cairo compiler panicked when enabling multiple modules with cross-dependencies. Fixed by restructuring the module hierarchy, inlining crypto functions, and adding required Default/Copy traits to storage enums.

  • Fixed-Size Array Limitations: Cairo doesn’t support 2D array indexing like Rust. The BLAKE2b sigma permutation table had to be reimplemented as an if-else lookup function instead of sigma.at(round).at(index).

  • Zcash Cryptography in Cairo: Zcash uses BLAKE2b-256, Equihash PoW, and SHA256d—none native to Cairo. Pure implementations would be gas-prohibitive. Solution: use circom circuits for heavy crypto off-chain, verify ZK proofs on-chain.

  • Storage Constraints: Cairo contracts can’t store dynamic arrays. Created separate MintTransferStorage structs without Array fields for persistence.

  • RPC Deprecation: Starknet public RPC endpoints (BlastAPI) became unreliable, requiring migration to Alchemy/Infura with API keys.

Gallery