Inspiration

We're in awe of the eco-system and gameplay experience of the Cheeze Wizards blockchain game from Dapper Labs. That said, we know how to make the play experience even better!

What it does

Currently, a duel in Cheeze Wizards requires a minimum of 2 separate blocks mined and confirmed to process power transfer between 2 wizards (e.g. a duel outcome); in the first block, both players submit encrypted sets of 5 turns, and in the second block the encrypted moves are revealed by each player.

Using the Enigma protocol, we handle both blocks (turn commitments and reveal commitment) within a single a block resolution; this creates a dueling experience that is at least 50% faster for the players!

"Okay, okay, but how does it really work?" So glad you asked!

Turn commitments are passed as encrypted data into Enigma's secure SGX environment. Inside Enigma the encrypted move sets are decrypted and processed by our Rust smart contract. Once Rust resolves the score of the duel (which determines how much power the winning wizard gains, and losing wizard loses) the Enigma contract updates the Ethereum blockchain with the duel outcome on chain. Since both move commitments and revelations are handled within SGX, we can confidently (and provably) claim that we've eliminated at least half the "idle" waiting time that all players of Cheeze Wizards necessarily experience when playing any duel.

Challenges we ran into

We're no experts when it comes to Rust or Intel SGX environments, so the learning curve was incredibly steep and required a bit of prioritizing in terms of focus and deliverables.

Accomplishments that we're proud of

We're amazed we were able to pull this off. So much of this project is based on high level abstract theory and ambitious presumption, that it seems it would be impossible to deliver within the time frame of a weekend hackathon. We're also proud of our ability to develop using Rust and Enigma as using these tech stacks helped get our feet wet in totally unknown and unpredictable currents.

What we learned

  • Rust is awesome, but give yourself time for it to compile (woo, it can be hefty!) and please use snake case even for single word variable declarations!
  • Sometimes: sleep + second wind > hack until you fall asleep on top of the keyboard
  • SGX is a peculiar beast, but probably totally a game changer - consider the fact we were able to make the official Cheeze Wizards tournament contract 50% faster, in the span of a weekend, with no sacrifice to security or game mechanics short cutting.

What's next for Fonduels

As the makers of https://cheezeofinsight.com we've built a decent amount of momentum around our products; we hope to keep building that momentum with this project! Cheeze Wizards was designed with ERC721 composability in mind, and really CW is all about creating an extensible developer eco-system as much as it is a TOTALLY LEGENDARY pioneer project within the blockchain gaming space. We'd like to take this ambitious POC back to Dapper for review and see if they're interested in having us build it out into something production ready.

Proposed project road map:

  • Create a production ready version of our hackathon POC, and pitch it as a refactor candidate for Dapper's next CW tournament

  • Create an ORM version of the production ready product that can be used on any Ethereum DApp that uses the commit + reveal 2 block structure

  • We are also currently working on an eSports tournament structure for Cheeze Wizards. It's in the Whitepaper drafting phase at the moment, but the idea is it would also be using the single block structure on Enigma for confirming commit + reveal.

Share this project:

Updates