Zakkarat - The Zero-Knowledge Baccarat Game

Zakkarat - The Zero-Knowledge Baccarat Game

A Fully-Verifiable, Privacy Centric Zero-Knowledge Baccarat Game on Aleo

Zakkarat - The Zero-Knowledge Baccarat Game

Zakkarat - The Zero-Knowledge Baccarat Game

A Fully-Verifiable, Privacy Centric Zero-Knowledge Baccarat Game on Aleo

The problem Zakkarat - The Zero-Knowledge Baccarat Game solves

Problem Statement

1. Genuineness and trustworthiness of online casinos in question

There are an abundance of online gaming sites available in the market, be it legal or illegal ones. Right now, there is no way we could ensure that these gaming sites generate the games fairly and do not tamper with the game probability to increase the house edge.

Let us use Baccarat as an example - the expected return for every $1 a user betting on "Player" is $0.9874, which means that casino has a house edge of $0.0126 for every $1 a user bet. However should a casino decided to tweak the game generation algorithim to decrease user's winning expected return to $0.9700, it could go unnoticed by the user, but will increase the casino's long term profit on the game by more than 100%.

2. Privacy of user's on-chain betting

Most modern smart contract enabled blockchains utilizes a transparent account based model, and this makes users betting and other transaction on chain fully visible to anyone. This causes privacy concerns and potentially create legal risks for the user under certain jurisfiction.

Solution:

We are building a fully-verifiable, privacy-centric zero-knowledge baccarat game on Aleo, that can ensures the genuineness of the game hands by storing the game hash on chain, and resolves the game result via zero-knowledge execution. Under Aleo's design, all transactions were essentially ciphered, and only the owner with the private key / view key of the record can view it.
This ensures the genuineness of the game and the pricavy of user's transaction at the same time.

Challenges we ran into

Developing on Aleo is a total new experience for us, as Aleo's Blockchain utilizes UTXO mode which is very much different from Ethereum's Account-based model.

1. Leo programming language

  • Leo is a functional programming language, due to how underlying ZK-Circuits work, Leo doesn't officially support strings and arrays as data types. This makes us to be more creative in designing our programme.

2. Not able to share state between different programs

  • Due to the privacy-centric nature of the network, different programs where not able to share states.

3. Bugs in Aleo-SDK

  • We have encountered bugs during the usage of Aleo-SDK, and we have managed to dive into the node_module, find the bug and fix it. Examples of sdk usages were not up to date, there were some dependencies problems within the sdk. Pull Request PR #774

4. Aleo Testnet3 Under Recalibration During Hackathon Period

  • The testnet was under recalibration and causes our aleo programme not being able to deploy. We uses older version of SnarkOS to run a local Beacon node to test the deployment of our programmes.

Tracks Applied (1)

Aleo Track

Our project is a ZeFi / Gaming app that was built on Aleo, and fully utilizes SnarkOs and the provided build tools which...Read More

Aleo

Discussion