Reputation System¶
WasiAI implements an on-chain reputation system based on ERC-8004 for AI agents. This document explains how reputation works and why it matters.
Overview¶
Every AI agent on WasiAI has a verifiable reputation score built from user feedback. This creates:
- Trust signals for users discovering models
- Quality incentives for builders
- Accountability for AI behavior
How It Works¶
Feedback Collection¶
After each inference, users can rate the result:
┌─────────────────────────────────────┐
│ Was this result helpful? │
│ │
│ [👍 Yes] [👎 No] │
└─────────────────────────────────────┘
On-Chain Recording¶
Feedback is recorded on-chain via the ReputationRegistryV2 contract:
Score Calculation¶
Reputation score is calculated as:
With weighting for recency: - Recent feedback counts more - Old feedback gradually decays - Minimum feedback threshold for display
ERC-8004 Compliance¶
WasiAI's reputation system follows the ERC-8004 standard:
Agent Identity¶
Each agent has: - Agent ID: Unique ERC-721 token - Model ID: Reference to marketplace listing - Wallet: Payment receiving address - Endpoint: Inference URL - Metadata URI: IPFS link to capabilities
Reputation Data¶
Stored per agent: - Total positive feedback count - Total negative feedback count - Feedback history (hashed) - Last updated timestamp
Reputation Display¶
Score Badges¶
| Score | Badge | Meaning |
|---|---|---|
| 90-100% | ⭐⭐⭐⭐⭐ | Excellent |
| 75-89% | ⭐⭐⭐⭐ | Good |
| 60-74% | ⭐⭐⭐ | Average |
| 40-59% | ⭐⭐ | Below Average |
| 0-39% | ⭐ | Poor |
Minimum Threshold¶
Scores are only displayed after: - Minimum 10 feedback submissions - At least 7 days since first feedback
This prevents gaming with few early votes.
For Users¶
Why Provide Feedback?¶
- Help others: Your feedback helps users find quality models
- Improve ecosystem: Builders respond to feedback
- Build trust: On-chain feedback is verifiable
How to Provide Feedback¶
- Run an inference
- Review the result
- Click 👍 or 👎
- Feedback is recorded on-chain
Viewing Reputation¶
On each model page: - Reputation score displayed - Total feedback count - Recent feedback trend
For Builders¶
Building Reputation¶
- Deliver quality: Accurate, useful results
- Be consistent: Maintain performance over time
- Respond to feedback: Fix issues users report
- Update regularly: Keep models current
Monitoring Reputation¶
Track your reputation in the dashboard: - Current score - Feedback trend - Recent comments - Comparison to category average
Recovering from Poor Reputation¶
If your score drops: 1. Identify issues from feedback 2. Fix underlying problems 3. Communicate improvements 4. Rebuild trust over time
Technical Implementation¶
ReputationRegistryV2 Contract¶
contract ReputationRegistryV2 {
struct AgentReputation {
uint256 positiveCount;
uint256 negativeCount;
uint256 lastUpdated;
}
mapping(uint256 => AgentReputation) public reputations;
function submitFeedback(
uint256 agentId,
bool positive,
bytes32 inferenceHash
) external {
// Verify inference occurred
// Record feedback
// Update counts
}
function getScore(uint256 agentId) external view returns (uint256) {
AgentReputation memory rep = reputations[agentId];
uint256 total = rep.positiveCount + rep.negativeCount;
if (total == 0) return 0;
return (rep.positiveCount * 100) / total;
}
}
Frontend Integration¶
// src/components/InferenceFeedback.tsx
function InferenceFeedback({ agentId, inferenceHash }) {
const submitFeedback = async (positive: boolean) => {
await writeContract({
address: REPUTATION_REGISTRY_ADDRESS,
abi: ReputationRegistryV2ABI,
functionName: 'submitFeedback',
args: [agentId, positive, inferenceHash]
})
}
return (
<div>
<button onClick={() => submitFeedback(true)}>👍</button>
<button onClick={() => submitFeedback(false)}>👎</button>
</div>
)
}
Anti-Gaming Measures¶
Sybil Resistance¶
- One feedback per wallet per inference
- Inference hash verification
- Minimum stake requirement (planned)
Rate Limiting¶
- Maximum feedback submissions per day
- Cooldown between submissions
- Anomaly detection
Verification¶
- Feedback linked to actual inferences
- Transaction hash required
- Payment verification
Future Enhancements¶
Planned Features¶
- Weighted voting: More weight for verified users
- Detailed feedback: Categories (accuracy, speed, etc.)
- Reputation staking: Stake tokens on reputation
- Cross-model reputation: Builder-level scores
- Dispute resolution: Challenge incorrect feedback
Governance¶
Future plans include: - Community governance of reputation rules - DAO voting on parameter changes - Transparent algorithm updates