BattleZips
  • Awesome Circom
  • 🔬Theory
    • Prerequisite Knowledge
    • Resources
      • White Papers & PDF's
      • Blogs and Writeups
      • Videos
      • Important Entities
      • Communities
    • Proving Schemes
    • Primitives
      • Hash Functions
      • Public Key Cryptosystems
        • Note on L1 key registry → L2 hot key + callback to circuit-optimized hash functions
        • ECDSA & secp256k1
        • EdDSA
      • Merkle Trees
        • What is a Merkle Tree?
        • What is a merkle proof of inclusion?
        • zk-kit
        • Incremental Merkle Trees
        • Sparse Merkle Trees
        • Tree Arity (Binary, Quinary)
      • Semaphore
      • Arithmetic Circuits
  • 🏗️Development
    • Circom Language
      • Installation
      • IDE
      • Signals and Variables
      • Signal Assignment and Constraint Generation
      • Conditional Statements
      • Components and Templates
      • Circuit Compilation
      • Syntax
    • SnarkJS
      • Proving Schemes
      • Powers of Tau
      • ZK Keys
      • Zero Knowledge Proofs
      • On-Chain ZKP
      • Page 2
    • circomlib
      • Basic Math Constraints
      • Multiplexing
      • Hashing
      • EdDSA
      • circomlibjs
    • circom-tester
    • hardhat-circom
    • SHIELD
    • Circomspect
  • 🌆Ecosystem
    • Circom vs Other Solutions
      • Domain-Specific Languages
      • ZK Virtual Machines
      • ZK Ethereum Virtual Machines
    • Communities to Join
    • Recorded Content
    • Projects
  • 🛳️Examples
    • BattleZips V1
      • On the BattleZips Project
      • Docs holder
        • Join Game UML Sequence Diagram
        • Play Game UML Sequence Diagram
        • End Game UML Sequence Diagram
      • ZK Privacy Stack
      • Deploying Artifacts to Prod
      • Browser Client
    • RollupNC
      • Smart Contracts
      • Account/ State Tree
      • Transaction Tree
      • Layer 1 Deposits to Layer 2
      • Layer 2 Transacting
      • Layer 2 Withdrawals to Layer 1
Powered by GitBook
On this page
  1. Examples
  2. BattleZips V1

On the BattleZips Project

I'm sorry do you know a brother at the house? Otherwise I can't let you in...

PreviousBattleZips V1NextDocs holder

Last updated 2 years ago

BattleZips is an exploration into the application of zero knowledge cryptography to achieve privacy and scalability in EVM stacks. As a FOSS toy example of private state computation on a public blockchain, we encourage anyone to use the BattleZips code base as an educational starting point (or transformative production code base). In BattleZips V1, we utilise the Circom/SnarkJS/Solidity to demonstrate how adversarial parties can coordinate private state with eachother in the form of an on-chain Battleship game. This is done using zero knowledge proofs to obscure ship positions that discloses whether proof whether a "shot" (x,y coordinate) on a 10x10 grid intersects with a pre-commited hash of the arrangement of 5 ships on the 10x10 grid.

In BattleZips V2, The engineering goal is to produce a ZK State Channel summary that proves correct execution of an arbitrary off-chain process. This private state is reached only by the participating parties. The receipt of this engagement is put on-chain without revealing the intimate underlying state that composed the agreement. Where all these intermediate state increments may currently be coordinated on-chain, the proof of their correct construction can instead be put on-chain in a single transaction. Battleships again offers a fantastic opportunity to disintermediate adversarial private state coordination; just look to [Absolute Poker]("). The same proof exchange to validate state increments coordinated on-chain in L1 is instead sent via websockets directly to the client. Once a client has recieved 17 shot proofs demonstrating hits from the opponent, a "Proof of Battleship Game" can be constructed. We got the idea for the name "Zips" out of the way that two parties "zip up" state between eachother into a single transaction.

We got the idea for the name "Zips" out of the way that two (or more) disjoint parties "zip up" state between each other into a single transaction/ proof. In the context of a brutally strict KYCAML regime we believe this pattern will be important for allowing commercial participants uninterested in crypto to engage with businesses funded by decentralized finance. From the outset we focus on making our work permissionlessly open source such that anyone can come up with a novel (or for that matter copy-cat) implementation such that the true implications of ZK State Channels' potential can hopefully be realized.

BattleZips' team have minimal mathematical backgrounds and approached Zero Knowledge from the perspective of software programmers wielding the web3 stack (Solidity/ NodeJS/ React/ Subgraphs/ etc). As we accumulated experience we recognized how much the battle is actually finding the resources you need to use to establish your own understanding, compared to the actual act of researching and studying to understand. It became apparent that there is opportunity to alleviate developer on-boarding pains simply by adding more highly-visible introductory resources to the ecosystem. For this reason, [we also maintain an "Awesome Circom" GitBook]() compendium to Circom's use for both privacy and scalability as we have so far determined. At the generous offer by a DevCon VI attendee, we soon will translate this GitBook to Spanish. A future secondary aspiration is to build out BattleZips in the manner of [CryptoZombies](), spoonfeeding certain topics with an interactive IDE gamifying the learning experience for absolute novices while linking to more complex resources for second readers.

🛳️
https://upswingpoker.com/ultimate-bet-absolute-poker-scandal/
https://battlezips.com/resources
https://cryptozombies.io/