Stellar
Clash of Pirates
On-chain PvP where zero-knowledge proofs hide your moves until the reveal.
Overview
Players commit three turns of attacks (Slash, Fireball, Lightning) and defenses (Block, Dodge, Counter). A Noir circuit proves every move is legal and binds the commitment to the player and the session, so nobody can peek or change moves after seeing the opponent's.
The problem
On a public chain, the second player can read the first player's move before choosing. Simultaneous-move games need hiding plus proof of honesty.
What I built
- A duel-commit circuit validating six move types and producing a Pedersen commitment bound to player and session
- Soroban contracts for the game, a token, a points tracker and an on-chain UltraHonk verifier
- Passkey smart-account wallets with WebAuthn and Ed25519 verifiers and delegated session keys
- An animated battle UI kept strictly separate from protocol logic
Under the hood
How it flows
ArchitectureLive
Clash of Pirates
01Pick 3 turns
02Noir proof
03Commit on Soroban
04Reveal
05Leaderboard
NoirRust / SorobanUltraHonkTypeScriptVitePasskey smart accounts
On-chain
| Stellar testnet | Clash game contractCCRG66MIX7ATFB4T3VJZ4TJLWKNRXKBX6HZWPUL2U2UQLUO5564F5IL5 |
