feat: add reputation extension specification#1024
feat: add reputation extension specification#1024tenequm wants to merge 18 commits intocoinbase:mainfrom
reputation extension specification#1024Conversation
🟡 Heimdall Review Status
|
|
@tenequm is attempting to deploy a commit to the Coinbase Team on Vercel. A member of the Team first needs to authorize it. |
- Add Pre-Payment Verification section with multi-chain support - Convert TypeScript examples to pseudocode (matches x402 extension style) - Rename Client Verification to Post-Service Signature Verification - Split Security Considerations into MUST/SHOULD sections - Use unified ERC-8004 compliant interface (getAgentWallet, tokenURI)
|
Updated spec with:
|
|
Nice work @tenequm! My three main pieces of feedback would be:
|
|
@notorious-d-e-v thanks for the feedback. Will make changes based on it. |
|
@notorious-d-e-v Following up before I make the changes - want to make sure I implement what you intended: 1. Backend abstraction → 8004-reputationClear - will rename extension to 2. Optional signingWant to confirm scope here. The spec has agent signatures in two places: a) Agent signs response (PAYMENT-RESPONSE) - proof-of-service-delivery Are you asking to make (a) optional? So:
3. Multi-registry supportConfirmed - Let me know on point 2 and I'll push the updates. |
specs/extensions/8004-reputation.md
Outdated
|
|
||
| **Agents MUST:** | ||
| 1. Complete the service and construct the response | ||
| 2. Compute: `interactionHash = keccak256(UTF8(taskRef) || UTF8(requestBody) || UTF8(responseBody))` |
There was a problem hiding this comment.
What about request/responses with binary data?
|
Thanks a lot for putting this together @tenequm @notorious-d-e-v, overall looks great to me! @notorious-d-e-v proposal stated "Payments and reputation feedback occur on the same chain", this seems implicit in this PR too. It would be great if we could decouple payments from identity, otherwise servers need registrations on every chain they want to accept payments and feedback is fragmented. I'd suggest to allow agents to have identity on one chain (or a select few, ordered by preference) while accepting payments on any chain. The registration file could include a |
|
The 8004 evm contracts have been audited, did the svm implementations went through the same scrutiny? |
|
In general, preferred to finalize specs before discussing implementation details but since you've already started exploring, a few thoughts:
|
Regarding the optional signing preferences. The way I imagined it was
If both parties don't request signatures, then both parties are free to leave feedback if they want to, or not. It seems like the client can trick the server though and not leave signed feedback, even if it promised to. |
Registry addresses (CAIP-10 format) already identify the implementation. Network prefix distinguishes chain type for address comparison logic. Addresses PR feedback from @notorious-d-e-v.
Per PR feedback - keep extension specific to ERC-8004 rather than abstracting "reputation" generically. Addresses PR feedback from @notorious-d-e-v.
- Rename maxAmountRequired to amount in examples - Add payer field to settlementResponse per PR coinbase#1003 convention - Add x402Support and supportedTrust fields to registration file per ERC-8004 spec Addresses PR feedback from @phdargen.
464886b to
44dd33d
Compare
…nvention - Remove settlementResponse wrapper, fields now at top level - Rename txHash to transaction - Rename networkId to network (at top level) Addresses PR feedback from @phdargen.
|
Just pushed several commits addressing the review: Changes
On SVM audit status@phdargen Not formally audited yet - formal audit is on the roadmap. The spec itself is registry-agnostic and works with any ERC-8004 compliant implementation. Remaining questionsWill think through and respond tomorrow on:
Noted on implementation guidance - will keep extension isolated from core packages and use the hooks you mentioned. Appreciate the detailed feedback @phdargen @notorious-d-e-v - want to get these right. |
|
Apologies for the delay - this took longer than expected as I dug deeper into all the involved mechanisms to make sure the approach is consistent. Here's my proposed direction for each remaining question. Want to confirm alignment before pushing changes. Q1: Binary data in request/responsesProposed: Signature computed over raw bytes:
Binary bodies (images, files) used as-is. Text bodies UTF-8 encoded. No special handling needed - keccak256 operates on bytes directly. Q2: Align
|
| Field | Purpose |
|---|---|
taskRef |
CAIP-220 payment reference |
dataHash |
keccak256(request || response) |
agentSignerPublicKey |
Which key signed (for multi-signer agents) |
agentSignature |
Signature over keccak256(taskRef || dataHash) |
agentSignatureAlgorithm |
ed25519 or secp256k1 |
reviewerAddress |
Actual reviewer's address (CAIP-10) |
reviewerSignature |
Proves reviewer authorized this feedback |
reviewerSignatureAlgorithm |
ed25519 or secp256k1 |
Why proofOfParticipation instead of proofOfPayment:
- Payment proof is already in
taskRef(CAIP-220 contains chain + txHash) - What x402 uniquely provides is proof of participation - that the client actually received service, not just that they paid
- The agent signature over
dataHash(request + response content) cryptographically binds feedback to actual service delivery - This is what makes x402 feedback meaningful vs. generic on-chain reviews
Why reviewerAddress + reviewerSignature:
ERC-8004's giveFeedback() hardcodes clientAddress = msg.sender. When aggregator submits on behalf of client, on-chain clientAddress = aggregator address. The real reviewer must be identified and verified in feedbackURI so consumers know who actually left the feedback.
Q3: feedbackAggregator specification scope
Proposed: In scope for v1. Essential for practical adoption.
The problem without aggregator:
- Client must have wallet on agent's identity chain
- Client must have native tokens for gas
- Cross-chain friction: paid on Solana, need ETH on Base for feedback
- Most clients won't bother → less feedback → less useful reputation data
How it works:
- Agent declares
feedbackAggregatorURL in registration file - Client receives PAYMENT-RESPONSE with agent signature
- Client signs their review off-chain (no on-chain interaction)
- Client POSTs to aggregator:
{ paymentResponse, review: { value, reviewerAddress, reviewerSignature } } - Aggregator validates signatures, builds feedbackURI JSON, uploads to IPFS
- Aggregator submits to identity chain's reputation registry, pays gas
- Client gets confirmation
Economic model:
- Agent funds aggregator (deposit, subscription, or per-feedback fee)
- Aggregator submits ALL feedback regardless of sentiment - this is a trust requirement
- Agent benefits from operational reputation system; aggregator is infrastructure
Why facilitators are natural fit:
Facilitators already validate settlements against their records. They have the infrastructure, the trust relationship with agents, and economic alignment. A facilitator-operated aggregator can verify the payment actually happened before accepting feedback submission.
Q4: Bidirectional ratings vs server-only focus
Agreed with @phdargen. Will remove any mention of bidirectional ratings for v1 and focus entirely on server (agent) ratings.
Rationale:
- Server ratings are the primary unlock - clients rating agents builds trust in the autonomous agent ecosystem
- Client ratings are marginal value add at this stage and add protocol complexity
- Client identity in the spec exists for feedback attribution (proving who left the review), not for agents to rate clients back
Bidirectional ratings could be revisited in a future version if agent-to-agent interactions become common and client reputation becomes valuable for prioritization or pricing.
Q5: agentWallet fallback when no signers specified
Proposed: Yes, allow fallback to agentWallet when signers array is empty or missing. Follows ERC-8004 pattern where agentWallet defaults to owner address.
Also proposing to remove role field from signers - it's self-declared and unverifiable. Owner/delegate status should be checked on-chain.
Q6: Cross-chain feedback model
Proposed: Adopt @phdargen's suggestion to decouple identity from payments. Use existing ERC-8004 services pattern:
"services": [
{ "name": "agentWallet", "endpoint": "eip155:8453:0xBaseWallet..." },
{ "name": "agentWallet", "endpoint": "solana:5eykt4...:SolanaWallet..." }
]Why cross-chain decoupling matters:
- Without it: agents need registrations on every chain they accept payments → higher costs, fragmented reputation
- With it: register once on preferred identity chain, accept payments anywhere, unified reputation
Why this aligns with ERC-8004 direction:
- ERC-8004 spec (Line 406): "an agent registered and receiving feedback on chain A can still operate and transact on other chains"
- ERC-8004 Best Practices: "You can also advertise wallets on other chains even if your agent is registered on mainnet"
- Davide Crapis (ERC-8004 author) has noted cross-chain is priority for next version
Why services pattern vs new paymentAddresses array:
Reuses existing ERC-8004 primitive without adding x402-specific fields to the registration schema. The agentWallet service entries already support CAIP-10 format for any chain.
Note: Happy to discuss if you prefer a dedicated paymentAddresses array - the functionality is the same, it's a question of schema preference.
Q7: Optional signing and client commitment
Re: "client can trick the server and not leave signed feedback, even if it promised to"
Proposed: Accept the asymmetry. Following @phdargen's point on removing bidirectional ratings, there's no mechanism for agents to enforce client commitment in v1 anyway - and that's fine.
Why this is acceptable:
- Agent signs every response unconditionally (blind commitment to participation)
- Agent gets paid regardless of whether feedback is submitted
- Missing feedback = neutral outcome for agent, not a loss
- Real-world parallel: customers aren't obligated to leave reviews, businesses can't punish non-reviewers
The asymmetry exists but doesn't harm agents. Positive feedback is a bonus (reputation boost), not an entitlement.
Does this direction make sense? Happy to push changes once aligned.
|
Thanks for the follow up @tenequm
or but open to suggestions
|
|
Hi @tenequm @notorious-d-e-v @BranchManager69 @ruhil6789 @MonteCrypto999 and everyone interested in the 8004 extension, we are now having one open issue and 3 PRs around this topic, its getting increasingly difficult to follow the discussion. I'd suggest to please:
Had a look at @BranchManager69's PR #1054 and think it mostly aligns with what @tenequm and I discussed above. @tenequm did you have a chance to check that? While @tenequm PR predominantly covers the server- and client-side extension and @BranchManager69's PR focusses on the facilitator extension, they have significant overlap and imo working on 2 separate extension specs doesn't make sense. Could we please consolidate into this PR? A merged spec should clearly separate:
|
|
@phdargen thanks for the update. Aligning on a single issue makes sense. |
|
@phdargen Thanks for the detailed feedback - great to have alignment on most points. On your refinements: Q3 (feedbackAggregator): Agreed - the interface should be general, not assume facilitator. Will update the spec to make fallback to direct submission explicit when no aggregator is specified, and add client opt-out for direct submission preference. Q6 (cross-chain payments): I like the On consolidation: Strongly support consolidating into this PR. Happy to incorporate the facilitator extension section (settlement attestation as optional layer). Re: #1054 - I reviewed it when it was opened. The Will push the spec changes by end of tomorrow addressing your Q3/Q6 refinements and adding the facilitator extension section. |
|
@phdargen @tenequm - Agreed. We based #1054 on the open questions here, so folding it back in keeps everything in one place. On attestation vs taskRef - taskRef proves a payment exists on-chain. Attestation ties the feedback to a specific facilitator who processed that settlement. This creates accountability: if a facilitator's attestations are consistently tied to malicious feedback, that becomes visible and their reputation suffers. It also gives facilitators a chokepoint to add verification before issuing attestations. Doesn't prevent attacks outright, but makes them attributable and raises the cost. Let me know if anything needs clarification. |
…ck structure - Q1: Two-step hash with dataHash for binary data support - Q2: Restructure feedbackURI with proofOfParticipation object, rename clientAddress/clientSignature to reviewerAddress/reviewerSignature - Q4: Remove bidirectional ratings section, focus on server ratings for v1 - Q5: Remove unverifiable role field from signers, add agentWallet fallback - Q7: No changes needed (existing language already correct)
… on-chain only - Replace networkId (CAIP-2) with agentRegistry (CAIP-10) in InteractionData so clients know exactly which registry contract the agent identity lives on - Do not duplicate clientAddress in feedbackURI -- it is already recorded on-chain as msg.sender; reviewerAddress in proofOfParticipation identifies the actual reviewer when aggregator submits
…to proofOfParticipation
Use agentWallet service entries in CAIP-10 format for cross-chain payment address advertisement, following the pattern established by the official ERC-8004 best practices guide. Update pre-payment verification flow to resolve wallet addresses from services first, with on-chain agentWallet fallback on the identity chain.
Add Aggregator Submission section as the default feedback path. Clients POST interaction data, review, and signature; the aggregator assembles the full feedbackURI, uploads to IPFS, and submits on-chain. Rename existing backend examples to Direct Submission (Fallback).
…04 interfaces Reorganize spec into clearly separated sections per phdargen's request: 1. Server extension (identity declaration, response signing, registration file) 2. Client extension (pre-payment verification, signature verification, feedback) 3. Feedback aggregator API (general-purpose, not facilitator-specific) 4. Facilitator extension (operating a feedback aggregator) Align SATI example with ERC-8004 interfaces (giveFeedback, tag1/tag2, endpoint, feedbackURI) to ensure consistent developer experience across EVM and Solana implementations. Add protocol flow overview, conventions, extension schema, reviewer signature specification, feedbackHash computation, cross-chain payment address verification, and security considerations.
|
@phdargen @notorious-d-e-v @BranchManager69 @ruhil6789 Just pushed a restructure addressing the open review feedback. What changed1. Spec restructured into 4 parts per @phdargen's consolidation request:
2. Additional sections added: protocol flow overview, conventions, extension JSON schema, reviewer signature spec, feedbackHash computation (RFC 8785 JCS), pre-payment Design decisions3. Cross-chain payment addresses: I previously mentioned adopting a 4. Facilitator attestation: The feedbackAggregator protocol from #1054 is fully integrated. I left out 5. Signing model: Agent signs every response unconditionally (blind commitment). Per our Q7 discussion, this accepts the asymmetry that clients may not submit feedback - agents get paid regardless, missing feedback is a neutral outcome. 6. Next steps
|
|
Thanks for the update @tenequm, will try to read through it soon Concerning the hooks, I realized the current implementation of the While the |
|
@tenequm - Thanks for the detailed breakdown on the design decisions. I see the reasoning on facilitatorAttestation - you're right that The gap I was targeting is attribution - not whether something happened, but who can be held responsible when it's abused. Scenario: An attacker spends $1 making 20 micro-payments to Agent X, then submits 20 negative reviews. Each passes all trust checks - valid With facilitator attestation: those 20 reviews are tied to Facilitator F who processed the settlements. If F's attestations consistently correlate with malicious feedback patterns, that becomes visible - F's reputation suffers. F now has incentive to rate-limit suspicious patterns, add verification, or refuse attestation for sketchy behavior. The attestation creates a traceable party which raises the cost of attacks. This is the loop @MonteCrypto999 described - facilitators with 8004 identities whose attestation history is public and auditable. The chain proves payment happened; the attestation proves who vouched for it. Happy to defer to v2 / Validation Registry if that's the cleaner path. Just wanted to clarify the use case - it's about making the trust chain attributable, not adding redundant verification. |
Summary
Adds the
reputationextension specification for x402, enabling cryptographic proof of agent interactions linked to payment transactions.Implements the proposal from #931 with additions:
Key Design
Agents sign responses with their registered identity keys as part of the normal response flow. This provides:
Without agent signatures, clients could send 1000 payment transactions without ever requesting service and submit 1000 fake reviews. Agent signatures ensure feedback represents real interactions.
Implementation Status
Extension implementations in progress, coordinating with @ruhil6789 for EVM and Solana sides.
Backend registries ready:
References
CC: @notorious-d-e-v @ruhil6789