Lotero

io.github.csacanam由 GitHub 帳號 csacanam 發布v0.1.0更新於 Oct 24, 2026

Provably fair on-chain slot machine for AI agents: x402 spins on Base, Chainlink VRF results.

已驗證STDIO僅桌面金融AI 與機器學習

概覽

AI 產生的概覽

一個本機 MCP 伺服器,讓 AI 助理在 Base 上玩可驗證公平的鏈上吃角子老虎機,並透過 x402 以 USDC 支付轉動與領取費用。

可以做什麼
以 USDC 轉動吃角子老虎機,經 x402 付費並在鏈上以 Chainlink VRF 隨機數結算,受每次工作階段轉動上限約束(spin)。依請求 ID 查詢某一局是否已結算(get_round)。讀取玩家的餘額與收益(get_balances)。免 gas 領取獎金與推薦佣金(claim)。檢查合約健康狀態(get_contract_health)。
適用情境
適合試驗讓自主代理付費參與 Base 上的鏈上博弈遊戲,或讀取 Lotero 吃角子老虎機的局資訊、餘額與合約健康資料。
執行需求
透過 npx 以 npm 套件形式在本機執行(需要 Node.js)。需要在 LOTERO_WALLET_PRIVATE_KEY 中提供持有 Base 上 USDC 的專用錢包私鑰,用於轉動與領取;並在 LOTERO_PLAYER_ADDRESS 中提供玩家錢包地址。可選 LOTERO_MAX_SPINS_PER_SESSION 設定轉動上限(預設 10)。需要連線至 Base 網路與 Lotero 代理 API 的網路存取。
安裝前請注意
這是真錢博弈:每次轉動花費 USDC(轉動 1.1 USDC,領取 0.1 USDC),標稱 RTP 約 93%,長期預期虧損。伺服器需要 LOTERO_WALLET_PRIVATE_KEY 中的錢包私鑰,請使用專用且餘額較低的錢包。轉動與領取會發起交易並花費資金。README 說明每筆下注收取 5% 開發費與 1% 推薦佣金。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Lotero,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

🎰 Lotero

A Provably Fair Casino for AI Agents

A provably fair, on-chain slot machine with Chainlink VRF 2.5. Designed for autonomous agents: clients pay in USDC via x402, execution is gasless.

Overview

Lotero lets users (or AI agents) bet USDC and win prizes when three matching symbols appear on the reels. The game uses Chainlink VRF 2.5 for provably fair randomness.

  • RTP ~93% — DOCS/RTP_MODEL.md
  • Max win: 30× — Bet 1 USDC, win up to 30 USDC (three BTC)
  • Symbols — DOGE 5×, BNB 14×, ETH 20×, BTC 30×
  • Referral — 1% commission on referred players' bets
  • Dev fee — 5% of each bet to the team

⚠️ Frontend in development — The web app in packages/frontend is incomplete. The contracts and agent are production-ready.


Smart Contract

SlotMachineV2 (Base mainnet)

ItemValue
Address0xC4b88e90a73fA9ec588E504255A43d4Ccb82edE9
TokenUSDC. Bet 1 USDC, win up to 30 USDC.
VRFChainlink VRF 2.5
EventsSpinRequested, SpinResolved

Core functions

  • playFor(player, referringUserAddress, amountToPlay) — Pay on behalf of another address; the player receives the round, wins, and stats.
  • claimPlayerEarnings(userAddress) — Claim winnings and referral earnings.
  • isResolved(requestId) — Check if a round has been resolved.

Agents

Lotero Agent

Stateless HTTP API that sells spins and claims as a service. Clients pay via x402 (1.1 USDC spin, 0.1 USDC claim); the agent relays playFor and claimPlayerEarnings onchain. Two-agent system: Lotero Agent (Express API) + Ops Agent (external cron calling GET /cron/health). See packages/agent/README.md.

  • POST /spinWith1USDC — Paid (x402). Execute spin for player.
  • POST /claim — Paid (x402). Claim player earnings (gasless).
  • GET /round?requestId=..., GET /player/:address/balances, GET /contract/health — Read-only.
  • GET /cron/health — Ops Agent: system status, may execute transfers and Telegram alerts.
bash
yarn agent        # Start agentyarn agent:dev    # Dev with watch

Documentation: DOCS/AGENT_FLOWS.md | DOCS/AGENT_API.md

For AI agents:

  • MCP server (lotero-mcp on npm, listed on the official Model Context Protocol registry as io.github.csacanam/lotero): exposes 5 MCP tools over stdio — spin (paid via x402), get_round, get_balances, claim and get_contract_health — built with the official MCP TypeScript SDK (@modelcontextprotocol/sdk), with an enforced session spin limit as a responsible-gambling guardrail. Install:

    bash
    claude mcp add lotero -- npx -y lotero-mcp

    See mcp/README.md for configuration and tool reference.

  • Agent skill: npx skills add csacanam/lotero-core (or read it at lotero.xyz/skill.md) — wallet setup, x402 spin/poll/claim flow, payouts, budget guardrails.

  • LLM index: lotero.xyz/llms.txt.


Project Structure

packages/├── agent/         # Lotero Agent — x402 + onchain relay├── contracts/     # Smart contracts, tests, deploy scripts│   ├── contracts/   SlotMachine.sol, SlotMachineV2.sol│   ├── deploy/│   └── test/└── frontend/      # Web app (in development)

Documentation

DocDescription
DOCS/AGENT_FLOWS.mdFlow diagrams (cron health, spin, claim)
DOCS/AGENT_API.mdAPI reference, endpoints, env, constants
DOCS/DEPLOY_BASE.mdDeploy contracts to Base
DOCS/RTP_MODEL.mdRTP math and reel layout

Requirements


Quick Start

1. Install dependencies

bash
git clone https://github.com/csacanam/lotero-core.gitcd lotero-coreyarn install

2. Run local chain

bash
yarn chain

3. Deploy contracts (new terminal)

bash
yarn deploy

4. Run tests

bash
yarn contracts:test

5. Start the frontend (optional, in development)

bash
yarn start

App runs at http://localhost:3000.


Production

For Base mainnet: see DOCS/DEPLOY_BASE.md. Contract address above. Fund the VRF subscription with LINK.


License

MIT

來源:README.md,提交 4a55d7a

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分