{"name":"verify402","version":"1.1.2","mode":"testnet","networks":"Base Sepolia / Solana devnet","description":"Machine-payable truth service. /preflight is the free pre-signing gate: validate an x402 payment request or a chain transaction and get PASS / CAUTION / BLOCK with typed reasons and a short-lived receipt. /verify measures whether a cross-venue arbitrage round trip is profitable; /safety is a pre-trade gate with a quote-based sellability check, not a honeypot proof. All quotes come from Uniswap's canonical QuoterV2 and each venue's own router, never from our own reimplementation of venue mathematics. The MCP server (verify402-mcp) exposes the gate and the five checks as native tools; install at /mcp.","prices":{"preflight":"free","preflight_verify":"free","verify":"$0.05","safety":"$0.10","route":"$0.03","quotecheck":"$0.05","depth":"$0.05"},"usage":{"path":"/usage","price":"free","scope":"this process instance; resets on restart or deploy","note":"Anonymous free-gate call counts. Not a unique-agent count; paid settlements are the identity-backed signal."},"state_persistence":{"scope":"process-local","lostOnRestart":true,"appliesTo":["recovery","/usage"],"warning":"Recovery records and /usage counters are process-local: they live only in this process and are lost on restart or deploy. A previously settled idempotency key may be charged again, and usage counts reset. State is not shared across instances."},"hosting":{"status":"Demo instance runs on a free host: first request after idle can take about a minute; testnet only.","freeTier":true,"coldStartSeconds":60},"payment":{"protocol":"x402","scheme":"exact","facilitator":"api.cdp.coinbase.com","discovery":"cdp-bazaar-eligible","network":"eip155:84532","networkLabel":"Base Sepolia / Solana devnet","acceptsExample":{"scheme":"exact","price":"$0.05","network":"eip155:84532","payTo":"0xAeEF086DD4e436c69d6d0F684b4c9F43392df9cb"}},"chains":[{"chainId":1,"name":"ethereum","tokens":["USDC","WETH","WBTC","DAI","USDT"],"venues":["uni-v3-0.01%","uni-v3-0.05%","uni-v3-0.3%","uni-v3-1%","uniswap-v2","sushiswap"]},{"chainId":8453,"name":"base","tokens":["USDC","WETH","cbBTC","DAI"],"venues":["uni-v3-0.01%","uni-v3-0.05%","uni-v3-0.3%","uni-v3-1%"]},{"chainId":42161,"name":"arbitrum","tokens":["USDC","WETH","WBTC","USDT","ARB"],"venues":["uni-v3-0.01%","uni-v3-0.05%","uni-v3-0.3%","uni-v3-1%","uniswap-v2","sushiswap"]}],"endpoints":[{"method":"POST","path":"/preflight","price":"free","body":{"kind":"payment","payment":{"scheme":"exact","network":"eip155:84532","asset":"0x036CbD53842c5426634e7929541eC2318f3dCF7e","amount":"10000","payTo":"0xAeEF086DD4e436c69d6d0F684b4c9F43392df9cb","resource":"https://vex402.online/verify","maxTimeoutSeconds":60},"from":"0x...","policy":{"maxAmountUsd":0.25,"allowedPayTo":["0x..."]}},"response":{"verdict":"PASS | CAUTION | BLOCK","reasons":"[{ code, severity, message }]","checked":"[what was actually checked]","notChecked":"[what was deliberately not checked]","receipt":"{ spec, id, kind, verdict, intentHash, requestHash, blockNumber, blockHash, issuedAt, expiresAt, signature }"},"use_when":"an agent is about to sign ANY x402 payment request or chain transaction; free and fail-closed"},{"method":"POST","path":"/preflight/verify","price":"free","body":{"receipt":"{...the receipt returned by /preflight...}","intent":"{optional: the normalized intent returned by /preflight}","request":"{optional: the exact request body sent to /preflight}"},"response":{"valid":"boolean","reason":"null | missing_receipt | unknown_spec | missing_signature | bad_signature | missing_intent_hash | missing_request_hash | bad_expiry | expired | invalid_intent | invalid_request | intent_mismatch | request_mismatch","intentBound":"boolean","requestBound":"boolean"},"use_when":"an executor verifies a preflight receipt against its own intent/request before allowing a signature"},{"method":"POST","path":"/verify","price":"$0.05","body":{"chainId":1,"target":"WETH","base":"USDC","size":100000},"response":{"verdict":"edge | no_edge | no_edge_costs_ate_it","gross":"{ human, bps }","net":"{ human, bps }","costs":"{ flashLoanPremiumBps, gasUsd, ... }","evidence":"per-venue quotes for both legs, at the reported block"},"use_when":"an agent is about to execute a specific arbitrage that someone (or something) claims is profitable"},{"method":"POST","path":"/safety","price":"$0.10","body":{"chainId":1,"tokenAddress":"0x95aD61b0a150d79219dCF64E1E6Cc01f0B64C4cE","intendedUsd":500,"offeredPriceUsd":0.00002},"response":{"verdict":"TRUST | CAUTION | AVOID","reasons":["why it is not TRUST"],"notes":["what checked out"],"checked":["contract","market","quote-based sellability","liquidity","price-sanity"],"notChecked":["actual token transfer or sell execution","transfer tax / fee-on-transfer","blacklist / pause / max-tx restrictions","venues not in config"],"evidence":"contract facts, market data, quote-based sellability venues, round-trip cost, price comparison"},"use_when":"an agent is about to BUY a token and needs a quote-based check that it can exit on the configured venues, plus the stated untested restrictions"},{"method":"POST","path":"/route","price":"$0.03","body":{"chainId":1,"tokenIn":"USDC","tokenOut":"WETH","amountIn":"1000000000"},"response":{"best":"{ venue, kind, amountOut(raw) } | null","book":"every configured venue (direct + WETH-routed), best first, one pinned block","unavailable":["venues that could not quote the size"],"checked":["every configured venue","direct and WETH-routed paths"],"notChecked":["aggregators","unconfigured DEX venues","execution","MEV"]},"use_when":"an agent wants the chain's own answer for what a swap should pay, before trusting any counterparty's number"},{"method":"POST","path":"/quotecheck","price":"$0.05","body":{"chainId":1,"tokenIn":"USDC","tokenOut":"WETH","amountIn":"1000000000","quotedOut":"326259300000000000","venueClaimed":"who-gave-you-this"},"response":{"verdict":"fair | overpaying | too_good_to_be_true | unknown","notes":["why"],"evidence":"offered quote, chain best, full venue book, ratio, shortfallBps"},"use_when":"an agent was OFFERED a quote by a broker/aggregator/bot and is about to sign it"},{"method":"POST","path":"/depth","price":"$0.05","body":{"chainId":1,"tokenAddress":"WETH","baseSymbol":"USDC","sizesUsd":[100,1000,10000,100000],"maxRoundTripPct":1},"response":{"capacityUsd":"largest rung with round-trip cost <= maxRoundTripPct","ladder":"per size: impactPct, roundTripCostPct, buyVenue, sellVenue, impliedPriceBase, impliedPriceUsd (deprecated alias for USD-stable bases only)","notes":["the honest caveats, block-pinned"]},"use_when":"an agent is ABOUT TO CHOOSE A SIZE and needs to know what the pool will really give it"}],"unpayable":"A request without payment returns HTTP 402 with instructions in the payment-required header.","chainIdRequired":"Every paid route and every transaction preflight requires an integer chainId. Missing => 400 missing_chain; wrong type => 400 invalid_chain; unsupported => 400 unsupported_chain. There is no silent Ethereum default.","errors":{"bad_request":"400; the caller's input is wrong (specific code: missing_chain, invalid_chain, unsupported_chain, invalid_size, ...)","rate_limited":"429; retry after the advertised window","busy":"429; too many concurrent requests","rpc_unavailable":"503; the chain/provider could not be read; no verdict was issued","rpc_rate_limited":"503; the provider rate-limited us; no verdict was issued","internal_error":"500; no provider detail is returned","requestId":"Every error carries requestId and the same value in the x-request-id header; server logs use it.","settlement":"x402 settlement is cancelled for any response >=400 (the installed @x402/express middleware checks res.statusCode). A 503 means no charge.","payment_unresolved":"503; this ONE operation's settlement outcome cannot be proven. No Retry-After, `retry: same_payment`, reason named. It is not a service-health signal: do not fail over or open a circuit breaker.","operation_in_flight":"409; the same idempotency key is still resolving. Retry the SAME payment after Retry-After."},"readiness":{"path":"/ready","price":"free","check":"RPC eth_chainId must match READY_CHAIN_ID, then latest block read; whole probe capped at 3s","liveness":"/health"},"preflight":{"spec":"verify402/preflight@1","receiptSpec":"verify402/preflight-receipt@1","price":"free","defaultTtlSeconds":90,"limits":{"perMinutePerIp":60,"maxInFlight":8},"intents":["payment","transaction"],"paymentNetworks":"Free preflight validates EVM (1, 42161, 8453, 84532, 11155111) + Solana mainnet/devnet intents; paid public-demo settlement offers Base Sepolia / Solana devnet only.","transactionChains":[1,8453,42161],"verdicts":{"PASS":"every check in `checked` passed at this fresh pinned block","CAUTION":"at least one check needs a decision; read `reasons`","BLOCK":"at least one hard check failed; do not sign"},"blockFreshness":{"cautionAfterSeconds":30,"blockAfterSeconds":120,"noTimestamp":"503, no receipt","note":"EVM only; the response carries block.timestamp and block.ageSeconds"},"binding":"sha256 of the canonical normalized intent and the exact request body, a fresh pinned block where the chain is readable, and an expiry (default 90s, max 300s). requestHash is additive within verify402/preflight-receipt@1; older receipts are signature-valid but unbound and return missing_request_hash when a request is supplied. Receipt-only verification returns intentBound:false and requestBound:false.","failClosed":"if the chain cannot be read, /preflight returns 503 and issues no receipt; an executor should refuse to sign without a verifiable PASS or an explicitly acknowledged CAUTION","receiptSigning":"hmac-sha256 with PREFLIGHT_SECRET","verify":"POST /preflight/verify; supply intent and request, then require intentBound and requestBound","mcpTool":"preflight_gate","doesNotCheck":["recipient reputation","sanctions screening","contract audits","balance-delta simulation","MEV/sandwich protection","payment signature / signed payload","gas price/limit chosen by the signer","raw signed-transaction binding","facilitator settlement","counterparty identity / tool metadata","prompt injection / hidden Unicode in tool output"],"note":"A PASS is not a guarantee or a counterparty audit. It means the listed checks passed at this block; `notChecked` lists what was not examined, including tool metadata and response content."},"mcp":{"package":"verify402-mcp","version":"1.1.2","license":"Apache-2.0","transport":"stdio","install":"https://vex402.online/mcp","freeTool":"preflight_gate","paidTools":["verify_arbitrage","check_token_safety","get_best_route","verify_quote_fairness","get_trade_depth"],"freeOnlyWithoutWallet":true,"note":"Start with no EVM_PRIVATE_KEY to expose only the free gate. Paid tools use a dedicated hot wallet, cap each payment at MAX_PAYMENT_USD, and only pay an allowlisted network/payee. The bridge signs x402 payments only, never a trade."},"recovery":{"header":"x-idempotency-key","behavior":"Send this header on the FIRST call of an operation. If the response is lost after settlement, retrying with the same header returns the SAME verdict within the TTL without requiring payment again. Records are promoted to replayable ONLY after your settlement is confirmed by the facilitator: a failed or pending settlement leaves no free replay (fail-closed).","keyStrength":"Use crypto.randomUUID() or at least 32 URL-safe characters (A-Z, a-z, 0-9, _, -) with at least 16 distinct characters. Weak keys return 400 weak_idempotency_key. Omitting the header keeps normal pay-per-call behavior.","ttlMinutes":10,"maxReplays":3,"maxReplaysNote":"the cap is per operation, bound to the caller's key","identity":"The original idempotency key is the only replay credential. The service does NOT derive a payer identity from x-payment, payment-signature, or authorization.from. The settled record stores the facilitator-confirmed payer as verified_payer for audit only.","noCompanionAlias":"There is no content-hash companion alias. A public content hash would turn a known body into a free read, and a token returned only in the original response cannot help a lost-response retry. The caller's secret key is the only credential that survives.","requestBinding":"The key is bound to the canonical request body; reusing it for a different operation returns 409 recovery_conflict before payment.","afterWindow":"expired verdicts leave a tombstone holding the previous responseHash for 6 hours; a retry re-measures with the paywall re-armed and the response carries recovery.remeasured + previousResponseHash so agents can branch instead of guessing","delegatedSpend":"the caps here are client-side for the signer that constructs the payment; spend through wallets delegated to OTHER agents is outside this contract and governed by the delegating owner's own controls","warn":"The key is the caller's secret: whoever presents it can replay the verdict for free until the TTL/replay cap. Do not log it publicly. A leaked key cannot be revoked; use a new key for the next operation.","doesNotGuarantee":"Recovery is not a durable ledger and does not survive a restart; recovery and usage state are process-local and lost on restart/deploy, so it does not prove payment, refund a failed call, cross instances, or replay after the TTL/cap, and it cannot help if the caller lost the key.","observability":{"durable":false,"unresolved":0,"settling":0,"stuck":0,"stuckTotal":0,"settlingTotal":0,"unattributedSettles":0,"reconcilerFailures":0}},"evidence_bundle":{"spec":"verify402/evidence-bundle@1","included":"evidence_bundle: { requestHash, responseHash, pinnedBlock, mode, createdAt, payment.in }","requestHash":"sha256 of the canonical JSON { route, body } (keys sorted recursively, no whitespace)","responseHash":"sha256 of the canonical JSON of the response body excluding evidence_bundle, recovery, cache, elapsedMs, and operationId","verifier":"use src/recovery.mjs canonicalStable() as reference, or key-sort and stringify with no whitespace, then sha256"},"honesty":["No profit is promised. The measured answer for mainstream pairs is usually no_edge.","If a response says edge, verify before acting; the service reports what it measured, not what it guarantees.","Safety verdicts use a quote-based sellability check (quotes, not transfer execution). Transfer tax, blacklist, pause, and max-tx restrictions are listed in notChecked.","A preflight PASS is not a guarantee: it means the listed checks passed at that block; `notChecked` names what was not examined.","Payment preflight PASS can be structural_only: with no payer from address or no proof, it validates the request shape and says so.","Not financial advice."]}