🧠Project Story
About the Project
BrainD was inspired by the nostalgic Brain Challenge games many of us grew up with.
We wanted to reimagine that same feeling of quick mental workouts, but with the ownership, transparency, and incentives of Web3.
Our motivation came from two places:
- Play & Learn — making cognitive training more engaging by giving it real stakes through prediction markets and rewards.
- Impact — building a sustainable economy where surplus fees go to support research in Alzheimer’s and Parkinson’s.
What We Learned
- How to design modular Cairo smart contracts that separate concerns (games, payments, leaderboards).
- How to integrate a Progressive Web App (PWA) for offline-friendly gameplay.
- The importance of provably fair randomness (VRF) and NFT-based achievements to boost fairness and retention.
How We Built It
- Smart Contracts: Iterated through three architectures (V1, V2, V3) to arrive at modular, scalable contracts deployed on Starknet (Sepolia testnet + mainnet).
- Frontend: Built with Next.js and TypeScript, styled with a retro pixel art design system, deployed as a PWA.
- Integration: Connected contracts with custom React hooks (
useLeaderboard,usePredictionMarket,usePlayerStats) to give smooth, onchain-driven gameplay. - Economy: Designed a round-based prize pool with distribution model:
$$
Prize = {30\%,\;25\%,\;20\%,\;10\%,\;10\%,\;5\%}
$$
where each percentage maps to 1st place → 2nd place → 3rd place → random player → House Fee→ airdrop fund.
Challenges We Faced
- Debugging Cairo 2.12.2 changes that broke ~30% of our original tests.
- Implementing session management that correctly closes and pays out without leaving orphaned sessions.
- Designing the pixel-art UI to look nostalgic yet functional for a modern PWA.
- Balancing the game economy: keeping fees low while ensuring rewards and donation surplus are meaningful.
Built With
- braavos-ipfs/arweave-(nft-metadata-&-assets)-(future)-vrf-oracle-for-randomness-design:-pixel-art-design-system-(press-start-2p-+-inter)
- crt-scanline-&-neon-glow-effects-testing:-snforge
- eslint
- for
- javascript-frameworks:-scaffold-stark-2
- jest-(frontend-components)
- languages:-cairo-2.12.2-(smart-contracts)
- mainnet)
- next.js-15.2.4
- prettier
- public-endpoints)-wallets:-argentx
- react-platforms:-starknet-(sepolia-testnet
- starknet-foundry
- typescript-5.0
- vercel-(frontend-hosting)-smart-contract-tools:-scarb
- voyager-(verification)-apis-&-services:-starknet-rpcs-(blast
Log in or sign up for Devpost to join the conversation.