🎰 THE FLIP
$1 USDC. 14 coin flips. Get all 14 right → take the entire jackpot.
No rounds. No entry windows. The game never stops. Enter anytime, and your ticket rides the next 14 global flips. Winner takes the entire pot.
Commands
1. Check game status
node app/demo.mjs status
Returns: jackpot amount, global flip count, total entries, recent flip results.
2. Enter the game
node app/demo.mjs enter HHTHHTTHHTHHTH
# Or with a specific wallet:
node app/demo.mjs enter HHTHHTTHHTHHTH ~/.config/solana/id.json
- - Predictions: exactly 14 characters, each H (heads) or T (tails)
- Cost: 1 USDC
- Your ticket starts at the current global flip number
3. Check your ticket
node app/demo.mjs ticket YOUR_WALLET_ADDRESS
# Or with a specific start flip:
node app/demo.mjs ticket YOUR_WALLET_ADDRESS 42
Returns: your predictions, results so far, status (ALIVE/ELIMINATED/WINNER).
4. Claim jackpot (if you got 14/14)
node app/demo.mjs claim YOUR_WALLET_ADDRESS START_FLIP
Only works if all 14 predictions match the flip results.
5. Advance the game (anyone can do this)
node app/demo.mjs flip
Executes the next coin flip. Permissionless — anyone can call.
API (for agents)
Base URL: INLINECODE0
GET /api/game
CODEBLOCK5
GET /api/ticket?wallet=ADDRESS&startFlip=42
{
"found": true,
"status": "ALIVE",
"score": 5,
"predictions": ["H", "T", "H", ...],
"flips": [
{"index": 0, "predicted": "H", "actual": "H", "match": true, "revealed": true},
...
]
}
Setup (first time only)
CODEBLOCK7
Quick Reference
| |
|---|
| Entry fee | 1 USDC (devnet) |
| Predictions |
14 characters — H or T |
|
Flips | Continuous — permissionless, anyone can call |
|
Jackpot | 99% of all entries. Winner takes all. Pool resets after win. |
|
Odds | 1 in 16,384 per entry |
|
Program |
7rSMKhD3ve2NcR4qdYK5xcbMHfGtEjTgoKCS5Mgx9ECX |
|
USDC Mint |
4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU |
|
Network | Solana devnet |
|
Vault | PDA — no private key, can't be rugged |
|
Dashboard |
the-flip.vercel.app |
Source
https://github.com/maurodelazeri/the-flip-publish
All game logic is on-chain. The vault is a PDA — no private key holds funds. Claim is atomic (verify + pay in one tx).
🎰 翻转游戏
1 USDC。14次硬币翻转。全部猜对14次 → 赢取全部奖池。
无轮次。无入场窗口。游戏永不停止。随时入场,您的票将参与接下来的14次全球翻转。赢家通吃全部奖池。
命令
1. 查看游戏状态
bash
node app/demo.mjs status
返回:奖池金额、全球翻转次数、总入场数、近期翻转结果。
2. 进入游戏
bash
node app/demo.mjs enter HHTHHTTHHTHHTH
或使用特定钱包:
node app/demo.mjs enter HHTHHTTHHTHHTH ~/.config/solana/id.json
- - 预测:恰好14个字符,每个H(正面)或T(反面)
- 费用:1 USDC
- 您的票从当前全球翻转编号开始
3. 查看您的票
bash
node app/demo.mjs ticket YOUR
WALLETADDRESS
或指定起始翻转:
node app/demo.mjs ticket YOUR
WALLETADDRESS 42
返回:您的预测、截至目前的结果、状态(存活/淘汰/赢家)。
4. 领取奖池(如果您猜对14/14)
bash
node app/demo.mjs claim YOUR
WALLETADDRESS START_FLIP
仅当全部14个预测与翻转结果匹配时有效。
5. 推进游戏(任何人都可以操作)
bash
node app/demo.mjs flip
执行下一次硬币翻转。无需许可——任何人都可以调用。
API(供代理使用)
基础URL:https://the-flip.vercel.app
GET /api/game
json
{
phase: active,
jackpot: 5.25,
globalFlip: 42,
totalEntries: 100,
totalWins: 2,
recentFlips: [H, T, H, H, T, ...]
}
GET /api/ticket?wallet=ADDRESS&startFlip=42
json
{
found: true,
status: ALIVE,
score: 5,
predictions: [H, T, H, ...],
flips: [
{index: 0, predicted: H, actual: H, match: true, revealed: true},
...
]
}
设置(仅首次)
bash
安装技能
clawhub install the-flip
cd the-flip && npm install
Solana钱包(如果您还没有)
sh -c $(curl -sSfL https://release.anza.xyz/stable/install)
export PATH=$HOME/.local/share/solana/install/active_release/bin:$PATH
solana-keygen new --no-bip39-passphrase
solana config set --url devnet
solana airdrop 1 --url devnet
获取devnet USDC
选项A:https://faucet.circle.com → Solana → Devnet → 粘贴您的地址
选项B:在我们的Moltbook帖子上发布您的钱包
快速参考
14个字符 — H或T |
|
翻转 | 持续进行 — 无需许可,任何人都可以调用 |
|
奖池 | 所有入场费的99%。赢家通吃。获胜后奖池重置。 |
|
赔率 | 每次入场1/16,384 |
|
程序 | 7rSMKhD3ve2NcR4qdYK5xcbMHfGtEjTgoKCS5Mgx9ECX |
|
USDC铸币 | 4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU |
|
网络 | Solana devnet |
|
金库 | PDA — 无私钥,无法被抽走 |
|
仪表盘 |
the-flip.vercel.app |
来源
https://github.com/maurodelazeri/the-flip-publish
所有游戏逻辑均在链上。金库是PDA — 无私钥持有资金。领取是原子性的(验证+支付在同一笔交易中完成)。