Reins
For judges · 30 seconds

Let your agent trade.Keep the reins.

Limits no agent tool can change, for AI agents that trade Phoenix perps on Solana. The agent asks with plan_order; Reins checks your policy against Phoenix's own live data and either refuses, naming the rule, the Phoenix field and what would fit, or returns a single-use plan_id that place_order re-checks before anything is signed.

Right now on Phoenix reading…

the page's hero ticket

Checking Phoenix…

Asking Phoenix's public mainnet API through the same rules module the CLI and MCP server run.

The 30-second path no wallet, no key, nothing to install


  1. See a live refusal

    The first screen is a real ticket checked against current Phoenix data. On weekends: TSLA refused, market closed, from Phoenix's own calendar, with the reopening time.

    reins.edycu.dev →
  2. Push it yourself

    Change the ticket to SOL, $500 at 10×. Reins refuses it on minLiqDistancePct: liquidation sits closer to the fill than the 15 % floor, and the ticket names the Phoenix source and what fits.

    try a ticket →
  3. Watch an agent trade for real

    A headless Claude Code session was tasked with SOL $40 at 10× and told to take what fits, then close. Reins refused it (liquidation 7.9 % away) and offered $20 at 5×. The agent placed that on Phoenix mainnet and closed it. Every journal row is on the page.

    receipts →
  4. Check the chain

    16 Phoenix order transactions, signed by an agent key that can trade but never withdraw, are each re-read from Solana (DEMO.md). The owner's policy pin and DelegateTrader are below.

    transactions ↓

Receipts every number names the file or command it comes from; the transactions open on Solscan


16/16real Phoenix order transactions on Solana mainnet (8 opens, 8 closes) re-read with getTransaction; 17 refusals signed nothing; −$0.16 of USDC in fees and price moves on a $51.67 account, plus 80,000 lamports of Solana fees and a one-time 2,275,840-lamport subaccount rent, both paid by the agent keyDEMO.md · evidence/receipts/summary.json
15,000random orders × policies on real Phoenix states; none cleared over a limit. Part of 179 tests (+2 gated)test/property.test.mjs · evidence/property-mutation.md
11/11decision evals on two frozen Phoenix states, no LLMnpm run eval · evidence/evals.json
10/10live core flow on Phoenix mainnet: plan → refuse with fits → re-plan → plan_id → re-checkREINS_LIVE=1 · test/live.test.mjs
4/4Tier C: cleared plans on Phoenix's real programs in LiteSVM (local simulation)cargo test --locked · evidence/tierc-test.txt
21Phoenix-native rules in one module, behind the MCP server, CLI and pagesrc/rules/phoenix.mjs
14Phoenix REST reads wrapped (calendar, leverage tiers, funding, order book, mark…) plus 3 unsigned order builderssrc/phoenix/rest.mjs
7recorded Claude Code sessions (2 on mainnet), plus scripted MCP runs (policy tamper; mainnet receipts)/receipts · evidence/agent-runs/
285 ms p50/api/plan re-planning one market (p95 379 ms, n = 12)evidence/bench.json
Owner signed

Policy pin · Solana mainnet

Memo reins-policy:v1:<sha256> of the policy file, signed by the owner wallet. Tier B opens positions only while it matches; reduce-only closes are not pin-gated.

3rug4D6Wuf…oC6r on Solscan ↗
Owner signed

DelegateTrader · Phoenix

Makes the agent key a position authority: it can trade the account, it cannot withdraw, deposit or re-delegate.

5UJx73AWHD…wLZvn on Solscan ↗
Agent key signed

Claude Code opens SOL $20 @5×

After Reins refused $40 at 10×. Phoenix put liquidation 18.74 % away; Reins read that back after the fill.

4iu71krEX4…Raem on Solscan ↗
Agent key signed

Claude Code closes it

close_position: a reduce-only sell of all 34 lots; the margin went back to the main account.

4X4fmbUruq…zemZ on Solscan ↗
14 more

SOL, BTC, ETH round trips

Seven open-and-close round trips, $20–25 at 2–3×, and the refusals around them, each with its Solscan link and Phoenix's liquidation price.

DEMO.md ↗

Reproduce the real path: live Phoenix mainnet data, keyless


The product, live

# Node 22. Reads Phoenix's public API; no key, no account.
$ git clone https://github.com/edycutjong/reins
$ cd reins && npm install
$ node src/cli.mjs demo-order   # holds right now
$ node src/cli.mjs plan SOL long 500 --lev 10
# exit 0 cleared · 2 refused · 3 Phoenix unreachable

# as an MCP server for Claude Code
$ claude mcp add reins -e REINS_POLICY=$HOME/.reins/policy.json \
    -- node "$PWD/src/cli.mjs" mcp

CI · deterministic replay

# Frozen Phoenix responses, for repeatable checks only.
# Not the product: the product is the live path on the left.
$ npm test             # 179 passed, 2 gated
$ npm run eval         # 11/11 on captured states
$ REINS_LIVE=1 npm test  # adds the live flow

Honest limits the ones that matter most; the full list is in the README


Links


Built for the Solana Perps & Prediction Markets hackathon, Dec 2026. Reins is free; Phoenix charges its normal taker fee. MIT licensed.