
Stealth Command: The Hidden Fronts
Autobattler game that uses FHE (Fully Homomorphic Encryption) to hide defensive strategies. This is a complete re-write of a game written with ZK. This serves as a comparison between FHE and ZK.
About
The problem it solves "Fog of war" in on-chain games is not easily achevable in public chains like Ethereum. ZK provides a solution to achieve privacy on-chain. However, since proof is generated off-chain, in a multiplayer game - we might need to store data off-chain. This is not a developer friendly experience, and moreover, in some cases storing the data in a centralized location defeats the purpose of on-chain data. Fully Homomorphic Encryotion (FHE) provides a viable option to store encrypted data on-chain and do computation on encrypted data, removing the need of off-chain storage. It also can eliminate the need of deploying verifiers on-chain and doing costly verifiation transactions. For detailed information on how FHE was an improvement to the ZK solution, please check the [Readme/Documentation](https://github.com/Switch-Labs/stealth_command?tab=readme-ov-file#stealth-command-the-hidden-fronts).
How it's made
Challenges we ran into One of the biggest challenges I ran into while hacking solo is that I ran out of time before I could implement a frontend for my game. I could have probably done a lot more if I worked with a bigger team. Also, the randomness generation in Inco Protocol did not quite work. I am guessing it has to do with solidity version I am using. But TFHE.rem function was not available. I did not have the time to debug. Also, for Fhenix Protocol, the documentations were updated far too late, an updated documentation a few days earlier would have been appreciated. However, it all worked out in the end.