The diagram is drawn at 1600 px: pinch to zoom, or open the full-size PNG.
src/ · three surfaces: MCP stdio, CLI, page APIWrites policy.json.
Its wallet signs the pin and DelegateTrader.
Creates the Tier B files.
Claude Code (recorded) · any MCP stdio client
plan_orderplace_order
markets · policy · journal
read-only
close_position · cancel_all
Tier B: reduce-only close · read resting orders
No tool edits the policy.
No tool returns a key.
I didn't raise the limit. No tool can change it, …
Claude Code, claude-bypass session
reins plan in a terminal
reins.edycu.dev: the keyless page, Tier A
Your limits: zod-strict, fail-closed. sha256 latched at start; an edit refuses every order until restart.
reins pin · reins delegate
Reins builds the transaction; the owner wallet signs it. Run by the human, never the agent.
rules/phoenix.mjs · 21 rules
Same code behind MCP, CLI and page.
marketClosedminLiqDistancePctleverageTierfundingAgainstOne snapshot; every value keeps its endpoint and fetchedAt.
Liquidation: Rise createMarginCalculator, run locally on a hypothetical isolated account.
rule · field · value · limit
same bet at the reopen · less leverage
or another market: a different bet
plan_id: single use, 60 s
the only input place_order takes
plan_id fresh and unused; policy sha256 unchanged. Facts fetched again, every rule run again; a failure is refused, with what fits.
phoenix-mainnet.jsonTIER_B_OK budget covers itfiles missing: would-place · pin or budget fails: refused
~/.reins/journal.jsonl, append-only: every plan, refusal, would-place and receipt is a numbered row.
Phoenix's and the local liquidation agree (or Phoenix's is read back after the fill); allow-listed programs only. The agent key signs; getTransaction re-reads it.
Memo reins-policy:v1:<sha256>tx 3rug4D6W… · :revoke stops every signerDelegateTraderagent key becomes position authority: can trade, cannot withdraw · tx 5UJx73AW…perp-api.phoenix.trade/v1/
view/exchange/statusrunningStateview/exchange/market/{symbol}leverageTiers · isolatedOnly · earningsDatesV2 · open-interest capmarket/{symbol}/next-market-calendar-transition currentState · utcNextTransitionmarket/{symbol}/market-calendarthe session while it is shutfunding/{symbol}/ratesfunding against your sideview/orderbook/{symbol}walked to your sizemarket/{symbol}/mark-pricetrader/state/{authority}Tier B: open exposureLiteSVM with Phoenix's mainnet program binaries: a cleared plan in, fill and Hawkeye liquidation out
Phoenix isolated market orderbuilt unsigned by POST /v1/ix/place-isolated-market-order-enhancedmainnet · 8 opens + 8 closes, re-read