On the BattleZips Project

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

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]("https://upswingpoker.com/ultimate-bet-absolute-poker-scandal/). 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](https://battlezips.com/resources) 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](https://cryptozombies.io/), spoonfeeding certain topics with an interactive IDE gamifying the learning experience for absolute novices while linking to more complex resources for second readers.

Last updated