VeriFlow
The trust layer for AI agents that pay each other on Concordium. Any x402 seller can copy another agent's name, card and badge and put its own wallet in payTo; the seller cannot tell who is buying; and nobody can prove what was sold wasn't changed afterwards. In a read-only census of the mainnet Agent Registry, about 1 in 4 Active agents (23.5%) could not be paid safely (JUDGES.md). VeriFlow closes all three, as parts any team can install:
- A seller guard any x402 agent can wrap around the client it already has. Before signing, it reads the seller from the Agent Registry and pays only the agent's own on-chain wallet (or, on Base, a key bound to its owner in CIS-8). Run against seven sellers we do not run: MainsMarker (#990) passed and was bought from, Oracle Scout (#1253) passed and was bought from, x402 Doctor (#5120) passed on mainnet, and four were refused, including a seller built to take payment and deliver nothing. See JUDGES.md.
- A seller that checks the buyer: a zero-knowledge eligibility proof re-checked at every payment, and the payer must be the wallet of the agent it names. Packaged for any x402 seller as
concordium-x402-seller: concordiumSeller(server, { eligibility, buyerAgent: "optional" }).
- A contract that enforces the payout: our escrow
veriflow_escrow <13171,0> reads the Agent Registry itself and pays only the agentWallet it recorded at payment, while the registry still names it for an Active agent; unknown, Revoked or wallet-less agents are rejected on-chain (codes −2, −3, −4, CCDScan). Verifiable build (CCDExplorer). One click on the live site runs it, no wallet.
- A record that cannot be rewritten: every call our reference seller sells is committed on-chain before its outcome, one per asset and day.
Ways in, none needing a wallet: npm (concordium-x402-guard, concordium-x402-seller), a GitHub Action on the Marketplace (check a seller in CI, testnet or mainnet; source in packages/guard-action), and the hosted MCP endpoint https://veriflow-yrhp.onrender.com/mcp with check_seller, listed in the official MCP Registry as io.github.jiahaoc040-ai/veriflow. No wallet needed: the live site runs a purchase and an escrow payment in one click each, and npx concordium-x402-guard check <seller-url> runs the buyer's checks against any x402 seller.
The reference seller sells a deliberately simple public rule: a BTC or ETH RISK_ON / RISK_OFF call from Binance's 30-day momentum, for 1 testnet CCD, 1 EUDemo (Concordium's allow-listed test euro, a Protocol-Level Token, paid here), 1 hh-VFUSD (our own PLT test dollar) or 0.01 USDC on Base, over x402. The product is the checks around it.
import { protect, concordiumGuardDeps } from "concordium-x402-guard"; // npm install concordium-x402-guard
const guarded = protect(client, concordiumGuardDeps({ network: "testnet" })); // wraps your existing @x402/fetch client; "mainnet" works too
const { response, verdict } = await guarded.fetch("https://seller.example/x402/thing", { method: "POST", body });
// verdict.checks: badge · Active in CIS-8004 · official badge check · card hash · payTo bound · (optional) delivery record
The package is on npm: https://www.npmjs.com/package/concordium-x402-guard (source in packages/concordium-x402-guard). Or from a terminal, against any seller: cd gateway && npm ci && npm run guard -- check <url> (no wallet), npm run guard -- buy <url> (pays only if every check passes).
Demo video (3 min): https://youtu.be/UO6d-opQ56o
Judges: JUDGES.md is the one-page summary with every on-chain link. Start here: TRY_IT.md. Path A takes about 10 minutes and needs no wallet: check a call that was really bought, against the chain and Binance. Path B takes about 30 minutes: buy one yourself on testnet.
How Identity, the Agent Registry and payments work together
| Question |
Concordium piece |
What happens |
See it on-chain |
What it does not prove |
| Who is paid? |
Agent Registry (CIS-8004 <12802,0>), agent #1313, Verified by Concordium badge |
Before signing, the buyer reads #1313 straight from a Concordium node: Active, the Agent Card hash, the owner, and the payout wallet. It pays only if x402 payTo equals that wallet. The 402 names the agent in a concordium-agent extension, as a pointer only; the wallet always comes from the chain. Any failure means the wallet is never asked to sign. |
Wallet bound by setAgentWallet 8238b866… to 3WSAJwTZ… |
A stock x402 client pays payTo without asking. The badge's identity check itself is Concordium's hosted service, not on-chain data. |
| Who may buy? |
Verify & Access V1 |
The buyer proves age ≥ 18 and residence outside CU, IR, KP, SY and US, without revealing either. The request (VRA) and audit record (VAA) are anchored. At every payment the gateway re-runs the official check on the stored proof. It also requires both anchors to be VeriFlow's own and the credential to still belong to the paying account. Any failure, including a node error, refuses the payment. |
Buyer 4Vf4…: VRA edc30fac…, VAA c40957b4… |
Whether the restricted list is the right one for a given jurisdiction is a legal question. These are testnet identity providers. |
| What was sold, and when? |
Smart contract v2 <13115,0> (Rust, this repo) |
The contract accepts one call per asset and day, and only within the day after that close. Only a committer appointed by the offline owner 4dNM… can commit, and the owner itself cannot. After 7 days anyone can reveal. The contract hashes the text and checks its asset, day, and RISK_ON ⇔ momentum_e6 > 0. |
Committer 4HgaCRwX… appointed by 6e3eb548… |
That a call is right. The rule is public and carries no edge. The record shows calls were made before outcomes and never changed. |
The latest purchase: two agents check each other (2026-11-24).
- The buyer, agent #1478 (badge
JyP9Xd8nPLMb7cZK2y3oq, owner and agentWallet 4Vf4…, bound by setAgentWallet e2487e43…), checked the seller, agent #1313, 5/5 from a Concordium node, including payTo = #1313's on-chain wallet.
- The seller checked the buyer back: it read #1478 from a node before verification and again before settlement, and required it to be Active and the payer to be #1478's
agentWallet.
- The buyer's Verify & Access proof was re-checked, and it paid 1 CCD:
515226b5….
- It received
{"as_of":"2026-11-23","asset":"BTC","momentum_e6":-242523,…,"signal":"RISK_OFF"}, committed before the sale in d9527398… under BTC, 2026-11-23 on <13115,0>.
Paid in USDC on Base, still tied to Concordium identity (2026-11-25). The same signal is also sold for 0.01 USDC on Base Sepolia, and both sides of that payment are bound to Concordium accounts through the CIS-8 External Key Registry <12801,0>:
- The seller's Base address
0xdd31…8746 is registered under #1313's owner 4dNM… (registerExternalKey 64746743…); the buyer's 0xAc02…aCb8 under 4Vf4… (21c76e95…). Each EVM key signed the CIS-8 canonical bytes, which the contract verified on-chain; our bytes were first compared with the official build_cis8_canonical_bytes service.
- Before signing, the buyer ran the same 5 seller checks, with check 5 replaced: it read CIS-8 from a Concordium node and required
payTo to be derived from the key in the 402's extra.cis8, Active, and bound to #1313's owner.
- The seller recovered the payer's public key from the EIP-3009 signature itself (no extra header), read CIS-8 from a node, and mapped the payment to Concordium account
4Vf4…. It then ran the Verify & Access re-check and the #1478 buyer-agent check on that account, and re-read the binding before settlement.
- Paid 0.01 USDC
0xAc02… → 0xdd31…: 0xe48c3357…, settled by the public x402 facilitator. Received the BTC 2026-11-24 call, committed before the sale in af3fc90c….
An EVM key that is not bound, a revoked binding, an authorization for another payee or amount, a Permit2 payment (not implemented) or a smart-wallet signature (its address is not a key's address, so it cannot be a CIS-8 subject), or an authorization signed by someone other than its from is refused before settlement. If the facilitator reports a failure for a transfer that did go through, the gateway reads the Base receipt and delivers only on the exact USDC Transfer. The testnet registry stores keys registered as secp256k1-uncompressed in compressed form; the read-back compares both forms. Code: gateway/src/cis8.ts, gateway/src/evm-payer.ts, gateway/src/settle-recovery.ts.
Next to other agent-identity schemes
Checking who an agent is before paying is not new; where the check sits is what differs. Most schemes sign the request; few tie the payout address to a registered identity, and none of the three below re-checks the buyer's eligibility at the moment of payment with a zero-knowledge proof. (Concordium's own x402 guide also puts an attribute-proof check in the payment flow, at the facilitator; ours runs in the seller's code at every payment.)