SusBot

Social deduction (impostor) game bot for XMTP group chats with mobile-first interactive voting

SusBot

Created At

ETHGlobal Buenos Aires

Project Description

SusBot brings the classic "Imposter" social deduction game to XMTP group chats with full mobile support. Players receive secret roles via DMs - normal players get a secret word while one imposter doesn't. The group discusses the word to identify the suspicious player before voting them out.

The bot orchestrates the complete game flow: players vote on discussion duration (5/7/10 minutes), receive private role assignments via DM, participate in timed discussions, and vote using interactive buttons. The bot manages multiple concurrent games across different groups, handles all timing mechanics, and provides real-time game state updates.

Built for mobile-first XMTP clients like Base app, SusBot demonstrates how decentralized messaging can power engaging social gaming experiences with privacy-preserving mechanics and seamless cross-platform gameplay.

How it's Made

SusBot is built using the XMTP Node SDK with TypeScript for type-safe development. The core architecture implements multi-group state management to run concurrent games across different XMTP group chats, with NodeJS timers orchestrating game phases (voting, discussion, results).

A key innovation is the implementation of XIP-67 Actions and Intent content types (coinbase.com/actions:1.0) to enable interactive button-based voting on mobile XMTP clients. This replaced initial custom Poll content types that weren't displaying on mobile apps, ensuring full compatibility with Converse, Coinbase Wallet, and the Base mobile app.

The bot uses XMTP's DM functionality (client.conversations.newDm) for private role assignments, maintaining game privacy while coordinating public group interactions. We implemented address resolution helpers with caching for efficient player name display and built graceful error handling for network issues.

Deployment uses Railway with Nixpacks for automated builds. The project structure follows best practices with separate modules for game state (GameState.ts), orchestration (GameManager.ts), message routing (messageHandlers.ts), and custom content type codecs. The word pool includes 120+ categorized words for variety across food, animals, technology, nature, and sports.

background image mobile

Join the mailing list

Get the latest news and updates