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

BubbleWars

BubbleWars is a gamified Telegram-implementation of our novel Ethereum Referral Protocol.

BubbleWars

Created At

ETHGlobal Bangkok

Winner of

Blockscout - Blockscout Explorer Big Pool Prize

Prize Pool

Coinbase Developer Platform - CDP SDK Pool Prize

Prize Pool

Pyth Network - Pyth Entropy Pool Prize

Prize Pool

ENS - Best use of L2 Primary Names

ETHGlobal - 🏆 ETHGlobal Bangkok 2024 Finalist

Project Description

BubbleWars is a multiplayer-battler game in Telegram, similar to agar.io.

The game implements an instance of our Ethereum Referral Protocol (ERP), which allows for custom on-chain referral programs. By leveraging ERP, BubbleWars gains a social element, where users are rewarded for inviting their friends, and growing the community. Due to ERP's open and modular design, almost any smart contract is able to take advantage of a fully trustless, and customizable referral system on-chain.

To seamlessly onboard users, BubbleWars leverages Telegram auth, which is used to authenticate the user into their EOA, which owns an ENS subdomain (*.bubblewars.eth) on Base. The ENS implementation leverages L1 state and L2 retrieval via Durin. The BubbleWars game contract tracks PvP activity on chain, from which the client reads real-time gameplay data via The Graph Protocol that provides context to our in-game AI. This AI's responses is verified by a TEE Docker image from Phala Network with a remote attestation quote. Our custom GPT implementation using on-chain context to commentate the on-chain leaderboard of the game and feed that into Telegram. Pyth was used to implement on-chain randomness to ensure verifiably fair gameplay. AWS technologies we used include Lambda, EC2, DynamoDB, Cloudwatch.

How it's Made

We architected an ambitious and deeply integrated tech stack that leverages multiple cutting-edge technologies to bring our project to life.

Core Infrastructure on AWS 🚀

•	DynamoDB serves as our backbone for storing critical user data, including Telegram credentials and on-chain metadata, ensuring fast, scalable, and reliable data management.
•	S3 powers our storage solution for dynamic frontend assets, particularly the game-related images that enhance user engagement.
•	EC2 instances run our AI and Phala Docker containers, providing a robust compute layer that handles complex AI processing and secure, decentralized verifications.
•	Lambda functions serve as the core of our backend, orchestrating everything from user authentication to AI integrations.
•	CloudWatch is our go-to for real-time log monitoring, ensuring that we have visibility into every system component and can quickly resolve any issues.

AI-Powered On-Chain Intelligence 🤖

•	OpenAI plays a central role in delivering dynamic commentary. We’ve fine-tuned models using on-chain data to generate highly contextual and relevant responses, giving our users a personalized, data-driven experience.
•	Phala Network is used to verify the authenticity of AI-generated responses, ensuring secure and tamper-proof interactions.

Blockchain Integrations & Data Aggregation ⛓️

•	Blockscout allows us to verify the integrity of our contracts, ensuring transparency and trust with our users.
•	Pyth Network adds a layer of randomness directly on-chain, which we leverage for gameplay mechanics that require unpredictability, like loot drops and leaderboard rewards.
•	TheGraph indexes our smart contracts, enabling us to provide real-time updates and feed contextual data to both our AI and other backend systems.

Enhancing User Experience 🌐

•	Leveraging ENS with Durin, we’ve created a seamless username experience for players, integrating Web3 identities in a familiar way.
•	Telegram is our primary authentication and frontend platform. We’ve streamlined user onboarding with its robust API, providing a frictionless entry point for gamers.
•	Using Ethers.js, we instantly onboard users by creating an Externally Owned Account (EOA), enabling them to interact with the blockchain without needing extensive wallet setup.

Notable Hacks & Innovations 🛠️

•	One of our most hacky solutions involved combining OpenAI fine-tuning with on-chain data sourced via TheGraph to deliver real-time, context-aware commentary during gameplay. This required clever data pipelining and prompt engineering to keep responses relevant and timely.
•	We leveraged Phala to securely validate AI responses, pushing the boundaries of using decentralized verification for content authenticity—something that hasn’t been widely explored in the Web3 gaming space.

This multi-faceted approach, blending traditional cloud infrastructure with decentralized technologies and AI, enables us to deliver a unique and cutting-edge user experience.

background image mobile

Join the mailing list

Get the latest news and updates