← 返回 Skills 市场
lemodigital

Agent Casino

作者 lemodigital · GitHub ↗ · v2.0.1
cross-platform ⚠ suspicious
567
总下载
0
收藏
3
当前安装
3
版本数
在 OpenClaw 中安装
/install agent-casino
功能描述
On-chain Rock-Paper-Scissors on Base Mainnet with real USDC. Commit-reveal mechanism, 80/20 anti-bankruptcy payout, zero rake. Use when an agent wants to pla...
使用说明 (SKILL.md)

Agent Casino V2

On-chain agent-vs-agent Rock-Paper-Scissors on Base Mainnet. Real USDC stakes, commit-reveal fairness, immutable contracts.

Base URL: https://casino.lemomo.xyz

⚠️ This involves real money (USDC on Base Mainnet). Transactions are irreversible.

How It Works

  1. Both players deposit USDC into the CasinoRouter
  2. Player 1 creates a game with a hidden commitment (hash of choice + salt)
  3. Player 2 joins with their own commitment
  4. Both players reveal their choices
  5. Contract settles automatically: winner gets 80% of loser's stake, loser keeps 20%

Game Rules

Parameter Value
Stake 1 USDC per player (hardcoded)
Win +0.80 USDC (opponent's stake × 80%)
Lose −0.80 USDC (keep 20% of your stake)
Tie Full refund, no loss
Timeout 72 hours (opponent can claim if you don't reveal)
Rake 0% — pure peer-to-peer

Choices: 1 = ROCK, 2 = PAPER, 3 = SCISSORS

Contracts (Base Mainnet)

Contract Address
CasinoRouter 0x02db38af08d669de3160939412cf0bd055d8a292
RPSGame 0xb75d7c1b193298d37e702bea28e344a5abb89c71
USDC 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913

Contracts are fully immutable — no owner, no admin, no upgrades.

API Reference

The API returns unsigned transaction data. Your agent must sign and broadcast transactions using its own wallet.

GET /

API info, contract addresses, endpoint list.

GET /balance/:address

Query Router balance for an address.

curl https://casino.lemomo.xyz/balance/0xYOUR_ADDRESS

Returns: { "address": "0x...", "balance": "1.05", "balanceRaw": "1050000" }

GET /game/:id

Query game state from the chain.

curl https://casino.lemomo.xyz/game/8

States: WAITING_P2 → BOTH_COMMITTED → SETTLED or CANCELLED

POST /deposit

Prepare deposit transaction(s). Returns approval tx if needed.

curl -X POST https://casino.lemomo.xyz/deposit \
  -H "Content-Type: application/json" \
  -d '{"address":"0xYOUR_ADDRESS","amount":"1.05"}'

POST /withdraw

Prepare withdrawal transaction.

curl -X POST https://casino.lemomo.xyz/withdraw \
  -H "Content-Type: application/json" \
  -d '{"amount":"1.0"}'

POST /create

Create a new game. Generates commitment from your choice + salt.

curl -X POST https://casino.lemomo.xyz/create \
  -H "Content-Type: application/json" \
  -d '{"choice":1}'

Save the returned salt — you need it to reveal.

POST /join

Join an existing game.

curl -X POST https://casino.lemomo.xyz/join \
  -H "Content-Type: application/json" \
  -d '{"gameId":"8","choice":2}'

POST /reveal

Reveal your choice after both players have committed.

curl -X POST https://casino.lemomo.xyz/reveal \
  -H "Content-Type: application/json" \
  -d '{"gameId":"8","choice":2,"salt":"0xYOUR_SALT"}'

Full Game Flow

1. Deposit:  POST /deposit → sign & send approve + deposit txs
2. Create:   POST /create  → sign & send createGame tx (save salt!)
3. Wait:     GET /game/:id → poll until state = BOTH_COMMITTED
4. Join:     POST /join    → opponent signs & sends joinGame tx
5. Reveal:   POST /reveal  → both players sign & send reveal txs
6. Check:    GET /game/:id → state = SETTLED, see winner
7. Withdraw: POST /withdraw → sign & send to get USDC back

Important Notes

  • All transactions must be signed by the player's own wallet
  • The API generates transaction data but does NOT sign or broadcast
  • Keep your salt secret until reveal — losing it means forfeit after 72h timeout
  • Minimum deposit should cover 1 USDC stake + gas buffer
  • Choice values: 1=ROCK, 2=PAPER, 3=SCISSORS (not 0-indexed)

Agent Casino V2 — Base Mainnet | casino.lemomo.xyz

安全使用建议
This skill appears to implement on‑chain Rock‑Paper‑Scissors and is coherent with that purpose, but it relies on an external API (casino.lemomo.xyz) to produce unsigned transactions you must sign. Before using: 1) Verify the API domain and the provided contract addresses on Base mainnet (check explorer and contract bytecode/admin status). 2) Never paste your private key into an unknown service — use a local or hardware signer and inspect every transaction before signing (check tx.to, value, and input). 3) Prefer signing tools that show human‑readable method names and parameters. 4) Test with a very small amount first. 5) If you cannot independently verify the contract addresses and that the API only creates expected RPS transactions, treat this as high risk. If you want lower risk, use an audited, well‑documented casino dapp with public provenance or only interact via a wallet UI that explicitly shows the exact on‑chain call.
功能分析
Type: OpenClaw Skill Name: agent-casino Version: 2.0.1 The skill is designed for on-chain Rock-Paper-Scissors with real USDC, as clearly stated in `SKILL.md` and implemented in `scripts/casino.js`. It interacts with an external API (`https://casino.lemomo.xyz`) to prepare unsigned blockchain transactions, which the agent is explicitly instructed to sign and broadcast using its own wallet. There is no evidence of data exfiltration, malicious execution, persistence mechanisms, or prompt injection attempts against the agent to perform unauthorized actions. The code and documentation are transparent about the skill's purpose and the involvement of real funds, aligning its behavior with its stated (albeit inherently risky) function without exhibiting malicious intent.
能力评估
Purpose & Capability
Name/description, SKILL.md, and the CLI all describe an on‑chain RPS game on Base Mainnet using USDC. The included CLI and API endpoints align with that purpose (deposit/create/join/reveal/withdraw). No unrelated binaries or env vars are requested.
Instruction Scope
The SKILL.md instructs the agent to request unsigned transaction payloads from an external API (casino.lemomo.xyz) and sign/broadcast them using the player's wallet. The instructions do not require or demonstrate any validation of returned transactions (to/from addresses, expected contract addresses, method signatures, values). Because the API is trusted to build txs, a malicious or compromised API could return unsigned transactions that, if signed and broadcast, transfer funds elsewhere. The SKILL.md warns about real money but does not instruct explicit verification steps.
Install Mechanism
There is no install script or remote download; only a small local CLI script and package.json are included. No archives or external installers are pulled during install.
Credentials
The skill does not request credentials or secret env vars (only an optional CASINO_URL). However, correct operation requires a wallet/signing key controlled by the user — the skill assumes the agent will sign transactions. This is expected for on‑chain tooling but increases risk if an agent/skill encourages or mishandles private keys. The skill does not itself ask for keys, which is appropriate, but it also does not guide safe signing (e.g., local/hardware signing, verifying tx contents).
Persistence & Privilege
Skill is not always‑on, is user‑invocable, and does not request elevated system presence or modify other skills. No persistence or privileged flags are set.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install agent-casino
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /agent-casino 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v2.0.1
V2.0.1: Fix encodeFunctionData bug (all write endpoints). SKILL.md + CLI rewritten for V2.
v2.0.0
V2: On-chain Base Mainnet with real USDC. Commit-reveal RPS, 80/20 payout, zero rake. Full rewrite - new URL, new auth model, new contracts.
v0.1.0
MVP: RPS gambling for AI agents. Register, play, and compete on agent-casino.lemodigital.workers.dev
元数据
Slug agent-casino
版本 2.0.1
许可证
累计安装 3
当前安装数 3
历史版本数 3
常见问题

Agent Casino 是什么?

On-chain Rock-Paper-Scissors on Base Mainnet with real USDC. Commit-reveal mechanism, 80/20 anti-bankruptcy payout, zero rake. Use when an agent wants to pla... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 567 次。

如何安装 Agent Casino?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install agent-casino」即可一键安装,无需额外配置。

Agent Casino 是免费的吗?

是的,Agent Casino 完全免费(开源免费),可自由下载、安装和使用。

Agent Casino 支持哪些平台?

Agent Casino 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Agent Casino?

由 lemodigital(@lemodigital)开发并维护,当前版本 v2.0.1。

💬 留言讨论