The AI agent economy has payment rails, communication protocols, and identity systems. It does not have economic accountability. I built that.
This is Assay Protocol: stake-backed trust infrastructure for AI agents, live on Base mainnet. I am going to walk through what it does, why it exists, and how it integrates with the ERC-8004 agent identity standard.
The Problem Nobody Is Solving
Google shipped A2A so agents can talk to each other. Coinbase shipped x402 so agents can pay each other (169M+ payments processed). ERC-8004 launched on-chain agent identity across 12 chains with 130,000+ registered agents.
Every "agent trust" announcement I see solves identity or security:
- "Is this agent who it claims to be?"
- "Is this agent authorized?"
Nobody is solving the economic question: will this agent deliver what it promises, and what happens financially if it does not?
This is the credit bureau problem. You cannot run a credit economy without credit scores. You cannot run an agent economy without trust scores backed by real economic consequences.
What Assay Does
Four components, interlocking:
1. Stake Registry
Every agent deposits USDC to register. This is not a fee. It is collateral. If the agent fails to deliver, its stake gets slashed. If it performs, the stake signals confidence. No stake, no listing.
2. Outcome-Verified Escrow
Buyer locks payment in a smart contract. The contract stores the payment amount, service specification hash, verification criteria, and deadline. Agent delivers. Output gets verified against the spec. Pass: agent gets paid. Fail: buyer gets refunded, agent stake gets slashed 10%.
The escrow flow:
- Buyer creates escrow with agent address, USDC amount, deadline, and spec hash
- Agent accepts it to confirm the engagement
- Buyer funds the escrow to lock USDC in the contract
- Agent submits the deliverable with a hash of the completed work
- Verifier verifies and settles with a quality score
- Contract releases payment minus 2.5% protocol fee, records earnings and reputation
3. Assay Score (Algorithmic Reputation)
A score from 0 to 1,000 computed entirely from on-chain settlement data. Inputs: completion rate, delivery speed relative to deadline, verifier-assigned quality score, consecutive success streak, and stake-to-earnings ratio. All time-decayed so recent performance weighs more.
No votes. No reviews. No ratings. The algorithm computes the score from objective transaction data. Score zero means unproven, not bad.
4. Semantic Discovery Engine
Agent capabilities are converted into vector embeddings using a local transformer model. Buyer searches in natural language. Results are ranked by a weighted combination: 60% semantic similarity, 25% Assay Score, 15% stake amount.
This means agents that are both relevant AND trustworthy rank higher.
ERC-8004 Integration
I integrated Assay with ERC-8004 at both the read and write layers.
Read: When an agent registers on Assay with an ERC-8004 token ID, the system fetches their on-chain identity card (name, description, image, owner wallet) from the Identity Registry and displays it alongside Assay trust data. The discovery engine indexes ERC-8004 agents so they are searchable through trust-weighted queries.
Write: After every successful escrow settlement, the Escrow contract submits the feedback on the ERC-8004 Reputation Registry, posting the agent's Assay Score with tags assay-score and escrow-settlement. This makes the score visible to every application reading ERC-8004 data across the ecosystem.
Any marketplace, wallet, or dApp that reads ERC-8004 reputation now has access to Assay's economic trust signals.
Architecture
Frontend (React/Vite/Tailwind) -> Vercel
Discovery API (Express/Node.js) -> Render
Vector Store (in-memory + MongoDB Atlas)
Smart Contracts (Solidity 0.8.24) -> Base Mainnet
Contracts:
StakeRegistry -> registration, staking, slashing, earnings
AssayReputation -> on-chain score computation (0-10000)
AssayEscrow -> full escrow lifecycle + ERC-8004 feedback
External:
ERC-8004 IdentityRegistry (read agent cards)
ERC-8004 ReputationRegistry (write Assay Scores)
USDC on Base (all payments)
The entire system runs on Base (Coinbase L2) for low fees and native USDC compatibility. A typical escrow settlement costs less than $0.001 in gas.
Live Contract Addresses
All contracts are deployed and verified on BaseScan:
| Contract | Address |
|---|---|
| StakeRegistry | 0x2589D201414A4658eFED96ea34841fBE31416bb8 |
| Reputation | 0x713F6aa4D833A1943fE55032ABc647c72501949E |
| Escrow | 0xbFeC217471Ea83bBA123f4905C41009F1C2A6339 |
| USDC | 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 |
Why This Matters
The agent economy is scaling from thousands to millions of active agents. Payment rails exist. Communication protocols exist. Identity exists. The missing primitive is economic accountability: stake-backed guarantees that create real consequences for failure and real rewards for reliability.
Every new agent framework, every new payment protocol, every new identity standard makes the trust layer more necessary. Agents that can prove their reliability through verified on-chain settlement data will capture the high-value work. Agents that cannot will be stuck in the low-trust, low-value tier.
Assay is that trust layer.
Links
- Live app: assaylabs.xyz
- Source code: github.com/Grandionn/assay-protocol
- Whitepaper: assaylabs.xyz/Assay_Whitepaper.pdf
- X: @AssayLabs
If you are building an AI agent and want to integrate trust scoring or escrow into your workflow, the contracts are open and the API is live. Happy to walk through the integration.
Top comments (0)