project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4
project screenshot 5
project screenshot 6

bB Onboard Pro

A revolutionary onboarding tool for multi-player games, using zk proofs & strategic game testing to optimise team composition for game play success.

bB Onboard Pro

Created At

StarkHack

Winner of

Starkware - Best use of Starknet Promising Projects

Project Description

What?

A tool for mobile gaming apps that strategically allocates users into teams based on set criteria (ie gender; age range; colour preference and playing style).

Why?

Ensuring balanced teams through effective matchmaking algorithms is crucial to many multi-player games. Web2 relies on traditional methods like email verification and user prompts for player onboarding & team allocation. However (as we know) users may not always provide truthful information about their gender or age! This can lead to mismatches between allocated teams and compromise the whole game experience. We can solve this problem with the help of web3, where zk proofs can be used to prove that certain criteria are met (like gender & age) without revealing the user's underlying data. Smart contracts can then allocate players into teams based on on-chain, verified data. This is what our product does!

Objective:

To allocate new users into one of four teams:

  • Red Panda
  • Red Fox
  • Blue Panda
  • Blue Fox

Each team should target the following user composition:

| Gender | % | Data Source | | Male | 50% | zk proof from passport scan | | Female | 50% | zk proof from passport scan |

| Age Range | % | Data Source | | Age Range 18-25 | 25% | zk proof from passport scan | | Age Range 26-35 | 25% | zk proof from passport scan | | Age Range 36-45 | 25% | zk proof from passport scan | | Age Range 46 + | 25% | zk proof from passport scan |

| Player Type | % | Data Source | | Player Type 1 | 33.3% | game outcome [win] | | Player Type 2 | 33.3% | game outcome [draw]| | Player Type 3 | 33.3% | game outcome [lose]|

User Journey:

  1. User scans the NFC chip in their government-issued passport/ID - allowing selective disclosure of their birth year and gender without revealing any other private information

  2. User plays a strategy game. We designed a fully on-chain game inspired by SOS. The user plays against an AI contra player. This helps us capture a player type based on the game outcome. User chooses a coloured stone (red or blue) and places them on a 5x5 grid, aiming to control the board by capturing opponent pieces and strategically positioning their own. The goal is to accumulate the most points within three minutes. The player who captures the most stones wins. After completing the game, players are allocated a score for a win; lose or draw.

  3. Users are allocated a team in line with user composition above. To create hype and enhance the player experience, the user can then determine whether they wish to reveal their team through the app (instantly via paywall or after 5 days in the freemium model) or by attending a “reveal party” (where they will be prompted to find a reveal party using geo-location functionality).

How it's Made

There are three main components behind our tool:

  1. Passport Proof
  2. Fully On-Chain Strategy Game
  3. Allocation Algorithm

Passport Proof:

The Passport's NFC is scanned at the front end. Web NFC API will help to establish the connection between NFC Reader (device camera or NFC Reader Device). The personal data will be sent to an API as a post request using Axios library in React. The post request will be received by the running back-end server. To generate the zero-knowledge proof we used the NPM package of Starknet. We used the Starknet package to compile and run Cairo code that verifies the birth year and gender from the passport.

Strategy Game:

We designed our fully on-chain SOS inspired game with Dojo on Starknet. We ran the local node with Katana, indexing with Torii and deployed the contract with Slot. The user plays against an AI contra player (player's stone position is sent as a parameter on-chain).

Allocation algorithm:

For the allocation algorithm we used the Cairo plug-in for remix IDE provided by Nethermind. We found this to be a quick and easy tool to compile, declare, deploy, and unit test!

We took the following steps to build this algorithm on Starknet:

  1. define standard ranges for each item (age range, gender, player type & colour) and created a team structure based on these criteria;

  2. receive user data in smart contract a parameter (including user's age range, gender, player type, and colour preference - blue or red);

  3. assign user to team by determining which teams are candidates for assignment (iterating through all teams to find those that meet certain criteria - ie not full or needing balance adjustments);

  4. calculate imbalance of each team based on factors such as the difference in the number of members, the difference in average age or player type distribution from the desired balance;

  5. once teams identified, assign the new user to the team that has the fewest members and the most imbalance;

  6. update team data in smart contract (adjusting member count and recalculating metrics related to team balance).

In a multi-player setting where achieving the right team composition is crucial, our tool innovatively ensures player profile integrity while delivering an engaging onboarding experience!

background image mobile

Join the mailing list

Get the latest news and updates