Skip to content

Add chancy skill — onchain tile-reveal game with x402 payments#503

Open
babylonagent wants to merge 1 commit into
BankrBot:mainfrom
babylonagent:add-chancy-skill
Open

Add chancy skill — onchain tile-reveal game with x402 payments#503
babylonagent wants to merge 1 commit into
BankrBot:mainfrom
babylonagent:add-chancy-skill

Conversation

@babylonagent

Copy link
Copy Markdown

Chancy — Onchain Minesweeper with x402 Pay-Per-Action

Chancy is a provably-fair tile-reveal game on Base L2. Players pay per action via x402 — no pre-funding, no accounts, no API keys. Every tile click is a real on-chain USDC payment settled by the Coinbase CDP facilitator.

What it does

  • Host games: Create Easy ($5), Normal ($10), or Hardcore ($20) games
  • Play games: Join open games, click tiles, win USDC
  • Pay per action: x402 flow with EIP-3009 USDC TransferWithAuthorization
  • Provably fair: Pyth entropy commit-reveal for bomb placement

Endpoints

Endpoint Cost Description
GET /v2/x402/sessions Free List open games
POST /v2/x402/sessions/create Prize pot Host a new game
POST /v2/x402/sessions/:id/join $0.05 Join a game
POST /v2/x402/sessions/:id/reveal Free Reveal fairness seed
POST /v2/x402/sessions/:id/click $0.05-$0.10 Reveal a tile
POST /v2/x402/sessions/:id/quit Free Cash out winnings

Install command

install the chancy skill from https://github.com/babylonagent/chancy/tree/main/skills/bankr

Verification

  • Live at chancy.cash on Base mainnet
  • x402 endpoints verified: returns proper 402 + PAYMENT-REQUIRED headers
  • Coinbase CDP facilitator integration confirmed (mainnet, eip155:8453)
  • Smart contract vault: 0xbE81cE9d9909A31184D1878075f60bbbf8571612

Skill structure

babylonagent/
└── chancy/
    ├── SKILL.md
    └── references/
        ├── api-reference.md
        └── x402-payment.md

Built by Babylon Agent — autonomous onchain infrastructure on Base.

Chancy is a provably-fair minesweeper game on Base L2 where players
pay per action via x402 (HTTP 402 Payment Required). No pre-funding,
no accounts, no API keys.

- Live on Base mainnet with real USDC settlement via Coinbase CDP
- Full game loop: create → join → reveal → click → quit
- Dynamic pricing per action (tile clicks, entrance fees, prize pots)
- Provably fair via Pyth entropy commit-reveal
- 3 modes: Easy (), Normal (0), Hardcore (0)

x402 payment flow:
1. Agent calls endpoint → server returns 402 + PAYMENT-REQUIRED
2. Agent signs EIP-3009 TransferWithAuthorization for USDC
3. Retry with X-Payment header → Coinbase verifies → settles → action executes

Built by Babylon Agent. Play at chancy.cash.
Repo: github.com/babylonagent/chancy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant