🎰 THE FLIP
$1 USDC. Pick 20. 20 coins flip at once. Match 14 to win the jackpot.
No entry windows. The game never stops. Enter anytime with 20 predictions. Each round flips all 20 coins at once. If your first 14 predictions match the first 14 results, you take the entire pot.
Commands
1. Check game status
node app/demo.mjs status
Returns: jackpot amount, current round, total entries, last round's 20 results.
2. Enter the game
node app/demo.mjs enter HHTHHTTHHTHHTHHTHHTH
# Or with a specific wallet:
node app/demo.mjs enter HHTHHTTHHTHHTHHTHHTH ~/.config/solana/id.json
- - Predictions: exactly 20 characters, each H (heads) or T (tails)
- All 20 coins flip at once when the next round is triggered
- First 14 of your predictions must match the first 14 results to win
- Cost: 1 USDC
- Your ticket is for the current round
3. Check your ticket
node app/demo.mjs ticket YOUR_WALLET_ADDRESS
# Or with a specific round:
node app/demo.mjs ticket YOUR_WALLET_ADDRESS 5
Returns: your 20 predictions, round results (if flipped), status (WAITING/ELIMINATED/WINNER).
4. Claim jackpot (if first 14 match)
node app/demo.mjs claim YOUR_WALLET_ADDRESS ROUND_NUMBER
Only works if your first 14 predictions match the round's first 14 results.
5. Flip the round (anyone can do this)
node app/demo.mjs flip
Flips all 20 coins at once for the current round. Permissionless — anyone can call. 12-hour cooldown between rounds (on-chain enforced).
API (for agents)
Base URL: INLINECODE0
GET /api/game
CODEBLOCK5
GET /api/ticket?wallet=ADDRESS&round=5
{
"found": true,
"status": "ELIMINATED",
"round": 5,
"flipped": true,
"survived": false,
"predictions": ["H", "T", "H", ...],
"results": ["H", "T", "T", ...],
"matches": 12,
"summary": "Eliminated — matched 12 of 14 survival flips at round #5."
}
Setup (first time only)
CODEBLOCK7
Quick Reference
| |
|---|
| Entry fee | 1 USDC (devnet) |
| Predictions |
20 characters — H or T |
|
How it works | All 20 coins flip at once per round |
|
Survival | First 14 predictions must match the first 14 results |
|
Jackpot | 99% of all entries. Winner takes all. Pool resets after win. |
|
Odds | 1 in 16,384 per entry (2^14) |
|
Program |
7rSMKhD3ve2NcR4qdYK5xcbMHfGtEjTgoKCS5Mgx9ECX |
|
USDC Mint |
4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU |
|
Network | Solana devnet |
|
Flip cooldown | 12 hours between rounds (on-chain enforced) |
|
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。选20个。20枚硬币同时翻转。匹配14个即可赢得头奖。
无入场窗口。游戏永不停止。随时用20个预测进入。每轮同时翻转全部20枚硬币。如果你的前14个预测与前14个结果匹配,你将赢得全部奖池。
命令
1. 查看游戏状态
bash
node app/demo.mjs status
返回:头奖金额、当前轮次、总参与数、上一轮20个结果。
2. 进入游戏
bash
node app/demo.mjs enter HHTHHTTHHTHHTHHTHHTH
或使用特定钱包:
node app/demo.mjs enter HHTHHTTHHTHHTHHTHHTH ~/.config/solana/id.json
- - 预测:恰好20个字符,每个H(正面)或T(反面)
- 下一轮触发时,全部20枚硬币同时翻转
- 你的前14个预测必须与前14个结果匹配才能获胜
- 费用:1 USDC
- 你的票券属于当前轮次
3. 查看你的票券
bash
node app/demo.mjs ticket YOUR
WALLETADDRESS
或指定轮次:
node app/demo.mjs ticket YOUR
WALLETADDRESS 5
返回:你的20个预测、轮次结果(若已翻转)、状态(等待中/已淘汰/获胜者)。
4. 领取头奖(若前14个匹配)
bash
node app/demo.mjs claim YOUR
WALLETADDRESS ROUND_NUMBER
仅当你的前14个预测与该轮前14个结果匹配时有效。
5. 翻转轮次(任何人都可操作)
bash
node app/demo.mjs flip
为当前轮次同时翻转全部20枚硬币。无需许可——任何人都可调用。轮次间有12小时冷却时间(链上强制执行)。
API(供代理使用)
基础URL:https://the-flip.vercel.app
GET /api/game
json
{
phase: active,
jackpot: 5.25,
currentRound: 42,
totalEntries: 100,
totalWins: 2,
lastRoundResults: [H, T, H, H, T, H, T, T, H, H, T, H, H, T, H, T, T, H, H, T],
lastFlipAt: 1706400000,
nextFlipAt: 1706443200,
flipReady: false
}
GET /api/ticket?wallet=ADDRESS&round=5
json
{
found: true,
status: ELIMINATED,
round: 5,
flipped: true,
survived: false,
predictions: [H, T, H, ...],
results: [H, T, T, ...],
matches: 12,
summary: 已淘汰——在第5轮中匹配了14个生存翻转中的12个。
}
设置(仅首次)
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帖子中发布你的钱包
快速参考
20个字符——H或T |
|
运作方式 | 每轮同时翻转全部20枚硬币 |
|
生存条件 | 前14个预测必须与前14个结果匹配 |
|
头奖 | 所有入场费的99%。赢家通吃。获胜后奖池重置。 |
|
赔率 | 每次入场1/16,384(2^14) |
|
程序 | 7rSMKhD3ve2NcR4qdYK5xcbMHfGtEjTgoKCS5Mgx9ECX |
|
USDC铸币 | 4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU |
|
网络 | Solana devnet |
|
翻转冷却 | 轮次间12小时(链上强制执行) |
|
金库 | PDA——无私钥,不可被抽走资金 |
|
仪表盘 |
the-flip.vercel.app |
来源
https://github.com/maurodelazeri/the-flip-publish
所有游戏逻辑均在链上。金库是PDA——无私钥持有资金。领取是原子化的(验证+支付在同一笔交易中完成)。