Taifei Bazaar: 2D DeFAI multiplayer arena inspired by Taiwanese night markets - Explore AI stalls
Prize Pool
Taifei Bazaar invites users into an interactive, 2D multiplayer arena designed as a gamified DeFi journey, drawing inspiration from the lively atmosphere of Taiwanese night markets and the social dynamics of platforms like Gather Town. Entry into this pixel-art world is seamless: users connect their crypto wallets, which instantly grants them an avatar to navigate the vibrant digital bazaar.
The core experience revolves around exploration and interaction. As users guide their avatars through the market, they encounter various themed stalls. These aren't just static elements; each stall embodies a DeFaI (Decentralized Finance AI) Agent, representing specific DeFi protocols, financial tools, or support functions. Users can approach these agent-stalls and engage in intuitive interactions using either natural language speech or text input.
For the initial launch (or hackathon scope), the bazaar features seven distinct agent-stalls, offering a range of functionalities: Celo Swapping Agent: Facilitates token swaps directly on the Celo network. Celo Staking Agent: Allows users to stake Celo assets via integrated protocols. Rootstock Swapping Agent: Enables token swaps on the Rootstock sidechain. Rootstock Staking Agent: Provides staking capabilities for Rootstock assets. Real-Time Price Teller: An oracle agent providing current market prices for various cryptocurrencies. Information / Support Hub: A helpdesk agent offering guidance and answering questions about the bazaar or DeFi concepts. "Add Your Own Stall" Kiosk: A conceptual placeholder or feature allowing users/protocols to potentially deploy their own agents in the future.
Interaction with these agents is designed to be conversational. Users can issue voice commands like "What is my ETH balance?", "What is the price of ETH right now?", "Swap my USDC for some MEMECOIN", or "Stake my assets with the highest yield provider." The DeFaI agent interprets these requests and prepares the necessary on-chain transaction.
Crucially, user sovereignty over funds is maintained. While the AI agent interacts with smart contracts to execute actions, the user must always approve and sign the transaction using their connected wallet before any funds are moved or actions are performed on their behalf.
Beyond DeFi interactions, Taifei Bazaar fosters a social environment. Users can create private rooms and share a unique 5-digit code, allowing friends or community members to join the same instance of the bazaar. Inside, they can see each other's avatars moving in real-time, react with various emoticons, and customize their avatar's display name.
Furthermore, the bazaar includes a dedicated stall demonstrating cross-chain swap simulation between Celo and Rootstock, leveraging Hyperlane technology to showcase interoperability possibilities.
Future Scope: The vision extends to allowing external DeFi protocols to easily deploy their own branded DeFaI agents into the marketplace, expanding the available services, and enabling broader multichain support beyond Celo and Rootstock.
Taifei Bazaar is built using a modern web technology stack, carefully chosen to enable its unique blend of real-time interaction, AI, and blockchain functionality:
Frontend Framework & UI: Next.js: The foundation is built on Next.js, a powerful React framework providing server-side rendering, static site generation, optimized routing, API route capabilities, and a streamlined developer experience for building complex web applications. Tailwind CSS & Shadcn/UI: Styling is handled efficiently using Tailwind CSS for utility-first CSS, enabling rapid development of custom designs. Shadcn/UI is likely used as a component library or methodology, offering accessible and composable UI primitives built on top of Tailwind, ensuring a consistent and visually appealing user interface for the bazaar, stalls, and modals.
Real-Time Multiplayer Simulation: Socket.io: This library is the engine behind the live, multiplayer experience. It establishes persistent, low-latency, bidirectional communication channels between the server (potentially a Next.js API route or a separate Node.js server) and all connected clients. Socket.io handles broadcasting player positions, avatar appearances, emote triggers, and room state updates, making the virtual world feel dynamic and populated.
Blockchain Integration & Smart Contracts: Solidity: The core logic for DeFi operations (like swapping and staking) that occur on the Celo and Rootstock networks resides in smart contracts written in Solidity, the standard language for EVM-compatible chains.
Celo & Rootstock: These specific blockchains were chosen as the initial target networks where the DeFi agent-stalls execute their actions. Contracts deployed on these chains handle the actual asset management and protocol interactions. Wallet Interaction (Frontend): Libraries like Privy, Wagmi, and Viem are used on the frontend to manage wallet connections, interact with the user's wallet for signing/approving transactions, and communicate with the Celo/Rootstock blockchain nodes (via RPC). Privy simplifies onboarding and authentication.
Artificial Intelligence (DeFaI Agents): GOAT SDK: This Software Development Kit is employed to build the conversational AI capabilities of the DeFaI agent-stalls. It handles Natural Language Processing (NLP) to understand user speech/text commands, manages conversational state, and determines the appropriate action (e.g., fetching data, preparing a blockchain transaction). Eleven Labs API: To make the agents more interactive and immersive, the Eleven Labs API is integrated for high-quality Text-to-Speech (TTS). When an agent needs to respond or provide information verbally, the text output is sent to Eleven Labs, which generates realistic voice audio played back to the user.
This combination of technologies allows Taifei Bazaar to deliver a feature-rich experience that merges the visual engagement of a 2D game, the social connectivity of a multiplayer platform, the power of AI-driven interaction, and the trustless execution of blockchain technology.