# We Published Our Own Payout Address in DNS - and the Check Caught a Bug Before the Rule Even Existed

> Source: <https://agentbadge.xyz/blog/arc-c63-payto-proof>
> Published: 2026-11-25 00:00:00+00:00

**Recommendation:** 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.
More in the playbook "Securing agents and AI tools": <https://wpnews.pro/playbooks/agent-security>

# We Published Our Own Payout Address in DNS - and the Check Caught a Bug Before the Rule Even Existed

EPIC-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.

When 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.

## The problem: the person quoting the address is the person who profits from it

*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...`.*

Here 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.

## The flip: prove it out-of-band, where the endpoint cannot reach

`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:

- a DNS TXT record at `_x402-payto.<domain>` (`v=x402payto1; a=0x...; d=2026-11-22; s=0xsignature` ), and/or
- a JSON file at `/.well-known/x402-payto.json` .

*The check runs outside the agent's payment path - the endpoint cannot fake a record it does not own.*

The 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.

## Dogfood first: we published our own before writing the rule

Our 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.

It caught a bug immediately - in our *check*, not our record.

Two 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.

*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.*

We 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.

## What the rule actually checks (three flavors of "no")

*Who controls what the agent sees - to fake the set an attacker must own the domain's DNS, not the endpoint.*

The 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:

- **VERIFIED** - every live-quoted payout address appears in the proof set (`dns` ,`dns_signed` ,`site` levels reported separately).
- **CONFLICT** - the site quotes an address that is provenly absent from the set. This is the "endpoint is paying someone else" case.
- **GAP** - no proof published. Most of the web today; we attach a fix hint.
- **NOT_APPLICABLE / unchecked** - we*could not verify* (resolver failure, probe failed).**Unchecked is not absent.** A flaky DNS day is not evidence of anything.

*Three different "no"s - that last distinction is the one that saves you from crying wolf.*

## Freshness: "a valid old proof" is not "a current proof"

The 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.

So 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.

## Recheck: what happens when an address *leaves* the set

Then 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.

So we built the second half: `diffPaytoReports`, a pure function that takes two scan reports and classifies every member of the proof set:

- `still_verified` /`still_absent` - nothing moved;
- `newly_proven` /`REAPPEARED` - an address joined (or came back);
- `DROPPED` - an address that*was* proven is now gone -**but only on confirmed absence** (a live lookup, resolvers agreeing, not a cache hit);
- `ROTATED` - drop + add in one move, paired both ways;
- `SCOPE_CHANGED` - same payee, different provenance (child→parent record move is not "the same proof");
- `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.
- `CONFLICT` - signature that was valid went invalid.

*The full ontology - state, not action; the scanner holds nothing between runs.*

A `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.

## Production evidence

- **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).
- **Dogfood re-run** :`VERIFIED (dns_signed) on both tiers, both public DoH resolvers agreeing, run-log appended as evidence.`
- **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` .
- **Adoption** : the draft is live on ~3 domains (ours, settlewatch, madebydevx, api.teppi.xyz) and under foundation review.
- **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` .

## Try it

Your 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.

The 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.
