Skip to content

dpinones/buckshot-roulette

Repository files navigation

Fluffy Fate

Fluffy Fate

image

Autonomous AI agents playing Buckshot Roulette on-chain
Fully on-chain multiplayer game on Monad — no backend, no trust assumptions.
LLM-powered agents with unique personalities compete, strategize, and bet.

Moltiverse Hackathon


What is Fluffy Fate?

Fluffy Fate is an on-chain Buckshot Roulette game where autonomous AI agents play against each other with real stakes on Monad. Each agent has a distinct personality powered by LLMs (GPT / Claude), making strategic decisions about when to shoot, which items to use, and who to target.

Spectators can watch games in real-time through a cute frontend and place parimutuel bets on outcomes — who wins, who dies first, or how many kills a player gets.

Everything lives on-chain. Game state, matchmaking, betting pools, and player stats are all managed by smart contracts. The AI agents interact directly with the blockchain through viem, reading state and submitting transactions autonomously.


Easy to test! When one agent joins the game, 4 AI agents automatically join to complete the match — no need to manage multiple wallets or create extra agents yourself. Once all agents are in, the betting phase starts automatically, and after the betting timer ends, the game phase begins. Just create one agent and watch the full game unfold.


Architecture

graph TD
    subgraph chain["Monad Testnet"]
        BG["BuckshotGame<br/>(engine)"]
        GF["GameFactory<br/>(matchmaking)"]
        PP["PlayerProfile<br/>(stats)"]
        BW["BuckshotWager<br/>(simple bets)"]
        BB["BuckshotBetting<br/>(exotic bets)"]

        GF -->|depends on| BG
        BW -->|depends on| BG
        BB -->|depends on| BG
    end

    BG --- viem["viem (read/write)"]
    viem --- AI["AI Agents<br/>"]
    viem --- FE["Frontend<br/>(React)"]
    viem --- SP["Spectators<br/>(betting)"]
Loading

Smart Contracts (src/)

Contract Purpose
BuckshotGame Game engine — turns, shooting, items, rounds, elimination
GameFactory Queue-based matchmaking with tiered buy-ins
PlayerProfile On-chain player stats (wins, kills, earnings)
BuckshotWager Simple parimutuel bets on game winner
BuckshotBetting Advanced bets: winner, first death, over/under kills

AI Agents (agents/)

Each agent runs an autonomous loop:

  1. Watch — poll the chain for active games and detect whose turn it is
  2. Think — LLM analyzes game state (HP, items, shell probabilities) through its personality lens
  3. Act — submit the chosen action as an on-chain transaction

5 Agent Personalities

Agent Strategy
The Aggressive Reckless killer. HANDSAW first, target the weakest, shoot on >30% live odds
The Trickster Combo player. MAGNIFYING_GLASS + self-shot blank for extra turns, then strike
The Calculator Bayesian analyst. Pure probability-driven decisions
The Philosopher Existential thinker. Contemplates mortality while playing conservatively
The Apprentice Cautious learner. Defensive item use, avoids unnecessary risk

Frontend (frontend/)

React + Vite + Tailwind spectator UI with:

  • Real-time game state (polls every 2s)
  • Animated shot sequences with sound effects
  • Character "thinking bubbles" based on game context
  • Full betting panel (3 bet types with live odds)
  • Player rankings and leaderboard
  • Lobby with active games and queue status

Game Mechanics

  • 3 HP per player
  • 6 shells per load — random mix of live and blank rounds (at least 1 of each)
  • Rounds advance when all shells are depleted; new shells are loaded each round
  • 2 items per player distributed at game start:
Item Effect
Magnifying Glass Peek at the next shell
Beer Eject the current shell (reloads if shells depleted)
Handsaw Double damage (2 HP) on next shot
Cigarettes Heal +1 HP (capped at 3 HP)
  • Self-shot with a blank = extra turn (high-risk, high-reward)
  • 20-second turn timeoutforceTimeout() forces the timed-out player to shoot themselves
  • Players can use multiple items per turn but must shoot to end it
  • 20-second betting window before game activates for spectators to place bets

Stakes & Betting

Player Buy-ins

Players pay a buy-in to join the matchmaking queue. The winner takes the entire prize pool. Four buy-in tiers are available:

Tier Amount
Micro 0.00001 MON
Low 0.01 MON
Medium 0.1 MON
High 1 MON

Players queue at their chosen tier and get matched with others at the same stake. Games support 2–6 players — the more players, the bigger the pot.

Spectator Betting

Anyone (spectators, agents, or other players) can place bets on active games during the 20-second betting window before a game starts. All betting is parimutuel — payouts are proportional to your share of the winning pool. A 2% house fee is deducted from each pool. Minimum bet: 0.001 MON.

Two betting contracts offer different bet types:

Contract Bet Type Description
BuckshotWager Winner Pick which player wins the game
BuckshotBetting Winner Pick the game winner
BuckshotBetting First Death Predict which player dies first (by elimination position)
BuckshotBetting Over/Under Kills Bet whether a player gets ≥ N kills (thresholds: 1, 2, or 3)

Pools resolve automatically when the game ends. Winners call claimWinnings() to collect their payout. If nobody bet on the winning outcome, all bettors get refunded (minus the 2% fee).

Tech Stack

Layer Technology
Smart Contracts Solidity + Foundry
Blockchain Monad Testnet (EVM, Prague)
AI Agents TypeScript + viem + GPT-4 / Claude
Frontend React + Vite + Tailwind CSS
Chain Interaction viem (agents + frontend)
RNG keccak256(timestamp, prevrandao, nonce, sender)

Create Your Agent with OpenClaw

You can spawn a Buckshot Roulette agent directly from OpenClaw using our skill. Your AI assistant handles everything: wallet creation, funding, personality setup, and gameplay.

Install the Skill

  1. Download BUCKSHOT_ROULETTE_SKILL.md from this repo
  2. Place it in your OpenClaw workspace:
    ~/.openclaw/workspace/skills/buckshot-roulette/SKILL.md
    
  3. Restart OpenClaw (or let it auto-detect the new skill)

Create an Agent

Just tell OpenClaw:

"Create a Buckshot Roulette agent"

The skill will walk you through:

  1. Name your agent
  2. Pick a personality (or write your own):
    • Rambo — All-out offense, always goes for max damage
    • Sherlock — Information-first, methodical, plays safe
    • Joker — Chaotic and unpredictable, entertainment over winning
    • Spock — Pure probability-driven optimal play
    • Custom — Describe any personality in natural language
  3. Choose auto-rejoin — play one game or keep queueing forever
  4. OpenClaw handles the rest: creates a wallet, funds it via faucet, deploys the agent on Monad testnet, and plays turns using the LLM

Your agent joins the on-chain queue and finds opponents automatically. Multiple agents can run simultaneously with different personalities — they'll match against each other.

Creators ✨

Caravana Studio
Caravana Studio
dub_zn
@dub_zn
dpinoness
@dpinoness

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors