START HERE · SOLANA DEVNET · FREE TEST CREDITS
Call the price.
Let the chain keep score.
RatchetX is a small prediction arcade. You say whether SOL will be higher or lower five minutes from now. Your call is sealed on Solana devnet before the move, Pyth prices decide, and the receipt is public forever. Test credits only - no real money, nothing to buy.
Two ways to play
1 · In a browser, with your own wallet
- Open ratchetx.xyz/play and connect a Solana wallet (Phantom, Solflare, ...). Switch the wallet to devnet; in Phantom turn on Settings → Developer settings → Testnet mode so it simulates correctly.
- Your wallet needs a little devnet SOL for fees (about 0.003). If the page cannot get it from the faucet for you, take some at faucet.solana.com.
- Press Claim 10,000 test credits - once per wallet, one signature.
- Pick UP or DOWN, a stake and a confidence, seal. Come back after the exit time and press Reveal; the result and the Pyth prices are yours to show anyone.
2 · From X, through Bankr - no wallet at all
- Have a Bankr account linked to your X handle.
- In Bankr, install the skill:
Install the ratchetx skill from https://github.com/3esign/ratchetx/tree/main/skills/ratchetx - In Bankr settings → Environment Variables add
RATCHET_G2_SEED= any private random string of 32+ characters (a password-manager password is fine). It is not a wallet key; it lets your agent keep the same devnet wallet between commands. - Post
@bankrbot rcx play SOL UP(or DOWN). Your agent claims its own 10,000 test credits and seals. If it answers that its wallet has no devnet SOL, send that address a little from the faucet and repeat. @bankrbot rcx statusshows the result once Pyth prices are in; the reply carries the proof link.
What you are trusting. The programs are on devnet with a retained upgrade authority (this is a rehearsal, not mainnet); the keeper that records Pyth prices is permissionless and anyone may run one; the public devnet RPC and faucet are rate limited. The mainnet token is a separate asset and is not paid out here.
Play in the browser → Delegate to an agent on my own wallet →
For agent builders
Everything below is the protocol surface: a read-only MCP that prepares unsigned transactions, and the skill your agent runs. Your agent keeps its wallet, signs locally and checks the result itself.
Connect through MCP
Endpoint: https://ratchetx.xyz/api/g2-mcp
Transport: Streamable HTTP · POST
MCP-Protocol-Version: 2025-11-25
Content-Type: application/json
Accept: application/json, text/event-stream
Authentication: none
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"my-agent","version":"1.0"}}}The stateless server returns JSON. GET returns 405 because there is no SSE stream. This is separate from the earlier, database-backed /api/mcp.
The tools
| Tool | What it provides |
|---|---|
g2_get_game | Validated rules, identity, timing and actual program upgrade authorities. |
g2_get_player | Your credit ledger, exact next nonce and eligible target times. |
g2_prepare_seal | A simulated unsigned transaction from your locally generated commitment, exact nonce, stake and accepted targets. |
g2_get_reveal_context | Public commitment, readiness and the actual reveal deadline. No secret accepted. |
g2_get_shot | A live Shot, or a reconstructed closed result when you supply the successful terminal signature. |
A round, end to end
- Read the game and your ledger. Check the devnet genesis, program identities, rules, credits and upgrade authorities.
- Choose direction and confidence locally. Generate a random 32-byte salt and use the canonical client to hash player, nonce, economy, ruleset, direction, probability and salt. Save the secret before signing.
- Prepare the seal with the public commitment. Inspect every account, instruction, signer and the block expiry. Rebuild locally and compare the exact message bytes before signing.
- Submit through your chosen RPC. Save the signed signature first. On a lost response, check the transaction and Shot before retrying; never blindly create another shot.
- Follow Timepin's Pyth evidence and Core settlement. Reveal with your local saved secret before the deadline.
- Read the closed result using its successful terminal transaction. Verify the reconstructed prices, outcome, XP and archived hashes.
Local signing and reveal
The remote endpoint never accepts your salt, direction or confidence. In a current G2 checkout, mcp/g2-mcp.mjs --rpc YOUR_DEVNET_RPC offers local stdio and adds g2_prepare_reveal_local. It validates the commitment, then simulates an unsigned reveal. Simulation discloses the reveal bytes to your selected RPC; call it when ready to publish.
For a fully local builder, use createPlayerActions.revealIx with the canonical G2 client. Current public modules are served here; the older GitHub default branch may not yet contain every G2 file.
What verification means here
Accounts are checked for owner, PDA, layout and hash bindings. A revealed archive can be reconstructed from permanent Timepin evidence and matched to its game and row hashes. This does not independently replay all balances, history, transaction signatures or validator consensus.
Programs retain upgrade authorities. Solana, Pyth, RPC availability and timely keeper transactions remain dependencies. A remote response is not a substitute for local verification. The MCP player workflow does not yet include keeper tools, delegate setup, reloads or real funded claims.
A bounded delegate
The G2 agent runtime creates a key inside the agent’s private persistent workspace and returns a public owner setup link. The owner signs an on-chain permission for that key: per-prediction stake, gross total, count, minimum gap and expiry. The page reads actual usage and prepares revocation. Revocation stops new predictions; an agent can finish a prediction already sealed.
The runtime keeps the reveal secret and signed transaction record before sending. Repeated delivery of the same authenticated source post reconciles the same saved call. A host must remain available to finish the reveal; installation alone does not supply that lifecycle. Inspect the pinned runtime manifest ↗
Bankr on X
The familiar @bankrbot play grammar and approved reply format are being preserved. The earlier Bankr session authorizes the server game; it is not a G2 transaction signer. The separate G2 runtime supplies a local delegated signer, without requiring a native Bankr Solana-signing API. It must be installed in the authenticated Bankr owner session, granted permission and checked through a real X command before Bankr/G2 can be called connected. The old working skill stays separate.
Machine-readable devnet configuration ↗ · Exact devnet configuration ↗ · Open a real receipt ↗ · GitHub ↗