Skip to content
septagosPublic

About

Pre-flight transaction verification for AI agents — signed SAFE/CAUTION/BLOCK via x402 on Base. Live: https://subcento.alterfield.com

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Subcento

Verify before you sign. Not after.

Pre-flight transaction verification for AI agents — one POST /check in front of every signature. Pay 0.002 USDC on Base with x402, get back a signed verdict (SAFE | CAUTION | BLOCK) with per-layer evidence. No API keys, no signup, no humans in the loop. A machine pays a machine for the one thing an agent should never sign without: an independent second opinion.

Live endpoint: https://subcento.alterfield.com · Listing on x402scan · Machine contract · llms.txt

What runs before your signature

# Layer Question it answers
1 GoPlus Is this address a known drainer / risky contract?
2 OFAC blocklist Is this address sanctioned by the US Treasury? (local copy, refreshed weekly)
3 Jev semantic analysis What does the calldata actually do — and does it match your agent's declared intent? (official TypeSafe AI System One API, version pinned)
4 Deterministic checks Unlimited approvals, honeypot patterns, value sanity — pure code, no model

Every verdict is Ed25519-signed. Don't trust the service? Don't trust us — verify the signature with the key from /health and see exactly what you paid for.

Fail-closed by design

If a trust layer is unreachable, you get BLOCK — never a generous SAFE. Subcento fails in the direction of your funds, not the direction of its uptime.

Quickstart

Discovery is free. Payment is x402 — your agent handles the 402 natively:

curl -X POST https://subcento.alterfield.com/check \
  -H 'content-type: application/json' \
  -d '{"to":"0x…target","calldata":"0x…","value":0,"intent":"swap ETH for USDC"}'
# → HTTP 402 + Payment-Required (x402 v2): 0.002 USDC, Base mainnet, 60s timeout

With the official x402 client, the payment is transparent — same call, paid retry:

# pip install x402
# See client_example.py for the decision-loop pattern (SAFE→sign, CAUTION→escalate, BLOCK→refuse)

Verify a verdict — in 10 lines

import hashlib, json
from nacl.signing import VerifyKey
from nacl.encoding import HexEncoder

v = verdict  # the JSON you got back from /check
FIELDS = ("verdict", "to", "function", "value", "calldata_sha256", "reasons",
          "timestamp", "chain_id", "binding", "evaluation_status",
          "checks_failed", "limits")  # canonical payload v1.3 — verbatim
payload = {k: v[k] for k in FIELDS}
canonical = json.dumps(payload, sort_keys=True, separators=(",", ":"))
digest = hashlib.sha256(canonical.encode()).digest()
VerifyKey(v["verify_key"], HexEncoder).verify(digest, bytes.fromhex(v["signature"]))
# raises on any tampering; passing = this exact verdict — bound to this exact
# calldata via calldata_sha256 (normalized lowercase hex) — left Subcento untouched

Don't trust — verify, offline

Every claim on this page ships as 5 production-signed fixtures plus runnable batteries in doc/verification-kit/: the engine itself, the doctrine tests, an offline verifier that refuses any key not announced out-of-band (/health), and a byte-for-byte regeneration path under your own signing key. One dependency, zero blind trust.

Architecture (the honest one)

  • Edge paywall, not app paywall. Payment gating lives in Caddy via caddy-x402avm (deploy/Caddyfile) — the backend never sees unpaid traffic, and the Python app has zero payment code to audit.
  • Measured latency (Oct 2026, our Frankfurt box): /regime 30–140 ms; /check ~1 s cold, ~0.3 s warm — Jev re-runs every call, GoPlus is the only cached layer. The Jev fan-out (drainer / risk / intent) is one 3-in-1 call, not three, and we'd keep it that way: budget ~1 s per fresh target, not ~10.
  • Signature key never leaves the machine it was born on. Generated once, on the production host, 600 perms. Split custody by design.
  • Run everything yourself: pip install -r requirements.txt && gunicorn subcento_api:app, bring your own TypeSafe key. MIT — fork the checker, keep the verdicts honest.

Why an agent should care

One 0.002 USDC call is the cheapest insurance in agentic commerce: it is smaller than a single wasted signature and larger than nothing when the approval you sign drains your wallet. The lane is littered with pre-sign guards that went dormant — this one ships signed evidence, sanctioned-address screening, and semantic intent analysis, and answers to machines.

Status

Live on Base mainnet · indexed on x402scan · discovery: /, /health, /openapi.json, /llms.txt (all free).

License

MIT — see LICENSE. Contact: subcento@pm.me

About

Pre-flight transaction verification for AI agents — signed SAFE/CAUTION/BLOCK via x402 on Base. Live: https://subcento.alterfield.com

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages