{"slug": "we-published-our-own-payout-address-in-dns-and-the-check-caught-a-bug-before-the", "title": "We Published Our Own Payout Address in DNS - and the Check Caught a Bug Before the Rule Even Existed", "summary": "AgentBadge published a signed x402 payout proof for its own domain agentbadge.xyz on 2026-11-22 — a DNS TXT record at _x402-payto plus a /.well-known/x402-payto.json file — and the verification check caught a real parsing bug before the draft spec x402payto1, authored by Ben McAlilly and under review in x402-foundation/x402#4320, required the fix. The bug: dns.google returns DNS-over-HTTPS TXT data bare while cloudflare-dns wraps it in RFC-1035 quotes, so a strict parser read one honest record as two and failed a 'both resolvers must agree' check; the spec now requires verifiers to normalize quoted and bare DoH TXT data. The checkers AB-188/189 report VERIFIED/CONFLICT/GAP/UNCHECKED, and a stateless recheck ontology classifies DROPPED/ROTATED/SCOPE_CHANGED/REAPPEARED, with SERVFAIL never treated as a revocation.", "body_md": "# We Published Our Own Payout Address in DNS - and the Check Caught a Bug Before the Rule Even Existed\n\nEPIC-258 x402 payout proofs, live on agentbadge.xyz: a signed out-of-band proof set (DNS TXT at _x402-payto + /.well-known/x402-payto.json) that the seller endpoint cannot touch, dogfooded on our own domain before the rule existed - where it caught a real DoH parsing bug. Checkers AB-188/189 report VERIFIED/CONFLICT/GAP/UNCHECKED (unchecked is not absent), freshness fields stamp when we saw each quote, and a stateless recheck ontology classifies DROPPED/ROTATED/SCOPE_CHANGED/REAPPEARED - where SERVFAIL is never a revocation.\n\nWhen an AI agent pays an API with crypto, the address it pays comes from the seller - the one party that profits from lying. A draft spec called x402payto1 flips this: the business publishes its payout addresses out-of-band, signed, where the seller endpoint cannot touch them. We dogfooded it on our own domain before writing a single rule - and our own check caught a real parsing bug in the way public DNS resolvers answer TXT queries. Then three strangers on LinkedIn independently pushed the same question: what happens when an address leaves the proof set? So we built that too.\n\n## The problem: the person quoting the address is the person who profits from it\n\n*For a junior: x402 is the protocol where an API answers `402 Payment Required` - \"pay this much crypto to this address, come back with a receipt, get your answer.\" Our scanner asks a site for its payment quote and sees `payTo: 0x...`.*\n\nHere is the uncomfortable part. **Everything in that quote is self-reported by the seller.** A compromised endpoint - or a dishonest one - can answer with *any* address. The agent signs, the crypto moves, no chargeback. Checking the endpoint's reputation does not help: the endpoint can be honest today and hijacked tomorrow.\n\n## The flip: prove it out-of-band, where the endpoint cannot reach\n\n`x402payto1` is a draft spec (under review in [x402-foundation/x402#4320](https://github.com/x402-foundation/x402/issues/4320), authored by [Ben McAlilly](https://github.com/benmcalillycreative)) with a simple shape: the business - the domain owner - publishes a signed list of its payout addresses in places the endpoint does not control:\n\n- a DNS TXT record at `_x402-payto.<domain>` (`v=x402payto1; a=0x...; d=2026-11-22; s=0xsignature` ), and/or\n- a JSON file at `/.well-known/x402-payto.json` .\n\n*The check runs outside the agent's payment path - the endpoint cannot fake a record it does not own.*\n\nThe check then runs **outside the agent's payment path**: do the addresses the live 402 challenge quotes actually appear in the proof set the domain published? The endpoint cannot fake a DNS record it does not own, and it cannot edit a well-known file served from the domain itself.\n\n## Dogfood first: we published our own before writing the rule\n\nOur convention is dogfood-before-rule: we cannot ask anyone to run a check we have not run on ourselves. So on 2026-11-22 we published a proof for `agentbadge.xyz` - a signed TXT record plus the well-known file - and ran the verification script against ourselves.\n\nIt caught a bug immediately - in our *check*, not our record.\n\nTwo public DNS-over-HTTPS resolvers format TXT answers differently: dns.google returns the `data` field bare, cloudflare-dns returns it wrapped in RFC-1035 quotes. A strict parser reads them as two different records - and a \"both resolvers must agree\" safety check fails on a perfectly honest proof. We found this **on our own domain, before the rule existed** - the kind of bug that would have failed every legitimate deployment and passed every crafted one.\n\n*The machine, end to end - the bug lived in \"normalize TXT\", and per-tier confirmsAbsence means a fetch timeout can never mark a proof DROPPED.*\n\nWe reported it. The spec now requires verifiers to normalize quoted and bare DoH TXT data - credited. A second finding landed the same way: the live `accepts[]` in a 402 challenge are authoritative; the `/.well-known/x402.json` manifest is only a hint. Both are in the draft now.\n\n## What the rule actually checks (three flavors of \"no\")\n\n*Who controls what the agent sees - to fake the set an attacker must own the domain's DNS, not the endpoint.*\n\nThe shipped checkers (AB-188 for x402 quotes, AB-189 for MPP/L402 payment challenges) do not answer \"verified or not.\" They answer one of several very different things:\n\n- **VERIFIED** - every live-quoted payout address appears in the proof set (`dns` ,`dns_signed` ,`site` levels reported separately).\n- **CONFLICT** - the site quotes an address that is provenly absent from the set. This is the \"endpoint is paying someone else\" case.\n- **GAP** - no proof published. Most of the web today; we attach a fix hint.\n- **NOT_APPLICABLE / unchecked** - we*could not verify* (resolver failure, probe failed).**Unchecked is not absent.** A flaky DNS day is not evidence of anything.\n\n*Three different \"no\"s - that last distinction is the one that saves you from crying wolf.*\n\n## Freshness: \"a valid old proof\" is not \"a current proof\"\n\nThe first reply we got after describing this on LinkedIn - from a founder who had independently built the same shape - cut straight to it: the check date matters, and it has to live outside the agent.\n\nSo every evidence row now carries `observed_at` (when *we* saw the quote, per probe, with `probe_id` and `observer` labels), and the report computes `issued_age_days` + a `stale_issued` flag when the proof is older than 30 days - informational, never a downgrade. An old proof still verifies; a stale one is just a stale one. And a proof dated in the future gets flagged, not trusted.\n\n## Recheck: what happens when an address *leaves* the set\n\nThen three different reviewers - independently, within two days - hit the direction everyone misses: rotation. A business rotates a wallet or drops an address; a standing allowlist keeps paying the old one until a human edits it.\n\nSo we built the second half: `diffPaytoReports`, a pure function that takes two scan reports and classifies every member of the proof set:\n\n- `still_verified` /`still_absent` - nothing moved;\n- `newly_proven` /`REAPPEARED` - an address joined (or came back);\n- `DROPPED` - an address that*was* proven is now gone -**but only on confirmed absence** (a live lookup, resolvers agreeing, not a cache hit);\n- `ROTATED` - drop + add in one move, paired both ways;\n- `SCOPE_CHANGED` - same payee, different provenance (child→parent record move is not \"the same proof\");\n- `recheck_unchecked` -**the critical one** : a SERVFAIL or resolver flap is*never* a revocation. Absence ≠ revocation ≠ loss-of-observability - three different events, three different responses.\n- `CONFLICT` - signature that was valid went invalid.\n\n*The full ontology - state, not action; the scanner holds nothing between runs.*\n\nA `DROPPED` transition renders as a medium alert: `0x23dd… was proven 2026-11-20, absent 2026-11-24 — possible rotation or compromise`. The scanner itself stays stateless: history is an *input* (two snapshots), not hidden state.\n\n## Production evidence\n\n- **Self-scan, live** :`agentbadge scan https://agentbadge.xyz` → AB-188**VERIFIED (dns_signed)** - both live accepts (eip155:5042 and eip155:5042002) match the DNS proof, signature valid,`issued_age_days: 2` ,`absence_confirmed: true` . AB-189 VERIFIED on the MPP path; AB-190 VERIFIED (extension declared).\n- **Dogfood re-run** :`VERIFIED (dns_signed) on both tiers, both public DoH resolvers agreeing, run-log appended as evidence.`\n- **Negative matrix** : 30+ e2e scenarios green - mismatch→CONFLICT, malformed→GAP+hint, absent→GAP, resolver disagreement→unchecked, double-probe divergence→possible_per_payment (not a mismatch), SERVFAIL→`recheck_unchecked` never`dropped` .\n- **Adoption** : the draft is live on ~3 domains (ours, settlewatch, madebydevx, api.teppi.xyz) and under foundation review.\n- **Arc Studio audit** : we ran an external adversarial review over the whole proof surface before shipping this. Verdict:**BLOCK** - 2 Critical, 4 High, 14 Medium, every critical/high reproduced in a scratch harness. The best catch: a well-known fetch timeout used to silently mark a site-tier proof`DROPPED` - a false revocation on a flaky day. All reproduced findings were fixed and re-tested (1342 scanner tests + 63 lib tests green); the evaluators you install today are`@agentbadge/x402-payto-proof@0.2.2` .\n\n## Try it\n\nYour own domain is one TXT record plus one offline signature away: publish `v=x402payto1; a=<your payout address>; d=<today>; s=<sig>` at `_x402-payto.<your-domain>` and run `agentbadge scan https://<your-domain>` - AB-188 tells you whether the check would pass. The evaluator is open source as [`@agentbadge/x402-payto-proof`](https://www.npmjs.com/package/@agentbadge/x402-payto-proof) - zero-IO, deterministic, you supply the clock.\n\nThe honest limit: this proves the *published set*, not the seller's honesty. An address can be proven and the endpoint can still lie about price. That is what the counterparty layer ([arc-c58](https://agentbadge.xyz/blog/arc-c58-counterparty-trust)) is for - evidence at both ends, neither trusting the other's word.", "url": "https://wpnews.pro/news/we-published-our-own-payout-address-in-dns-and-the-check-caught-a-bug-before-the", "canonical_source": "https://agentbadge.xyz/blog/arc-c63-payto-proof", "published_at": "2026-11-25 00:00:00+00:00", "updated_at": "2026-11-25 10:14:04.460627+00:00", "lang": "en", "topics": ["ai-agents", "agent-protocols", "ai-safety"], "entities": ["AgentBadge", "agentbadge.xyz", "x402payto1", "Ben McAlilly", "x402 Foundation", "dns.google", "cloudflare-dns"], "also_reported_by": [], "takeaway": "Normalize DNS-over-HTTPS TXT answers before comparing them: dns.google returns the data field bare while cloudflare-dns wraps it in RFC-1035 quotes, so a strict parser treats one honest record as two and fails a 'both resolvers must agree' check.", "recommendation": {"advice": "When verifying out-of-band payout proofs, strip RFC-1035 quotes from DoH TXT data before comparison and treat SERVFAIL or fetch timeouts as UNCHECKED, never as revocation.", "playbook": "agent-security", "playbook_url": "https://wpnews.pro/playbooks/agent-security"}, "alternates": {"html": "https://wpnews.pro/news/we-published-our-own-payout-address-in-dns-and-the-check-caught-a-bug-before-the", "markdown": "https://wpnews.pro/news/we-published-our-own-payout-address-in-dns-and-the-check-caught-a-bug-before-the.md", "text": "https://wpnews.pro/news/we-published-our-own-payout-address-in-dns-and-the-check-caught-a-bug-before-the.txt", "jsonld": "https://wpnews.pro/news/we-published-our-own-payout-address-in-dns-and-the-check-caught-a-bug-before-the.jsonld"}}