← All work
Product · 2024

Solana Memecoin Prediction-Market Game (Anchor + Next.js)

Overview

Memetank is a gamified, on-chain prediction market where players bet on whether memecoins will “tank or moon.” It pairs a Rust/Anchor Solana program implementing the game and ticketing economics with a Next.js wallet-connected dApp and a small backend API, delivered as a full-stack monorepo build.

The Challenge

Building a fair, trustless prediction-market game on Solana means encoding the entire lifecycle, game creation, joining, ticket buy/sell on a bonding curve, and winner selection, as on-chain instructions and accounts, then wrapping it in a responsive wallet-driven UI and a data/indexing layer.

What We Built

A Rust/Anchor program (anchor/programs/memetank) with instructions for initialize_master, initialize_game, join_game, buy_ticket, sell_ticket, and pick_winner, and on-chain state accounts for master, game, participation, user, token_info, and a bonding_curve pricing model. The Next.js 14 web app (web/, with DaisyUI/Tailwind, Jotai, TanStack Query, and Solana wallet adapters) exposes the Memetank feature, data-access, and UI components. An Express + Firebase Admin API (api/) handles off-chain data using the generated Anchor IDL. The whole thing is an Nx-managed monorepo deployable to Vercel.

Technologies & Approach

Rust + Anchor 0.30 for the program; SPL tokens and a bonding-curve mechanism for ticket pricing; @solana/web3.js and wallet-adapter for the client; Next.js App Router with TanStack Query and Jotai for state; Firebase Admin for off-chain persistence. Nx provides the monorepo task graph across the anchor, web, and api projects.

Outcome / Impact

A substantial, end-to-end Solana dApp build that validates the studio’s ability to design and ship non-trivial on-chain game economics, bonding-curve ticketing, multi-account state, and winner resolution, together with a polished wallet-connected frontend and supporting API.

Capabilities Demonstrated

  • Designing and implementing Solana programs with the Anchor framework (Rust)
  • Bonding-curve token economics and on-chain prediction-market mechanics
  • Multi-account on-chain state modelling and instruction design
  • Wallet-connected Next.js 14 dApp frontends
  • Full-stack Web3 delivery in an Nx monorepo (program + web + API)
More work See all →