Post a Sudoku puzzle with a USDC bounty.
Prove you solved it on-chain — without ever revealing the solution.
Built on Arc Testnet · Groth16 ZK proofs · Solidity + Foundry · Next.js
- Post — Creator submits an 81-cell Sudoku puzzle + USDC bounty + deadline
- Boost — Anyone can top up the prize pool (crowdfunded bounties)
- Solve — Solver fills the grid in the browser
- Prove — snarkjs generates a Groth16 ZK proof client-side (~30 s)
- Claim — Proof submitted on-chain; contract verifies it and releases the bounty
- Credential — Solver receives a soulbound NFT as proof-of-skill
The ZK circuit enforces all Sudoku rules (row/column/box uniqueness + clue matching). The solver's answer is never revealed on-chain — only the proof is.
solvex/
├── circuits/ Circom circuit — full Sudoku constraint system
├── contracts/ Foundry project
│ ├── src/
│ │ ├── BountyMarket.sol Core protocol contract
│ │ ├── SolverNFT.sol Soulbound credential NFT
│ │ └── interfaces/
│ ├── script/Deploy.s.sol
│ └── test/BountyMarket.t.sol
├── scripts/ Circuit compile + trusted setup + proof generation
└── frontend/ Next.js 14 app (App Router)
- Node.js ≥ 18
- Circom ≥ 2.0 (
npm i -g circom) - Foundry (
curl -L https://foundry.paradigm.xyz | bash) - Arc Testnet USDC from the Circle Faucet
# Circuit / scripts
cd scripts && npm install
# Contracts
cd ../contracts && forge install \
OpenZeppelin/openzeppelin-contracts \
foundry-rs/forge-std
# Frontend
cd ../frontend && npm installcd scripts
bash 1_compile.shOutputs artifacts/sudoku.r1cs, artifacts/sudoku_js/sudoku.wasm etc.
bash 2_setup.shDownloads pot14_final.ptau (~85 MB, Hermez ceremony), runs Phase 2 setup,
exports contracts/src/Verifier.sol and copies wasm + zkey to frontend/public/.
Production note: For mainnet, run a proper multi-party ceremony rather than a single-contributor setup.
cd contracts
cp .env.example .env # fill in PRIVATE_KEY and VERIFIER_ADDRESS
# Deploy Verifier first
forge create src/Verifier.sol:Groth16Verifier \
--rpc-url arc_testnet --private-key $PRIVATE_KEY
# Set VERIFIER_ADDRESS in .env, then deploy market + NFT
forge script script/Deploy.s.sol \
--rpc-url arc_testnet --broadcast --private-key $PRIVATE_KEYCopy the output addresses into frontend/.env.
cd frontend
cp .env.example .env # fill in contract addresses + WalletConnect project ID
npm run devOpen http://localhost:3000.
| Contract | Address |
|---|---|
| BountyMarket | TBD — fill after deploy |
| SolverNFT | TBD — fill after deploy |
| Verifier | TBD — fill after deploy |
cd contracts
forge test -vvvAll 8 unit tests cover: post, contribute, claim, double-claim prevention, expiry, refund, protocol fees, and soulbound transfer revert.
cd scripts
node 3_generate_proof.js puzzle.json solution.json
# outputs proof_calldata.json with formatted pA, pB, pC, pubSignalsThe Sudoku() circuit in circuits/sudoku.circom:
| Signal | Visibility | Description |
|---|---|---|
puzzle[81] |
public | Clue grid (0 = blank, 1-9 = given) |
solution[81] |
private | Full solution (never revealed) |
Constraints enforced:
- Each solution cell is in
[1, 9] - For every non-zero puzzle cell,
solution[i] == puzzle[i] - Every row contains
{1…9}exactly once - Every column contains
{1…9}exactly once - Every 3×3 box contains
{1…9}exactly once
Requires pot14_final.ptau (~16 384 constraints).
| Feature | Description |
|---|---|
| ZK proofs | Solution privacy guaranteed on-chain |
| Crowdfunded pools | Anyone adds to the bounty |
| Soulbound NFT | Non-transferable proof-of-skill credential |
| 2.5% protocol fee | Self-sustaining without a token |
| Creator refund | Unclaimed pool returned after deadline |
| On-chain SVG NFT | No IPFS dependency |
- Multi-puzzle-type registry (extend beyond Sudoku)
- Hint micropayments (creator earns from hints)
- Time-escalating bounty curve
- Proof aggregation for gas efficiency
- Mainnet deployment (Arc Mainnet)