Proof of concept · Casino × x402

A casino built for AI agents.

Pay per play with x402 (USDC on Base). Verify every roll with commit-reveal fairness. Withdraw on-chain.

A proof of concept exploring what autonomous agents can do with the x402 protocol. See Terms.

Base mainnetUSDC settlementProvably fair

Four games, three stakes each

Stake tiers are selected with ?stake=micro|standard|whale. The tier maps to a different x402 price on the same route.

GameStake tiersPayoutEndpoint
Coin Flip
Heads or tails.
micro: $0.10standard: $1.00whale: $10.00
1.96×/api/v1/games/coinflip
Dice (over/under 1-100)
Pick a threshold 2-99 and a direction.
micro: $0.10standard: $1.00whale: $10.00
1.00× – 99×/api/v1/games/dice
European Roulette
Single-zero, 0-36.
micro: $0.10standard: $1.00whale: $10.00
2× / 3× / 36×/api/v1/games/roulette
3-Reel Slots
6 symbols, 3 reels.
micro: $0.10standard: $1.00whale: $10.00
2× – 120×/api/v1/games/slots

Provably fair

Every bet is a deterministic HMAC of a committed server seed, the agent's client seed, and a nonce. After rotation, the seed is revealed — agents can verify any past bet.

1
Commit

Fetch sha256(server_seed) from /api/v1/seed/commit before playing.

2
Play

Include your client_seed and nonce in the bet. Outcome = HMAC-SHA256(server_seed, client_seed:nonce).

3
Verify

After seed rotation, /api/v1/seed/reveal returns the raw seed. Replay HMAC yourself.

Verification snippet
import crypto from "node:crypto";

// 1. after seed rotation, fetch the revealed seed
const { seed } = await fetch("/api/v1/seed/reveal?seed_id=...").then(r => r.json());

// 2. replay the HMAC
const msg = `${bet.client_seed}:${bet.nonce}`;
const hex = crypto.createHmac("sha256", Buffer.from(seed, "hex")).update(msg).digest("hex");

// 3. compare against bet.outcome — deterministic, tamper-evident.

Agent discovery

Discoverable via standard agent protocols. No human login required.

↓ Download skill.md
Quick start for agents
curl -O https://x402casinos.com/skill.md
# or, machine-readable:
curl -s https://x402casinos.com/.well-known/skill.json | jq

FAQ

Can humans play?+

There is no human UI for betting. All play happens programmatically via the HTTP API. Humans can view stats on the backoffice once authenticated.

Are outcomes manipulable?+

No. Each bet uses a server seed whose hash is published before play. The seed is later revealed so agents can replay the HMAC and verify.

What happens if settlement fails?+

The bet is flagged pending_settlement. A reconciler voids it after 10 minutes. No balance is credited.

What about regulation?+

See README.md — a gaming licence is required before any public mainnet launch.

Contact

Questions, integration help, or partnership inquiries? Reach out and we'll get back to you.

Ready to play?

Grab the docs, sign an EIP-3009 authorization, and POST to any game endpoint.

Open the docs