#3449·x402

[Feature]: Request commitment for the `default` asset transfer method

Author: javierpmateosCreated Sep 11, 2026Updated Sep 23, 2026
Labelsenhancement

Problem or use case

Following the Cardano TypeScript implementation landing in #2537, I wanted to raise a question about a boundary the spec currently leaves to the resource server. This seems worth clarifying now that a second implementation (cardano-foundation/cardano-x402-facilitator) is being built against the same spec.

scheme_exact_cardano.md leaves the binding between a settled transaction and a single protected operation to the resource server. For default and script, this is keyed by the canonical transaction ID, while masumi uses termsDigest.

For masumi, that binding is backed by a specific mechanism. The reasoning in the spec under "Masumi logical replay" is that transaction-level deduplication alone is not enough: a client can construct several different transactions from the same 402. inputCommitment / input_hash is what ties the payment to the exact job that was requested.

For default, transaction-ID deduplication is the only guard defined by the spec, and it answers a different question. It prevents the same transaction from being settled twice, but none of the verification rules actually bind the transaction to the request.

Rules 1–9 check network, recipient, amount, asset, nonce, phase-1, TTL, min-UTXO and confirmation, but none of them reference the resource. runMethodSpecificChecks for default currently just returns { ok: true }.

That means a transaction created for resource A can also verify against resource B on the same server, as long as the price is the same.

The main concern for me is that this is currently left entirely to the resource server. The spec does not define how that binding should work, so two otherwise conforming servers could reasonably implement it differently — or not implement any additional binding at all.

Context from adjacent rails

The same question came up recently for Lightning (#2861). There, a preimage-based proof validated the signer, amount, network and timeout, but it did not bind the proof to the specific request. As a result, a proof generated for one request could authorize another at the same price.

That issue was resolved by committing the canonicalized request into the invoice's signed BOLT11 description hash ... essentially the same shape as inputCommitment, using RFC 8785 canonicalization and a versioned domain tag, with the server recomputing the digest from the actual request.

Cardano is slightly different because the payment is broadcast by the facilitator as part of the authorization flow rather than being submitted directly by the client, so the threat model is not identical. Still, the underlying question seems to be the same: how do we prove that this payment was actually intended for this specific request?

This is also related to the more general discussion around client-submitted proofs in #3053, where @alftom raised the need for proof that the client is authorized to use the transaction, and @CarsonRoscoe noted that a bare transaction hash "lacks proving that the intent of that payment was for this endpoint."

Proposed solution

The interesting part is that most of the machinery needed for this already exists in the spec.

inputCommitment defines the ordered parts, jcs/raw canonicalization, per-part SHA-256 digests, content echo, and a versioned domain tag (masumi:x402:input:v1).

The main difference is the anchor: for masumi, input_hash lives in the vested pay datum. default currently has no equivalent.

One possible anchor is auxiliaryDataHash. It is already present in the decoded transaction type (currently noted as being kept for parity), and because the auxiliary data hash is part of the transaction body, it is covered by the buyer's signature.

That would give a facilitator a way to verify a commitment purely from the transaction and the requirements, without additional state. That seems consistent with the stateless nature of the existing default verification rules.

extra is also explicitly free-form for default ("may be empty or contain additional metadata"), so there is already a natural place for a defined commitment field without changing the overall shape.

What I don't know

There are a few practical questions here that I don't have an answer for:

  • What is the fee impact of attaching metadata to every payment transaction, and is that reasonable for the micro-payment sizes this scheme targets?
  • Do CIP-30 wallet flows make a caller-supplied auxiliary data payload awkward in practice?
  • Is the minimal nature of default intentional ... i.e. is it supposed to be more of a "bring your own binding" method?

Any of those could be a good reason to leave the current design as-is.

The part that seems worth resolving either way is that the responsibility is currently delegated to the resource server without defining a mechanism, at the same time that a second implementation is being built against the same document.

Happy to help with the spec text, test vectors, or a reference implementation if this is a direction worth exploring.