SolMachina

The agent financial firewall · developer docs

Ask before your agent executes.

SolMachina is the financial firewall for Solana & Base agents — the trust & decision layer they call over x402 before moving money. One call returns a decision, a risk score and the evidence — with a signed receipt you can verify offline. Pay per call in USDC. No account, no API key.

EXECUTEREVIEWREJECT+ SMRI 0–100+ signed receipt

1Try it free in 10 seconds

No account, no payment — via any MCP client (npx -y solmachina-x402-mcp, call solmachina_sample) or raw over our remote MCP endpoint:

curl -s -X POST https://api.solmachina.com/mcp -H "content-type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"solmachina_sample","arguments":{"endpoint":"/v1/decision"}}}'

2Make a real decision (paid, USDC over x402)

GET https://api.solmachina.com/v1/decision?mint=<MINT>
  → HTTP 402 (USDC terms) → pay with any x402 client → retry →
  { "decision":"EXECUTE|REVIEW|REJECT", "smri":0-100, "confidence":0-1, "reason":"…", "evidence":{…} }
  + header X-SolMachina-Receipt  (Ed25519, verify offline: npx solmachina-verify)

Agent Financial Firewall — send your policy and get policy.verdict = ALLOW/DENY (fail-closed) plus a signed, time-boxed authorization. Use a named preset or individual rules:

GET /v1/decision?mint=<MINT>&policy=anti-rug        # conservative | bluechip | anti-rug | degen
GET /v1/decision?mint=<MINT>&minSmri=80&denyMintAuthority=true&denyPermanentDelegate=true&denyTransferHook=true&maxTransferFeeBps=100

One verdict composes the full contract-level rug surface — mint/freeze authority, a permanent-delegate backdoor (can move any holder's balance), a transfer-hook (can block your sell), a transfer-fee sell-tax, holder concentration, and exit-liquidity — then returns a Proof-of-Decision authorization (granted + constraints + notAfterUtc) your executor can honor. All of it is covered by the Ed25519 receipt, verifiable offline.

Paying is risk-free — our promise to you:

Never pay for a bad answer

A 5xx, an invalid receipt, or no usable data means no charge — a failed call is never a settled sale.

Never double-charged

Idempotent settlement: retries and replays return the first result — one answer, one charge, ever. The live mode is published at /health, not just claimed here.

Yours to verify & leave

Every answer is signed and checkable offline. No account, no API key, no lock-in — walk away anytime.

3Add it to your agent (one tool)

Drop a decision gate into any framework — LangChain, Vercel AI SDK, CrewAI, or the SendAI Solana Agent Kit. Full copy-paste guide: SolMachina × Solana Agent Kit.

SDK — npm i solmachina-sdk. The whole firewall in three lines:

import { SolMachina } from "solmachina-sdk";
const sm = new SolMachina({ payFetch });               // payFetch = any x402 wallet
const { allowed } = await sm.guard({ mint, policy: "conservative" });
if (allowed) await wallet.send(tx);                    // proceed only when allowed

Your first paid decision in 2 minutes: payFetch is any x402-enabled fetch from your wallet — e.g. wrapFetchWithPayment(fetch, signer) from x402-fetch. Fund it with a little USDC on Solana or Base; a real decision costs $0.05. No wallet yet? Evaluate free first over MCP (solmachina_sample) — see the shape, then wire the wallet when you're ready.

Or as a system rule for a tool-calling agent:

// "Before any swap/buy, call solmachina_decision(mint); proceed only on EXECUTE."

Connect the whole toolset remotely (25 tools): MCP https://api.solmachina.com/mcp · registry io.github.imnotamob/solmachina-x402 · npm solmachina-x402-mcp.

4What agents build with SolMachina

SolMachina doesn't tell your agent what to trade — it decides whether the action your agent already chose satisfies its policy, and proves it. A single $0.05 decision can stop a $500–$50,000 action that breaks your rules. Three common gates (real endpoints, total cost per decision):

Autonomous token buyer   scan → validate → simulate → authorize
  token-intel $0.05 + decision $0.05 + dex-quote $0.003 + simulate $0.01     ≈ $0.113 / decision

Treasury / policy guard  every outbound action checked against your policy
  wallet-scan $0.02 + token-risk $0.028 + decision?policy=conservative $0.05  ≈ $0.098 / decision

Memecoin sniper          new pair → risk → holders → exit-liquidity → verdict
  new-pairs $0.005 + token-risk $0.028 + token-holders $0.005 +
  slippage-map $0.005 + decision $0.05                                        ≈ $0.093 / decision

Every answer ships an Ed25519 signed receipt — so after the fact you can prove why the agent was authorized to act. Full catalog + prices: /pricing.

5Why SolMachina (not a raw data feed)

Decisions, not data

EXECUTE/REVIEW/REJECT + SMRI + evidence — the answer your agent actually needs.

Signed receipts

Every paid answer ships an Ed25519 receipt verifiable offline + a transparency log.

Policy firewall

Your ALLOW/DENY rules, fail-closed — named presets or your own thresholds.

Trust-first

Cites every source, says unknown over guessing. Verdict-free. Not financial advice.

EndpointWhat it answers
/v1/decisionExecute this or not? (flagship) + SMRI + firewall
/v1/pretradeOne-call pre-trade sweep: risk + holders + liquidity + fees
/v1/token-risk · /v1/token-holdersMint/freeze authority, Token-2022 flags, whale map
/v1/dex-quote · /v1/slippage-mapBest route, price impact, slippage-by-size
/v1/wallet-scanCounterparty wallet profile

Full catalog + prices: /pricing · machine catalog: /.well-known/x402 · schema: /openapi.json.

api.solmachina.comx402 v2 · Solana + Base · USDCno account · no API keysigned receipts (SIR)